From: Martin Mares Date: Sat, 29 Dec 2012 22:36:13 +0000 (+0100) Subject: Gallery2: Renamed /gal2 to /gal X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=807cfec9d967b9262a416da4b11f68832c0e8425;p=gallery.git Gallery2: Renamed /gal2 to /gal --- diff --git a/gal/FORMAT b/gal/FORMAT new file mode 100644 index 0000000..67118ec --- /dev/null +++ b/gal/FORMAT @@ -0,0 +1,34 @@ +List of photos (gallery.list) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +One photo per line, tab-separated columns: + + File name (relative to OrigDir in config) + Identifier (16 hex digits) + Orientation: one of "l", "r", "d", "." + Transformation -- sequence of: + n normalize contrast + s sharpen + h equalize histogram + Title (UTF-8 string) + +Lines starting with "#" are ignored. + + +Photo meta-data (PhotoDir/gallery.meta or CacheDir/cache.meta) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Perl Storable containing a single hash. + +$meta->{photo}->{$identifier} is a hash of: + o orientation + xf transformation applied + w width after scaling + h height after scaling + title photo title + +The rest is present in cache.meta only: + +$meta->{sequence} is an array of photo IDs as they appear in the gallery. + +$meta->{thumb}->{$format}->{$identifier} is a hash of: + w thumbnail width + h thumbnail height diff --git a/gal/Gallery.pm b/gal/Gallery.pm deleted file mode 100644 index b543b45..0000000 --- a/gal/Gallery.pm +++ /dev/null @@ -1,79 +0,0 @@ -# Simple Photo Gallery -# (c) 2003--2005 Martin Mares - -package Gallery; - -use strict; -use warnings; - -BEGIN { - # Standard Perl module stuff - use Exporter(); - our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); - $VERSION = 1.00; - @ISA = qw(Exporter); - @EXPORT = qw(&SetOptions &Start &img &Finish &RawHTML); - %EXPORT_TAGS = (); - @EXPORT_OK = qw(%CF); -} - -our %CF; -our $th; - -BEGIN { - $CF{"Title"} = "An Unnamed Gallery", - $CF{"HeadExtras"} = "", - $CF{"TopExtras"} = "", - $CF{"BotExtras"} = "", - $CF{"ParentURL"} = "../", - $CF{"BackURL"} = "", - $CF{"FwdURL"} = "", - $CF{"ImageSubpages"} = 1, - $CF{"AllowArchives"} = 1, - $CF{"PhotoUrlPrefix"} = "", - $CF{"ThumbUrlPrefix"} = "", - $CF{"MetaDataDir"} = ".", - $CF{"PhotoDir"} = ".", - $CF{"ThumbDir"} = ".", -} - -sub SetOptions(@) { - while (my $o = shift @_) { - my $v = shift @_; - $CF{$o} = $v; - if ($o eq "Theme") { - require $CF{"GalDir"} . "/$v/theme.pm"; - Gallery::Theme::Init($CF{"GalURL"} . "/$v"); - } - } -} - -sub Start() { - if (defined $ENV{"GATEWAY_INTERFACE"}) { - require Gallery::Web; - $th = new Gallery::Web; - } else { - if (@ARGV && $ARGV[0] eq "--generate") { - require Gallery::Generator; - $th = new Gallery::Generator; - } else { - print STDERR "Usage: $0 [--generate]\n"; - exit 1; - } - } - $th->Start(); -} - -sub img($$) { - $th->img(@_); -} - -sub Finish() { - $th->Finish(); -} - -sub RawHTML($) { - $th->RawHTML($_[0]); -} - -1; diff --git a/gal/Gallery/Archive.pm b/gal/Gallery/Archive.pm deleted file mode 100644 index 764e243..0000000 --- a/gal/Gallery/Archive.pm +++ /dev/null @@ -1,45 +0,0 @@ -# Simple Photo Gallery: Web Archiver -# (c) 2005 Martin Mares - -package Gallery::Archive; -import Gallery qw(%CF); - -use IO::Handle; - -sub new($$) { - my ($cls, $type) = @_; - my $x = { 'type' => $type, 'files' => [] }; - return bless $x; -} - -sub Start($) { - my ($this) = @_; - my $type = $this->{'type'}; - my $cts = { "tar" => "application/x-tar", "zip" => "application/zip" }; - defined $cts->{$type} or die "Unknown archive type $type"; - print "Content-Type: ", $cts->{$type}, "\n"; - print "Content-Disposition: inline;filename=gallery.$type\n"; - print "\n"; -} - -sub Finish($) { - my ($this) = @_; - my $type = $this->{'type'}; - STDOUT->flush(); - chdir($CF{"PhotoDir"}) or die; - if ($type eq "tar") { - system("tar", "cf", "-", @{$this->{'files'}}); - } elsif ($type eq "zip") { - system("zip", "-q", "-", @{$this->{'files'}}); - } else { die; } -} - -sub RawHTML($$) { -} - -sub img($$$) { - my ($this, $orig, $annot) = @_; - push @{$this->{'files'}}, $orig; -} - -1; diff --git a/gal/Gallery/Generator.pm b/gal/Gallery/Generator.pm deleted file mode 100644 index c435543..0000000 --- a/gal/Gallery/Generator.pm +++ /dev/null @@ -1,61 +0,0 @@ -# Simple Photo Gallery: Thumbnail Generator -# (c) 2003--2004 Martin Mares - -package Gallery::Generator; - -use strict; -use warnings; - -use Image::Magick; -use IO::Handle; - -BEGIN { import Gallery qw(%CF); } - -sub new() { return bless {}; } - -sub Start($) { - print "Generating thumbnails...\n"; STDOUT->autoflush(1); - my $notes = $CF{'MetaDataDir'} . "/notes"; - open NOTES, ">$notes" or die "Unable to write to notes ($notes): $!"; -} - -sub Finish($) { - close NOTES; - print "Done.\n"; -} - -sub RawHTML($$) { } - -sub img($$$) { - my ($this, $orig, $annot) = @_; - my ($base, $ext) = ($orig =~ /^(.*)\.([^.]+)$/) or die "Unable to dissect name $orig"; - print "$base: "; - my $p = new Image::Magick; - my $e; - my $img = $CF{"PhotoDir"} . "/$orig"; - $e = $p->Read($img) and die "Error reading $img: $e"; - my ($wo, $ho) = $p->Get('width', 'height'); - my ($w, $h) = ($wo, $ho); - print "${w}x${h}"; - $p->Strip; - if ($w > $CF{"ThumbW"}) { - my $s = $CF{"ThumbW"} / $w; - $w = $w * $s; - $h = $h * $s; - } - if ($h > $CF{"ThumbH"}) { - my $s = $CF{"ThumbH"} / $h; - $w = $w * $s; - $h = $h * $s; - } - $w = int($w); - $h = int($h); - print " -> ${w}x${h} "; - $p->Resize(width=>$w, height=>$h); - my $thumb = $CF{"ThumbDir"} . "/$base-thumb.jpg"; - $e = $p->Write($thumb) and die "Unable to write $thumb: $e"; - print NOTES "$base $w $h $wo $ho\n"; - print "OK\n"; -} - -1; diff --git a/gal/Gallery/Web.pm b/gal/Gallery/Web.pm deleted file mode 100644 index 1a1bca2..0000000 --- a/gal/Gallery/Web.pm +++ /dev/null @@ -1,141 +0,0 @@ -# Simple Photo Gallery: Web Interface -# (c) 2003--2005 Martin Mares - -package Gallery::Web; -import Gallery qw(%CF); - -use UCW::CGI; -use UCW::CGI::ErrorHandler; - -my $show_img; -my $send_archive; - -my %args = ( - 'i' => { 'var' => \$show_img, 'check' => '\d+' }, - 'a' => { 'var' => \$send_archive } -); - -sub new() { - UCW::CGI::parse_args(\%args); - if ($send_archive && $CF{'AllowArchives'}) { - require Gallery::Archive; - return new Gallery::Archive($send_archive); - } else { - return bless {}; - } -} - -sub error($) { - print "

Bad luck, the script is broken. Sorry.\n

$_[0]\n"; - print "\n"; -} - -our (@images, %widths, %heights, %widths_orig, %heights_orig, %imgno); - -sub load_notes() { - @images = (""); - %widths = (); - %heights = (); - %imgno = (); - my $notes = $CF{'MetaDataDir'} . "/notes"; - open NOTES, $notes or die "Unable to read notes ($notes): $!"; - while () { - chomp; - my ($n, $w, $h, $wo, $ho) = split /\s+/; - push @images, $n; - $widths{$n} = $w; - $heights{$n} = $h; - $widths_orig{$n} = $wo; - $heights_orig{$n} = $ho; - $imgno{$n} = $#images; - } - close NOTES; -} - -sub show_links($$$) { - my ($prev, $up, $next) = @_; - print "

"; - print ""; - print "Back" if $prev ne ""; - print "\n"; - print ""; - print "Forward" if $next ne ""; - print "\n"; - print "Up\n" if $up ne ""; -} - -sub Start($) { - my $title = UCW::CGI::html_escape($CF{"Title"}); - print < - -$CF{"HeadExtras"} - -$title - -$CF{"TopExtras"} -EOF - $UCW::CGI::ErrorHandler::error_hook = \&error; - load_notes(); - if ($show_img ne "" && $show_img > 0 && $show_img <= $#images) { - show_links(($show_img > 1 ? ("?i=".($show_img-1)) : ""), - "?", - ($show_img < $#images ? ("?i=".($show_img+1)) : "")); - } else { - show_links($CF{'BackURL'}, $CF{'ParentURL'}, $CF{'FwdURL'}); - print "

$CF{'Title'}

\n"; - print "

$CF{'SubTitle'}

\n" if defined $CF{'SubTitle'}; - } -} - -sub Finish($) { - print "$CF{'BotExtras'}\n\n"; -} - -sub RawHTML($$) { - my ($obj, $h) = @_; - print $h if $show_img eq ""; -} - -sub img($$$) { - my ($this, $orig, $annot) = @_; - my ($base, $ext) = ($orig =~ /^(.*)\.([^.]+)$/) or die "Unable to dissect name $orig"; - $annot = UCW::CGI::html_escape($annot); - my $id = $imgno{$base} || 0; - - if ($show_img ne "") { - if ($id == $show_img) { - print "

$annot

\n" if $annot ne ""; - my $img = $CF{'PhotoUrlPrefix'} . $orig; - print "

$orig\n"; - } - return; - } - - my $thumb = $CF{'ThumbUrlPrefix'} . "$base-thumb.jpg"; - my $w = $widths{$base} || 10; - my $h = $heights{$base} || 10; - my $side_w = $CF{"ThumbW"} + 2*$CF{"InteriorMargin"}; - my $side_h = $CF{"ThumbH"} + 2*$CF{"InteriorMargin"}; - my $box_w = $CF{"LeftW"} + $side_w + $CF{"RightW"}; - my $box_h = $CF{"TopH"} + $side_h + $CF{"BotH"}; - print "

\n"; - print "\n"; - print "\n"; - my $ol = $CF{'LeftW'} + $CF{'InteriorMargin'} + int(($CF{'ThumbW'} - $w)/2); - my $ot = $CF{'TopH'} + $CF{'InteriorMargin'} + int(($CF{'ThumbH'} - $h)/2); - my $tit = ($annot ne "") ? " title=\"$annot\"" : ""; - my $url = ($CF{"ImageSubpages"} ? "?i=$id" : $orig); - print "$orig\n"; - print "\n"; - print "\n"; - print "
\n"; -# if ($annot ne "") { -# print "

$annot\n"; -# } - print "

\n\n"; -} - -1; diff --git a/gal/Makefile b/gal/Makefile index 264a0af..c57a4f3 100644 --- a/gal/Makefile +++ b/gal/Makefile @@ -1,6 +1,17 @@ $(eval $(dir-setup)) -$(call lib-copy, Gallery.pm) -$(call lib-copy, $(addprefix Gallery/,Archive.pm Generator.pm Web.pm)) +$(call lib-copy, UCW/Gallery.pm) +$(call lib-copy, $(addprefix UCW/Gallery/, Web.pm Archive.pm)) +$(call lib-copy, $(addprefix UCW/Gallery/Web/, Plain.pm NrtBlue.pm HighSlide.pm)) -$(call copy, $(addprefix nrt-blue/,back.png bot.png left.png next.png prev.png right.png top.png theme.pm style.css)) +$(call copy, $(addprefix nrt-blue/,back.png bot.png left.png next.png prev.png right.png top.png style.css)) +$(call copy, $(addprefix plain/,back.png next.png prev.png style.css)) + +$(call copy, $(addprefix highslide/, highslide-ie6.css highslide.config.js highslide-with-gallery.js highslide.css)) +$(call copy, $(addprefix highslide/graphics/, \ + close.png closeX.png controlbar-black-border.gif controlbar-text-buttons.png controlbar-white-small.gif \ + controlbar-white.gif controlbar2.gif controlbar3.gif controlbar4-hover.gif controlbar4.gif fullexpand.gif \ + geckodimmer.png icon.gif loader.big.black.gif loader.big.white.gif loader.black.gif loader.white.gif \ + resize.gif scrollarrows.png zoom.png zoomin.cur zoomout.cur)) +$(call copy, $(addprefix highslide/graphics/outlines/, \ + beveled.png custom.png drop-shadow.png glossy-dark.png outer-glow.png rounded-black.png rounded-white.png)) diff --git a/gal/UCW/Gallery.pm b/gal/UCW/Gallery.pm new file mode 100644 index 0000000..3912868 --- /dev/null +++ b/gal/UCW/Gallery.pm @@ -0,0 +1,161 @@ +# Simple Photo Gallery +# (c) 2003--2012 Martin Mares + +package UCW::Gallery; + +use strict; +use warnings; + +use Storable; + +### Class methods ### + +sub new($) { + my ($class) = @_; + my $self = { }; + $self->{cfg} = { + # Directories + OrigDir => '.', # Original images + PhotoDir => 'photo', # Scaled-down photos for web + CacheDir => 'cache', # Cache with meta-data and thumbnails + + # URL prefixes + PhotoUrlPrefix => 'photo/', + ThumbUrlPrefix => 'thumb/', + ThemeUrlPrefix => 'gal/', + + # Processing machinery settings + ScanDefaultTransform => 's', + PhotoMaxWidth => 1024, + PhotoMaxHeight => 1024, + ThumbFormats => {}, # Set up by themes + + # Titles and navigation + Title => 'An Unnamed Gallery', + SubTitle => "", + ParentURL => '../', + BackURL => "", + FwdURL => "", + }; + return bless $self, $class; +} + +sub load_config($) { + my $cfg = "./gallery.cf"; + my $self = do $cfg; + unless (defined $self) { + if ($@) { + die "Error parsing $cfg: $@"; + } elsif ($!) { + die "Cannot load $cfg: $!\n"; + } else { + die "Cannot load $cfg, check that it returns true\n"; + } + } + return $self; +} + +### Object methods ### + +sub get($$) { + my ($self, $key) = @_; + if (exists $self->{cfg}->{$key}) { + my $val = $self->{cfg}->{$key}; + defined $val or warn "Gallery: Config item $key is not set\n"; + return $val; + } else { + warn "Gallery: Config item $key does not exist\n"; + return; + } +} + +sub def($@) { + my $self = shift; + while (my $key = shift @_) { + my $val = shift @_; + !exists $self->{cfg}->{$key} or warn "Gallery: Re-definining config item $key\n"; + $self->{cfg}->{$key} = $val; + } +} + +sub set($@) { + my $self = shift; + while (my $key = shift @_) { + my $val = shift @_; + exists $self->{cfg}->{$key} or warn "Gallery: Config item $key does not exist\n"; + $self->{cfg}->{$key} = $val; + } +} + +sub get_config_keys($) { + my ($self) = @_; + return keys %{$self->{cfg}}; +} + +sub require_thumbnails($$$) { + my ($self, $w, $h) = @_; + my $fmt = "${w}x${h}"; + $self->{cfg}->{ThumbFormats}->{$fmt} = 1; + return $fmt; +} + +sub write_list($$$) { + my ($self, $file, $images) = @_; + open my $fh, '>:utf8', "$file.new" or die "Cannot create $file.new: $!\n"; + for my $i (@$images) { + print $fh join("\t", + $i->{file}, + $i->{id}, + $i->{orientation}, + $i->{xfrm}, + ($i->{title} eq '' ? '-' : $i->{title}), + ), "\n"; + } + close $fh; + rename "$file.new", $file or die "Cannot rename $file.new to $file: $!\n"; +} + +sub read_list($$) { + my ($self, $file) = @_; + my @images = (); + open my $fh, '<:utf8', $file or return; + while (<$fh>) { + chomp; + /^$/ and next; + /^#/ and next; + my $i = {}; + ($i->{file}, $i->{id}, $i->{orientation}, $i->{xfrm}, $i->{title}) = split /\t/; + if ($i->{title} eq '-') { $i->{title} = ""; } + push @images, $i; + } + close $fh; + return \@images; +} + +sub write_meta($$) { + my ($self, $file, $meta) = @_; + open my $fh, '>', "$file.new" or die "Cannot create $file.new: $!\n"; + Storable::nstore_fd($meta, $fh); + close $fh; + rename "$file.new", $file or die "Cannot rename $file.new to $file: $!\n"; +} + +sub read_meta($) { + my ($self, $file) = @_; + open my $fh, '<', $file or die "Cannot read $file: $!\n"; + my $meta = Storable::fd_retrieve($fh) or die "Cannot parse $file\n"; + close $fh; + return $meta; +} + +sub photo_meta_name($) { + my ($self) = @_; + return File::Spec->catfile($self->get('PhotoDir'), 'gallery.meta'); +} + +sub cache_meta_name($) { + my ($self) = @_; + return File::Spec->catfile($self->get('CacheDir'), 'cache.meta'); +} + +1; diff --git a/gal/UCW/Gallery/Archive.pm b/gal/UCW/Gallery/Archive.pm new file mode 100644 index 0000000..fb7c40b --- /dev/null +++ b/gal/UCW/Gallery/Archive.pm @@ -0,0 +1,34 @@ +# Simple Photo Gallery: Archiving +# (c) 2003--2012 Martin Mares + +package UCW::Gallery::Archive; + +use strict; +use warnings; + +use Archive::Zip; +use File::Spec; +use UCW::CGI; + +sub send_archive($$) { + my ($gal, $meta) = @_; + + if (!$gal->get('WebAllowArchives')) { + UCW::CGI::http_error('403 Archiving forbidden by server configuration'); + return; + } + + my $zip = Archive::Zip->new; + my $cnt = 0; + for my $id (@{$meta->{sequence}}) { + $zip->addFile(File::Spec->catfile($gal->get('PhotoDir'), "$id.jpg"), sprintf("%03d.jpg", $cnt)) or die; + $cnt++; + } + + print "Content-type: application/zip\n"; + print "Content-Disposition: attachment; filename=gallery.zip\n"; + print "\n"; + $zip->writeToFileHandle(\*STDOUT, 0); +} + +42; diff --git a/gal/UCW/Gallery/Web.pm b/gal/UCW/Gallery/Web.pm new file mode 100644 index 0000000..dbf913a --- /dev/null +++ b/gal/UCW/Gallery/Web.pm @@ -0,0 +1,166 @@ +# Simple Photo Gallery: Web Interface +# (c) 2003--2012 Martin Mares + +package UCW::Gallery::Web; + +use strict; +use warnings; + +use UCW::Gallery; +use UCW::CGI; +use File::Spec; + +my $show_img; +my $want_archive; + +my %args = ( + 'i' => { 'var' => \$show_img, 'check' => '\d+' }, + 'a' => { 'var' => \$want_archive }, +); + +sub error($) { + print "

Bad luck, the script is broken. Sorry.\n

$_[0]\n"; + print "\n"; +} + +sub get($$) { + my ($self, $key) = @_; + return $self->{gal}->get($key); +} + +sub extras($$) { + my ($self, $key) = @_; + my $val = $self->get($key); + if (ref $val eq 'CODE') { + return &$val($self->{gal}); + } else { + return $val; + } +} + +sub html_top($) { + my ($self) = @_; + my $title = UCW::CGI::html_escape($self->get('Title')); + my $hextras = $self->extras('WebHeadExtras'); + my $textras = $self->extras('WebTopExtras'); + my $theme_hextras = $self->theme_head_extras; + print < + +$hextras$theme_hextras$title + +$textras +EOF + $UCW::CGI::ErrorHandler::error_hook = \&error; +} + +sub html_bot($) { + my ($self) = @_; + print $self->extras('WebBotExtras'), "\n"; +} + +sub show_img($) { + my ($self) = @_; + + if ($show_img < 1 || $show_img > $self->{num_photos}) { + UCW::CGI::http_error('404 No such photo'); + return; + } + + my $meta = $self->{meta}; + my $id = $meta->{sequence}->[$show_img-1]; + my $m = $meta->{photo}->{$id} or die; + $self->html_top; + + $self->show_links(($show_img > 1 ? ("?i=".($show_img-1)) : ""), + ".", + ($show_img < $self->{num_photos} ? ("?i=".($show_img+1)) : "")); + + my $t = UCW::CGI::html_escape($m->{title}); + my $w = $m->{w}; + my $h = $m->{h}; + print "

$t

\n" if $t ne ""; + my $img = $self->get('PhotoUrlPrefix') . $id . '.jpg'; + print "

$t\n"; + + $self->html_bot; +} + +sub show_pre_thumbs($) { + my ($self) = @_; +} + +sub show_post_thumbs($) { + my ($self) = @_; +} + +sub show_list($) { + my ($self) = @_; + $self->html_top; + + $self->show_links($self->get('BackURL'), $self->get('ParentURL'), $self->get('FwdURL')); + print "

", $self->get('Title'), "

\n"; + my $subtitle = $self->get('SubTitle'); + print "

$subtitle

\n" if $subtitle ne ""; + $self->show_pre_thumbs; + + my $meta = $self->{meta}; + for my $idx (1..$self->{num_photos}) { + my $id = $meta->{sequence}->[$idx-1]; + my $click_url; + if ($self->get('WebImageSubpages')) { + $click_url = "?i=$idx"; + } else { + $click_url = $self->get('PhotoUrlPrefix') . "$id.jpg"; + } + $self->show_thumb($meta, $id, $click_url); + } + + $self->show_post_thumbs; + $self->html_bot(); +} + +sub dispatch($) { + my ($self) = @_; + binmode STDOUT, ':utf8'; + UCW::CGI::parse_args(\%args); + $self->{meta} = $self->{gal}->read_meta(File::Spec->catfile($self->get('CacheDir'), 'cache.meta')); + $self->{num_photos} = scalar @{$self->{meta}->{sequence}}; + + if ($want_archive) { + require UCW::Gallery::Archive; + UCW::Gallery::Archive::send_archive($self->{gal}, $self->{meta}); + } elsif ($show_img ne "") { + $self->show_img; + } else { + $self->show_list; + } +} + +sub attach($$) { + my ($class, $gal) = @_; + my $self = { gal => $gal }; + $gal->def( + WebFE => $self, + + # Extras are either strings or functions called with the current gallery object as parameter + WebHeadExtras => "", + WebTopExtras => "", + WebBotExtras => "", + + # Used by the theming logic + WebThemeCSS => undef, + + # 1 if thumbnail link to sub-pages with images, 0 if they link directly to image files + WebImageSubpages => 1, + + # If enabled, calling the CGI with a=zip produces a ZIP archive with all photos. + WebAllowArchives => 1, + ); + bless $self, $class; + return $self; +} + +42; diff --git a/gal/UCW/Gallery/Web/HighSlide.pm b/gal/UCW/Gallery/Web/HighSlide.pm new file mode 100644 index 0000000..5cb5f44 --- /dev/null +++ b/gal/UCW/Gallery/Web/HighSlide.pm @@ -0,0 +1,94 @@ +# HighSlide JS Theme for MJ's Photo Gallery +# (c) 2012 Martin Mares ; GPL'ed + +package UCW::Gallery::Web::HighSlide; + +use strict; +use warnings; + +use UCW::Gallery; +use UCW::Gallery::Web; + +our @ISA = qw(UCW::Gallery::Web); + +my $theme_name = "plain"; +my $navw = 48; +my $navh = 48; +my $box_w = 130; +my $box_h = 110; +my $thumb_w = 114; +my $thumb_h = 94; + +sub theme_dir($) { + my ($self) = @_; + return $self->get('ThemeUrlPrefix') . $theme_name; +} + +sub theme_head_extras($) { + my ($self) = @_; + my $tdir = $self->theme_dir; + my $hsdir = $self->get('ThemeUrlPrefix') . "highslide"; + return < + + + + + +AMEN +} + +sub show_links($$$$) { + my ($self, $prev, $up, $next) = @_; + my $theme = $self->theme_dir; + print "

"; + print ""; + print "Back" if $prev ne ""; + print "\n"; + printf ""; + printf "Forward" if $next ne ""; + print "\n"; + printf "Up" if $up ne ""; +} + +sub show_pre_thumbs($) { + my ($self) = @_; + print "\n

\n\n"; +} + +sub show_thumb($) { + my ($self, $meta, $photo_id, $click_url) = @_; + my $theme = $self->theme_dir; + my $m = $meta->{photo}->{$photo_id}; + my $annot = UCW::CGI::html_escape($m->{title}); + my $tf = $self->{thumb_fmt}; + my $tm = $meta->{thumb}->{$tf}->{$photo_id} or die "No thumbnails for format $tf found!\n"; + my $tw = $tm->{w}; + my $th = $tm->{h}; + my $thumb = $self->get('ThumbUrlPrefix') . "$tf/$photo_id.jpg"; + # HighSlide requires title either for all images, or for none + my $tit = " title=\"$annot\""; + my $aid = $self->{hs_thumb_counter}++ ? "" : " id=thumb1"; + my $photo_url = $self->get('PhotoUrlPrefix') . "$photo_id.jpg"; + print "
  • "; + print "Photo\n"; +} + +sub attach($$) { + my ($class, $gal) = @_; + my $self = $class->SUPER::attach($gal); + $self->{thumb_fmt} = $gal->require_thumbnails($thumb_w, $thumb_h); + return $self; +} + +1; diff --git a/gal/UCW/Gallery/Web/NrtBlue.pm b/gal/UCW/Gallery/Web/NrtBlue.pm new file mode 100644 index 0000000..0d327f1 --- /dev/null +++ b/gal/UCW/Gallery/Web/NrtBlue.pm @@ -0,0 +1,83 @@ +# NRT Theme for MJ's Photo Gallery +# (c) 2003--2012 Martin Mares ; GPL'ed +# Theme images taken from the cthumb package (c) Carlos Puchol + +package UCW::Gallery::Web::NrtBlue; + +use strict; +use warnings; + +use UCW::Gallery; +use UCW::Gallery::Web; + +our @ISA = qw(UCW::Gallery::Web); + +my $theme_name = "nrt-blue"; +my $navw = 48; +my $navh = 48; +my $thumb_w = 114; +my $thumb_h = 94; +my $interior_margin = 4; +my $left_w = 14; +my $right_w = 18; +my $top_h = 14; +my $bot_h = 18; + +sub theme_dir($) { + my ($self) = @_; + return $self->get('ThemeUrlPrefix') . $theme_name; +} + +sub theme_head_extras($) { + my ($self) = @_; + my $stylesheet = $self->theme_dir . "/style.css"; + return "\n"; +} + +sub show_links($$$$) { + my ($self, $prev, $up, $next) = @_; + my $theme = $self->theme_dir; + print "

    "; + print ""; + print "Back" if $prev ne ""; + print "\n"; + printf ""; + printf "Forward" if $next ne ""; + print "\n"; + printf "Up" if $up ne ""; +} + +sub show_thumb($) { + my ($self, $meta, $photo_id, $click_url) = @_; + my $theme = $self->theme_dir; + my $m = $meta->{photo}->{$photo_id}; + my $annot = UCW::CGI::html_escape($m->{title}); + my $tf = $self->{thumb_fmt}; + my $tm = $meta->{thumb}->{$tf}->{$photo_id} or die "No thumbnails for format $tf found!\n"; + my $tw = $tm->{w}; + my $th = $tm->{h}; + my $thumb = $self->get('ThumbUrlPrefix') . "$tf/$photo_id.jpg"; + my $side_w = $thumb_w + 2*$interior_margin; + my $side_h = $thumb_h + 2*$interior_margin; + my $box_w = $left_w + $side_w + $right_w; + my $box_h = $top_h + $side_h + $bot_h; + print "

    \n"; + print "\n"; + print "\n"; + my $ol = $left_w + $interior_margin + int(($thumb_w - $tw)/2); + my $ot = $top_h + $interior_margin + int(($thumb_h - $th)/2); + my $tit = ($annot ne "") ? " title=\"$annot\"" : ""; + print "Photo\n"; + print "\n"; + print "\n"; + print "
    \n\n"; +} + +sub attach($$) { + my ($class, $gal) = @_; + my $self = $class->SUPER::attach($gal); + $self->{thumb_fmt} = $gal->require_thumbnails($thumb_w, $thumb_h); + return $self; +} + +1; diff --git a/gal/UCW/Gallery/Web/Plain.pm b/gal/UCW/Gallery/Web/Plain.pm new file mode 100644 index 0000000..885095b --- /dev/null +++ b/gal/UCW/Gallery/Web/Plain.pm @@ -0,0 +1,71 @@ +# Plain Theme for MJ's Photo Gallery +# (c) 2012 Martin Mares ; GPL'ed + +package UCW::Gallery::Web::Plain; + +use strict; +use warnings; + +use UCW::Gallery; +use UCW::Gallery::Web; + +our @ISA = qw(UCW::Gallery::Web); + +my $theme_name = "plain"; +my $navw = 48; +my $navh = 48; +my $box_w = 130; +my $box_h = 110; +my $thumb_w = 114; +my $thumb_h = 94; + +sub theme_dir($) { + my ($self) = @_; + return $self->get('ThemeUrlPrefix') . $theme_name; +} + +sub theme_head_extras($) { + my ($self) = @_; + my $stylesheet = $self->theme_dir . "/style.css"; + return "\n"; +} + +sub show_links($$$$) { + my ($self, $prev, $up, $next) = @_; + my $theme = $self->theme_dir; + print "

    "; + print ""; + print "Back" if $prev ne ""; + print "\n"; + printf ""; + printf "Forward" if $next ne ""; + print "\n"; + printf "Up" if $up ne ""; +} + +sub show_thumb($) { + my ($self, $meta, $photo_id, $click_url) = @_; + my $theme = $self->theme_dir; + my $m = $meta->{photo}->{$photo_id}; + my $annot = UCW::CGI::html_escape($m->{title}); + my $tf = $self->{thumb_fmt}; + my $tm = $meta->{thumb}->{$tf}->{$photo_id} or die "No thumbnails for format $tf found!\n"; + my $tw = $tm->{w}; + my $th = $tm->{h}; + my $thumb = $self->get('ThumbUrlPrefix') . "$tf/$photo_id.jpg"; + print "

    \n"; + my $ol = int(($box_w - $tw)/2); + my $ot = int(($box_h - $th)/2); + my $tit = ($annot ne "") ? " title=\"$annot\"" : ""; + print "Photo\n"; + print "
    \n\n"; +} + +sub attach($$) { + my ($class, $gal) = @_; + my $self = $class->SUPER::attach($gal); + $self->{thumb_fmt} = $gal->require_thumbnails($thumb_w, $thumb_h); + return $self; +} + +1; diff --git a/gal/bin/gal-cache b/gal/bin/gal-cache new file mode 100755 index 0000000..da9a291 --- /dev/null +++ b/gal/bin/gal-cache @@ -0,0 +1,93 @@ +#!/usr/bin/perl +# UCW Gallery: Prepare cache +# (c) 2004--2012 Martin Mares + +use strict; +use warnings; + +use UCW::Gallery; +use Image::Magick; +use IO::Handle; +use File::Spec; +use File::Path; + +STDOUT->autoflush(1); + +my $gal = UCW::Gallery->load_config; + +print "Reading gallery.list\n"; +my $orig_list = $gal->read_list('gallery.list') or die "Cannot read gallery.list: $!\n"; + +my $photo_dir = $gal->get('PhotoDir'); +my $photo_meta = $gal->photo_meta_name; +print "Reading meta-data from $photo_meta\n"; +-f $photo_meta or die "Cannot load $photo_meta\n"; +my $meta = $gal->read_meta($photo_meta); + +my $cache_dir = $gal->get('CacheDir'); +if (-d $cache_dir) { + print "Deleting old cache directory: $cache_dir\n"; + File::Path::remove_tree($cache_dir); +} +print "Creating cache directory: $cache_dir\n"; +File::Path::mkpath($cache_dir) or die "Unable to create $cache_dir: $!\n"; + +# Construct sequence and store photo titles +$meta->{sequence} = []; +for my $f (@$orig_list) { + push @{$meta->{sequence}}, $f->{id}; + my $m = $meta->{photo}->{$f->{id}} or die; + $m->{title} = $f->{title}; +} + +for my $thumb_fmt (keys %{$gal->get('ThumbFormats')}) { + my ($tw, $th) = ($thumb_fmt =~ m{^(\d+)x(\d+)$}) or die "Cannot parse thumbnail format $thumb_fmt\n"; + print "Generating $thumb_fmt thumbnails\n"; + my $thumb_meta = {}; + $meta->{thumb}->{$thumb_fmt} = $thumb_meta; + my $thumb_dir = File::Spec->catfile($cache_dir, $thumb_fmt); + -d $thumb_dir or File::Path::mkpath($thumb_dir) or die "Unable to create $thumb_dir: $!\n"; + + for my $id (@{$meta->{sequence}}) { + my $m = $meta->{photo}->{$id} or die; + print "\t$id: "; + + my $p = new Image::Magick; + my $photo = File::Spec->catfile($photo_dir, "$id.jpg"); + my $e; + $e = $p->Read($photo) and die "Error reading $photo: $e"; + + my $w = $m->{w}; + my $h = $m->{h}; + if ($w > $tw) { + my $s = $tw / $w; + $w = $w * $s; + $h = $h * $s; + } + if ($h > $th) { + my $s = $th / $h; + $w = $w * $s; + $h = $h * $s; + } + $w = int($w + .5); + $h = int($h + .5); + print "${w}x${h} "; + $p->Resize(width=>$w, height=>$h); + + my $out = File::Spec->catfile($thumb_dir, "$id.jpg"); + my $tmp = "$photo.new"; + $e = $p->Write($tmp) and die "Unable to write $tmp: $e"; + rename $tmp, $out or die "Unable to rename $tmp to $out: $!\n"; + + $thumb_meta->{$id} = { + 'w' => $w, + 'h' => $h, + }; + + print "... OK\n"; + } +} + +my $cache_meta = $gal->cache_meta_name; +print "Writing meta-data to $cache_meta\n"; +$gal->write_meta($cache_meta, $meta); diff --git a/gal/bin/gal-dump-config b/gal/bin/gal-dump-config new file mode 100755 index 0000000..600a9d5 --- /dev/null +++ b/gal/bin/gal-dump-config @@ -0,0 +1,17 @@ +#!/usr/bin/perl +# UCW Gallery: Show configuration variables +# (c) 2004--2012 Martin Mares + +use strict; +use warnings; + +use UCW::Gallery; +use Data::Dumper; + +my $gal = UCW::Gallery->load_config(); + +for my $k (sort $gal->get_config_keys) { + my $d = Data::Dumper->new([ $gal->get($k) ]); + $d->Terse(1); + print "$k=", $d->Dump; +} diff --git a/gal/bin/gal-dump-meta b/gal/bin/gal-dump-meta new file mode 100755 index 0000000..1734183 --- /dev/null +++ b/gal/bin/gal-dump-meta @@ -0,0 +1,15 @@ +#!/usr/bin/perl +# UCW Gallery: Dump meta-data +# (c) 2004--2012 Martin Mares + +use strict; +use warnings; + +use UCW::Gallery; +use Data::Dumper; + +@ARGV == 1 or die "Usage: $0 \n"; + +my $gal = UCW::Gallery->load_config; +my $meta = $gal->read_meta($ARGV[0]); +print Dumper($meta); diff --git a/gal/bin/gal-from-gqview b/gal/bin/gal-from-gqview new file mode 100755 index 0000000..138af5a --- /dev/null +++ b/gal/bin/gal-from-gqview @@ -0,0 +1,17 @@ +#!/usr/bin/perl +# UCW Gallery: Extract image list from GQview collection +# (c) 2004--2012 Martin Mares + +use strict; +use warnings; + +while (<>) { + chomp; + /^#/ && next; + /^$/ && next; + if (/^"(.*)"$/) { + print "$1\n"; + } else { + die "Error parsing collection: $_"; + } +} diff --git a/gal/bin/gal-gen b/gal/bin/gal-gen new file mode 100755 index 0000000..ce75896 --- /dev/null +++ b/gal/bin/gal-gen @@ -0,0 +1,132 @@ +#!/usr/bin/perl +# UCW Gallery: Generate published photos +# (c) 2004--2012 Martin Mares + +use strict; +use warnings; + +use UCW::Gallery; +use Image::Magick; +use IO::Handle; +use File::Spec; +use File::Path; + +STDOUT->autoflush(1); + +my $gal = UCW::Gallery->load_config; + +my $orig_list = $gal->read_list('gallery.list') or die "Cannot read gallery.list: $!\n"; + +my $photo_dir = $gal->get('PhotoDir'); +if (-d $photo_dir) { + print "Using existing output directory: $photo_dir\n"; +} else { + print "Creating output directory: $photo_dir\n"; + File::Path::mkpath($photo_dir) or die "Unable to create $photo_dir: $!\n"; +} + +my $photo_meta = $gal->photo_meta_name; +my $old_meta = {}; +if (-f $photo_meta) { + print "Reading old meta-data\n"; + $old_meta = $gal->read_meta($photo_meta); + # use Data::Dumper; print "Read old meta: ", Dumper($old_meta), "\n"; +} +my $meta = { 'photo' => {} }; + +for my $f (@$orig_list) { + my $id = $f->{id}; + my $rotate = $f->{orientation}; + my $xfrm = $f->{xfrm}; + print "$id: "; + + my $p = new Image::Magick; + my $orig = File::Spec->rel2abs($f->{file}, $gal->get('OrigDir')); + my ($orig_w, $orig_h, $orig_size, $orig_format) = $p->PingImage($orig) or die "Error reading $orig\n"; + print "${orig_w}x${orig_h} "; + + my ($w0, $h0) = ($rotate eq "l" || $rotate eq "r") ? ($orig_h, $orig_w) : ($orig_w, $orig_h); + my ($w, $h) = ($w0, $h0); + if ($w > $gal->get('PhotoMaxWidth')) { + my $s = $gal->get('PhotoMaxWidth') / $w; + $w = $w * $s; + $h = $h * $s; + } + if ($h > $gal->get('PhotoMaxHeight')) { + my $s = $gal->get('PhotoMaxHeight') / $h; + $w = $w * $s; + $h = $h * $s; + } + $w = int($w + .5); + $h = int($h + .5); + + my $m = { + 'o' => $rotate, + 'xf' => $xfrm, + 'w' => $w, + 'h' => $h, + }; + $meta->{photo}->{$id} = $m; + + my $om = $old_meta->{photo}->{$id}; + if ($om && + $om->{o} eq $m->{o} && + $om->{xf} eq $m->{xf} && + $om->{w} eq $m->{w} && + $om->{h} eq $m->{h}) { + print "... uptodate\n"; + next; + } + + my $e; + $e = $p->Read($orig) and die "Error reading $orig: $e"; + $p->Strip; + $p->SetAttribute(quality=>90); + + if ($xfrm =~ /s/) { + print "-> sharpen "; + $p->Sharpen(1); + } + if ($xfrm =~ /h/) { + print "-> equalize "; + $p->Equalize(); + } + if ($xfrm =~ /n/) { + print "-> normalize "; + $p->Normalize(); + } + + my $rot = 0; + if ($rotate eq "l") { $rot = 270; } + elsif ($rotate eq "r") { $rot = 90; } + elsif ($rotate eq "u") { $rot = 180; } + if ($rot) { + print "-> rotate $rot "; + $p->Rotate(degrees=>$rot); + } + + if ($w != $w0 || $h != $h0) { + print "-> ${w}x${h} "; + $p->Resize(width=>$w, height=>$h); + } + + my $photo = File::Spec->catfile($photo_dir, $id . ".jpg"); + my $tmp = "$photo.new"; + $e = $p->Write($tmp) and die "Unable to write $tmp: $e"; + rename $tmp, $photo or die "Cannot rename $tmp to $photo: $!\n"; + + print "... OK\n"; +} + +print "Cleaning up stale files\n"; +for my $f (<$photo_dir/*.jpg>) { + my ($vv, $dd, $id) = File::Spec->splitpath($f); + $id =~ s{\..*$}{}; + unless (defined $meta->{photo}->{$id}) { + print "$id: removing\n"; + unlink $f; + } +} + +print "Writing meta-data\n"; +$gal->write_meta($photo_meta, $meta); diff --git a/gal/bin/gal-mj-digikam b/gal/bin/gal-mj-digikam new file mode 100755 index 0000000..e222e5d --- /dev/null +++ b/gal/bin/gal-mj-digikam @@ -0,0 +1,48 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Cwd; +use DBI; + +my $photos_root = $ENV{HOME} . '/photos'; + +my $album = $ARGV[0]; +if (!defined $album) { + my $cwd = getcwd; + $cwd =~ m{/photos/(.*)} or die "Cannot identify album from current directory, need to specify maunally.\n"; + $album = $1; +} + +if (! -f "gallery.cf") { + system 'gal', 'mj-init'; die if $?; +} + +my $dbfile = "$photos_root/digikam4.db"; +my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile", "", "") or die "Cannot access $dbfile\n"; + +my %alba = (); +for my $r (@{$dbh->selectall_arrayref( + 'SELECT a.id AS id, r.label AS label, a.relativePath AS rpath FROM Albums a JOIN AlbumRoots r ON (r.id = a.albumRoot)', + { Slice => {} })}) { + my $name = $r->{label} . $r->{rpath}; + # print "$name\n"; + $alba{$name} = $r->{id}; +} + +my $album_id = $alba{$album} // die "Unknown album $album\n"; +print "## Album $album: id=$album_id\n"; + +my ($tag_id) = $dbh->selectrow_array('SELECT id FROM Tags WHERE pid=0 AND name="web"'); +$tag_id // die "Cannot find web tag\n"; +print "## Tag ID: $tag_id\n"; + +open OUT, '|-', $ENV{GALLERY_ROOT} . '/bin/gal-scan' or die "Cannot feed gal scan\n"; +for my $r (@{$dbh->selectall_arrayref( + 'SELECT i.name AS name FROM Images i JOIN ImageTags t ON (i.id = t.imageid) WHERE i.album=? AND t.tagid=? ORDER BY i.name', + { Slice => {} }, + $album_id, $tag_id)}) { + print OUT "$photos_root/$album/" . $r->{name}, "\n"; +} +close OUT; diff --git a/gal/bin/gal-mj-init b/gal/bin/gal-mj-init new file mode 100755 index 0000000..1105254 --- /dev/null +++ b/gal/bin/gal-mj-init @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +if [ -f gallery.cf ] ; then + echo >&2 'gallery.cf already present, giving up!' + exit 1 +fi + +cat >gallery.cf <<'AMEN' +use strict; +use warnings; +use utf8; + +my $gal = require '../../default.cf'; +$gal->set( + Title => 'Unnamed', +); + +return $gal; +AMEN diff --git a/gal/bin/gal-mj-map b/gal/bin/gal-mj-map new file mode 100755 index 0000000..b9f48d9 --- /dev/null +++ b/gal/bin/gal-mj-map @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Digest::SHA; +use File::Find; + +STDOUT->autoflush(1); + +find({ + wanted => sub { + my $name = $File::Find::name; + $name =~ s{^\./}{}; + $name =~ m{^\d} or return; + $name =~ m{\.jpe?g$}i or return; + -f $name or return; + print "$name\t"; + + my $sha = Digest::SHA->new(1); + $sha->addfile($name) or die "Cannot hash $name\n"; + my $id = substr($sha->hexdigest, 0, 16); + print "$id\n"; + }, + no_chdir => 1, +}, "."); diff --git a/gal/bin/gal-mj-migrate-check b/gal/bin/gal-mj-migrate-check new file mode 100755 index 0000000..5936f32 --- /dev/null +++ b/gal/bin/gal-mj-migrate-check @@ -0,0 +1,35 @@ +#!/usr/bin/perl +# Check that thumbnail aspect ratios match pre-migration data + +use strict; +use warnings; + +use UCW::Gallery; + +my $gal = UCW::Gallery->load_config; +my $meta = $gal->read_meta($gal->cache_meta_name); + +open T, "gallery.thumb" or die "Cannot read gallery.thumb\n"; +my @thumbs = (); +while () { + chomp; + my ($name, $tw, $th) = split /\s+/; + push @thumbs, [ $tw, $th ]; +} +close T; + +for my $id (@{$meta->{sequence}}) { + my ($tw, $th) = @{shift @thumbs} or die; + my $ta = $tw / $th; + my $m = $meta->{photo}->{$id} or die; + my $pw = $m->{w}; + my $ph = $m->{h}; + my $pa = $pw / $ph; + if (abs($ta - $pa) > 0.05) { + if (abs($ta - 1/$pa) > 0.05) { + print STDERR "$id: Mismatched aspect ratio: orig $ta (${tw}x${th}) new $pa (${pw}x${ph})\n"; + } else { + print STDERR "$id: Mismatched rotation\n"; + } + } +} diff --git a/gal/bin/gal-mj-upgrade b/gal/bin/gal-mj-upgrade new file mode 100755 index 0000000..66c260f --- /dev/null +++ b/gal/bin/gal-mj-upgrade @@ -0,0 +1,154 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use UCW::Gallery; +use File::Spec; +use Image::Magick; + +my $photos_root = $ENV{HOME} . '/photos'; + +my $album = $ARGV[0] // die "Usage: gal mj-upgrade \n"; +print "### $album ###\n"; + +### Scan photos.map ### + +my $year = $album; +$year =~ s{/.*}{}; +if ($album eq '2009/Fireworks') { $year = 2008; } +print "Loading map for $year\n"; +open M, "$photos_root/photos.map" or die "No map file found\n"; +my %map = (); +while () { + chomp; + m{^$year} or next; + my ($path, $hash) = split /\t/; + my $name = $path; + $name =~ s{.*/}{}; + if (defined $map{$name}) { + my $prev = $map{$name}; + if ($prev->{hash} ne $hash) { + print STDERR "Collision for $name: ", $prev->{path}, " vs. ", $path, "\n"; + } else { + # print STDERR "Harmless collision for $name: ", $prev->{path}, " vs. ", $path, "\n"; + } + } else { + $map{$name} = { path => $path, hash => $hash }; + } +} +close M; + +### Scan static list (if any) ### + +my @src = (); +if (open S, "../static/photos/$album/x") { + print "Found static list\n"; + while () { + chomp; + my @fields = split /\t/; + if (@fields == 4) { + push @src, { name => $fields[0], rotate => $fields[2], xform => $fields[3] }; + } elsif (@fields == 2) { + push @src, { name => $fields[0], rotate => $fields[1], xform => '.' }; + } else { + die "Error parsing gallery list: $_\n"; + } + } + close S; +} + +### Parse index.cgi and produce gallery.new ### + +open I, "$album/index.cgi" or die "Cannot find $album/index.cgi\n"; +open W, ">$album/gallery.new" or die "Cannot create $album/gallery.new\n"; +open T, ">$album/gallery.thumb" or die "Cannot create $album/gallery.thumb\n"; +my %opt = (); +my %found_dirs = (); +my @items = (); +while () { + chomp; + if (/^\s+"(\w+)" => "(.*)",?$/) { + $opt{$1} = $2; + print "Option: $1 = $2\n"; + } elsif (/^img\("([^"]+)(\.jpe?g)", "([^"]*)"\);\s*# (\S+)/) { + my $nr = $1; + my $ext = $2; + my $title = $3; + my $file = $4; + $file =~ s{^.*/}{}g; + + my $map = $map{$file}; + if (!$map) { + print STDERR "$album: No match for $file\n"; + next; + } + my $path = $map->{path}; + my ($vv, $dd, $ff) = File::Spec->splitpath($path); + $found_dirs{$dd} = 1; + + print "Image: $nr $path [$title]\n"; + my $src; + if (@src) { + if ($nr =~ m{^\d+$} && $nr <= @src) { + $src = $src[$nr-1]; + } else { + print STDERR "$album: Crooked refs ($nr)\n"; + } + } + + print W join("\t", + "$photos_root/$path", + $map->{hash}, + ($src ? $src->{rotate} : '-'), + ($src ? $src->{xform} : '.'), + ($title ne "" ? $title : '-'), + ), "\n"; + + + my $thumb = "../static/photos/$album/$nr-thumb.jpg"; + if (!-f $thumb) { + print STDERR "$album: Cannot find thumbnail for photo $nr ($thumb)\n"; + print T "1 1\n"; + } else { + my $im = new Image::Magick; + my ($thumb_w, $thumb_h, $thumb_size, $thumb_format) = $im->PingImage($thumb) or die "Error reading $thumb\n"; + print T "$thumb $thumb_w $thumb_h\n"; + } + } elsif (/^($|#|require|SetOptions|\)|Start|Finish)/) { + # Nothing important + } else { + print STDERR "$album/index.cgi: Parse error at line $.: $_\n"; + } +} +close T; +close W; +close I; + +if (scalar keys %found_dirs != 1) { + print STDERR "$album: Photos in multiple directories\n"; +} + +### Create gallery.cf ### + +open CF, ">$album/gallery.cf" or die "Cannot create $album/gallery.cf"; +print CF <<'AMEN' ; +use strict; +use warnings; +use utf8; + +my $gal = require '../../default.cf'; +$gal->set( +AMEN + +for my $cf (reverse sort keys %opt) { + print CF "\t$cf => \"", $opt{$cf}, "\",\n"; +} + +print CF <<'AMEN' ; +); + +return $gal; +AMEN + +close CF; diff --git a/gal/bin/gal-mj-upload b/gal/bin/gal-mj-upload new file mode 100755 index 0000000..6fc7cf1 --- /dev/null +++ b/gal/bin/gal-mj-upload @@ -0,0 +1,42 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +print "## Updating Git\n"; +system "git", "pull"; +die if $?; + +print "## Ensuring that photos are generated\n"; +system "gal", "gen"; +die if $?; + +use Cwd; +my $cwd = getcwd; +my ($root, $album) = $cwd =~ m{(.*)/photos/(.*)} or die "Cannot identify album from current directory, giving up.\n"; +my $static = "$root/static/gallery/photo/$album"; +-d $static or die "Cannot find generated photos in $static, giving up.\n"; + +print "## Uploading album $album\n"; +system "rs", "$static/", "jw:www/static/gallery/photo/$album/"; +die if $?; + +print "## Calling editor on index files\n"; +system 'vim', 'gallery.cf', "$root/photos/Makefile", "$root/photos/index.thtml"; +die if $?; + +print "## Committing to repository\n"; +system 'git', 'add', 'gallery.cf', 'gallery.list'; die if #?; +system 'git', 'add', "$root/photos/Makefile", "$root/photos/index.thtml"; die if $?; +system 'git', 'commit'; die if $?; +system 'git', 'push'; die if $?; + +print "## Pulling at the server\n"; +system "ssh", "jw", "cd web && git pull && make"; +die if $?; + +print "## Regenerating cache at the server\n"; +system "ssh", "jw", "cd web/photos/$album && ~/web/gal/gal cache"; +die if $?; + +print "Done.\n"; diff --git a/gal/bin/gal-scan b/gal/bin/gal-scan new file mode 100755 index 0000000..0cdff94 --- /dev/null +++ b/gal/bin/gal-scan @@ -0,0 +1,140 @@ +#!/usr/bin/perl +# UCW Gallery: Scan images and generate image list +# (c) 2004--2012 Martin Mares + +use strict; +use warnings; + +use UCW::Gallery; +use File::Spec; +use Image::EXIF; +use Digest::SHA; +use Getopt::Long; + +if (@ARGV && $ARGV[0] eq '--help') { + die < + or: gal scan --update +AMEN +} + +my $update; +GetOptions( + 'update!' => \$update, +) or die "Try gal scan --help\n"; + +STDOUT->autoflush(1); +my $gal = UCW::Gallery->load_config; +my $orig_prefix = $gal->get('OrigDir'); +$orig_prefix =~ m{/$} or $orig_prefix .= '/'; + +my @source = (); +if ($update) { + print "Loading previous gallery.list\n"; + my $pg = $gal->read_list('gallery.list') or die "Unable to load gallery.list\n"; + @source = @{$pg}; +} elsif (@ARGV) { + for my $in (@ARGV) { + if (-f $in) { + push @source, { file => $in }; + } elsif (-d $in) { + opendir D, $in or die "Cannot scan directory $in: $!\n"; + my @p = (); + while (my $e = readdir D) { + my $f = File::Spec->canonpath(File::Spec->catfile($in, $e)); + if ($f =~ m{\.(jpe?g|png)$}i) { + push @p, $f; + } + } + closedir D; + push @source, map { { file => $_ } } sort @p; + } else { + die "$in is neither file nor directory\n"; + } + } +} else { + while () { + chomp; + push @source, { file => $_ }; + } +} + +print "Scanning photos\n"; +my @images = (); +foreach my $src (@source) { + my $name = $src->{file}; + if ($name =~ m{^/}) { + # Try to relativize to OrigDir + if (substr($name, 0, length $orig_prefix) eq $orig_prefix) { + $src->{file} = $name = substr($name, length $orig_prefix); + } + } + print "\t$name:"; + + my $path = File::Spec->rel2abs($name, $gal->get('OrigDir')); + -f $path or die "Cannot find $path\n"; + + if (!defined $src->{id}) { + my $sha = Digest::SHA->new(1); + $sha->addfile($path) or die "Cannot hash $path\n"; + $src->{id} = substr($sha->hexdigest, 0, 16); + } + print " id=", $src->{id}; + + if (!defined $src->{orientation} || $src->{orientation} eq '-') { + my $e = new Image::EXIF($path); + my $i = $e->get_all_info(); + if ($e->error) { + print "EXIF error: ", $e->error, "\n"; + $src->{orientation} = '.'; + } else { + # print STDERR Dumper($i), "\n"; + my $o = $i->{'image'}->{'Image Orientation'} || "Top, Left-Hand"; + if ($o eq "Top, Left-Hand") { $o = "."; } + elsif ($o eq "Right-Hand, Top") { $o = "r"; } + elsif ($o eq "Left-Hand, Bottom") { $o = "l"; } + elsif ($o eq "Bottom, Right-Hand") { $o = "d"; } + else { + print "Unrecognized orientation: $o\n"; + $o = "."; + } + $src->{orientation} = $o; + } + } + print " ori=", $src->{orientation}; + + defined $src->{xfrm} or $src->{xfrm} = $gal->get('ScanDefaultTransform'); + print " xfrm=", $src->{xfrm}; + + $src->{title} //= ''; + push @images, $src; + print "\n"; +} + +if (!$update) { + my $old = $gal->read_list('gallery.list'); + if ($old) { + print "Updating gallery.list\n"; + my %old_by_id = map { $_->{id} => $_ } @$old; + for my $i (@images) { + my $id = $i->{id}; + my $o = $old_by_id{$id}; + if ($o) { + print "\t$id: updated\n"; + $i->{orientation} = $o->{orientation}; + $i->{xfrm} = $o->{xfrm}; + $i->{title} = $o->{title}; + } else { + print "\t$id: new\n"; + } + delete $old_by_id{$id}; + } + for my $id (keys %old_by_id) { + print "\t$id: removed\n"; + } + } +} + +$gal->write_list('gallery.list', \@images); +print "Written gallery.list (", (scalar @images), " items)\n"; diff --git a/gal/gal b/gal/gal new file mode 100755 index 0000000..f66c682 --- /dev/null +++ b/gal/gal @@ -0,0 +1,107 @@ +#!/usr/bin/perl +# UCW Gallery -- Master Program +# (c) 2012 Martin Mares + +use strict; +use warnings; +use Getopt::Long; + +use FindBin; +my $gallery_root = $FindBin::Bin; + +my $all; +my $threads = 4; + +sub show_help() { + print < + +General options: +--all Run on all galleries in subdirectories +--threads= Run in threads (default=4) + +Common commands: +scan Scan directory and obtain originals +gen Generate web photos from originals +cache Rebuild thumbnails and other cached info + +Other commands: +dump-config Show configuration settings +dump-meta Show contents of metadata files +from-gqview Parse gqview/geeqie collections +AMEN + exit 0; +} + +Getopt::Long::Configure('require_order'); +GetOptions( + "help" => \&show_help, + "version" => sub { + print "UCW Gallery 2.0 (c) 2004-2012 Martin Mares \n"; + }, + "all!" => \$all, + "threads=i" => \$threads, +) or die "Try `gal help' for more information.\n"; +Getopt::Long::Configure('default'); + +@ARGV or die "Missing subcommand.\n"; +my $sub = shift @ARGV; +$sub =~ /^[0-9a-zA-Z-]+$/ or die "Invalid subcommand $sub\n"; + +if ($sub eq 'help') { show_help(); } + +my $sub_path = "$gallery_root/bin/gal-$sub"; +-x $sub_path or die "Unknown subcommand $sub\n"; + +$ENV{"GALLERY_ROOT"} = $gallery_root; +$ENV{"PERL5LIB"} = join(":", $gallery_root, $ENV{"PERL5LIB"} // ()); + +if (!$all) { + exec $sub_path, @ARGV; + die "Cannot execute $sub_path: $!\n"; +} + +### Parallel execution ### + +my @dirs = sort map { chomp; s{^\./}{}; s{\/gallery.cf}{}; $_; } `find . -mindepth 2 -name gallery.cf`; +my $done = 0; +my $need = @dirs; + +my $running = 0; +my $errors = 0; +my %pid_to_dir = (); + +while ($running || @dirs) { + if ($running == $threads || !@dirs) { + # Wait for children + my $pid = wait; die if $pid < 0; + my $dir = $pid_to_dir{$pid} or die; + if ($?) { + print "!! $dir FAILED [see $dir/gallery.log]"; + $errors++; + } else { + print "++ $dir"; + unlink "$dir/gallery.log"; + } + delete $pid_to_dir{$pid}; + $running--; + $done++; + print " (done $done/$need)\n"; + } else { + my $dir = shift @dirs; + print "<< $dir\n"; + my $pid = fork; + if (!$pid) { + close STDOUT; + open STDOUT, '>', "$dir/gallery.log" or die; + chdir $dir or die "Cannot chdir to $dir: $!\n"; + exec $sub_path, @ARGV; + die "Cannot execute $sub_path: $!\n"; + } + $pid_to_dir{$pid} = $dir; + $running++; + } +} + +print "$done jobs, $errors errors.\n"; +exit ($errors > 0); diff --git a/gal/gal-gen b/gal/gal-gen deleted file mode 100755 index af63d4c..0000000 --- a/gal/gal-gen +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/perl -# Generate image gallery -# (c) 2004--2007 Martin Mares - -# Syntax of input file: -# -# where is either ".", "l", "r" or "u" -# contains: -# d touch output file to -# D include in output file names -# n normalize contrast -# s sharpen -# h equalize histogram - -use Image::Magick; -use IO::Handle; - -use strict; -use warnings; - -my $maxw = 1024; -my $maxh = 768; -my $recompress = 1; - -STDERR->autoflush(1); -print STDERR "Searching for template file... "; - -my $tdir = ""; -my $templ; -my $maxdepth = 10; -while ($maxdepth--) { - my $t = "${tdir}gallery.cf"; - if (-f $t) { - $templ = $t; - last; - } - $tdir .= "../"; - last if ! -d $tdir; -} -if ($templ) { - print STDERR "$templ\n"; -} else { - print STDERR "NONE\n"; -} - -print "#!/usr/bin/perl\n\n"; -if ($templ) { - print "require \"$templ\";\n\n"; - print "SetOptions(\n"; -} else { - print < "/~mj/gal", - "GalDir" => "/home/mj/WWW/gal", - "Theme" => "nrt", -EOF -; -} -print < "Untitled" -); -Start(); -EOF -; - -#`rm -f [0-9]*.{jpg,png} *.tmp`; $? && die; - -my $idx = 0; -while () { - chomp; - my ($src, $date, $rotate, $xform) = split (/\t+/, $_); - $idx++; - my $id = sprintf("%03d", $idx); - if ($xform =~ /D/) { - $id = "$date-$id"; - $id =~ s/ /-/g; - } - my $dest; - my $is_jpeg = 0; - if ($src =~ /\.(jpg|JPG|jpeg)$/) { - $dest = "$id.jpg"; - $is_jpeg = 1; - } elsif ($src =~ /\.png$/) { - $dest = "$id.png"; - } else { - die "$src: Unknown image type"; - } - my $tmp = "$dest.tmp"; - print STDERR "$dest: $src "; - - my $p = new Image::Magick; - my $e; - $e = $p->Read($src) and die "Error reading $tmp: $e"; - $p->Strip; - $p->SetAttribute(quality=>90); - my ($w, $h) = $p->Get('width', 'height'); - print STDERR "-> ${w}x${h} "; - - my ($w0, $h0) = ($rotate eq "l" || $rotate eq "r") ? ($h, $w) : ($w, $h); - my ($ww, $hh) = ($w0, $h0); - if ($ww > $maxw) { - my $s = $maxw / $ww; - $ww = $ww * $s; - $hh = $hh * $s; - } - if ($hh > $maxh) { - my $s = $maxh / $hh; - $ww = $ww * $s; - $hh = $hh * $s; - } - $ww = int($ww); - $hh = int($hh); - - if ($recompress || - !$is_jpeg || - $xform ne "" || - $ww != $w0 || $hh != $h0) { - my $rot = 0; - if ($rotate eq "l") { $rot = 270; } - elsif ($rotate eq "r") { $rot = 90; } - elsif ($rotate eq "u") { $rot = 180; } - if ($xform =~ /s/) { - print STDERR "-> sharpen "; - $p->Sharpen(1); - } - if ($xform =~ /h/) { - print STDERR "-> equalize "; - $p->Equalize(); - } - if ($xform =~ /n/) { - print STDERR "-> normalize "; - $p->Normalize(); - } - if ($rot) { - print STDERR "-> rotate $rot "; - $p->Rotate(degrees=>$rot); - $rotate = "."; - } - if ($ww != $w0 || $hh != $h0) { - print STDERR "-> ${ww}x${hh} "; - $p->Resize(width=>$ww, height=>$hh); - } - $e = $p->Write($tmp) and die "Unable to write $tmp: $e"; - } else { - `cp $src $tmp`; $? && die; - } - - if ($is_jpeg) { - my $tran = "-optimize -copy none"; - if ($rotate eq ".") { } - elsif ($rotate eq "l") { $tran .= " -rotate 270 -trim"; } - elsif ($rotate eq "r") { $tran .= " -rotate 90 -trim"; } - elsif ($rotate eq "u") { $tran .= " -rotate 180 -trim"; } - else { die "Unknown rotation type $rotate"; } - print STDERR "-> $tran "; - `jpegtran $tran <$tmp >$dest`; $? && die; - } else { - rename $tmp, $dest or die; - } - - if ($xform =~ /d/) { - `touch -d "$date" $dest`; die if $?; - } - - unlink $tmp; - print STDERR "... OK\n"; - print "img(\"$dest\", \"\");\t\t# $src (${w0}x${h0})\n"; -} - -print "Finish();\n"; - -`rm -f *.tmp`; $? && die; diff --git a/gal/gal-merge b/gal/gal-merge deleted file mode 100755 index 26fc164..0000000 --- a/gal/gal-merge +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl -# Merge photos from multiple sources -# (c) 2008 Martin Mares - -use Image::EXIF; -use Data::Dumper; - -use strict; -use warnings; - -my @pics = (); -if (@ARGV) { - @pics = @ARGV; -} else { - while () { - chomp; - /^#/ && next; - /^$/ && next; - push @pics, $_; - } -} - -my %seen = (); -foreach my $f (@pics) { - my $e = new Image::EXIF($f); - my $i = $e->get_all_info(); - if ($e->error) { print STDERR "EXIF error on $f: ", $e->error, "\n"; } - else { - #print STDERR Dumper($i), "\n"; - my $o = $i->{'image'}->{'Image Orientation'} || "Top, Left-Hand"; - if ($o eq "Top, Left-Hand") { $o = "."; } - elsif ($o eq "Right-Hand, Top") { $o = "r"; } - elsif ($o eq "Left-Hand, Bottom") { $o = "l"; } - elsif ($o eq "Bottom, Right-Hand") { $o = "d"; } - else { - print STDERR "Unrecognized orientation: $o\n"; - $o = "."; - } - my $d = $i->{'image'}->{'Image Created'}; - if (defined($d)) { - $d =~ s/^(\d{4}):(\d{2}):(\d{2}) (\d{2}):(\d{2}):(\d{2})/$1$2$3-$4$5$6/ or die "Date parse error: $d"; - } else { - print STDERR "Unrecognized data, skipping: $f\n"; - next; - } - my $fn = $d; - if ($f =~ m{^\.\./orig/(\w+)/}) { - $fn = "$fn-$1"; - } - if (defined $seen{$fn}) { - my $c = ++$seen{$fn}; - $fn = "$fn-$c"; - } else { - $seen{$fn} = 1; - } - print "ln -s '$f' '$fn.jpg'\n"; - } -} diff --git a/gal/gal-scan b/gal/gal-scan deleted file mode 100755 index db41a0b..0000000 --- a/gal/gal-scan +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl -# Scan images in a list or gqview collection and prepare them for gal-gen -# (c) 2004--2007 Martin Mares - -use Image::EXIF; -use Data::Dumper; - -use strict; -use warnings; - -my @pics = (); -if (@ARGV) { - @pics = @ARGV; -} else { - while () { - chomp; - /^#/ && next; - /^$/ && next; - if (/^"(.*)"$/) { - push @pics, $1; - } else { - die "Parse error: $_"; - } - } -} - -foreach my $f (@pics) { - my $e = new Image::EXIF($f); - my $i = $e->get_all_info(); - if ($e->error) { print STDERR "EXIF error on $f: ", $e->error, "\n"; } - else { - #print STDERR Dumper($i), "\n"; - my $o = $i->{'image'}->{'Image Orientation'} || "Top, Left-Hand"; - if ($o eq "Top, Left-Hand") { $o = "."; } - elsif ($o eq "Right-Hand, Top") { $o = "r"; } - elsif ($o eq "Left-Hand, Bottom") { $o = "l"; } - elsif ($o eq "Bottom, Right-Hand") { $o = "d"; } - else { - print STDERR "Unrecognized orientation: $o\n"; - $o = "."; - } - my $d = $i->{'image'}->{'Image Created'} || "?"; - if ($d ne "?") { - $d =~ s/^(\d{4}):(\d{2}):(\d{2}) (\d{2}:\d{2}:\d{2})/$1-$2-$3 $4/ or die "Date parse error: $d"; - } - print "$f\t$d\t$o\tn\n"; - } -} diff --git a/gal/highslide/easing_equations.js b/gal/highslide/easing_equations.js new file mode 100644 index 0000000..f96a2b1 --- /dev/null +++ b/gal/highslide/easing_equations.js @@ -0,0 +1,282 @@ +/* + Easing Equations v1.5 + May 1, 2003 + (c) 2003 Robert Penner, all rights reserved. + This work is subject to the terms in http://www.robertpenner.com/easing_terms_of_use.html. + + These tweening functions provide different flavors of + math-based motion under a consistent API. + + Types of easing: + + Linear + Quadratic + Cubic + Quartic + Quintic + Sinusoidal + Exponential + Circular + Elastic + Back + Bounce + + Changes: + 1.5 - added bounce easing + 1.4 - added elastic and back easing + 1.3 - tweaked the exponential easing functions to make endpoints exact + 1.2 - inline optimizations (changing t and multiplying in one step)--thanks to Tatsuo Kato for the idea + + Discussed in Chapter 7 of + Robert Penner's Programming Macromedia Flash MX + (including graphs of the easing equations) + + http://www.robertpenner.com/profmx + http://www.amazon.com/exec/obidos/ASIN/0072223561/robertpennerc-20 +*/ + + +// simple linear tweening - no easing +// t: current time, b: beginning value, c: change in value, d: duration +Math.linearTween = function (t, b, c, d) { + return c*t/d + b; +}; + + + ///////////// QUADRATIC EASING: t^2 /////////////////// + +// quadratic easing in - accelerating from zero velocity +// t: current time, b: beginning value, c: change in value, d: duration +// t and d can be in frames or seconds/milliseconds +Math.easeInQuad = function (t, b, c, d) { + return c*(t/=d)*t + b; +}; + +// quadratic easing out - decelerating to zero velocity +Math.easeOutQuad = function (t, b, c, d) { + return -c *(t/=d)*(t-2) + b; +}; + +// quadratic easing in/out - acceleration until halfway, then deceleration +Math.easeInOutQuad = function (t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; +}; + + + ///////////// CUBIC EASING: t^3 /////////////////////// + +// cubic easing in - accelerating from zero velocity +// t: current time, b: beginning value, c: change in value, d: duration +// t and d can be frames or seconds/milliseconds +Math.easeInCubic = function (t, b, c, d) { + return c*(t/=d)*t*t + b; +}; + +// cubic easing out - decelerating to zero velocity +Math.easeOutCubic = function (t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; +}; + +// cubic easing in/out - acceleration until halfway, then deceleration +Math.easeInOutCubic = function (t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; +}; + + + ///////////// QUARTIC EASING: t^4 ///////////////////// + +// quartic easing in - accelerating from zero velocity +// t: current time, b: beginning value, c: change in value, d: duration +// t and d can be frames or seconds/milliseconds +Math.easeInQuart = function (t, b, c, d) { + return c*(t/=d)*t*t*t + b; +}; + +// quartic easing out - decelerating to zero velocity +Math.easeOutQuart = function (t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; +}; + +// quartic easing in/out - acceleration until halfway, then deceleration +Math.easeInOutQuart = function (t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; +}; + + + ///////////// QUINTIC EASING: t^5 //////////////////// + +// quintic easing in - accelerating from zero velocity +// t: current time, b: beginning value, c: change in value, d: duration +// t and d can be frames or seconds/milliseconds +Math.easeInQuint = function (t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; +}; + +// quintic easing out - decelerating to zero velocity +Math.easeOutQuint = function (t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; +}; + +// quintic easing in/out - acceleration until halfway, then deceleration +Math.easeInOutQuint = function (t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; +}; + + + + ///////////// SINUSOIDAL EASING: sin(t) /////////////// + +// sinusoidal easing in - accelerating from zero velocity +// t: current time, b: beginning value, c: change in position, d: duration +Math.easeInSine = function (t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; +}; + +// sinusoidal easing out - decelerating to zero velocity +Math.easeOutSine = function (t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; +}; + +// sinusoidal easing in/out - accelerating until halfway, then decelerating +Math.easeInOutSine = function (t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; +}; + + + ///////////// EXPONENTIAL EASING: 2^t ///////////////// + +// exponential easing in - accelerating from zero velocity +// t: current time, b: beginning value, c: change in position, d: duration +Math.easeInExpo = function (t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; +}; + +// exponential easing out - decelerating to zero velocity +Math.easeOutExpo = function (t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; +}; + +// exponential easing in/out - accelerating until halfway, then decelerating +Math.easeInOutExpo = function (t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; +}; + + + /////////// CIRCULAR EASING: sqrt(1-t^2) ////////////// + +// circular easing in - accelerating from zero velocity +// t: current time, b: beginning value, c: change in position, d: duration +Math.easeInCirc = function (t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; +}; + +// circular easing out - decelerating to zero velocity +Math.easeOutCirc = function (t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; +}; + +// circular easing in/out - acceleration until halfway, then deceleration +Math.easeInOutCirc = function (t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; +}; + + + /////////// ELASTIC EASING: exponentially decaying sine wave ////////////// + +// t: current time, b: beginning value, c: change in value, d: duration, a: amplitude (optional), p: period (optional) +// t and d can be in frames or seconds/milliseconds + +Math.easeInElastic = function (t, b, c, d, a, p) { + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; +}; + +Math.easeOutElastic = function (t, b, c, d, a, p) { + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; +}; + +Math.easeInOutElastic = function (t, b, c, d, a, p) { + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; +}; + + + /////////// BACK EASING: overshooting cubic easing: (s+1)*t^3 - s*t^2 ////////////// + +// back easing in - backtracking slightly, then reversing direction and moving to target +// t: current time, b: beginning value, c: change in value, d: duration, s: overshoot amount (optional) +// t and d can be in frames or seconds/milliseconds +// s controls the amount of overshoot: higher s means greater overshoot +// s has a default value of 1.70158, which produces an overshoot of 10 percent +// s==0 produces cubic easing with no overshoot +Math.easeInBack = function (t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; +}; + +// back easing out - moving towards target, overshooting it slightly, then reversing and coming back to target +Math.easeOutBack = function (t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; +}; + +// back easing in/out - backtracking slightly, then reversing direction and moving to target, +// then overshooting target, reversing, and finally coming back to target +Math.easeInOutBack = function (t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; +}; + + + /////////// BOUNCE EASING: exponentially decaying parabolic bounce ////////////// + +// bounce easing in +// t: current time, b: beginning value, c: change in position, d: duration +Math.easeInBounce = function (t, b, c, d) { + return c - Math.easeOutBounce (d-t, 0, c, d) + b; +}; + +// bounce easing out +Math.easeOutBounce = function (t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } +}; + +// bounce easing in/out +Math.easeInOutBounce = function (t, b, c, d) { + if (t < d/2) return Math.easeInBounce (t*2, 0, c, d) * .5 + b; + return Math.easeOutBounce (t*2-d, 0, c, d) * .5 + c*.5 + b; +}; + + +//trace (">> Penner easing equations loaded"); + + + + + + diff --git a/gal/highslide/graphics/close.png b/gal/highslide/graphics/close.png new file mode 100644 index 0000000..4de4396 Binary files /dev/null and b/gal/highslide/graphics/close.png differ diff --git a/gal/highslide/graphics/closeX.png b/gal/highslide/graphics/closeX.png new file mode 100644 index 0000000..cf5d018 Binary files /dev/null and b/gal/highslide/graphics/closeX.png differ diff --git a/gal/highslide/graphics/controlbar-black-border.gif b/gal/highslide/graphics/controlbar-black-border.gif new file mode 100644 index 0000000..e2403fe Binary files /dev/null and b/gal/highslide/graphics/controlbar-black-border.gif differ diff --git a/gal/highslide/graphics/controlbar-text-buttons.png b/gal/highslide/graphics/controlbar-text-buttons.png new file mode 100644 index 0000000..d2f72e0 Binary files /dev/null and b/gal/highslide/graphics/controlbar-text-buttons.png differ diff --git a/gal/highslide/graphics/controlbar-white-small.gif b/gal/highslide/graphics/controlbar-white-small.gif new file mode 100644 index 0000000..462fce7 Binary files /dev/null and b/gal/highslide/graphics/controlbar-white-small.gif differ diff --git a/gal/highslide/graphics/controlbar-white.gif b/gal/highslide/graphics/controlbar-white.gif new file mode 100644 index 0000000..1f143f5 Binary files /dev/null and b/gal/highslide/graphics/controlbar-white.gif differ diff --git a/gal/highslide/graphics/controlbar2.gif b/gal/highslide/graphics/controlbar2.gif new file mode 100644 index 0000000..39ad652 Binary files /dev/null and b/gal/highslide/graphics/controlbar2.gif differ diff --git a/gal/highslide/graphics/controlbar3.gif b/gal/highslide/graphics/controlbar3.gif new file mode 100644 index 0000000..3eebb81 Binary files /dev/null and b/gal/highslide/graphics/controlbar3.gif differ diff --git a/gal/highslide/graphics/controlbar4-hover.gif b/gal/highslide/graphics/controlbar4-hover.gif new file mode 100644 index 0000000..ca08b59 Binary files /dev/null and b/gal/highslide/graphics/controlbar4-hover.gif differ diff --git a/gal/highslide/graphics/controlbar4.gif b/gal/highslide/graphics/controlbar4.gif new file mode 100644 index 0000000..7a3ad34 Binary files /dev/null and b/gal/highslide/graphics/controlbar4.gif differ diff --git a/gal/highslide/graphics/fullexpand.gif b/gal/highslide/graphics/fullexpand.gif new file mode 100644 index 0000000..26d9ed0 Binary files /dev/null and b/gal/highslide/graphics/fullexpand.gif differ diff --git a/gal/highslide/graphics/geckodimmer.png b/gal/highslide/graphics/geckodimmer.png new file mode 100644 index 0000000..309bb27 Binary files /dev/null and b/gal/highslide/graphics/geckodimmer.png differ diff --git a/gal/highslide/graphics/icon.gif b/gal/highslide/graphics/icon.gif new file mode 100644 index 0000000..b74a073 Binary files /dev/null and b/gal/highslide/graphics/icon.gif differ diff --git a/gal/highslide/graphics/loader.big.black.gif b/gal/highslide/graphics/loader.big.black.gif new file mode 100644 index 0000000..c95d05a Binary files /dev/null and b/gal/highslide/graphics/loader.big.black.gif differ diff --git a/gal/highslide/graphics/loader.big.white.gif b/gal/highslide/graphics/loader.big.white.gif new file mode 100644 index 0000000..3288d10 Binary files /dev/null and b/gal/highslide/graphics/loader.big.white.gif differ diff --git a/gal/highslide/graphics/loader.black.gif b/gal/highslide/graphics/loader.black.gif new file mode 100644 index 0000000..0b31f6f Binary files /dev/null and b/gal/highslide/graphics/loader.black.gif differ diff --git a/gal/highslide/graphics/loader.white.gif b/gal/highslide/graphics/loader.white.gif new file mode 100644 index 0000000..f2a1bc0 Binary files /dev/null and b/gal/highslide/graphics/loader.white.gif differ diff --git a/gal/highslide/graphics/outlines/beveled.png b/gal/highslide/graphics/outlines/beveled.png new file mode 100644 index 0000000..fc428f4 Binary files /dev/null and b/gal/highslide/graphics/outlines/beveled.png differ diff --git a/gal/highslide/graphics/outlines/custom.png b/gal/highslide/graphics/outlines/custom.png new file mode 100644 index 0000000..2f20f70 Binary files /dev/null and b/gal/highslide/graphics/outlines/custom.png differ diff --git a/gal/highslide/graphics/outlines/drop-shadow.png b/gal/highslide/graphics/outlines/drop-shadow.png new file mode 100644 index 0000000..0186c2e Binary files /dev/null and b/gal/highslide/graphics/outlines/drop-shadow.png differ diff --git a/gal/highslide/graphics/outlines/glossy-dark.png b/gal/highslide/graphics/outlines/glossy-dark.png new file mode 100644 index 0000000..3c64c0d Binary files /dev/null and b/gal/highslide/graphics/outlines/glossy-dark.png differ diff --git a/gal/highslide/graphics/outlines/outer-glow.png b/gal/highslide/graphics/outlines/outer-glow.png new file mode 100644 index 0000000..288d43f Binary files /dev/null and b/gal/highslide/graphics/outlines/outer-glow.png differ diff --git a/gal/highslide/graphics/outlines/rounded-black.png b/gal/highslide/graphics/outlines/rounded-black.png new file mode 100644 index 0000000..a77e65d Binary files /dev/null and b/gal/highslide/graphics/outlines/rounded-black.png differ diff --git a/gal/highslide/graphics/outlines/rounded-white.png b/gal/highslide/graphics/outlines/rounded-white.png new file mode 100644 index 0000000..0d4b817 Binary files /dev/null and b/gal/highslide/graphics/outlines/rounded-white.png differ diff --git a/gal/highslide/graphics/resize.gif b/gal/highslide/graphics/resize.gif new file mode 100644 index 0000000..9100de7 Binary files /dev/null and b/gal/highslide/graphics/resize.gif differ diff --git a/gal/highslide/graphics/scrollarrows.png b/gal/highslide/graphics/scrollarrows.png new file mode 100644 index 0000000..b3d5575 Binary files /dev/null and b/gal/highslide/graphics/scrollarrows.png differ diff --git a/gal/highslide/graphics/zoom.png b/gal/highslide/graphics/zoom.png new file mode 100644 index 0000000..908612e Binary files /dev/null and b/gal/highslide/graphics/zoom.png differ diff --git a/gal/highslide/graphics/zoomin.cur b/gal/highslide/graphics/zoomin.cur new file mode 100644 index 0000000..cb79124 Binary files /dev/null and b/gal/highslide/graphics/zoomin.cur differ diff --git a/gal/highslide/graphics/zoomout.cur b/gal/highslide/graphics/zoomout.cur new file mode 100644 index 0000000..acf6199 Binary files /dev/null and b/gal/highslide/graphics/zoomout.cur differ diff --git a/gal/highslide/highslide-full.js b/gal/highslide/highslide-full.js new file mode 100644 index 0000000..9f7b3ef --- /dev/null +++ b/gal/highslide/highslide-full.js @@ -0,0 +1,3320 @@ +/** + * Name: Highslide JS + * Version: 4.1.13 (2011-10-06) + * Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash + * Author: Torstein Hønsi + * Support: www.highslide.com/support + * License: www.highslide.com/#license + */ +if (!hs) { 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', + 'pageOrigin', + '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: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : + parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), +ie : (document.all && !window.opera), +//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant? +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.ieLt9 && 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 (el.style[prop]) { + return el.style[prop]; + } else 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, + ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined'); + + var width = ieLt9 ? iebody.clientWidth : + (d.documentElement.clientWidth || self.innerWidth), + height = ieLt9 ? iebody.clientHeight : self.innerHeight; + hs.page = { + width: width, + height: height, + scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset, + scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset + }; + return hs.page; +}, + +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) { + isNew = true; + hs.dimmer = hs.createElement ('div', { + className: 'highslide-dimming highslide-viewport-size', + owner: '', + onclick: function() { + if (hs.fireEvent(hs, 'onDimmerClick')) + + hs.close(); + } + }, { + visibility: 'visible', + opacity: 0 + }, hs.container, true); + + if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) { + var body = document.body; + function pixDimmerSize() { + hs.setStyles(hs.dimmer, { + width: body.scrollWidth +'px', + height: body.scrollHeight +'px' + }); + } + pixDimmerSize(); + hs.addEventListener(window, 'resize', pixDimmerSize); + } + } + hs.dimmer.style.display = ''; + + var isNew = hs.dimmer.owner == ''; + hs.dimmer.owner += '|'+ exp.key; + + if (isNew) { + 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.dimmer.style.display = 'none'; + else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() { + hs.dimmer.style.display = 'none'; + }); +}, +transit : function (adj, exp) { + var last = exp || hs.getExpander(); + exp = last; + if (hs.upcoming) return false; + else hs.last = last; + hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + 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) return hs.transit(exp.getAdjacentAnchor(op), 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); + 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.ieLt9 ? 'white' : 'none'), + opacity: 0.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 (!e.relatedTarget) 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.ieLt7 = hs.ie && hs.uaVersion < 7; + hs.ieLt9 = hs.ie && hs.uaVersion < 9; + + hs.getPageSize(); + 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 highslide-viewport-size' + }, { + 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.ieLt7 && 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){ + try { + 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; + } catch (e) {} + } + } +}); + +hs.Outline = function (outlineType, onLoad) { + this.onLoad = onLoad; + this.outlineType = outlineType; + var v = hs.uaVersion, tr; + + this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 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.uaVersion < 525 ? 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 == 0 || 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; + + if (this.maxHeight && this.dim == 'x') + exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); + + 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 (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try { + exp.iDoc.body.style.overflow = 'auto'; + } catch (e) {} + 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 = this.pageOrigin || 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) { + if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); + else 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.uaVersion < 525) 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, + height: 0, + 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 exp = this; + var ajax = new hs.Ajax(this.a, innerContent); + ajax.src = this.src; + 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.iDoc = 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; + if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try { + this.iDoc.body.style.overflow = 'hidden'; + } catch (e) {} + 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 = Math.min(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; + } + changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); + 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, changed) { + var x = this.x, y = this.y; + if (this.overlayBox && (this.isImage || this.allowHeightReduction)) { + 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); + changed = true; + } + } + return changed; +}, + +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); + } +}, + +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, from) { + if (!up) return; + var exp = this, + last = this.last, + x = this.x, + y = this.y, + lastX = last.x, + lastY = last.y, + wrapper = this.wrapper, + content = this.content, + overlayBox = this.overlayBox; + hs.removeEventListener(document, 'mousemove', hs.dragHandler); + + hs.setStyles(content, { + width: (x.imgSize || x.size) +'px', + height: (y.imgSize || y.size) +'px' + }); + if (overlayBox) overlayBox.style.overflow = 'visible'; + this.outline = last.outline; + if (this.outline) this.outline.exp = exp; + last.outline = null; + var fadeBox = hs.createElement('div', { + className: 'highslide-'+ this.contentType + }, { + position: 'absolute', + zIndex: 4, + overflow: 'hidden', + display: 'none' + } + ); + 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]); + } + wrapper.appendChild(fadeBox); + if (this.isHtml) hs.setStyles(this.mediumContent, { + left: 0, + top: 0 + }); + if (overlayBox) { + overlayBox.className = ''; + wrapper.appendChild(overlayBox); + } + fadeBox.style.display = ''; + last.content.style.display = 'none'; + + + if (hs.safari && hs.uaVersion < 525) { + this.wrapper.style.visibility = 'visible'; + } + hs.animate(wrapper, { + width: x.size + }, { + duration: hs.transitionDuration, + step: function(val, args) { + var pos = args.pos, + invPos = 1 - pos; + var prop, + size = {}, + props = ['pos', 'size', 'p1', 'p2']; + for (var n in props) { + prop = props[n]; + size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]); + size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]); + size.ximgSize = Math.round( + invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size)); + size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad')); + size.yimgSize = Math.round( + invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size)); + size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad')); + } + if (exp.outline) exp.outline.setPosition({ + x: size.xpos, + y: size.ypos, + w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb, + h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb + }); + last.wrapper.style.clip = 'rect(' + + (size.ypos - lastY.pos)+'px, ' + + (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, ' + + (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, ' + + (size.xpos - lastX.pos)+'px)'; + + hs.setStyles(content, { + top: (size.yp1 + y.get('imgPad')) +'px', + left: (size.xp1 + x.get('imgPad')) +'px', + marginTop: (y.pos - size.ypos) +'px', + marginLeft: (x.pos - size.xpos) +'px' + }); + hs.setStyles(wrapper, { + top: size.ypos +'px', + left: size.xpos +'px', + width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px', + height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px' + }); + hs.setStyles(fadeBox, { + width: (size.ximgSize || size.xsize) + 'px', + height: (size.yimgSize || size.ysize) +'px', + left: (size.xp1 + size.ximgPad) +'px', + top: (size.yp1 + size.yimgPad) +'px', + visibility: 'visible' + }); + + hs.setStyles(exp.oldImg, { + top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px', + left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px' + }); + + hs.setStyles(exp.newImg, { + opacity: pos, + top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px', + left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px' + }); + if (overlayBox) hs.setStyles(overlayBox, { + width: size.xsize + 'px', + height: size.ysize +'px', + left: (size.xp1 + x.cb) +'px', + top: (size.yp1 + y.cb) +'px' + }); + }, + complete: function () { + wrapper.style.visibility = content.style.visibility = 'visible'; + content.style.display = 'block'; + hs.discardElement(fadeBox); + exp.afterExpand(); + last.afterClose(); + exp.last = null; + } + + }); +}, +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 (as && !as[current + op] && this.slideshow && this.slideshow.repeat) { + if (op == 1) return as[0]; + else if (op == -1) return as[as.length-1]; + } + return (as && 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) { + this.createOverlay(hs.extend(ss.overlayOptions || {}, { + overlayId: ss.controls, + hsId: 'controls', + zIndex: 5 + })); + } + 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) { + this[type] = hs.getNode(this.a['_'+ type + 'Id']); + if (!this[type]) { + var next = this.a.nextSibling; + while (next && !hs.isHsAnchor(next)) { + if ((new RegExp('highslide-'+ type)).test(next.className || null)) { + if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; + this[type] = hs.getNode(next.id); + 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.ieLt7 ? '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.ieLt7 && 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); + this.wrapper.style.height = this.y.get('wsize') +'px'; +}, + +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'; + this.isExpanded = false; + 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 : 'auto' + }, + 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.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.slideshow) { + var c = this.slideshow.controls; + if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c); + } + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o); + } + 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, + ySize = this.y.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; + + var ypos = this.y.pos - (this.y.size - ySize) / 2; + if (ypos < hs.marginTop) ypos = hs.marginTop; + + this.moveTo(xpos, ypos); + 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.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'; + this.destroyOverlays(); + 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 () { + var xhr; + 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 { xhr = new XMLHttpRequest(); } + catch (e) { + try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } + catch (e) { + try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } + catch (e) { this.onError(); } + } + } + var pThis = this; + xhr.onreadystatechange = function() { + if(pThis.xhr.readyState == 4) { + if (pThis.id) pThis.getElementContent(); + else pThis.loadHTML(); + } + }; + var src = this.src; + this.xhr = xhr; + if (hs.forceAjaxReload) + src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime()); + xhr.open('GET', src, true); + xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + xhr.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.xhr.responseText, + regBody; + if (this.pre) hs.cachedGets[this.src] = s; + if (!hs.ie || hs.uaVersion >= 5.5) { + s = s.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 { + regBody = /(]*>|<\/body>)/ig; + if (regBody.test(s)) s = s.split(regBody)[hs.ieLt9 ? 1 : 2]; + + } + } + 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', + className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '') + }); + 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 (minTblPos > 0) minTblPos = 0; + 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, + title: a.title, + onclick: function() { + if (/highslide-active-anchor/.test(this.className)) return false; + 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 + } +}; +hs.langDefaults = hs.lang; +// history +var HsExpander = hs.Expander; +if (hs.ie && window == window.top) { + (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); + +// set handlers +hs.addEventListener(document, 'ready', function() { + if (hs.expandCursor || hs.dimmingOpacity) { + var style = hs.createElement('style', { type: 'text/css' }, null, + document.getElementsByTagName('HEAD')[0]), + backCompat = document.compatMode == 'BackCompat'; + + + function addRule(sel, dec) { + if (hs.ie && (hs.uaVersion < 9 || backCompat)) { + var last = document.styleSheets[document.styleSheets.length - 1]; + if (typeof(last.addRule) == "object") last.addRule(sel, dec); + } else { + style.appendChild(document.createTextNode(sel + " {" + dec + "}")); + } + } + function fix(prop) { + return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + + ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; + } + if (hs.expandCursor) addRule ('.highslide img', + 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); + addRule ('.highslide-viewport-size', + hs.ie && (hs.uaVersion < 7 || backCompat) ? + 'position: absolute; '+ + 'left:'+ fix('scrollLeft') + + 'top:'+ fix('scrollTop') + + 'width:'+ fix('clientWidth') + + 'height:'+ fix('clientHeight') : + 'position: fixed; width: 100%; height: 100%; left: 0; top: 0'); + } +}); +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); +} diff --git a/gal/highslide/highslide-full.packed.js b/gal/highslide/highslide-full.packed.js new file mode 100644 index 0000000..d55a1bb --- /dev/null +++ b/gal/highslide/highslide-full.packed.js @@ -0,0 +1,9 @@ +/** + * Name: Highslide JS + * Version: 4.1.13 (2011-10-06) + * Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash +packed + * Author: Torstein Hønsi + * Support: www.highslide.com/support + * License: www.highslide.com/#license + */ +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}('q(!m){A m={18:{97:\'aK\',aZ:\'fw...\',aY:\'8G 2i fP\',bD:\'8G 2i g0 2i eR\',9Z:\'eZ 2i fc D (f)\',cq:\'f8 by an ao\',cr:\'f4 2i f6 an ao fg\',8Y:\'aq\',8W:\'ay\',8Z:\'ag\',92:\'am\',90:\'am (eD)\',b0:\'eY\',ab:\'al\',au:\'al 1p (aj)\',ac:\'ah\',ad:\'ah 1p (aj)\',8s:\'aq (8w 1b)\',8X:\'ay (8w 3m)\',8V:\'ag\',ae:\'1:1\',3G:\'g7 %1 fz %2\',9W:\'8G 2i 26 2R, dC aA dE 2i 3u. dF 8w dB O 1D aA 3a.\'},5c:\'K/dw/\',7R:\'dv.5q\',6h:\'dx.5q\',6W:5Z,9A:5Z,4W:15,9B:15,4d:15,6L:15,4F:cY,be:0.75,9l:M,9f:5,3Y:2,ei:3,5S:1j,bz:\'4Q 3m\',bA:1,br:M,ct:\'em://K.eh/\',cs:\'ec\',aS:M,9w:[\'a\',\'5v\'],3q:[],cE:5Z,4b:0,87:50,6J:1j,6X:M,4D:M,3U:\'60\',7W:M,46:\'1M\',9n:\'1M\',b1:I,aC:I,a7:M,4s:aw,6k:aw,5Y:M,1Z:\'ev-dV\',8i:{2X:\'

    <6t>\'+\'<1H 1W="K-3a">\'+\'\'+\'<1C>{m.18.8Y}\'+\'\'+\'<1H 1W="K-3L">\'+\'\'+\'<1C>{m.18.ab}\'+\'\'+\'<1H 1W="K-3p">\'+\'\'+\'<1C>{m.18.ac}\'+\'\'+\'<1H 1W="K-1D">\'+\'\'+\'<1C>{m.18.8W}\'+\'\'+\'<1H 1W="K-3u">\'+\'\'+\'<1C>{m.18.8Z}\'+\'\'+\'<1H 1W="K-1a-2F">\'+\'\'+\'<1C>{m.18.ae}\'+\'\'+\'<1H 1W="K-26">\'+\'\'+\'<1C>{m.18.92}\'+\'\'+\'

    \',bd:\'

    <6t>\'+\'<1H 1W="K-3a">\'+\'\'+\'<1C>{m.18.8Y}\'+\'\'+\'<1H 1W="K-1D">\'+\'\'+\'<1C>{m.18.8W}\'+\'\'+\'<1H 1W="K-3u">\'+\'\'+\'<1C>{m.18.8Z}\'+\'\'+\'<1H 1W="K-26">\'+\'\'+\'<1C>{m.18.92}\'+\'\'+\'

    \'+\'

    \'+\'

    \'+\'<1C 1W="K-3O" 24="{m.18.b0}"><1C>\'+\'

    \'},64:[],a1:M,16:[],a4:[\'5Y\',\'3t\',\'46\',\'9n\',\'b1\',\'aC\',\'1Z\',\'3Y\',\'dU\',\'dM\',\'dL\',\'b3\',\'dK\',\'dI\',\'dJ\',\'b2\',\'cv\',\'a7\',\'42\',\'6l\',\'3q\',\'4b\',\'L\',\'N\',\'88\',\'6J\',\'6X\',\'4D\',\'dN\',\'dO\',\'dT\',\'2I\',\'7W\',\'4j\',\'4x\',\'3U\',\'8e\',\'a9\',\'4s\',\'6k\',\'6M\',\'9i\',\'aX\',\'2N\',\'2Q\',\'cF\',\'cD\',\'1e\'],1T:[],61:0,8g:{x:[\'bM\',\'1b\',\'4X\',\'3m\',\'bC\'],y:[\'5N\',\'Y\',\'9a\',\'4Q\',\'7E\']},7B:{},b2:{},b3:{},8e:{aG:{},29:{},aF:{}},4m:[],6u:[],4n:{},4R:[],7q:[],5a:[],7k:{},8c:{},7l:[],2t:/dP\\/4\\.0/.11(4A.6d)?8:8J((4A.6d.5G().3b(/.+(?:b9|dQ|e9|2h)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),2h:(W.6q&&!1S.3z),4M:/ea/.11(4A.6d),6y:/eu.+b9:1\\.[0-8].+es/.11(4A.6d),$:C(1v){q(1v)E W.9Q(1v)},2o:C(2a,3j){2a[2a.V]=3j},1d:C(ba,4l,49,6c,bh){A el=W.1d(ba);q(4l)m.3A(el,4l);q(bh)m.R(el,{94:0,8H:\'1E\',9D:0});q(49)m.R(el,49);q(6c)6c.1X(el);E el},3A:C(el,4l){O(A x 2Y 4l)el[x]=4l[x];E el},R:C(el,49){O(A x 2Y 49){q(m.3R&&x==\'1z\'){q(49[x]>0.99)el.G.ew(\'5Q\');J el.G.5Q=\'bg(1z=\'+(49[x]*2w)+\')\'}J el.G[x]=49[x]}},2z:C(el,1f,3C){A 4T,51,4w;q(1F 3C!=\'7j\'||3C===I){A 2H=c5;3C={4h:2H[2],2Q:2H[3],76:2H[4]}}q(1F 3C.4h!=\'3G\')3C.4h=5Z;3C.2Q=1h[3C.2Q]||1h.bj;3C.7g=m.3A({},1f);O(A 2Z 2Y 1f){A e=1J m.fx(el,3C,2Z);4T=8J(m.8I(el,2Z))||0;51=8J(1f[2Z]);4w=2Z!=\'1z\'?\'F\':\'\';e.3E(4T,51,4w)}},8I:C(el,1f){q(el.G[1f]){E el.G[1f]}J q(W.8L){E W.8L.cK(el,I).co(1f)}J{q(1f==\'1z\')1f=\'5Q\';A 3j=el.5y[1f.2k(/\\-(\\w)/g,C(a,b){E b.bi()})];q(1f==\'5Q\')3j=3j.2k(/bg\\(1z=([0-9]+)\\)/,C(a,b){E b/2w});E 3j===\'\'?1:3j}},7S:C(){A d=W,w=1S,63=d.7a&&d.7a!=\'8v\'?d.5h:d.19,3R=m.2h&&(m.2t<9||1F bf==\'1L\');A L=3R?63.8F:(d.5h.8F||7c.ep),N=3R?63.c4:7c.eo;m.4g={L:L,N:N,5O:3R?63.5O:bf,5R:3R?63.5R:ed};E m.4g},6K:C(el){q(/5v/i.11(el.3J)){A 7N=W.2C(\'1N\');O(A i=0;i<7N.V;i++){A u=7N[i].eb;q(u&&u.2k(/^.*?#/,\'\')==el.23.2Z){el=7N[i];5m}}}A p={x:el.4V,y:el.8O};5g(el.bb){el=el.bb;p.x+=el.4V;p.y+=el.8O;q(el!=W.19&&el!=W.5h){p.x-=el.5O;p.y-=el.5R}}E p},2F:C(a,29,3E,T){q(!a)a=m.1d(\'a\',I,{1o:\'1E\'},m.2b);q(1F a.6a==\'C\')E 29;q(T==\'3D\'){O(A i=0;i8d){8d=1B;7n=i}}}q(7n==-1)m.3d=-1;J 16[7n].3M()},43:C(a,6b){a.6a=a.2p;A p=a.6a?a.6a():I;a.6a=I;E(p&&1F p[6b]!=\'1L\')?p[6b]:(1F m[6b]!=\'1L\'?m[6b]:I)},7s:C(a){A 1e=m.43(a,\'1e\');q(1e)E 1e;E a.21},4J:C(1v){A 1P=m.$(1v),4q=m.8c[1v],a={};q(!1P&&!4q)E I;q(!4q){4q=1P.5J(M);4q.1v=\'\';m.8c[1v]=4q;E 1P}J{E 4q.5J(M)}},3B:C(d){q(d)m.9y.1X(d);m.9y.2d=\'\'},1u:C(B){q(!m.2v){84=M;m.2v=m.1d(\'P\',{1c:\'K-dc K-2x-D\',5r:\'\',2p:C(){q(m.1A(m,\'d3\'))m.26()}},{1n:\'1Y\',1z:0},m.2b,M);q(/(df|d2|cU|cT)/.11(4A.6d)){A 19=W.19;C 81(){m.R(m.2v,{L:19.cR+\'F\',N:19.cV+\'F\'})}81();m.2j(1S,\'3O\',81)}}m.2v.G.1o=\'\';A 84=m.2v.5r==\'\';m.2v.5r+=\'|\'+B.Q;q(84){q(m.6y&&m.aR)m.R(m.2v,{9t:\'7T(\'+m.5c+\'d0.ak)\',1z:1});J m.2z(m.2v,{1z:B.4b},m.87)}},9x:C(Q){q(!m.2v)E;q(1F Q!=\'1L\')m.2v.5r=m.2v.5r.2k(\'|\'+Q,\'\');q((1F Q!=\'1L\'&&m.2v.5r!=\'\')||(m.2q&&m.43(m.2q,\'4b\')))E;q(m.6y&&m.aR)m.2v.G.1o=\'1E\';J m.2z(m.2v,{1z:0},m.87,I,C(){m.2v.G.1o=\'1E\'})},8N:C(7z,B){A 1i=B||m.2G();B=1i;q(m.2q)E 1j;J m.1i=1i;m.4z(W,1S.3z?\'6U\':\'71\',m.68);1t{m.2q=7z;7z.2p()}1y(e){m.1i=m.2q=I}1t{q(!7z||B.3q[1]!=\'4e\')B.26()}1y(e){}E 1j},7O:C(el,2n){A B=m.2G(el);q(B)E m.8N(B.7V(2n),B);J E 1j},3a:C(el){E m.7O(el,-1)},1D:C(el){E m.7O(el,1)},68:C(e){q(!e)e=1S.2u;q(!e.2L)e.2L=e.9k;q(1F e.2L.9j!=\'1L\')E M;q(!m.1A(m,\'dz\',e))E M;A B=m.2G();A 2n=I;b6(e.dy){2c 70:q(B)B.7r();E M;2c 32:2n=2;5m;2c 34:2c 39:2c 40:2n=1;5m;2c 8:2c 33:2c 37:2c 38:2n=-1;5m;2c 27:2c 13:2n=0}q(2n!==I){q(2n!=2)m.4z(W,1S.3z?\'6U\':\'71\',m.68);q(!m.aS)E M;q(e.5n)e.5n();J e.c0=1j;q(B){q(2n==0){B.26()}J q(2n==2){q(B.1p)B.1p.cl()}J{q(B.1p)B.1p.3p();m.7O(B.Q,2n)}E 1j}}E M},du:C(14){m.2o(m.1T,m.3A(14,{22:\'22\'+m.61++}))},dt:C(1r){A 3c=1r.2N;q(1F 3c==\'7j\'){O(A i=0;i<3c.V;i++){A o={};O(A x 2Y 1r)o[x]=1r[x];o.2N=3c[i];m.2o(m.6u,o)}}J{m.2o(m.6u,1r)}},9U:C(7y,7h){A el,2m=/^K-U-([0-9]+)$/;el=7y;5g(el.23){q(el.6R!==1L)E el.6R;q(el.1v&&2m.11(el.1v))E el.1v.2k(2m,"$1");el=el.23}q(!7h){el=7y;5g(el.23){q(el.3J&&m.77(el)){O(A Q=0;Q1)E M;q(!e.2L)e.2L=e.9k;A el=e.2L;5g(el.23&&!(/K-(2R|3u|3D|3O)/.11(el.1c))){el=el.23}A B=m.2G(el);q(B&&(B.62||!B.55))E M;q(B&&e.T==\'8y\'){q(e.2L.9j)E M;A 3b=el.1c.3b(/K-(2R|3u|3O)/);q(3b){m.2y={B:B,T:3b[1],1b:B.x.H,L:B.x.D,Y:B.y.H,N:B.y.D,aV:e.7A,aO:e.7F};m.2j(W,\'7D\',m.6H);q(e.5n)e.5n();q(/K-(2R|3D)-9J/.11(B.S.1c)){B.3M();m.a6=M}E 1j}J q(/K-3D/.11(el.1c)&&m.3d!=B.Q){B.3M();B.59(\'1q\')}}J q(e.T==\'c3\'){m.4z(W,\'7D\',m.6H);q(m.2y){q(m.54&&m.2y.T==\'2R\')m.2y.B.S.G.4L=m.54;A 3I=m.2y.3I;q(!3I&&!m.a6&&!/(3u|3O)/.11(m.2y.T)){q(m.1A(B,\'dr\'))B.26()}J q(3I||(!3I&&m.aU)){m.2y.B.59(\'1q\')}q(m.2y.B.3W)m.2y.B.3W.G.1o=\'1E\';q(3I)m.1A(m.2y.B,\'do\',m.2y);m.a6=1j;m.2y=I}J q(/K-2R-9J/.11(el.1c)){el.G.4L=m.54}}E 1j},6H:C(e){q(!m.2y)E M;q(!e)e=1S.2u;A a=m.2y,B=a.B;q(B.1k){q(!B.3W)B.3W=m.1d(\'P\',I,{1l:\'2l\',L:B.x.D+\'F\',N:B.y.D+\'F\',1b:B.x.cb+\'F\',Y:B.y.cb+\'F\',1B:4,9t:(m.3R?\'eB\':\'1E\'),1z:0.eU},B.U,M);q(B.3W.G.1o==\'1E\')B.3W.G.1o=\'\'}a.dX=e.7A-a.aV;a.dY=e.7F-a.aO;A 9g=1h.fG(1h.aE(a.dX,2)+1h.aE(a.dY,2));q(!a.3I)a.3I=(a.T!=\'2R\'&&9g>0)||(9g>(m.fK||5));q(a.3I&&e.7A>5&&e.7F>5){q(!m.1A(B,\'fN\',a))E 1j;q(a.T==\'3O\')B.3O(a);J{B.9m(a.1b+a.dX,a.Y+a.dY);q(a.T==\'2R\')B.S.G.4L=\'3u\'}}E 1j},aP:C(e){1t{q(!e)e=1S.2u;A 66=/fM/i.11(e.T);q(!e.2L)e.2L=e.9k;q(!e.7P)e.7P=66?e.fE:e.fD;A B=m.2G(e.2L);q(!B.55)E;q(!B||!e.7P||m.2G(e.7P,M)==B||m.2y)E;m.1A(B,66?\'ft\':\'fr\',e);O(A i=0;i=k.1r.4h+k.9c){k.4o=k.51;k.H=k.96=1;k.82();k.1r.7g[k.1f]=M;A 9s=M;O(A i 2Y k.1r.7g)q(k.1r.7g[i]!==M)9s=1j;q(9s){q(k.1r.76)k.1r.76.ax(k.30)}E 1j}J{A n=t-k.9c;k.96=n/k.1r.4h;k.H=k.1r.2Q(n,0,1,k.1r.4h);k.4o=k.4T+((k.51-k.4T)*k.H);k.82()}E M}};m.3A(m.fx,{3P:{1z:C(fx){m.R(fx.30,{1z:fx.4o})},ap:C(fx){1t{q(fx.30.G&&fx.30.G[fx.1f]!=I)fx.30.G[fx.1f]=fx.4o+fx.4w;J fx.30[fx.1f]=fx.4o}1y(e){}}}});m.6r=C(1Z,3F){k.3F=3F;k.1Z=1Z;A v=m.2t,47;k.9G=m.2h&&m.2t<7;q(!1Z){q(3F)3F();E}m.7m();k.2g=m.1d(\'2g\',{eJ:0},{1n:\'1q\',1l:\'2l\',eN:\'eM\',L:0},m.2b,M);A 4G=m.1d(\'4G\',I,I,k.2g,1);k.2J=[];O(A i=0;i<=8;i++){q(i%3==0)47=m.1d(\'47\',I,{N:\'1M\'},4G,M);k.2J[i]=m.1d(\'2J\',I,I,47,M);A G=i!=4?{eL:0,eK:0}:{1l:\'4y\'};m.R(k.2J[i],G)}k.2J[4].1c=1Z+\' K-1g\';k.ai()};m.6r.5w={ai:C(){A 1e=m.5c+(m.f1||"fi/")+k.1Z+".ak";A ar=m.4M&&m.2t<73?m.2b:I;k.3V=m.1d(\'1N\',I,{1l:\'2l\',Y:\'-4v\'},ar,M);A 3v=k;k.3V.4N=C(){3v.az()};k.3V.1e=1e},az:C(){A o=k.1w=k.3V.L/4,H=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1u={N:(2*o)+\'F\',L:(2*o)+\'F\'};O(A i=0;i<=8;i++){q(H[i]){q(k.9G){A w=(i==1||i==7)?\'2w%\':k.3V.L+\'F\';A P=m.1d(\'P\',I,{L:\'2w%\',N:\'2w%\',1l:\'4y\',2e:\'1q\'},k.2J[i],M);m.1d(\'P\',I,{5Q:"fo:fn.bv.fm(fl=fe, 1e=\'"+k.3V.1e+"\')",1l:\'2l\',L:w,N:k.3V.N+\'F\',1b:(H[i][0]*o)+\'F\',Y:(H[i][1]*o)+\'F\'},P,M)}J{m.R(k.2J[i],{9t:\'7T(\'+k.3V.1e+\') \'+(H[i][0]*o)+\'F \'+(H[i][1]*o)+\'F\'})}q(1S.3z&&(i==3||i==5))m.1d(\'P\',I,1u,k.2J[i],M);m.R(k.2J[i],1u)}}k.3V=I;q(m.4n[k.1Z])m.4n[k.1Z].5U();m.4n[k.1Z]=k;q(k.3F)k.3F()},4C:C(H,1w,aB,4i,2Q){A B=k.B,5X=B.U.G,1w=1w||0,H=H||{x:B.x.H+1w,y:B.y.H+1w,w:B.x.Z(\'2f\')-2*1w,h:B.y.Z(\'2f\')-2*1w};q(aB)k.2g.G.1n=(H.h>=4*k.1w)?\'1Y\':\'1q\';m.R(k.2g,{1b:(H.x-k.1w)+\'F\',Y:(H.y-k.1w)+\'F\',L:(H.w+2*k.1w)+\'F\'});H.w-=2*k.1w;H.h-=2*k.1w;m.R(k.2J[4],{L:H.w>=0?H.w+\'F\':0,N:H.h>=0?H.h+\'F\':0});q(k.9G)k.2J[3].G.N=k.2J[5].G.N=k.2J[4].G.N},5U:C(bk){q(bk)k.2g.G.1n=\'1q\';J m.3B(k.2g)}};m.6A=C(B,1u){k.B=B;k.1u=1u;k.3l=1u==\'x\'?\'bY\':\'bW\';k.3k=k.3l.5G();k.6m=1u==\'x\'?\'cj\':\'c8\';k.6Y=k.6m.5G();k.9L=1u==\'x\'?\'c7\':\'bX\';k.b5=k.9L.5G();k.1G=k.36=0};m.6A.5w={Z:C(Q){b6(Q){2c\'9T\':E k.1K+k.3s+(k.t-m.2r[\'1w\'+k.3l])/2;2c\'9v\':E k.H+k.cb+k.1G+(k.D-m.2r[\'1w\'+k.3l])/2;2c\'2f\':E k.D+2*k.cb+k.1G+k.36;2c\'5e\':E k.4K-k.3o-k.4S;2c\'8D\':E k.Z(\'5e\')-2*k.cb-k.1G-k.36;2c\'6e\':E k.H-(k.B.1g?k.B.1g.1w:0);2c\'9R\':E k.Z(\'2f\')+(k.B.1g?2*k.B.1g.1w:0);2c\'2K\':E k.1V?1h.3e((k.D-k.1V)/2):0}},8a:C(){k.cb=(k.B.S[\'1w\'+k.3l]-k.t)/2;k.4S=m[\'9D\'+k.9L]},9M:C(){k.t=k.B.el[k.3k]?3H(k.B.el[k.3k]):k.B.el[\'1w\'+k.3l];k.1K=k.B.1K[k.1u];k.3s=(k.B.el[\'1w\'+k.3l]-k.t)/2;q(k.1K==0||k.1K==-1){k.1K=(m.4g[k.3k]/2)+m.4g[\'28\'+k.6m]}},8h:C(){A B=k.B;k.2T=\'1M\';q(B.9n==\'4X\')k.2T=\'4X\';J q(1J 4Y(k.6Y).11(B.46))k.2T=I;J q(1J 4Y(k.b5).11(B.46))k.2T=\'4t\';k.H=k.1K-k.cb+k.3s;q(k.9i&&k.1u==\'x\')B.6M=1h.31(B.6M||k.1a,B.9i*k.1a/B.y.1a);k.D=1h.31(k.1a,B[\'4t\'+k.3l]||k.1a);k.2U=B.5Y?1h.31(B[\'31\'+k.3l],k.1a):k.1a;q(B.2E&&B.3t){k.D=B[k.3k];k.1V=k.1a}q(k.1u==\'x\'&&m.5S)k.2U=B.4s;k.2L=B[\'2L\'+k.1u.bi()];k.3o=m[\'9D\'+k.6m];k.28=m.4g[\'28\'+k.6m];k.4K=m.4g[k.3k]},72:C(i){A B=k.B;q(B.2E&&(B.3t||m.5S)){k.1V=i;k.D=1h.4t(k.D,k.1V);B.S.G[k.6Y]=k.Z(\'2K\')+\'F\'}J k.D=i;B.S.G[k.3k]=i+\'F\';B.U.G[k.3k]=k.Z(\'2f\')+\'F\';q(B.1g)B.1g.4C();q(B.3W)B.3W.G[k.3k]=i+\'F\';q(k.1u==\'y\'&&B.5C&&B.19.G.N!=\'1M\')1t{B.5C.19.G.2e=\'1M\'}1y(e){}q(B.2A){A d=B.2s;q(k.9e===1L)k.9e=B.1s[\'1w\'+k.3l]-d[\'1w\'+k.3l];d.G[k.3k]=(k.D-k.9e)+\'F\';q(k.1u==\'x\')B.4c.G.L=\'1M\';q(B.19)B.19.G[k.3k]=\'1M\'}q(k.1u==\'x\'&&B.1x)B.57(M);q(k.1u==\'x\'&&B.1p&&B.2E){q(i==k.1a)B.1p.5d(\'1a-2F\');J B.1p.4u(\'1a-2F\')}},aa:C(i){k.H=i;k.B.U.G[k.6Y]=i+\'F\';q(k.B.1g)k.B.1g.4C()}};m.5A=C(a,29,3E,35){q(W.bS&&m.2h&&!m.9F){m.2j(W,\'41\',C(){1J m.5A(a,29,3E,35)});E}k.a=a;k.3E=3E;k.35=35||\'2R\';k.2A=(35==\'3D\');k.2E=!k.2A;m.a1=1j;k.1T=[];k.1i=m.1i;m.1i=I;m.7m();A Q=k.Q=m.16.V;O(A i=0;ip.28+p.4K-p.4S)p.H=p.28+p.4K-p.D-p.3o-p.4S-p.1G-p.36;q(p.H(k.x.1V||k.x.D)){k.bs();q(k.1T.V==1)k.57()}}k.a5()}1y(e){k.9o(e)}},91:C(6c,1M){A c=m.4p(6c,\'7J\',\'K-19\');q(/(1k|3x)/.11(k.2I)){q(k.4j)c.G.L=k.4j+\'F\';q(k.4x)c.G.N=k.4x+\'F\'}},6T:C(){q(k.aD)E;A B=k;k.19=m.4p(k.1s,\'7J\',\'K-19\');q(k.2I==\'1k\'){k.6n();A 5o=m.3w.5J(1);k.19.1X(5o);k.eP=k.1s.1O;q(!k.4j)k.4j=5o.1O;A 5b=k.1s.1U-k.19.1U,h=k.4x||m.4g.N-5b-m.4d-m.6L,4N=k.3U==\'60\'?\' 4N="q (m.16[\'+k.Q+\']) m.16[\'+k.Q+\'].69()" \':\'\';k.19.2d+=\'<1k 2Z="m\'+(1J 7K()).79()+\'" eQ="0" Q="\'+k.Q+\'" \'+\' G="L:\'+k.4j+\'F; N:\'+h+\'F" \'+4N+\' 1e="\'+k.1e+\'" >\';k.5o=k.19.2C(\'P\')[0];k.1k=k.19.2C(\'1k\')[0];q(k.3U==\'6x\')k.8A()}q(k.2I==\'3x\'){k.19.1v=k.19.1v||\'m-fY-1v-\'+k.Q;A a=k.8e;q(!a.29)a.29={};q(1F a.29.aN==\'1L\')a.29.aN=\'fR\';q(9p)9p.fT(k.1e,k.19.1v,k.4j,k.4x,a.g1||\'7\',a.gb,a.aG,a.29,a.aF)}k.aD=M},7Z:C(){q(k.1k&&!k.4x){k.1k.G.N=k.19.G.N=k.8p()+\'F\'}k.1s.1X(m.3w);q(!k.x.1a)k.x.1a=k.1s.1O;k.y.1a=k.1s.1U;k.1s.9q(m.3w);q(m.2h&&k.aL>3H(k.1s.5y.N)){k.aL=3H(k.1s.5y.N)}m.R(k.U,{1l:\'2l\',94:\'0\'});m.R(k.S,{L:k.x.t+\'F\',N:k.y.t+\'F\'})},8p:C(){A h;1t{A 2B=k.5C=k.1k.9O||k.1k.6g.W;A 3w=2B.1d(\'P\');3w.G.aJ=\'bc\';2B.19.1X(3w);h=3w.8O;q(m.2h)h+=3H(2B.19.5y.4d)+3H(2B.19.5y.6L)-1}1y(e){h=de}E h},8A:C(){A 5i=k.1s.1O-k.5o.1O;m.3B(k.5o);q(5i<0)5i=0;A 5b=k.1s.1U-k.1k.1U;q(k.5C&&!k.4x&&!k.N&&k.y.D==k.y.1a)1t{k.5C.19.G.2e=\'1q\'}1y(e){}m.R(k.1k,{L:1h.9Y(k.x.D-5i)+\'F\',N:1h.9Y(k.y.D-5b)+\'F\'});m.R(k.19,{L:k.1k.G.L,N:k.1k.G.N});k.52=k.1k;k.2s=k.52},b4:C(){k.91(k.1s);q(k.2I==\'3x\'&&k.3U==\'60\')k.6T();q(k.x.D1P.1U){1P.G.L=(3H(1P.G.L)+6E)+\'F\'}k.52=1P;k.2s=k.52}q(k.1k&&k.3U==\'60\')k.8A();q(!k.52&&k.y.Dk.2s.23.1U){4a("1t { m.16["+k.Q+"].2s.G.2e = \'1M\'; } 1y(e) {}",m.6W)}},b8:C(5v){A c=5v.fC.7G(\',\');O(A i=0;ip.28+p.4K-p.4S){q(!5u&&8C&&5s){p.D=1h.31(p.D,p.Z(1u==\'y\'?\'5e\':\'8D\'))}J q(p.Z(\'2f\')2M){ 3f=3y*2M;q(3fk.6k&&x.D>k.4s&&y.Z(\'2f\')>y.Z(\'5e\')){y.D-=10;q(2M)x.D=y.D*2M;k.57(0,1);3T=M}}E 3T},dS:C(){q(k.2s){A h=/1k/i.11(k.2s.3J)?(k.8p()+1)+\'F\':\'1M\';q(k.19)k.19.G.N=h;k.2s.G.N=h;k.y.72(k.1s.1U)}},a5:C(){A x=k.x,y=k.y;k.59(\'1q\');m.1A(k,\'et\');q(k.1p&&k.1p.2D)k.1p.2D.5t();k.9b(1,{U:{L:x.Z(\'2f\'),N:y.Z(\'2f\'),1b:x.H,Y:y.H},S:{1b:x.1G+x.Z(\'2K\'),Y:y.1G+y.Z(\'2K\'),L:x.1V||x.D,N:y.1V||y.D}},m.6W)},9b:C(1I,2i,4i){A 5M=k.3q,8o=1I?(k.1i?k.1i.a:I):m.2q,t=(5M[1]&&8o&&m.43(8o,\'3q\')[1]==5M[1])?5M[1]:5M[0];q(k[t]&&t!=\'2F\'){k[t](1I,2i);E}q(k.1g&&!k.3Y){q(1I)k.1g.4C();J k.1g.5U((k.2A&&k.4D))}q(!1I)k.78();A B=k,x=B.x,y=B.y,2Q=k.2Q;q(!1I)2Q=k.cF||2Q;A 6x=1I?C(){q(B.1g)B.1g.2g.G.1n="1Y";4a(C(){B.6I()},50)}:C(){B.5D()};q(1I)m.R(k.U,{L:x.t+\'F\',N:y.t+\'F\'});q(1I&&k.2A){m.R(k.U,{1b:(x.1K-x.cb+x.3s)+\'F\',Y:(y.1K-y.cb+y.3s)+\'F\'})}q(k.cD){m.R(k.U,{1z:1I?0:1});m.3A(2i.U,{1z:1I})}m.2z(k.U,2i.U,{4h:4i,2Q:2Q,3P:C(3j,2H){q(B.1g&&B.3Y&&2H.1f==\'Y\'){A 5W=1I?2H.H:1-2H.H;A H={w:x.t+(x.Z(\'2f\')-x.t)*5W,h:y.t+(y.Z(\'2f\')-y.t)*5W,x:x.1K+(x.H-x.1K)*5W,y:y.1K+(y.H-y.1K)*5W};B.1g.4C(H,0,1)}q(B.2A){q(2H.1f==\'1b\')B.4c.G.1b=(x.H-3j)+\'F\';q(2H.1f==\'Y\')B.4c.G.Y=(y.H-3j)+\'F\'}}});m.2z(k.S,2i.S,4i,2Q,6x);q(1I){k.U.G.1n=\'1Y\';k.S.G.1n=\'1Y\';q(k.2A)k.1s.G.1n=\'1Y\';k.a.1c+=\' K-4I-46\'}},6w:C(1I,2i){k.3Y=1j;A B=k,t=1I?m.6W:0;q(1I){m.2z(k.U,2i.U,0);m.R(k.U,{1z:0,1n:\'1Y\'});m.2z(k.S,2i.S,0);k.S.G.1n=\'1Y\';m.2z(k.U,{1z:1},t,I,C(){B.6I()})}q(k.1g){k.1g.2g.G.1B=k.U.G.1B;A 6Z=1I||-1,1w=k.1g.1w,8r=1I?3:1w,8q=1I?1w:3;O(A i=8r;6Z*i<=6Z*8q;i+=6Z,t+=25){(C(){A o=1I?8q-i:8r-i;4a(C(){B.1g.4C(0,o,1)},t)})()}}q(1I){}J{4a(C(){q(B.1g)B.1g.5U(B.4D);B.78();m.2z(B.U,{1z:0},m.9A,I,C(){B.5D()})},t)}},4e:C(1I,2i,8u){q(!1I)E;A B=k,1i=k.1i,x=k.x,y=k.y,3n=1i.x,3g=1i.y,U=k.U,S=k.S,1x=k.1x;m.4z(W,\'7D\',m.6H);m.R(S,{L:(x.1V||x.D)+\'F\',N:(y.1V||y.D)+\'F\'});q(1x)1x.G.2e=\'1Y\';k.1g=1i.1g;q(k.1g)k.1g.B=B;1i.1g=I;A 5l=m.1d(\'P\',{1c:\'K-\'+k.35},{1l:\'2l\',1B:4,2e:\'1q\',1o:\'1E\'});A 8t={cN:1i,cM:k};O(A n 2Y 8t){k[n]=8t[n].S.5J(1);m.R(k[n],{1l:\'2l\',8H:0,1n:\'1Y\'});5l.1X(k[n])}U.1X(5l);q(k.2A)m.R(k.4c,{1b:0,Y:0});q(1x){1x.1c=\'\';U.1X(1x)}5l.G.1o=\'\';1i.S.G.1o=\'1E\';q(m.4M&&m.2t<73){k.U.G.1n=\'1Y\'}m.2z(U,{L:x.D},{4h:m.cE,3P:C(3j,2H){A H=2H.H,4B=1-H;A 1f,D={},93=[\'H\',\'D\',\'1G\',\'36\'];O(A n 2Y 93){1f=93[n];D[\'x\'+1f]=1h.3e(4B*3n[1f]+H*x[1f]);D[\'y\'+1f]=1h.3e(4B*3g[1f]+H*y[1f]);D.cI=1h.3e(4B*(3n.1V||3n.D)+H*(x.1V||x.D));D.6S=1h.3e(4B*3n.Z(\'2K\')+H*x.Z(\'2K\'));D.cJ=1h.3e(4B*(3g.1V||3g.D)+H*(y.1V||y.D));D.6V=1h.3e(4B*3g.Z(\'2K\')+H*y.Z(\'2K\'))}q(B.1g)B.1g.4C({x:D.3h,y:D.3r,w:D.5L+D.44+D.8U+2*x.cb,h:D.5K+D.45+D.8T+2*y.cb});1i.U.G.d7=\'d6(\'+(D.3r-3g.H)+\'F, \'+(D.5L+D.44+D.8U+D.3h+2*3n.cb-3n.H)+\'F, \'+(D.5K+D.45+D.8T+D.3r+2*3g.cb-3g.H)+\'F, \'+(D.3h-3n.H)+\'F)\';m.R(S,{Y:(D.45+y.Z(\'2K\'))+\'F\',1b:(D.44+x.Z(\'2K\'))+\'F\',4d:(y.H-D.3r)+\'F\',4W:(x.H-D.3h)+\'F\'});m.R(U,{Y:D.3r+\'F\',1b:D.3h+\'F\',L:(D.44+D.8U+D.5L+2*x.cb)+\'F\',N:(D.45+D.8T+D.5K+2*y.cb)+\'F\'});m.R(5l,{L:(D.cI||D.5L)+\'F\',N:(D.cJ||D.5K)+\'F\',1b:(D.44+D.6S)+\'F\',Y:(D.45+D.6V)+\'F\',1n:\'1Y\'});m.R(B.cN,{Y:(3g.H-D.3r+3g.1G-D.45+3g.Z(\'2K\')-D.6V)+\'F\',1b:(3n.H-D.3h+3n.1G-D.44+3n.Z(\'2K\')-D.6S)+\'F\'});m.R(B.cM,{1z:H,Y:(y.H-D.3r+y.1G-D.45+y.Z(\'2K\')-D.6V)+\'F\',1b:(x.H-D.3h+x.1G-D.44+x.Z(\'2K\')-D.6S)+\'F\'});q(1x)m.R(1x,{L:D.5L+\'F\',N:D.5K+\'F\',1b:(D.44+x.cb)+\'F\',Y:(D.45+y.cb)+\'F\'})},76:C(){U.G.1n=S.G.1n=\'1Y\';S.G.1o=\'3X\';m.3B(5l);B.6I();1i.5D();B.1i=I}})},bQ:C(o,el){q(!k.1i)E 1j;O(A i=0;i\'+s+\'

    \'+k[k.6l].2d}}},a0:C(){q(!k.1i){O(A i=0;ik.x.Z(\'6e\')+k.x.Z(\'9R\'));A bG=(3N.y+3N.hk.y.Z(\'6e\')+k.y.Z(\'9R\'))}A 6F=m.9U(1m[i]);q(!bl&&!bG&&6F!=k.Q){q(!2S){1m[i].5F(\'1q-by\',\'[\'+k.Q+\']\');1m[i].9N=1m[i].G[1f];1m[i].G[1f]=\'1q\'}J q(2S.bF(\'[\'+k.Q+\']\')==-1){1m[i].5F(\'1q-by\',2S+\'[\'+k.Q+\']\')}}J q((2S==\'[\'+k.Q+\']\'||m.3d==6F)&&6F!=k.Q){1m[i].5F(\'1q-by\',\'\');1m[i].G[1f]=1m[i].9N||\'\'}J q(2S&&2S.bF(\'[\'+k.Q+\']\')>-1){1m[i].5F(\'1q-by\',2S.2k(\'[\'+k.Q+\']\',\'\'))}}}}},3M:C(){k.U.G.1B=m.4F+=2;O(A i=0;i14.23.1O)14.G.L=\'2w%\'}J q(14.23!=k.1x)k.1x.1X(14);q(/1b$/.11(p))14.G.1b=74+\'F\';q(/4X$/.11(p))m.R(14,{1b:\'50%\',4W:(74-1h.3e(14.1O/2))+\'F\'});q(/3m$/.11(p))14.G.3m=-74+\'F\';q(/^bM$/.11(p)){m.R(14,{3m:\'2w%\',9B:k.x.cb+\'F\',Y:-k.y.cb+\'F\',4Q:-k.y.cb+\'F\',2e:\'1M\'});k.x.1G=14.1O}J q(/^bC$/.11(p)){m.R(14,{1b:\'2w%\',4W:k.x.cb+\'F\',Y:-k.y.cb+\'F\',4Q:-k.y.cb+\'F\',2e:\'1M\'});k.x.36=14.1O}A 9d=14.23.1U;14.G.N=\'1M\';q(53&&14.1U>9d)14.G.N=m.3Z?9d+\'F\':\'2w%\';q(/^Y/.11(p))14.G.Y=6O+\'F\';q(/^9a/.11(p))m.R(14,{Y:\'50%\',4d:(6O-1h.3e(14.1U/2))+\'F\'});q(/^4Q/.11(p))14.G.4Q=-6O+\'F\';q(/^5N$/.11(p)){m.R(14,{1b:(-k.x.1G-k.x.cb)+\'F\',3m:(-k.x.36-k.x.cb)+\'F\',4Q:\'2w%\',6L:k.y.cb+\'F\',L:\'1M\'});k.y.1G=14.1U}J q(/^7E$/.11(p)){m.R(14,{1l:\'4y\',1b:(-k.x.1G-k.x.cb)+\'F\',3m:(-k.x.36-k.x.cb)+\'F\',Y:\'2w%\',4d:k.y.cb+\'F\',L:\'1M\'});k.y.36=14.1U;14.G.1l=\'2l\'}},bB:C(){k.a2([\'58\',\'9X\'],M);k.bq();q(k.9X)m.1A(k,\'eE\');q(k.58)m.1A(k,\'eF\');q(k.58&&k.a7)k.58.1c+=\' K-3u\';q(m.br)k.bp();O(A i=0;i=5.5){s=s.2k(1J 4Y(\']*>\',\'c9\'),\'\').2k(1J 4Y(\']*>.*?\',\'c9\'),\'\');q(k.1k){A 2B=k.1k.9O;q(!2B&&k.1k.6g)2B=k.1k.6g.W;q(!2B){A 3v=k;4a(C(){3v.6f()},25);E}2B.ca();2B.dg(s);2B.26();1t{s=2B.9Q(k.1v).2d}1y(e){1t{s=k.1k.W.9Q(k.1v).2d}1y(e){}}m.3B(k.1k)}J{7H=/(<19[^>]*>|<\\/19>)/db;q(7H.11(s))s=s.7G(7H)[m.3R?1:2]}}m.4p(k.S,\'7J\',\'K-19\').2d=s;k.3F();O(A x 2Y k)k[x]=I}};m.83=C(4k,1r){q(m.cX!==1j)m.95();k.4k=4k;O(A x 2Y 1r)k[x]=1r[x];q(k.cZ)k.cg();q(k.2D)k.2D=m.ci(k)};m.83.5w={cg:C(){k.2X=m.1d(\'P\',{2d:m.8b(m.8i.2X)},I,m.2b);A 6j=[\'3L\',\'3p\',\'3a\',\'1D\',\'3u\',\'1a-2F\',\'26\'];k.1Q={};A 3v=k;O(A i=0;i<6j.V;i++){k.1Q[6j[i]]=m.4p(k.2X,\'1H\',\'K-\'+6j[i]);k.4u(6j[i])}k.1Q.3p.G.1o=\'1E\'},ch:C(){q(k.cm||!k.2X)E;A B=m.16[k.4k],5q=B.7v(),2m=/7w$/;q(5q==0)k.5d(\'3a\');J q(2m.11(k.1Q.3a.2C(\'a\')[0].1c))k.4u(\'3a\');q(5q+1==m.4U.3i[B.2N||\'1E\'].V){k.5d(\'1D\');k.5d(\'3L\')}J q(2m.11(k.1Q.1D.2C(\'a\')[0].1c)){k.4u(\'1D\');k.4u(\'3L\')}},4u:C(1Q){q(!k.1Q)E;A cn=k,a=k.1Q[1Q].2C(\'a\')[0],2m=/7w$/;a.2p=C(){cn[1Q]();E 1j};q(2m.11(a.1c))a.1c=a.1c.2k(2m,\'\')},5d:C(1Q){q(!k.1Q)E;A a=k.1Q[1Q].2C(\'a\')[0];a.2p=C(){E 1j};q(!/7w$/.11(a.1c))a.1c+=\' 7w\'},cl:C(){q(k.42)k.3p();J k.3L()},3L:C(ck){q(k.1Q){k.1Q.3L.G.1o=\'1E\';k.1Q.3p.G.1o=\'\'}k.42=M;q(!ck)m.1D(k.4k)},3p:C(){q(k.1Q){k.1Q.3p.G.1o=\'1E\';k.1Q.3L.G.1o=\'\'}d9(k.42);k.42=I},3a:C(){k.3p();m.3a(k.1Q.3a)},1D:C(){k.3p();m.1D(k.1Q.1D)},3u:C(){},\'1a-2F\':C(){m.2G().7r()},26:C(){m.26(k.1Q.26)}};m.ci=C(1p){C 7p(B){m.3A(1r||{},{4P:4E,22:\'2D\',1c:\'K-2D-\'+5k+\'-14 \'+(1r.1c||\'\')});q(m.3Z)1r.6w=0;B.4O(1r);m.R(4E.23,{2e:\'1q\'})};C 28(3K){5t(1L,1h.3e(3K*4E[3S?\'1O\':\'1U\']*0.7))};C 5t(i,80){q(i===1L)O(A j=0;j<5I.V;j++){q(5I[j]==m.16[1p.4k].a){i=j;5m}}q(i===1L)E;A as=4E.2C(\'a\'),4I=as[i],48=4I.23,1b=3S?\'cj\':\'c8\',3m=3S?\'c7\':\'bX\',L=3S?\'bY\':\'bW\',4V=\'1w\'+1b,1O=\'1w\'+L,7e=P.23.23[1O],5j=7e-2g[1O],6o=3H(2g.G[3S?\'1b\':\'Y\'])||0,2O=6o,ej=20;q(80!==1L){2O=6o-80;q(5j>0)5j=0;q(2O>0)2O=0;q(2O<5j)2O=5j}J{O(A j=0;j0?as[i-1].23[4V]:48[4V],7Y=48[4V]+48[1O]+(as[i+1]?as[i+1].23[1O]:0);q(7Y>7e-6o)2O=7e-7Y;J q(7X<-6o)2O=-7X}A 8R=48[4V]+(48[1O]-7f[1O])/2+2O;m.2z(2g,3S?{1b:2O}:{Y:2O},I,\'8S\');m.2z(7f,3S?{1b:8R}:{Y:8R},I,\'8S\');8l.G.1o=2O<0?\'3X\':\'1E\';8M.G.1o=(2O>5j)?\'3X\':\'1E\'};A 5I=m.4U.3i[m.16[1p.4k].2N||\'1E\'],1r=1p.2D,5k=1r.5k||\'bV\',8K=(5k==\'en\'),4f=8K?[\'P\',\'6t\',\'1H\',\'1C\']:[\'2g\',\'4G\',\'47\',\'2J\'],3S=(5k==\'bV\'),4E=m.1d(\'P\',{1c:\'K-2D K-2D-\'+5k,2d:\'

    \'+\'<\'+4f[0]+\'><\'+4f[1]+\'>

    \'+\'

    \'+\'

    \'+\'

    \'},{1o:\'1E\'},m.2b),5E=4E.7L,P=5E[0],8l=5E[1],8M=5E[2],7f=5E[3],2g=P.ef,4G=4E.2C(4f[1])[0],47;O(A i=0;i<5I.V;i++){q(i==0||!3S)47=m.1d(4f[2],I,I,4G);(C(){A a=5I[i],48=m.1d(4f[3],I,I,47),ex=i;m.1d(\'a\',{21:a.21,24:a.24,2p:C(){q(/K-4I-46/.11(k.1c))E 1j;m.2G(k).3M();E m.8N(a)},2d:m.bT?m.bT(a):a.2d},I,48)})()}q(!8K){8l.2p=C(){28(-1)};8M.2p=C(){28(1)};m.2j(4G,W.eA!==1L?\'er\':\'eq\',C(e){A 3K=0;e=e||1S.2u;q(e.bU){3K=e.bU/dR;q(m.3z)3K=-3K}J q(e.bZ){3K=-e.bZ/3}q(3K)28(-3K*0.2);q(e.5n)e.5n();e.c0=1j})}E{7p:7p,5t:5t}};m.7o=m.18;A e8=m.5A;q(m.2h&&1S==1S.Y){(C(){1t{W.5h.e4(\'1b\')}1y(e){4a(c5.dZ,50);E}m.41()})()}m.2j(W,\'dW\',m.41);m.2j(1S,\'8B\',m.41);m.2j(W,\'41\',C(){q(m.7R||m.4b){A G=m.1d(\'G\',{T:\'e0/8I\'},I,W.2C(\'e1\')[0]),8E=W.7a==\'8v\';C 5P(8m,8n){q(m.2h&&(m.2t<9||8E)){A 1i=W.c6[W.c6.V-1];q(1F(1i.5P)=="7j")1i.5P(8m,8n)}J{G.1X(W.e6(8m+" {"+8n+"}"))}}C 5T(1f){E\'e5( ( ( ez = W.5h.\'+1f+\' ? W.5h.\'+1f+\' : W.19.\'+1f+\' ) ) + \\\'F\\\' );\'}q(m.7R)5P(\'.K 1N\',\'4L: 7T(\'+m.5c+m.7R+\'), 7Q !dA;\');5P(\'.K-2x-D\',m.2h&&(m.2t<7||8E)?\'1l: 2l; \'+\'1b:\'+5T(\'5O\')+\'Y:\'+5T(\'5R\')+\'L:\'+5T(\'8F\')+\'N:\'+5T(\'c4\'):\'1l: fV; L: 2w%; N: 2w%; 1b: 0; Y: 0\')}});m.2j(1S,\'3O\',C(){m.7S();q(m.2x)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', + 'pageOrigin', + '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: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : + parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), +ie : (document.all && !window.opera), +//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant? +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.ieLt9 && 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 (el.style[prop]) { + return el.style[prop]; + } else 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, + ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined'); + + var width = ieLt9 ? iebody.clientWidth : + (d.documentElement.clientWidth || self.innerWidth), + height = ieLt9 ? iebody.clientHeight : self.innerHeight; + hs.page = { + width: width, + height: height, + scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset, + scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset + }; + return hs.page; +}, + +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) { + isNew = true; + hs.dimmer = hs.createElement ('div', { + className: 'highslide-dimming highslide-viewport-size', + owner: '', + onclick: function() { + + hs.close(); + } + }, { + visibility: 'visible', + opacity: 0 + }, hs.container, true); + + if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) { + var body = document.body; + function pixDimmerSize() { + hs.setStyles(hs.dimmer, { + width: body.scrollWidth +'px', + height: body.scrollHeight +'px' + }); + } + pixDimmerSize(); + hs.addEventListener(window, 'resize', pixDimmerSize); + } + } + hs.dimmer.style.display = ''; + + var isNew = hs.dimmer.owner == ''; + hs.dimmer.owner += '|'+ exp.key; + + if (isNew) { + 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.dimmer.style.display = 'none'; + else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() { + hs.dimmer.style.display = 'none'; + }); +}, +transit : function (adj, exp) { + var last = exp || hs.getExpander(); + exp = last; + if (hs.upcoming) return false; + else hs.last = last; + hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + 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) return hs.transit(exp.getAdjacentAnchor(op), 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'); + } + 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 (!e.relatedTarget) 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.ieLt7 = hs.ie && hs.uaVersion < 7; + hs.ieLt9 = hs.ie && hs.uaVersion < 9; + + hs.getPageSize(); + 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 highslide-viewport-size' + }, { + 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.ieLt7 && 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){ + try { + 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; + } catch (e) {} + } + } +}); + +hs.Outline = function (outlineType, onLoad) { + this.onLoad = onLoad; + this.outlineType = outlineType; + var v = hs.uaVersion, tr; + + this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 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.uaVersion < 525 ? 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 == 0 || 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; + + if (this.maxHeight && this.dim == 'x') + exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); + + 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 = this.pageOrigin || 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) { + if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); + else 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.uaVersion < 525) 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 = Math.min(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; + } + changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); + 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, changed) { + 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); + changed = true; + } + } + return changed; +}, + +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, from) { + if (!up) return; + var exp = this, + last = this.last, + x = this.x, + y = this.y, + lastX = last.x, + lastY = last.y, + wrapper = this.wrapper, + content = this.content, + overlayBox = this.overlayBox; + hs.removeEventListener(document, 'mousemove', hs.dragHandler); + + hs.setStyles(content, { + width: (x.imgSize || x.size) +'px', + height: (y.imgSize || y.size) +'px' + }); + if (overlayBox) overlayBox.style.overflow = 'visible'; + this.outline = last.outline; + if (this.outline) this.outline.exp = exp; + last.outline = null; + var fadeBox = hs.createElement('div', { + className: 'highslide-'+ this.contentType + }, { + position: 'absolute', + zIndex: 4, + overflow: 'hidden', + display: 'none' + } + ); + 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]); + } + wrapper.appendChild(fadeBox); + if (overlayBox) { + overlayBox.className = ''; + wrapper.appendChild(overlayBox); + } + fadeBox.style.display = ''; + last.content.style.display = 'none'; + + + if (hs.safari && hs.uaVersion < 525) { + this.wrapper.style.visibility = 'visible'; + } + hs.animate(wrapper, { + width: x.size + }, { + duration: hs.transitionDuration, + step: function(val, args) { + var pos = args.pos, + invPos = 1 - pos; + var prop, + size = {}, + props = ['pos', 'size', 'p1', 'p2']; + for (var n in props) { + prop = props[n]; + size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]); + size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]); + size.ximgSize = Math.round( + invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size)); + size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad')); + size.yimgSize = Math.round( + invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size)); + size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad')); + } + if (exp.outline) exp.outline.setPosition({ + x: size.xpos, + y: size.ypos, + w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb, + h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb + }); + last.wrapper.style.clip = 'rect(' + + (size.ypos - lastY.pos)+'px, ' + + (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, ' + + (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, ' + + (size.xpos - lastX.pos)+'px)'; + + hs.setStyles(content, { + top: (size.yp1 + y.get('imgPad')) +'px', + left: (size.xp1 + x.get('imgPad')) +'px', + marginTop: (y.pos - size.ypos) +'px', + marginLeft: (x.pos - size.xpos) +'px' + }); + hs.setStyles(wrapper, { + top: size.ypos +'px', + left: size.xpos +'px', + width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px', + height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px' + }); + hs.setStyles(fadeBox, { + width: (size.ximgSize || size.xsize) + 'px', + height: (size.yimgSize || size.ysize) +'px', + left: (size.xp1 + size.ximgPad) +'px', + top: (size.yp1 + size.yimgPad) +'px', + visibility: 'visible' + }); + + hs.setStyles(exp.oldImg, { + top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px', + left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px' + }); + + hs.setStyles(exp.newImg, { + opacity: pos, + top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px', + left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px' + }); + if (overlayBox) hs.setStyles(overlayBox, { + width: size.xsize + 'px', + height: size.ysize +'px', + left: (size.xp1 + x.cb) +'px', + top: (size.yp1 + y.cb) +'px' + }); + }, + complete: function () { + wrapper.style.visibility = content.style.visibility = 'visible'; + content.style.display = 'block'; + hs.discardElement(fadeBox); + exp.afterExpand(); + last.afterClose(); + exp.last = null; + } + + }); +}, +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 (as && !as[current + op] && this.slideshow && this.slideshow.repeat) { + if (op == 1) return as[0]; + else if (op == -1) return as[as.length-1]; + } + return (as && 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) { + this.createOverlay(hs.extend(ss.overlayOptions || {}, { + overlayId: ss.controls, + hsId: 'controls', + zIndex: 5 + })); + } + 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) { + this[type] = hs.getNode(this.a['_'+ type + 'Id']); + if (!this[type]) { + var next = this.a.nextSibling; + while (next && !hs.isHsAnchor(next)) { + if ((new RegExp('highslide-'+ type)).test(next.className || null)) { + if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; + this[type] = hs.getNode(next.id); + 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.ieLt7 ? '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.ieLt7 && 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); + this.wrapper.style.height = this.y.get('wsize') +'px'; +}, + +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 : 'auto' + }, + 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.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.slideshow) { + var c = this.slideshow.controls; + if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c); + } + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o); + } + 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, + ySize = this.y.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; + + var ypos = this.y.pos - (this.y.size - ySize) / 2; + if (ypos < hs.marginTop) ypos = hs.marginTop; + + this.moveTo(xpos, ypos); + 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); + this.destroyOverlays(); + 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', + className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '') + }); + 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 (minTblPos > 0) minTblPos = 0; + 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, + title: a.title, + onclick: function() { + if (/highslide-active-anchor/.test(this.className)) return false; + 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 + } +}; +hs.langDefaults = hs.lang; +// history +var HsExpander = hs.Expander; +if (hs.ie && window == window.top) { + (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); + +// set handlers +hs.addEventListener(document, 'ready', function() { + if (hs.expandCursor || hs.dimmingOpacity) { + var style = hs.createElement('style', { type: 'text/css' }, null, + document.getElementsByTagName('HEAD')[0]), + backCompat = document.compatMode == 'BackCompat'; + + + function addRule(sel, dec) { + if (hs.ie && (hs.uaVersion < 9 || backCompat)) { + var last = document.styleSheets[document.styleSheets.length - 1]; + if (typeof(last.addRule) == "object") last.addRule(sel, dec); + } else { + style.appendChild(document.createTextNode(sel + " {" + dec + "}")); + } + } + function fix(prop) { + return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + + ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; + } + if (hs.expandCursor) addRule ('.highslide img', + 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); + addRule ('.highslide-viewport-size', + hs.ie && (hs.uaVersion < 7 || backCompat) ? + 'position: absolute; '+ + 'left:'+ fix('scrollLeft') + + 'top:'+ fix('scrollTop') + + 'width:'+ fix('clientWidth') + + 'height:'+ fix('clientHeight') : + 'position: fixed; width: 100%; height: 100%; left: 0; top: 0'); + } +}); +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); +} diff --git a/gal/highslide/highslide-with-gallery.packed.js b/gal/highslide/highslide-with-gallery.packed.js new file mode 100644 index 0000000..449942c --- /dev/null +++ b/gal/highslide/highslide-with-gallery.packed.js @@ -0,0 +1,9 @@ +/** + * Name: Highslide JS + * Version: 4.1.13 (2011-10-06) + * Config: default +slideshow +positioning +transitions +viewport +thumbstrip +packed + * Author: Torstein Hønsi + * Support: www.highslide.com/support + * License: www.highslide.com/#license + */ +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}('q(!m){u m={18:{9C:\'9t\',9f:\'bb...\',9g:\'8o 1L ba\',9Y:\'8o 1L bd 1L bw\',7p:\'bx 1L bl B (f)\',aS:\'bp by 8H 8I\',b0:\'bn 1L bj 8H 8I bz\',8T:\'8C\',8U:\'8D\',8w:\'8E\',8v:\'8J\',8t:\'8J (bv)\',bu:\'bg\',8P:\'8G\',8A:\'8G 1g (8B)\',8N:\'8F\',8M:\'8F 1g (8B)\',8S:\'8C (8l 14)\',8O:\'8D (8l 2V)\',8s:\'8E\',8r:\'1:1\',3n:\'b9 %1 bq %2\',84:\'8o 1L 26 2M, c4 8L c6 1L 3i. c0 8l c1 K 1p 8L 3c.\'},4p:\'L/bX/\',5M:\'bI.4y\',5m:\'bK.4y\',7f:53,8p:53,4L:15,9M:15,4j:15,9K:15,4z:bE,91:0.75,9j:J,7A:5,3B:2,bP:3,4R:1f,at:\'4g 2V\',aq:1,an:J,aF:\'bQ://L.c2/\',aE:\'bO\',8V:J,8e:[\'a\'],2Z:[],aL:53,3I:0,7G:50,3Q:\'2n\',6H:\'2n\',8y:H,8x:H,7v:J,5c:8R,5w:8R,5q:J,1B:\'bR-bS\',a6:{2B:\'<7V>\'+\'<1R 2s="L-3c">\'+\'\'+\'<23>{m.18.8T}\'+\'\'+\'<1R 2s="L-3r">\'+\'\'+\'<23>{m.18.8P}\'+\'\'+\'<1R 2s="L-2S">\'+\'\'+\'<23>{m.18.8N}\'+\'\'+\'<1R 2s="L-1p">\'+\'\'+\'<23>{m.18.8U}\'+\'\'+\'<1R 2s="L-3i">\'+\'\'+\'<23>{m.18.8w}\'+\'\'+\'<1R 2s="L-1a-2D">\'+\'\'+\'<23>{m.18.8r}\'+\'\'+\'<1R 2s="L-26">\'+\'\'+\'<23>{m.18.8v}\'+\'\'+\'\'},4X:[],6Z:J,W:[],6V:[\'5q\',\'30\',\'3Q\',\'6H\',\'8y\',\'8x\',\'1B\',\'3B\',\'bG\',\'bH\',\'bJ\',\'8u\',\'bW\',\'cd\',\'cc\',\'8z\',\'aW\',\'7v\',\'3D\',\'5b\',\'2Z\',\'3I\',\'M\',\'1b\',\'7B\',\'5c\',\'5w\',\'6F\',\'6R\',\'9i\',\'2t\',\'2r\',\'aT\',\'aD\',\'1G\'],1x:[],4V:0,7q:{x:[\'9H\',\'14\',\'4i\',\'2V\',\'9L\'],y:[\'4T\',\'11\',\'8h\',\'4g\',\'6D\']},66:{},8z:{},8u:{},3u:[],4U:[],48:{},7I:{},5G:[],21:/ca\\/4\\.0/.19(4B.5r)?8:8n((4B.5r.5Y().2H(/.+(?:9y|c9|ce|2m)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),2m:(R.52&&!1A.3q),4u:/cf/.19(4B.5r),5Z:/ci.+9y:1\\.[0-8].+cg/.19(4B.5r),$:z(1M){q(1M)D R.c7(1M)},2p:z(2o,3j){2o[2o.S]=3j},1c:z(9m,4k,3P,8b,9n){u C=R.1c(9m);q(4k)m.3b(C,4k);q(9n)m.V(C,{bY:0,aM:\'1F\',6S:0});q(3P)m.V(C,3P);q(8b)8b.2E(C);D C},3b:z(C,4k){K(u x 2T 4k)C[x]=4k[x];D C},V:z(C,3P){K(u x 2T 3P){q(m.4d&&x==\'1n\'){q(3P[x]>0.99)C.G.c5(\'5j\');I C.G.5j=\'9o(1n=\'+(3P[x]*28)+\')\'}I C.G[x]=3P[x]}},2b:z(C,Z,31){u 41,4v,47;q(1q 31!=\'6q\'||31===H){u 36=9V;31={3J:36[2],2r:36[3],63:36[4]}}q(1q 31.3J!=\'3n\')31.3J=53;31.2r=1d[31.2r]||1d.93;31.5S=m.3b({},Z);K(u 35 2T Z){u e=24 m.1E(C,31,35);41=8n(m.7U(C,35))||0;4v=8n(Z[35]);47=35!=\'1n\'?\'F\':\'\';e.3F(41,4v,47)}},7U:z(C,Z){q(C.G[Z]){D C.G[Z]}I q(R.6T){D R.6T.9P(C,H).9Q(Z)}I{q(Z==\'1n\')Z=\'5j\';u 3j=C.bf[Z.2j(/\\-(\\w)/g,z(a,b){D b.92()})];q(Z==\'5j\')3j=3j.2j(/9o\\(1n=([0-9]+)\\)/,z(a,b){D b/28});D 3j===\'\'?1:3j}},6v:z(){u d=R,w=1A,5d=d.6i&&d.6i!=\'7P\'?d.4l:d.3x,4d=m.2m&&(m.21<9||1q 9l==\'1C\');u M=4d?5d.8m:(d.4l.8m||5J.b2),1b=4d?5d.aK:5J.b3;m.3S={M:M,1b:1b,5l:4d?5d.5l:9l,5i:4d?5d.5i:be};D m.3S},6g:z(C){u p={x:C.4f,y:C.9h};4o(C.9k){C=C.9k;p.x+=C.4f;p.y+=C.9h;q(C!=R.3x&&C!=R.4l){p.x-=C.5l;p.y-=C.5i}}D p},2D:z(a,2O,3F,T){q(!a)a=m.1c(\'a\',H,{1u:\'1F\'},m.22);q(1q a.5u==\'z\')D 2O;2d{24 m.4Z(a,2O,3F);D 1f}1W(e){D J}},a4:z(C,4F,U){u 1i=C.2L(4F);K(u i=0;i<1i.S;i++){q((24 5X(U)).19(1i[i].U)){D 1i[i]}}D H},a7:z(s){s=s.2j(/\\s/g,\' \');u 1T=/{m\\.18\\.([^}]+)\\}/g,4S=s.2H(1T),18;q(4S)K(u i=0;i<4S.S;i++){18=4S[i].2j(1T,"$1");q(1q m.18[18]!=\'1C\')s=s.2j(4S[i],m.18[18])}D s},9w:z(){u 7J=0,6j=-1,W=m.W,A,1r;K(u i=0;i7J){7J=1r;6j=i}}}q(6j==-1)m.3v=-1;I W[6j].43()},5h:z(a,5p){a.5u=a.2G;u p=a.5u?a.5u():H;a.5u=H;D(p&&1q p[5p]!=\'1C\')?p[5p]:(1q m[5p]!=\'1C\'?m[5p]:H)},73:z(a){u 1G=m.5h(a,\'1G\');q(1G)D 1G;D a.1Y},4W:z(1M){u 3w=m.$(1M),45=m.7I[1M],a={};q(!3w&&!45)D H;q(!45){45=3w.7j(J);45.1M=\'\';m.7I[1M]=45;D 3w}I{D 45.7j(J)}},3H:z(d){q(d)m.8j.2E(d);m.8j.2R=\'\'},1m:z(A){q(!m.2a){7E=J;m.2a=m.1c(\'X\',{U:\'L-bk L-1Z-B\',4x:\'\',2G:z(){m.26()}},{1e:\'1D\',1n:0},m.22,J);q(/(bm|bt|bo|br)/.19(4B.5r)){u 3x=R.3x;z 7H(){m.V(m.2a,{M:3x.bA+\'F\',1b:3x.b5+\'F\'})}7H();m.1Q(1A,\'3O\',7H)}}m.2a.G.1u=\'\';u 7E=m.2a.4x==\'\';m.2a.4x+=\'|\'+A.P;q(7E){q(m.5Z&&m.9q)m.V(m.2a,{9e:\'5O(\'+m.4p+\'bh.97)\',1n:1});I m.2b(m.2a,{1n:A.3I},m.7G)}},7Q:z(P){q(!m.2a)D;q(1q P!=\'1C\')m.2a.4x=m.2a.4x.2j(\'|\'+P,\'\');q((1q P!=\'1C\'&&m.2a.4x!=\'\')||(m.1U&&m.5h(m.1U,\'3I\')))D;q(m.5Z&&m.9q)m.2a.G.1u=\'1F\';I m.2b(m.2a,{1n:0},m.7G,H,z(){m.2a.G.1u=\'1F\'})},83:z(6n,A){u Y=A||m.2h();A=Y;q(m.1U)D 1f;I m.Y=Y;m.49(R,1A.3q?\'5P\':\'5Q\',m.4N);2d{m.1U=6n;6n.2G()}1W(e){m.Y=m.1U=H}2d{q(!6n||A.2Z[1]!=\'3Y\')A.26()}1W(e){}D 1f},6d:z(C,1P){u A=m.2h(C);q(A)D m.83(A.7b(1P),A);I D 1f},3c:z(C){D m.6d(C,-1)},1p:z(C){D m.6d(C,1)},4N:z(e){q(!e)e=1A.29;q(!e.2i)e.2i=e.7l;q(1q e.2i.9x!=\'1C\')D J;u A=m.2h();u 1P=H;8Y(e.cq){1I 70:q(A)A.6k();D J;1I 32:1P=2;5B;1I 34:1I 39:1I 40:1P=1;5B;1I 8:1I 33:1I 37:1I 38:1P=-1;5B;1I 27:1I 13:1P=0}q(1P!==H){q(1P!=2)m.49(R,1A.3q?\'5P\':\'5Q\',m.4N);q(!m.8V)D J;q(e.4D)e.4D();I e.9W=1f;q(A){q(1P==0){A.26()}I q(1P==2){q(A.1g)A.1g.ad()}I{q(A.1g)A.1g.2S();m.6d(A.P,1P)}D 1f}}D J},d5:z(O){m.2p(m.1x,m.3b(O,{1H:\'1H\'+m.4V++}))},d4:z(1h){u 2C=1h.2t;q(1q 2C==\'6q\'){K(u i=0;i<2C.S;i++){u o={};K(u x 2T 1h)o[x]=1h[x];o.2t=2C[i];m.2p(m.4U,o)}}I{m.2p(m.4U,1h)}},86:z(7N,65){u C,1T=/^L-Q-([0-9]+)$/;C=7N;4o(C.1O){q(C.5F!==1C)D C.5F;q(C.1M&&1T.19(C.1M))D C.1M.2j(1T,"$1");C=C.1O}q(!65){C=7N;4o(C.1O){q(C.4F&&m.5L(C)){K(u P=0;P1)D J;q(!e.2i)e.2i=e.7l;u C=e.2i;4o(C.1O&&!(/L-(2M|3i|5W|3O)/.19(C.U))){C=C.1O}u A=m.2h(C);q(A&&(A.8c||!A.55))D J;q(A&&e.T==\'aH\'){q(e.2i.9x)D J;u 2H=C.U.2H(/L-(2M|3i|3O)/);q(2H){m.2I={A:A,T:2H[1],14:A.x.E,M:A.x.B,11:A.y.E,1b:A.y.B,9v:e.6c,9u:e.68};m.1Q(R,\'6o\',m.5V);q(e.4D)e.4D();q(/L-(2M|5W)-89/.19(A.17.U)){A.43();m.7R=J}D 1f}}I q(e.T==\'aA\'){m.49(R,\'6o\',m.5V);q(m.2I){q(m.4I&&m.2I.T==\'2M\')m.2I.A.17.G.46=m.4I;u 3y=m.2I.3y;q(!3y&&!m.7R&&!/(3i|3O)/.19(m.2I.T)){A.26()}I q(3y||(!3y&&m.d8)){m.2I.A.5s(\'1s\')}m.7R=1f;m.2I=H}I q(/L-2M-89/.19(C.U)){C.G.46=m.4I}}D 1f},5V:z(e){q(!m.2I)D J;q(!e)e=1A.29;u a=m.2I,A=a.A;a.5T=e.6c-a.9v;a.7o=e.68-a.9u;u 7s=1d.ck(1d.9r(a.5T,2)+1d.9r(a.7o,2));q(!a.3y)a.3y=(a.T!=\'2M\'&&7s>0)||(7s>(m.cX||5));q(a.3y&&e.6c>5&&e.68>5){q(a.T==\'3O\')A.3O(a);I{A.7C(a.14+a.5T,a.11+a.7o);q(a.T==\'2M\')A.17.G.46=\'3i\'}}D 1f},8Q:z(e){2d{q(!e)e=1A.29;u 6C=/cW/i.19(e.T);q(!e.2i)e.2i=e.7l;q(!e.6E)e.6E=6C?e.db:e.di;u A=m.2h(e.2i);q(!A.55)D;q(!A||!e.6E||m.2h(e.6E,J)==A||m.2I)D;K(u i=0;i=k.1h.3J+k.80){k.4c=k.4v;k.E=k.7X=1;k.8a();k.1h.5S[k.Z]=J;u 8d=J;K(u i 2T k.1h.5S)q(k.1h.5S[i]!==J)8d=1f;q(8d){q(k.1h.63)k.1h.63.95(k.2F)}D 1f}I{u n=t-k.80;k.7X=n/k.1h.3J;k.E=k.1h.2r(n,0,1,k.1h.3J);k.4c=k.41+((k.4v-k.41)*k.E);k.8a()}D J}};m.3b(m.1E,{3k:{1n:z(1E){m.V(1E.2F,{1n:1E.4c})},96:z(1E){2d{q(1E.2F.G&&1E.2F.G[1E.Z]!=H)1E.2F.G[1E.Z]=1E.4c+1E.47;I 1E.2F[1E.Z]=1E.4c}1W(e){}}}});m.4O=z(1B,3V){k.3V=3V;k.1B=1B;u v=m.21,3L;k.7h=m.2m&&m.21<7;q(!1B){q(3V)3V();D}m.71();k.1V=m.1c(\'1V\',{cr:0},{1e:\'1s\',1j:\'2v\',cC:\'cD\',M:0},m.22,J);u 4a=m.1c(\'4a\',H,H,k.1V,1);k.2e=[];K(u i=0;i<=8;i++){q(i%3==0)3L=m.1c(\'3L\',H,{1b:\'2n\'},4a,J);k.2e[i]=m.1c(\'2e\',H,H,3L,J);u G=i!=4?{cP:0,cO:0}:{1j:\'8i\'};m.V(k.2e[i],G)}k.2e[4].U=1B+\' L-16\';k.98()};m.4O.5o={98:z(){u 1G=m.4p+(m.cN||"cQ/")+k.1B+".97";u 9a=m.4u&&m.21<6t?m.22:H;k.3d=m.1c(\'1y\',H,{1j:\'2v\',11:\'-4P\'},9a,J);u 7T=k;k.3d.64=z(){7T.9b()};k.3d.1G=1G},9b:z(){u o=k.1k=k.3d.M/4,E=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1m={1b:(2*o)+\'F\',M:(2*o)+\'F\'};K(u i=0;i<=8;i++){q(E[i]){q(k.7h){u w=(i==1||i==7)?\'28%\':k.3d.M+\'F\';u X=m.1c(\'X\',H,{M:\'28%\',1b:\'28%\',1j:\'8i\',3a:\'1s\'},k.2e[i],J);m.1c(\'X\',H,{5j:"cL:cG.cF.cE(cH=cI, 1G=\'"+k.3d.1G+"\')",1j:\'2v\',M:w,1b:k.3d.1b+\'F\',14:(E[i][0]*o)+\'F\',11:(E[i][1]*o)+\'F\'},X,J)}I{m.V(k.2e[i],{9e:\'5O(\'+k.3d.1G+\') \'+(E[i][0]*o)+\'F \'+(E[i][1]*o)+\'F\'})}q(1A.3q&&(i==3||i==5))m.1c(\'X\',H,1m,k.2e[i],J);m.V(k.2e[i],1m)}}k.3d=H;q(m.48[k.1B])m.48[k.1B].5x();m.48[k.1B]=k;q(k.3V)k.3V()},3Z:z(E,1k,9d,3t,2r){u A=k.A,cK=A.Q.G,1k=1k||0,E=E||{x:A.x.E+1k,y:A.y.E+1k,w:A.x.N(\'1N\')-2*1k,h:A.y.N(\'1N\')-2*1k};q(9d)k.1V.G.1e=(E.h>=4*k.1k)?\'1D\':\'1s\';m.V(k.1V,{14:(E.x-k.1k)+\'F\',11:(E.y-k.1k)+\'F\',M:(E.w+2*k.1k)+\'F\'});E.w-=2*k.1k;E.h-=2*k.1k;m.V(k.2e[4],{M:E.w>=0?E.w+\'F\':0,1b:E.h>=0?E.h+\'F\':0});q(k.7h)k.2e[3].G.1b=k.2e[5].G.1b=k.2e[4].G.1b},5x:z(9c){q(9c)k.1V.G.1e=\'1s\';I m.3H(k.1V)}};m.6r=z(A,1m){k.A=A;k.1m=1m;k.3m=1m==\'x\'?\'ah\':\'au\';k.3G=k.3m.5Y();k.4M=1m==\'x\'?\'af\':\'ag\';k.6B=k.4M.5Y();k.7d=1m==\'x\'?\'a5\':\'a8\';k.90=k.7d.5Y();k.1o=k.2z=0};m.6r.5o={N:z(P){8Y(P){1I\'78\':D k.1K+k.3o+(k.t-m.1S[\'1k\'+k.3m])/2;1I\'6Q\':D k.E+k.cb+k.1o+(k.B-m.1S[\'1k\'+k.3m])/2;1I\'1N\':D k.B+2*k.cb+k.1o+k.2z;1I\'4n\':D k.3W-k.2P-k.3X;1I\'7a\':D k.N(\'4n\')-2*k.cb-k.1o-k.2z;1I\'5t\':D k.E-(k.A.16?k.A.16.1k:0);1I\'7M\':D k.N(\'1N\')+(k.A.16?2*k.A.16.1k:0);1I\'2f\':D k.1z?1d.2y((k.B-k.1z)/2):0}},74:z(){k.cb=(k.A.17[\'1k\'+k.3m]-k.t)/2;k.3X=m[\'6S\'+k.7d]},6X:z(){k.t=k.A.C[k.3G]?7L(k.A.C[k.3G]):k.A.C[\'1k\'+k.3m];k.1K=k.A.1K[k.1m];k.3o=(k.A.C[\'1k\'+k.3m]-k.t)/2;q(k.1K==0||k.1K==-1){k.1K=(m.3S[k.3G]/2)+m.3S[\'1J\'+k.4M]}},6P:z(){u A=k.A;k.2k=\'2n\';q(A.6H==\'4i\')k.2k=\'4i\';I q(24 5X(k.6B).19(A.3Q))k.2k=H;I q(24 5X(k.90).19(A.3Q))k.2k=\'56\';k.E=k.1K-k.cb+k.3o;q(k.6R&&k.1m==\'x\')A.6F=1d.2X(A.6F||k.1a,A.6R*k.1a/A.y.1a);k.B=1d.2X(k.1a,A[\'56\'+k.3m]||k.1a);k.2q=A.5q?1d.2X(A[\'2X\'+k.3m],k.1a):k.1a;q(A.3A&&A.30){k.B=A[k.3G];k.1z=k.1a}q(k.1m==\'x\'&&m.4R)k.2q=A.5c;k.2i=A[\'2i\'+k.1m.92()];k.2P=m[\'6S\'+k.4M];k.1J=m.3S[\'1J\'+k.4M];k.3W=m.3S[k.3G]},82:z(i){u A=k.A;q(A.3A&&(A.30||m.4R)){k.1z=i;k.B=1d.56(k.B,k.1z);A.17.G[k.6B]=k.N(\'2f\')+\'F\'}I k.B=i;A.17.G[k.3G]=i+\'F\';A.Q.G[k.3G]=k.N(\'1N\')+\'F\';q(A.16)A.16.3Z();q(k.1m==\'x\'&&A.1l)A.4K(J);q(k.1m==\'x\'&&A.1g&&A.3A){q(i==k.1a)A.1g.4J(\'1a-2D\');I A.1g.3T(\'1a-2D\')}},7Z:z(i){k.E=i;k.A.Q.G[k.6B]=i+\'F\';q(k.A.16)k.A.16.3Z()}};m.4Z=z(a,2O,3F,2Q){q(R.cs&&m.2m&&!m.6I){m.1Q(R,\'3s\',z(){24 m.4Z(a,2O,3F,2Q)});D}k.a=a;k.3F=3F;k.2Q=2Q||\'2M\';k.3A=!k.cp;m.6Z=1f;k.1x=[];k.Y=m.Y;m.Y=H;m.71();u P=k.P=m.W.S;K(u i=0;ip.1J+p.3W-p.3X)p.E=p.1J+p.3W-p.B-p.2P-p.3X-p.1o-p.2z;q(p.E(k.x.1z||k.x.B)){k.ap();q(k.1x.S==1)k.4K()}}k.aG()}1W(e){k.7D(e)}},2k:z(p,4C){u 4b,2l=p.2i,1m=p==k.x?\'x\':\'y\';q(2l&&2l.2H(/ /)){4b=2l.dh(\' \');2l=4b[0]}q(2l&&m.$(2l)){p.E=m.6g(m.$(2l))[1m];q(4b&&4b[1]&&4b[1].2H(/^[-]?[0-9]+F$/))p.E+=7L(4b[1]);q(p.Bp.1J+p.3W-p.3X){q(!4C&&79&&4q){p.B=1d.2X(p.B,p.N(1m==\'y\'?\'4n\':\'7a\'))}I q(p.N(\'1N\')2x){ 2A=2Y*2x;q(2Ak.5w&&x.B>k.5c&&y.N(\'1N\')>y.N(\'4n\')){y.B-=10;q(2x)x.B=y.B*2x;k.4K(0,1);3e=J}}D 3e},aG:z(){u x=k.x,y=k.y;k.5s(\'1s\');q(k.1g&&k.1g.2g)k.1g.2g.4G();k.8f(1,{Q:{M:x.N(\'1N\'),1b:y.N(\'1N\'),14:x.E,11:y.E},17:{14:x.1o+x.N(\'2f\'),11:y.1o+y.N(\'2f\'),M:x.1z||x.B,1b:y.1z||y.B}},m.7f)},8f:z(1t,1L,3t){u 5k=k.2Z,6M=1t?(k.Y?k.Y.a:H):m.1U,t=(5k[1]&&6M&&m.5h(6M,\'2Z\')[1]==5k[1])?5k[1]:5k[0];q(k[t]&&t!=\'2D\'){k[t](1t,1L);D}q(k.16&&!k.3B){q(1t)k.16.3Z();I k.16.5x()}q(!1t)k.67();u A=k,x=A.x,y=A.y,2r=k.2r;q(!1t)2r=k.aT||2r;u ay=1t?z(){q(A.16)A.16.1V.G.1e="1D";4r(z(){A.62()},50)}:z(){A.5v()};q(1t)m.V(k.Q,{M:x.t+\'F\',1b:y.t+\'F\'});q(k.aD){m.V(k.Q,{1n:1t?0:1});m.3b(1L.Q,{1n:1t})}m.2b(k.Q,1L.Q,{3J:3t,2r:2r,3k:z(3j,36){q(A.16&&A.3B&&36.Z==\'11\'){u 4Q=1t?36.E:1-36.E;u E={w:x.t+(x.N(\'1N\')-x.t)*4Q,h:y.t+(y.N(\'1N\')-y.t)*4Q,x:x.1K+(x.E-x.1K)*4Q,y:y.1K+(y.E-y.1K)*4Q};A.16.3Z(E,0,1)}}});m.2b(k.17,1L.17,3t,2r,ay);q(1t){k.Q.G.1e=\'1D\';k.17.G.1e=\'1D\';k.a.U+=\' L-42-3Q\'}},5n:z(1t,1L){k.3B=1f;u A=k,t=1t?m.7f:0;q(1t){m.2b(k.Q,1L.Q,0);m.V(k.Q,{1n:0,1e:\'1D\'});m.2b(k.17,1L.17,0);k.17.G.1e=\'1D\';m.2b(k.Q,{1n:1},t,H,z(){A.62()})}q(k.16){k.16.1V.G.1r=k.Q.G.1r;u 5D=1t||-1,1k=k.16.1k,7c=1t?3:1k,6Y=1t?1k:3;K(u i=7c;5D*i<=5D*6Y;i+=5D,t+=25){(z(){u o=1t?6Y-i:7c-i;4r(z(){A.16.3Z(0,o,1)},t)})()}}q(1t){}I{4r(z(){q(A.16)A.16.5x(A.cz);A.67();m.2b(A.Q,{1n:0},m.8p,H,z(){A.5v()})},t)}},3Y:z(1t,1L,72){q(!1t)D;u A=k,Y=k.Y,x=k.x,y=k.y,2W=Y.x,2U=Y.y,Q=k.Q,17=k.17,1l=k.1l;m.49(R,\'6o\',m.5V);m.V(17,{M:(x.1z||x.B)+\'F\',1b:(y.1z||y.B)+\'F\'});q(1l)1l.G.3a=\'1D\';k.16=Y.16;q(k.16)k.16.A=A;Y.16=H;u 4s=m.1c(\'X\',{U:\'L-\'+k.2Q},{1j:\'2v\',1r:4,3a:\'1s\',1u:\'1F\'});u 77={aO:Y,aR:k};K(u n 2T 77){k[n]=77[n].17.7j(1);m.V(k[n],{1j:\'2v\',aM:0,1e:\'1D\'});4s.2E(k[n])}Q.2E(4s);q(1l){1l.U=\'\';Q.2E(1l)}4s.G.1u=\'\';Y.17.G.1u=\'1F\';q(m.4u&&m.21<6t){k.Q.G.1e=\'1D\'}m.2b(Q,{M:x.B},{3J:m.aL,3k:z(3j,36){u E=36.E,3U=1-E;u Z,B={},6N=[\'E\',\'B\',\'1o\',\'2z\'];K(u n 2T 6N){Z=6N[n];B[\'x\'+Z]=1d.2y(3U*2W[Z]+E*x[Z]);B[\'y\'+Z]=1d.2y(3U*2U[Z]+E*y[Z]);B.aJ=1d.2y(3U*(2W.1z||2W.B)+E*(x.1z||x.B));B.6p=1d.2y(3U*2W.N(\'2f\')+E*x.N(\'2f\'));B.aN=1d.2y(3U*(2U.1z||2U.B)+E*(y.1z||y.B));B.6f=1d.2y(3U*2U.N(\'2f\')+E*y.N(\'2f\'))}q(A.16)A.16.3Z({x:B.2K,y:B.2J,w:B.58+B.3C+B.6O+2*x.cb,h:B.5a+B.3z+B.6W+2*y.cb});Y.Q.G.ct=\'cn(\'+(B.2J-2U.E)+\'F, \'+(B.58+B.3C+B.6O+B.2K+2*2W.cb-2W.E)+\'F, \'+(B.5a+B.3z+B.6W+B.2J+2*2U.cb-2U.E)+\'F, \'+(B.2K-2W.E)+\'F)\';m.V(17,{11:(B.3z+y.N(\'2f\'))+\'F\',14:(B.3C+x.N(\'2f\'))+\'F\',4j:(y.E-B.2J)+\'F\',4L:(x.E-B.2K)+\'F\'});m.V(Q,{11:B.2J+\'F\',14:B.2K+\'F\',M:(B.3C+B.6O+B.58+2*x.cb)+\'F\',1b:(B.3z+B.6W+B.5a+2*y.cb)+\'F\'});m.V(4s,{M:(B.aJ||B.58)+\'F\',1b:(B.aN||B.5a)+\'F\',14:(B.3C+B.6p)+\'F\',11:(B.3z+B.6f)+\'F\',1e:\'1D\'});m.V(A.aO,{11:(2U.E-B.2J+2U.1o-B.3z+2U.N(\'2f\')-B.6f)+\'F\',14:(2W.E-B.2K+2W.1o-B.3C+2W.N(\'2f\')-B.6p)+\'F\'});m.V(A.aR,{1n:E,11:(y.E-B.2J+y.1o-B.3z+y.N(\'2f\')-B.6f)+\'F\',14:(x.E-B.2K+x.1o-B.3C+x.N(\'2f\')-B.6p)+\'F\'});q(1l)m.V(1l,{M:B.58+\'F\',1b:B.5a+\'F\',14:(B.3C+x.cb)+\'F\',11:(B.3z+y.cb)+\'F\'})},63:z(){Q.G.1e=17.G.1e=\'1D\';17.G.1u=\'4H\';m.3H(4s);A.62();Y.5v();A.Y=H}})},9E:z(o,C){q(!k.Y)D 1f;K(u i=0;i\'+s+\'\'+k[k.5b].2R}}},aB:z(){q(!k.Y){K(u i=0;ik.x.N(\'5t\')+k.x.N(\'7M\'));u 9Z=(3g.y+3g.hk.y.N(\'5t\')+k.y.N(\'7M\'))}u 5H=m.86(1i[i]);q(!ax&&!9Z&&5H!=k.P){q(!2u){1i[i].5A(\'1s-by\',\'[\'+k.P+\']\');1i[i].88=1i[i].G[Z];1i[i].G[Z]=\'1s\'}I q(2u.9X(\'[\'+k.P+\']\')==-1){1i[i].5A(\'1s-by\',2u+\'[\'+k.P+\']\')}}I q((2u==\'[\'+k.P+\']\'||m.3v==5H)&&5H!=k.P){1i[i].5A(\'1s-by\',\'\');1i[i].G[Z]=1i[i].88||\'\'}I q(2u&&2u.9X(\'[\'+k.P+\']\')>-1){1i[i].5A(\'1s-by\',2u.2j(\'[\'+k.P+\']\',\'\'))}}}}},43:z(){k.Q.G.1r=m.4z+=2;K(u i=0;iO.1O.2c)O.G.M=\'28%\'}I q(O.1O!=k.1l)k.1l.2E(O);q(/14$/.19(p))O.G.14=5E+\'F\';q(/4i$/.19(p))m.V(O,{14:\'50%\',4L:(5E-1d.2y(O.2c/2))+\'F\'});q(/2V$/.19(p))O.G.2V=-5E+\'F\';q(/^9H$/.19(p)){m.V(O,{2V:\'28%\',9M:k.x.cb+\'F\',11:-k.y.cb+\'F\',4g:-k.y.cb+\'F\',3a:\'2n\'});k.x.1o=O.2c}I q(/^9L$/.19(p)){m.V(O,{14:\'28%\',4L:k.x.cb+\'F\',11:-k.y.cb+\'F\',4g:-k.y.cb+\'F\',3a:\'2n\'});k.x.2z=O.2c}u 8g=O.1O.3f;O.G.1b=\'2n\';q(4E&&O.3f>8g)O.G.1b=m.3E?8g+\'F\':\'28%\';q(/^11/.19(p))O.G.11=5C+\'F\';q(/^8h/.19(p))m.V(O,{11:\'50%\',4j:(5C-1d.2y(O.3f/2))+\'F\'});q(/^4g/.19(p))O.G.4g=-5C+\'F\';q(/^4T$/.19(p)){m.V(O,{14:(-k.x.1o-k.x.cb)+\'F\',2V:(-k.x.2z-k.x.cb)+\'F\',4g:\'28%\',9K:k.y.cb+\'F\',M:\'2n\'});k.y.1o=O.3f}I q(/^6D$/.19(p)){m.V(O,{1j:\'8i\',14:(-k.x.1o-k.x.cb)+\'F\',2V:(-k.x.2z-k.x.cb)+\'F\',11:\'28%\',4j:k.y.cb+\'F\',M:\'2n\'});k.y.2z=O.3f;O.G.1j=\'2v\'}},9J:z(){k.a2([\'6z\',\'dd\'],J);k.a3();q(k.6z&&k.7v)k.6z.U+=\' L-3i\';q(m.an)k.am();K(u i=0;i0)4w=0;q(2w>0)2w=0;q(2w<4w)2w=4w}I{K(u j=0;j0?as[i-1].1O[4f]:3M[4f],7x=3M[4f]+3M[2c]+(as[i+1]?as[i+1].1O[2c]:0);q(7x>6h-5z)2w=6h-7x;I q(7F<-5z)2w=-7F}u 7r=3M[4f]+(3M[2c]-6b[2c])/2+2w;m.2b(1V,3p?{14:2w}:{11:2w},H,\'7n\');m.2b(6b,3p?{14:7r}:{11:7r},H,\'7n\');7Y.G.1u=2w<0?\'4H\':\'1F\';85.G.1u=(2w>4w)?\'4H\':\'1F\'};u 51=m.3R.2N[m.W[1g.3N].2t||\'1F\'],1h=1g.2g,4m=1h.4m||\'ao\',81=(4m==\'bi\'),3K=81?[\'X\',\'7V\',\'1R\',\'23\']:[\'1V\',\'4a\',\'3L\',\'2e\'],3p=(4m==\'ao\'),4e=m.1c(\'X\',{U:\'L-2g L-2g-\'+4m,2R:\'\'+\'<\'+3K[0]+\'><\'+3K[1]+\'>\'+\'\'+\'\'+\'\'},{1u:\'1F\'},m.22),57=4e.6l,X=57[0],7Y=57[1],85=57[2],6b=57[3],1V=X.b7,4a=4e.2L(3K[1])[0],3L;K(u i=0;i<51.S;i++){q(i==0||!3p)3L=m.1c(3K[2],H,H,4a);(z(){u a=51[i],3M=m.1c(3K[3],H,H,3L),cj=i;m.1c(\'a\',{1Y:a.1Y,1X:a.1X,2G:z(){q(/L-42-3Q/.19(k.U))D 1f;m.2h(k).43();D m.83(a)},2R:m.9I?m.9I(a):a.2R},H,3M)})()}q(!81){7Y.2G=z(){1J(-1)};85.2G=z(){1J(1)};m.1Q(4a,R.c3!==1C?\'bB\':\'bZ\',z(e){u 3h=0;e=e||1A.29;q(e.9D){3h=e.9D/ch;q(m.3q)3h=-3h}I q(e.9N){3h=-e.9N/3}q(3h)1J(-3h*0.2);q(e.4D)e.4D();e.9W=1f})}D{6s:6s,4G:4G}};m.5U=m.18;u bC=m.4Z;q(m.2m&&1A==1A.11){(z(){2d{R.4l.bD(\'14\')}1W(e){4r(9V.bF,50);D}m.3s()})()}m.1Q(R,\'bL\',m.3s);m.1Q(1A,\'az\',m.3s);m.1Q(R,\'3s\',z(){q(m.5M||m.3I){u G=m.1c(\'G\',{T:\'bM/7U\'},H,R.2L(\'bT\')[0]),8k=R.6i==\'7P\';z 5e(7w,7W){q(m.2m&&(m.21<9||8k)){u Y=R.9S[R.9S.S-1];q(1q(Y.5e)=="6q")Y.5e(7w,7W)}I{G.2E(R.bU(7w+" {"+7W+"}"))}}z 5f(Z){D\'bV( ( ( bN = R.4l.\'+Z+\' ? R.4l.\'+Z+\' : R.3x.\'+Z+\' ) ) + \\\'F\\\' );\'}q(m.5M)5e(\'.L 1y\',\'46: 5O(\'+m.4p+m.5M+\'), 5R !c8;\');5e(\'.L-1Z-B\',m.2m&&(m.21<7||8k)?\'1j: 2v; \'+\'14:\'+5f(\'5l\')+\'11:\'+5f(\'5i\')+\'M:\'+5f(\'8m\')+\'1b:\'+5f(\'aK\'):\'1j: bc; M: 28%; 1b: 28%; 14: 0; 11: 0\')}});m.1Q(1A,\'3O\',z(){m.6v();q(m.1Z)K(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', + 'pageOrigin', + '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: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : + parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), +ie : (document.all && !window.opera), +//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant? +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.ieLt9 && 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 (el.style[prop]) { + return el.style[prop]; + } else 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, + ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined'); + + var width = ieLt9 ? iebody.clientWidth : + (d.documentElement.clientWidth || self.innerWidth), + height = ieLt9 ? iebody.clientHeight : self.innerHeight; + hs.page = { + width: width, + height: height, + scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset, + scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset + }; + return hs.page; +}, + +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 || hs.getExpander(); + exp = last; + if (hs.upcoming) return false; + else hs.last = last; + hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + 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) return hs.transit(exp.getAdjacentAnchor(op), 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.ieLt9 ? 'white' : 'none'), + opacity: 0.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 (!e.relatedTarget) 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.ieLt7 = hs.ie && hs.uaVersion < 7; + hs.ieLt9 = hs.ie && hs.uaVersion < 9; + + hs.getPageSize(); + 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.ieLt7 && 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){ + try { + 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; + } catch (e) {} + } + } +}); + +hs.Outline = function (outlineType, onLoad) { + this.onLoad = onLoad; + this.outlineType = outlineType; + var v = hs.uaVersion, tr; + + this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 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.uaVersion < 525 ? 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 == 0 || 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; + + if (this.maxHeight && this.dim == 'x') + exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); + + 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 (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try { + exp.iDoc.body.style.overflow = 'auto'; + } catch (e) {} + 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 = this.pageOrigin || 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) { + if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); + else 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.uaVersion < 525) 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, + height: 0, + 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 exp = this; + var ajax = new hs.Ajax(this.a, innerContent); + ajax.src = this.src; + 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.iDoc = 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; + if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try { + this.iDoc.body.style.overflow = 'hidden'; + } catch (e) {} + 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 = Math.min(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; + } + changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); + 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, changed) { + var x = this.x, y = this.y; + if (this.overlayBox && (this.isImage || this.allowHeightReduction)) { + 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); + changed = true; + } + } + return changed; +}, + +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']; + return (as && 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) { + this[type] = hs.getNode(this.a['_'+ type + 'Id']); + if (!this[type]) { + var next = this.a.nextSibling; + while (next && !hs.isHsAnchor(next)) { + if ((new RegExp('highslide-'+ type)).test(next.className || null)) { + if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; + this[type] = hs.getNode(next.id); + 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.ieLt7 ? '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.ieLt7 && 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); + this.wrapper.style.height = this.y.get('wsize') +'px'; +}, + +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'; + this.isExpanded = false; + 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 : 'auto' + }, + 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.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, + ySize = this.y.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; + + var ypos = this.y.pos - (this.y.size - ySize) / 2; + if (ypos < hs.marginTop) ypos = hs.marginTop; + + this.moveTo(xpos, ypos); + 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 () { + var xhr; + 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 { xhr = new XMLHttpRequest(); } + catch (e) { + try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } + catch (e) { + try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } + catch (e) { this.onError(); } + } + } + var pThis = this; + xhr.onreadystatechange = function() { + if(pThis.xhr.readyState == 4) { + if (pThis.id) pThis.getElementContent(); + else pThis.loadHTML(); + } + }; + var src = this.src; + this.xhr = xhr; + if (hs.forceAjaxReload) + src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime()); + xhr.open('GET', src, true); + xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + xhr.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.xhr.responseText, + regBody; + if (this.pre) hs.cachedGets[this.src] = s; + if (!hs.ie || hs.uaVersion >= 5.5) { + s = s.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 { + regBody = /(]*>|<\/body>)/ig; + if (regBody.test(s)) s = s.split(regBody)[hs.ieLt9 ? 1 : 2]; + + } + } + hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s; + this.onLoad(); + for (var x in this) this[x] = null; +} +}; +hs.langDefaults = hs.lang; +// history +var HsExpander = hs.Expander; +if (hs.ie && window == window.top) { + (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); + +// set handlers +hs.addEventListener(document, 'ready', function() { + if (hs.expandCursor) { + var style = hs.createElement('style', { type: 'text/css' }, null, + document.getElementsByTagName('HEAD')[0]), + backCompat = document.compatMode == 'BackCompat'; + + + function addRule(sel, dec) { + if (hs.ie && (hs.uaVersion < 9 || backCompat)) { + var last = document.styleSheets[document.styleSheets.length - 1]; + if (typeof(last.addRule) == "object") last.addRule(sel, dec); + } else { + style.appendChild(document.createTextNode(sel + " {" + dec + "}")); + } + } + function fix(prop) { + return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + + ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; + } + if (hs.expandCursor) addRule ('.highslide img', + 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); + } +}); +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); +} diff --git a/gal/highslide/highslide-with-html.packed.js b/gal/highslide/highslide-with-html.packed.js new file mode 100644 index 0000000..6febacf --- /dev/null +++ b/gal/highslide/highslide-with-html.packed.js @@ -0,0 +1,9 @@ +/** + * Name: Highslide JS + * Version: 4.1.13 (2011-10-06) + * Config: default +inline +ajax +iframe +flash +packed + * Author: Torstein Hønsi + * Support: www.highslide.com/support + * License: www.highslide.com/#license + */ +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}('q(!m){u m={1e:{89:\'8H\',8K:\'co...\',8G:\'6Q 2h cA\',9s:\'6Q 2h cB 2h c1\',9Y:\'bX 2h bT G (f)\',ag:\'c7 by 8g 8f\',9F:\'d3 2h d6 8g 8f dg\',91:\'8n\',8W:\'8e\',8R:\'9g\',8V:\'8j\',8U:\'8j (di)\',93:\'dj\',dd:\'8h\',d2:\'8h 8m (8l)\',cM:\'8k\',bR:\'8k 8m (8l)\',90:\'8n (6L 1f)\',8X:\'8e (6L 2G)\',8S:\'9g\',b8:\'1:1\',7h:\'6Q 2h 28 2D, aR 8Y aL 2h 3I. aH 6L aT W 1M 8Y 5n.\'},56:\'U/aN/\',5v:\'bG.6E\',4E:\'bB.6E\',7c:6j,a7:6j,4j:15,6m:15,3N:15,6f:15,4l:bt,8N:0.75,7m:J,71:5,3g:2,aZ:3,4M:1h,9Z:\'3E 2G\',9U:1,a1:J,9y:\'b2://U.b4/\',9E:\'aO\',8C:J,7B:[\'a\'],5D:1h,5A:J,48:J,31:\'4K\',82:J,7b:J,3O:8Z,4s:8Z,4I:J,1x:\'aS-aP\',8A:{8B:\'<1i 3n="U-aU"><92>\'+\'<3u 3n="U-5n">\'+\'\'+\'<2p>{m.1e.91}\'+\'\'+\'<3u 3n="U-1M">\'+\'\'+\'<2p>{m.1e.8W}\'+\'\'+\'<3u 3n="U-3I">\'+\'\'+\'<2p>{m.1e.8R}\'+\'\'+\'<3u 3n="U-28">\'+\'\'+\'<2p>{m.1e.8V}\'+\'\'+\'\'+\'<1i 3n="U-V">\'+\'<1i 3n="U-b0"><1i>\'+\'<2p 3n="U-3q" 2u="{m.1e.93}"><2p>\'+\'\'},4P:[],6n:J,P:[],6s:[\'4I\',\'2K\',\'1x\',\'3g\',\'b5\',\'bc\',\'aG\',\'9e\',\'aM\',\'b3\',\'bQ\',\'9c\',\'9K\',\'7b\',\'K\',\'M\',\'7f\',\'5D\',\'5A\',\'48\',\'bD\',\'bC\',\'bH\',\'2f\',\'82\',\'3i\',\'3J\',\'31\',\'7I\',\'78\',\'3O\',\'4s\',\'5X\',\'6N\',\'8d\',\'4h\',\'2g\',\'an\',\'am\',\'T\'],1Q:[],4y:0,bI:{x:[\'ad\',\'1f\',\'6H\',\'2G\',\'ac\'],y:[\'4U\',\'18\',\'6q\',\'3E\',\'6a\']},5R:{},9c:{},9e:{},7I:{al:{},1E:{},ay:{}},3t:[],3G:{},3C:[],5b:[],4o:[],5J:{},7k:{},6h:[],26:/bM\\/4\\.0/.16(46.5V)?8:6t((46.5V.5x().2Z(/.+(?:9f|bJ|bK|1L)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1L:(N.4F&&!1y.30),4X:/bL/.16(46.5V),7V:/bx.+9f:1\\.[0-8].+bi/.16(46.5V),$:B(1j){q(1j)D N.6F(1j)},20:B(1P,2R){1P[1P.1c]=2R},14:B(9b,3h,3l,4r,95){u C=N.14(9b);q(3h)m.3e(C,3h);q(95)m.Q(C,{6z:0,ap:\'24\',6V:0});q(3l)m.Q(C,3l);q(4r)4r.1G(C);D C},3e:B(C,3h){W(u x 3A 3h)C[x]=3h[x];D C},Q:B(C,3l){W(u x 3A 3l){q(m.2Y&&x==\'1B\'){q(3l[x]>0.99)C.F.bp(\'4C\');L C.F.4C=\'97(1B=\'+(3l[x]*2A)+\')\'}L C.F[x]=3l[x]}},41:B(C,1a,2P){u 3S,3Y,3P;q(1t 2P!=\'6W\'||2P===I){u 2S=aE;2P={3w:2S[2],2g:2S[3],83:2S[4]}}q(1t 2P.3w!=\'42\')2P.3w=6j;2P.2g=1r[2P.2g]||1r.8M;2P.5d=m.3e({},1a);W(u 2z 3A 1a){u e=1w m.1C(C,2P,2z);3S=6t(m.79(C,2z))||0;3Y=6t(1a[2z]);3P=2z!=\'1B\'?\'E\':\'\';e.2O(3S,3Y,3P)}},79:B(C,1a){q(C.F[1a]){D C.F[1a]}L q(N.87){D N.87.9k(C,I).9i(1a)}L{q(1a==\'1B\')1a=\'4C\';u 2R=C.4u[1a.2i(/\\-(\\w)/g,B(a,b){D b.bo()})];q(1a==\'4C\')2R=2R.2i(/97\\(1B=([0-9]+)\\)/,B(a,b){D b/2A});D 2R===\'\'?1:2R}},5y:B(){u d=N,w=1y,58=d.5G&&d.5G!=\'6M\'?d.44:d.V,2Y=m.1L&&(m.26<9||1t 8y==\'1X\');u K=2Y?58.8Q:(d.44.8Q||5o.bv),M=2Y?58.bu:5o.bm;m.3k={K:K,M:M,5T:2Y?58.5T:8y,5U:2Y?58.5U:bf};D m.3k},85:B(C){u p={x:C.8x,y:C.6G};3T(C.8p){C=C.8p;p.x+=C.8x;p.y+=C.6G;q(C!=N.V&&C!=N.44){p.x-=C.5T;p.y-=C.5U}}D p},53:B(a,1E,2O,R){q(!a)a=m.14(\'a\',I,{1O:\'24\'},m.1S);q(1t a.4V==\'B\')D 1E;q(R==\'2Q\'){W(u i=0;i7n){7n=1u;5g=i}}}q(5g==-1)m.2q=-1;L P[5g].3d()},3U:B(a,4R){a.4V=a.2M;u p=a.4V?a.4V():I;a.4V=I;D(p&&1t p[4R]!=\'1X\')?p[4R]:(1t m[4R]!=\'1X\'?m[4R]:I)},5m:B(a){u T=m.3U(a,\'T\');q(T)D T;D a.2v},3z:B(1j){u 1D=m.$(1j),3M=m.7k[1j],a={};q(!1D&&!3M)D I;q(!3M){3M=1D.61(J);3M.1j=\'\';m.7k[1j]=3M;D 1D}L{D 3M.61(J)}},3j:B(d){q(d)m.7g.1G(d);m.7g.2n=\'\'},8t:B(7F,A){u 3r=A||m.3v();A=3r;q(m.3B)D 1h;L m.3r=3r;m.4g(N,1y.30?\'5i\':\'5h\',m.4D);1m{m.3B=7F;7F.2M()}1l(e){m.3r=m.3B=I}1m{A.28()}1l(e){}D 1h},5k:B(C,2w){u A=m.3v(C);q(A)D m.8t(A.6B(2w),A);L D 1h},5n:B(C){D m.5k(C,-1)},1M:B(C){D m.5k(C,1)},4D:B(e){q(!e)e=1y.1Y;q(!e.2j)e.2j=e.6p;q(1t e.2j.7O!=\'1X\')D J;u A=m.3v();u 2w=I;8T(e.aI){1J 70:q(A)A.7i();D J;1J 32:1J 34:1J 39:1J 40:2w=1;7N;1J 8:1J 33:1J 37:1J 38:2w=-1;7N;1J 27:1J 13:2w=0}q(2w!==I){m.4g(N,1y.30?\'5i\':\'5h\',m.4D);q(!m.8C)D J;q(e.65)e.65();L e.aY=1h;q(A){q(2w==0){A.28()}L{m.5k(A.S,2w)}D 1h}}D J},b1:B(19){m.20(m.1Q,m.3e(19,{2F:\'2F\'+m.4y++}))},7S:B(7C,5M){u C,2t=/^U-Y-([0-9]+)$/;C=7C;3T(C.3a){q(C.1j&&2t.16(C.1j))D C.1j.2i(2t,"$1");C=C.3a}q(!5M){C=7C;3T(C.3a){q(C.4c&&m.5W(C)){W(u S=0;S1)D J;q(!e.2j)e.2j=e.6p;u C=e.2j;3T(C.3a&&!(/U-(2D|3I|2Q|3q)/.16(C.1p))){C=C.3a}u A=m.3v(C);q(A&&(A.4z||!A.4e))D J;q(A&&e.R==\'7H\'){q(e.2j.7O)D J;u 2Z=C.1p.2Z(/U-(2D|3I|3q)/);q(2Z){m.2a={A:A,R:2Z[1],1f:A.x.H,K:A.x.G,18:A.y.H,M:A.y.G,8J:e.5Q,8F:e.5f};m.1R(N,\'6o\',m.8a);q(e.65)e.65();q(/U-(2D|2Q)-7s/.16(A.O.1p)){A.3d();m.7p=J}D 1h}L q(/U-2Q/.16(C.1p)&&m.2q!=A.S){A.3d();A.4a(\'1n\')}}L q(e.R==\'9t\'){m.4g(N,\'6o\',m.8a);q(m.2a){q(m.4i&&m.2a.R==\'2D\')m.2a.A.O.F.3L=m.4i;u 3f=m.2a.3f;q(!3f&&!m.7p&&!/(3I|3q)/.16(m.2a.R)){A.28()}L q(3f||(!3f&&m.8O)){m.2a.A.4a(\'1n\')}q(m.2a.A.2W)m.2a.A.2W.F.1O=\'24\';m.7p=1h;m.2a=I}L q(/U-2D-7s/.16(C.1p)){C.F.3L=m.4i}}D 1h},8a:B(e){q(!m.2a)D J;q(!e)e=1y.1Y;u a=m.2a,A=a.A;q(A.11){q(!A.2W)A.2W=m.14(\'1i\',I,{1d:\'22\',K:A.x.G+\'E\',M:A.y.G+\'E\',1f:A.x.cb+\'E\',18:A.y.cb+\'E\',1u:4,94:(m.2Y?\'bh\':\'24\'),1B:0.cD},A.Y,J);q(A.2W.F.1O==\'24\')A.2W.F.1O=\'\'}a.5q=e.5Q-a.8J;a.5r=e.5f-a.8F;u 6A=1r.cU(1r.8E(a.5q,2)+1r.8E(a.5r,2));q(!a.3f)a.3f=(a.R!=\'2D\'&&6A>0)||(6A>(m.cR||5));q(a.3f&&e.5Q>5&&e.5f>5){q(a.R==\'3q\')A.3q(a);L{A.7x(a.1f+a.5q,a.18+a.5r);q(a.R==\'2D\')A.O.F.3L=\'3I\'}}D 1h},8c:B(e){1m{q(!e)e=1y.1Y;u 67=/cW/i.16(e.R);q(!e.2j)e.2j=e.6p;q(!e.6l)e.6l=67?e.cZ:e.cY;u A=m.3v(e.2j);q(!A.4e)D;q(!A||!e.6l||m.3v(e.6l,J)==A||m.2a)D;W(u i=0;i=k.1N.3w+k.84){k.3Q=k.3Y;k.H=k.80=1;k.7Q();k.1N.5d[k.1a]=J;u 86=J;W(u i 3A k.1N.5d)q(k.1N.5d[i]!==J)86=1h;q(86){q(k.1N.83)k.1N.83.8v(k.2k)}D 1h}L{u n=t-k.84;k.80=n/k.1N.3w;k.H=k.1N.2g(n,0,1,k.1N.3w);k.3Q=k.3S+((k.3Y-k.3S)*k.H);k.7Q()}D J}};m.3e(m.1C,{3o:{1B:B(1C){m.Q(1C.2k,{1B:1C.3Q})},8z:B(1C){1m{q(1C.2k.F&&1C.2k.F[1C.1a]!=I)1C.2k.F[1C.1a]=1C.3Q+1C.3P;L 1C.2k[1C.1a]=1C.3Q}1l(e){}}}});m.4L=B(1x,2J){k.2J=2J;k.1x=1x;u v=m.26,5O;k.6C=m.1L&&m.26<7;q(!1x){q(2J)2J();D}m.5N();k.2m=m.14(\'2m\',{d7:0},{1q:\'1n\',1d:\'22\',d8:\'dc\',K:0},m.1S,J);u 7W=m.14(\'7W\',I,I,k.2m,1);k.29=[];W(u i=0;i<=8;i++){q(i%3==0)5O=m.14(\'5O\',I,{M:\'1H\'},7W,J);k.29[i]=m.14(\'29\',I,I,5O,J);u F=i!=4?{db:0,da:0}:{1d:\'3K\'};m.Q(k.29[i],F)}k.29[4].1p=1x+\' U-1o\';k.8P()};m.4L.54={8P:B(){u T=m.56+(m.d9||"cL/")+k.1x+".cE";u 98=m.4X&&m.26<8i?m.1S:I;k.2X=m.14(\'1v\',I,{1d:\'22\',18:\'-3R\'},98,J);u 36=k;k.2X.3H=B(){36.96()};k.2X.T=T},96:B(){u o=k.1s=k.2X.K/4,H=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1F={M:(2*o)+\'E\',K:(2*o)+\'E\'};W(u i=0;i<=8;i++){q(H[i]){q(k.6C){u w=(i==1||i==7)?\'2A%\':k.2X.K+\'E\';u 1i=m.14(\'1i\',I,{K:\'2A%\',M:\'2A%\',1d:\'3K\',1W:\'1n\'},k.29[i],J);m.14(\'1i\',I,{4C:"c6:c5.9M.c4(c8=c9, T=\'"+k.2X.T+"\')",1d:\'22\',K:w,M:k.2X.M+\'E\',1f:(H[i][0]*o)+\'E\',18:(H[i][1]*o)+\'E\'},1i,J)}L{m.Q(k.29[i],{94:\'6X(\'+k.2X.T+\') \'+(H[i][0]*o)+\'E \'+(H[i][1]*o)+\'E\'})}q(1y.30&&(i==3||i==5))m.14(\'1i\',I,1F,k.29[i],J);m.Q(k.29[i],1F)}}k.2X=I;q(m.3G[k.1x])m.3G[k.1x].5l();m.3G[k.1x]=k;q(k.2J)k.2J()},4B:B(H,1s,9a,3b,2g){u A=k.A,4A=A.Y.F,1s=1s||0,H=H||{x:A.x.H+1s,y:A.y.H+1s,w:A.x.1b(\'1K\')-2*1s,h:A.y.1b(\'1K\')-2*1s};q(9a)k.2m.F.1q=(H.h>=4*k.1s)?\'2l\':\'1n\';m.Q(k.2m,{1f:(H.x-k.1s)+\'E\',18:(H.y-k.1s)+\'E\',K:(H.w+2*k.1s)+\'E\'});H.w-=2*k.1s;H.h-=2*k.1s;m.Q(k.29[4],{K:H.w>=0?H.w+\'E\':0,M:H.h>=0?H.h+\'E\':0});q(k.6C)k.29[3].F.M=k.29[5].F.M=k.29[4].F.M},5l:B(9d){q(9d)k.2m.F.1q=\'1n\';L m.3j(k.2m)}};m.5t=B(A,1F){k.A=A;k.1F=1F;k.2H=1F==\'x\'?\'cd\':\'cc\';k.2C=k.2H.5x();k.4J=1F==\'x\'?\'ca\':\'c3\';k.6J=k.4J.5x();k.6P=1F==\'x\'?\'c2\':\'bV\';k.bU=k.6P.5x();k.1V=k.2U=0};m.5t.54={1b:B(S){8T(S){1J\'7R\':D k.1A+k.2s+(k.t-m.21[\'1s\'+k.2H])/2;1J\'1K\':D k.G+2*k.cb+k.1V+k.2U;1J\'4b\':D k.5E-k.3y-k.5F;1J\'6K\':D k.1b(\'4b\')-2*k.cb-k.1V-k.2U;1J\'4w\':D k.H-(k.A.1o?k.A.1o.1s:0);1J\'88\':D k.1b(\'1K\')+(k.A.1o?2*k.A.1o.1s:0);1J\'5u\':D k.1T?1r.5Y((k.G-k.1T)/2):0}},6v:B(){k.cb=(k.A.O[\'1s\'+k.2H]-k.t)/2;k.5F=m[\'6V\'+k.6P]},6y:B(){k.t=k.A.C[k.2C]?49(k.A.C[k.2C]):k.A.C[\'1s\'+k.2H];k.1A=k.A.1A[k.1F];k.2s=(k.A.C[\'1s\'+k.2H]-k.t)/2;q(k.1A==0||k.1A==-1){k.1A=(m.3k[k.2C]/2)+m.3k[\'3s\'+k.4J]}},6u:B(){u A=k.A;k.3X=\'1H\';k.H=k.1A-k.cb+k.2s;q(k.6N&&k.1F==\'x\')A.5X=1r.2L(A.5X||k.Z,A.6N*k.Z/A.y.Z);k.G=1r.2L(k.Z,A[\'7l\'+k.2H]||k.Z);k.2E=A.4I?1r.2L(A[\'2L\'+k.2H],k.Z):k.Z;q(A.2o&&A.2K){k.G=A[k.2C];k.1T=k.Z}q(k.1F==\'x\'&&m.4M)k.2E=A.3O;k.3y=m[\'6V\'+k.4J];k.3s=m.3k[\'3s\'+k.4J];k.5E=m.3k[k.2C]},7J:B(i){u A=k.A;q(A.2o&&(A.2K||m.4M)){k.1T=i;k.G=1r.7l(k.G,k.1T);A.O.F[k.6J]=k.1b(\'5u\')+\'E\'}L k.G=i;A.O.F[k.2C]=i+\'E\';A.Y.F[k.2C]=k.1b(\'1K\')+\'E\';q(A.1o)A.1o.4B();q(A.2W)A.2W.F[k.2C]=i+\'E\';q(k.1F==\'y\'&&A.4v&&A.V.F.M!=\'1H\')1m{A.4v.V.F.1W=\'1H\'}1l(e){}q(A.1Z){u d=A.2c;q(k.7a===1X)k.7a=A.1g[\'1s\'+k.2H]-d[\'1s\'+k.2H];d.F[k.2C]=(k.G-k.7a)+\'E\';q(k.1F==\'x\')A.3D.F.K=\'1H\';q(A.V)A.V.F[k.2C]=\'1H\'}q(k.1F==\'x\'&&A.1z)A.4m(J)},7j:B(i){k.H=i;k.A.Y.F[k.6J]=i+\'E\';q(k.A.1o)k.A.1o.4B()}};m.4S=B(a,1E,2O,2B){q(N.9r&&m.1L&&!m.6Z){m.1R(N,\'3p\',B(){1w m.4S(a,1E,2O,2B)});D}k.a=a;k.2O=2O;k.2B=2B||\'2D\';k.1Z=(2B==\'2Q\');k.2o=!k.1Z;m.6n=1h;k.1Q=[];m.5N();u S=k.S=m.P.1c;W(u i=0;i(k.x.1T||k.x.G)){k.9W();q(k.1Q.1c==1)k.4m()}}k.7M()}1l(e){k.7w(e)}},7d:B(4r,1H){u c=m.4d(4r,\'5H\',\'U-V\');q(/(11|3c)/.16(k.2f)){q(k.3i)c.F.K=k.3i+\'E\';q(k.3J)c.F.M=k.3J+\'E\'}},5S:B(){q(k.av)D;u A=k;k.V=m.4d(k.1g,\'5H\',\'U-V\');q(k.2f==\'11\'){k.4t();u 4n=m.2I.61(1);k.V.1G(4n);k.cn=k.1g.2e;q(!k.3i)k.3i=4n.2e;u 45=k.1g.1I-k.V.1I,h=k.3J||m.3k.M-45-m.3N-m.6f,3H=k.31==\'4K\'?\' 3H="q (m.P[\'+k.S+\']) m.P[\'+k.S+\'].4x()" \':\'\';k.V.2n+=\'<11 2z="m\'+(1w 5s()).59()+\'" cq="0" S="\'+k.S+\'" \'+\' F="K:\'+k.3i+\'E; M:\'+h+\'E" \'+3H+\' T="\'+k.T+\'" >\';k.4n=k.V.3x(\'1i\')[0];k.11=k.V.3x(\'11\')[0];q(k.31==\'4O\')k.6S()}q(k.2f==\'3c\'){k.V.1j=k.V.1j||\'m-cm-1j-\'+k.S;u a=k.7I;q(!a.1E)a.1E={};q(1t a.1E.aF==\'1X\')a.1E.aF=\'ci\';q(7D)7D.cj(k.T,k.V.1j,k.3i,k.3J,a.ck||\'7\',a.cC,a.al,a.1E,a.ay)}k.av=J},76:B(){q(k.11&&!k.3J){k.11.F.M=k.V.F.M=k.at()+\'E\'}k.1g.1G(m.2I);q(!k.x.Z)k.x.Z=k.1g.2e;k.y.Z=k.1g.1I;k.1g.aj(m.2I);q(m.1L&&k.au>49(k.1g.4u.M)){k.au=49(k.1g.4u.M)}m.Q(k.Y,{1d:\'22\',6z:\'0\'});m.Q(k.O,{K:k.x.t+\'E\',M:k.y.t+\'E\'})},at:B(){u h;1m{u 1U=k.4v=k.11.6r||k.11.52.N;u 2I=1U.14(\'1i\');2I.F.ar=\'aw\';1U.V.1G(2I);h=2I.6G;q(m.1L)h+=49(1U.V.4u.3N)+49(1U.V.4u.6f)-1}1l(e){h=bY}D h},6S:B(){u 4k=k.1g.2e-k.4n.2e;m.3j(k.4n);q(4k<0)4k=0;u 45=k.1g.1I-k.11.1I;q(k.4v&&!k.3J&&!k.M&&k.y.G==k.y.Z)1m{k.4v.V.F.1W=\'1n\'}1l(e){}m.Q(k.11,{K:1r.7u(k.x.G-4k)+\'E\',M:1r.7u(k.y.G-45)+\'E\'});m.Q(k.V,{K:k.11.F.K,M:k.11.F.M});k.4p=k.11;k.2c=k.4p},aq:B(){k.7d(k.1g);q(k.2f==\'3c\'&&k.31==\'4K\')k.5S();q(k.x.G1D.1I){1D.F.K=(49(1D.F.K)+5C)+\'E\'}k.4p=1D;k.2c=k.4p}q(k.11&&k.31==\'4K\')k.6S();q(!k.4p&&k.y.Gk.2c.3a.1I){4T("1m { m.P["+k.S+"].2c.F.1W = \'1H\'; } 1l(e) {}",m.7c)}},3X:B(p,3W){u bW,bS=p.2j,1F=p==k.x?\'x\':\'y\';u 6R=1h;u 3V=p.A.4I;p.H=1r.5Y(p.H-((p.1b(\'1K\')-p.t)/2));q(p.Hp.3s+p.5E-p.5F){q(!3W&&6R&&3V){p.G=1r.2L(p.G,p.1b(1F==\'y\'?\'4b\':\'6K\'))}L q(p.1b(\'1K\')2d){ 2r=2N*2d;q(2rk.4s&&x.G>k.3O&&y.1b(\'1K\')>y.1b(\'4b\')){y.G-=10;q(2d)x.G=y.G*2d;k.4m(0,1);2V=J}}D 2V},7M:B(){u x=k.x,y=k.y;k.4a(\'1n\');k.7z(1,{Y:{K:x.1b(\'1K\'),M:y.1b(\'1K\'),1f:x.H,18:y.H},O:{1f:x.1V+x.1b(\'5u\'),18:y.1V+y.1b(\'5u\'),K:x.1T||x.G,M:y.1T||y.G}},m.7c)},7z:B(2y,2h,3b){q(k.1o&&!k.3g){q(2y)k.1o.4B();L k.1o.5l((k.1Z&&k.48))}q(!2y)k.9V();u A=k,x=A.x,y=A.y,2g=k.2g;q(!2y)2g=k.an||2g;u 4O=2y?B(){q(A.1o)A.1o.2m.F.1q="2l";4T(B(){A.aC()},50)}:B(){A.7A()};q(2y)m.Q(k.Y,{K:x.t+\'E\',M:y.t+\'E\'});q(2y&&k.1Z){m.Q(k.Y,{1f:(x.1A-x.cb+x.2s)+\'E\',18:(y.1A-y.cb+y.2s)+\'E\'})}q(k.am){m.Q(k.Y,{1B:2y?0:1});m.3e(2h.Y,{1B:2y})}m.41(k.Y,2h.Y,{3w:3b,2g:2g,3o:B(2R,2S){q(A.1o&&A.3g&&2S.1a==\'18\'){u 4G=2y?2S.H:1-2S.H;u H={w:x.t+(x.1b(\'1K\')-x.t)*4G,h:y.t+(y.1b(\'1K\')-y.t)*4G,x:x.1A+(x.H-x.1A)*4G,y:y.1A+(y.H-y.1A)*4G};A.1o.4B(H,0,1)}q(A.1Z){q(2S.1a==\'1f\')A.3D.F.1f=(x.H-2R)+\'E\';q(2S.1a==\'18\')A.3D.F.18=(y.H-2R)+\'E\'}}});m.41(k.O,2h.O,3b,2g,4O);q(2y){k.Y.F.1q=\'2l\';k.O.F.1q=\'2l\';q(k.1Z)k.1g.F.1q=\'2l\';k.a.1p+=\' U-9T-9O\'}},aC:B(){k.4e=J;k.3d();q(k.1Z&&k.31==\'4O\')k.5S();q(k.11){1m{u A=k,1U=k.11.6r||k.11.52.N;m.1R(1U,\'7H\',B(){q(m.2q!=A.S)A.3d()})}1l(e){}q(m.1L&&1t k.4z!=\'ce\')k.11.F.K=(k.3i-1)+\'E\'}q(m.3B&&m.3B==k.a)m.3B=I;k.ax();u p=m.3k,6I=m.5R.x+p.5T,6D=m.5R.y+p.5U;k.6x=k.x.H<6I&&6Ik.x.1b(\'4w\')+k.x.1b(\'88\'));u 9p=(2T.y+2T.hk.y.1b(\'4w\')+k.y.1b(\'88\'));u 5c=m.7S(1k[i]);q(!9o&&!9p&&5c!=k.S){q(!23){1k[i].4N(\'1n-by\',\'[\'+k.S+\']\');1k[i].7q=1k[i].F[1a];1k[i].F[1a]=\'1n\'}L q(23.9v(\'[\'+k.S+\']\')==-1){1k[i].4N(\'1n-by\',23+\'[\'+k.S+\']\')}}L q((23==\'[\'+k.S+\']\'||m.2q==5c)&&5c!=k.S){1k[i].4N(\'1n-by\',\'\');1k[i].F[1a]=1k[i].7q||\'\'}L q(23&&23.9v(\'[\'+k.S+\']\')>-1){1k[i].4N(\'1n-by\',23.2i(\'[\'+k.S+\']\',\'\'))}}}}},3d:B(){k.Y.F.1u=m.4l+=2;W(u i=0;i=5.5){s=s.2i(1w 5P(\']*>\',\'aB\'),\'\').2i(1w 5P(\']*>.*?\',\'aB\'),\'\');q(k.11){u 1U=k.11.6r;q(!1U&&k.11.52)1U=k.11.52.N;q(!1U){u 36=k;4T(B(){36.4Y()},25);D}1U.ak();1U.bO(s);1U.28();1m{s=1U.6F(k.1j).2n}1l(e){1m{s=k.11.N.6F(k.1j).2n}1l(e){}}m.3j(k.11)}L{5I=/(]*>|<\\/V>)/ba;q(5I.16(s))s=s.az(5I)[m.2Y?1:2]}}m.4d(k.O,\'5H\',\'U-V\').2n=s;k.2J();W(u x 3A k)k[x]=I}};m.5z=m.1e;u b6=m.4S;q(m.1L&&1y==1y.18){(B(){1m{N.44.aW(\'1f\')}1l(e){4T(aE.aX,50);D}m.3p()})()}m.1R(N,\'b9\',m.3p);m.1R(1y,\'7o\',m.3p);m.1R(N,\'3p\',B(){q(m.5v){u F=m.14(\'F\',{R:\'aK/79\'},I,N.3x(\'aQ\')[0]),a2=N.5G==\'6M\';B 5B(6U,6T){q(m.1L&&(m.26<9||a2)){u 3r=N.a3[N.a3.1c-1];q(1t(3r.5B)=="6W")3r.5B(6U,6T)}L{F.1G(N.bb(6U+" {"+6T+"}"))}}B cT(1a){D\'cS( ( ( cV = N.44.\'+1a+\' ? N.44.\'+1a+\' : N.V.\'+1a+\' ) ) + \\\'E\\\' );\'}q(m.5v)5B(\'.U 1v\',\'3L: 6X(\'+m.56+m.5v+\'), 5w !d0;\')}});m.1R(1y,\'3q\',B(){m.5y()});m.1R(N,\'6o\',B(e){m.5R={x:e.5Q,y:e.5f}});m.1R(N,\'7H\',m.7K);m.1R(N,\'9t\',m.7K);m.1R(N,\'3p\',m.4Z);m.1R(1y,\'7o\',m.9u);m.1R(1y,\'7o\',m.af)}',62,827,'||||||||||||||||||||this||hs||||if||||var||||||exp|function|el|return|px|style|size|pos|null|true|width|else|height|document|content|expanders|setStyles|type|key|src|highslide|body|for||wrapper|full||iframe|||createElement||test||top|overlay|prop|get|length|position|lang|left|innerContent|false|div|id|els|catch|try|hidden|outline|className|visibility|Math|offset|typeof|zIndex|img|new|outlineType|window|overlayBox|tpos|opacity|fx|node|params|dim|appendChild|auto|offsetHeight|case|wsize|ie|next|options|display|arr|overlays|addEventListener|container|imgSize|doc|p1|overflow|undefined|event|isHtml|push|loading|absolute|hiddenBy|none||uaVersion||close|td|dragArgs|xhr|scrollerDiv|ratio|offsetWidth|objectType|easing|to|replace|target|elem|visible|table|innerHTML|isImage|span|focusKey|xSize|tb|re|title|href|op|ajax|up|name|100|contentType|wh|image|minSize|hsId|right|ucwh|clearing|onLoad|useBox|min|onclick|ySize|custom|opt|html|val|args|elPos|p2|changed|releaseMask|graphic|ieLt9|match|opera|objectLoadTime||||func|pThis||||parentNode|dur|swf|focus|extend|hasDragged|outlineWhileAnimating|attribs|objectWidth|discardElement|page|styles|groups|class|step|ready|resize|last|scroll|timers|li|getExpander|duration|getElementsByTagName|marginMin|getNode|in|upcoming|sleeping|mediumContent|bottom|ieLt7|pendingOutlines|onload|move|objectHeight|relative|cursor|clone|marginTop|minWidth|unit|now|9999px|start|while|getParam|allowReduce|moveOnly|justify|end|images||animate|number|Id|documentElement|hDiff|navigator|cNode|preserveContent|parseInt|doShowHide|fitsize|tagName|getElementByClass|isExpanded|blurExp|removeEventListener|slideshowGroup|styleRestoreCursor|marginLeft|wDiff|zIndexCounter|sizeOverlayBox|ruler|cacheBindings|scrollingContent|htmls|parent|minHeight|showLoading|currentStyle|iDoc|opos|contentLoaded|idCounter|isClosing|stl|setPosition|filter|keyHandler|restoreCursor|all|fac|block|allowSizeReduction|uclt|before|Outline|padToMinWidth|setAttribute|after|preloadTheseImages|on|param|Expander|setTimeout|above|getParams|createOverlay|safari|loadHTML|getAnchors||cache|contentWindow|expand|prototype|matches|graphicsDir|mask|iebody|getTime|showHideElements|preloadTheseAjax|wrapperKey|curAnim|gotoEnd|clientY|topmostKey|keydown|keypress|Ajax|previousOrNext|destroy|getSrc|previous|self|positionOverlay|dX|dY|Date|Dimension|imgPad|expandCursor|pointer|toLowerCase|getPageSize|langDefaults|allowHeightReduction|addRule|kdeBugCorr|allowWidthReduction|clientSize|marginMax|compatMode|DIV|regBody|cachedGets|anchors|pre|expOnly|init|tr|RegExp|clientX|mouse|writeExtendedContent|scrollLeft|scrollTop|userAgent|isHsAnchor|maxWidth|round|hideOnMouseOut|overlayId|cloneNode|offY|tId|offX|preventDefault|heading|over|preloadFullImage|fullExpandLabel|below|thumbsUserSetId|ypos|sg|onLoadStarted|marginBottom|os|onReady|maincontent|250|xpos|relatedTarget|marginRight|continuePreloading|mousemove|srcElement|middle|contentDocument|overrides|parseFloat|calcExpanded|calcBorders|cancelLoading|mouseIsOver|calcThumb|padding|distance|getAdjacentAnchor|hasAlphaImageLoader|mY|cur|getElementById|offsetTop|center|mX|lt|maxsize|arrow|BackCompat|maxHeight|thumbnailId|ucrb|Click|hasMovedMin|correctIframeSize|dec|sel|margin|object|url|fitOverlayBox|isReady||numberOfImagesToPreload|ie6|panel|doWrapper||htmlGetSize|getInline|wrapperClassName|css|sizeDiff|dragByHeading|expandDuration|setObjContainerSize|credits|contentId|garbageBin|restoreTitle|doFullExpand|setPos|clones|max|allowMultipleInstances|topZ|load|hasFocused|origProp|preloadAjaxElement|blur|getCacheBinding|abs|onError|error|moveTo|run|changeSize|afterClose|openerTagNames|element|swfobject|getSelfRendered|adj|resizeTo|mousedown|swfOptions|setSize|mouseClickHandler|string|show|break|form|Create|update|loadingPos|getWrapperKey|location|fade|geckoMac|tbody|types|getElementContent|Text|state|connectOutline|cacheAjax|complete|startTime|getPosition|done|defaultView|osize|cssDirection|dragHandler|direction|wrapperMouseHandler|pageOrigin|Next|JS|Highslide|Play|525|Close|Pause|spacebar|slideshow|Previous|thumb|offsetParent|from|timerId|orig|transit|updateAnchors|call|replaceLang|offsetLeft|pageXOffset|_default|skin|contentWrapper|enableKeyListener|htmlExpand|pow|clickY|loadingTitle|ltr|detachEvent|clickX|loadingText|focusTopmost|easeInQuad|loadingOpacity|hasHtmlExpanders|preloadGraphic|clientWidth|moveText|moveTitle|switch|closeTitle|closeText|nextText|nextTitle|and|200|previousTitle|previousText|ul|resizeTitle|background|nopad|onGraphicLoad|alpha|appendTo||vis|tag|headingOverlay|hide|captionOverlay|rv|Move|preloadNext|getPropertyValue|getAttribute|getComputedStyle|hideIframes|hideSelects|XMLHttpRequest|clearsX|clearsY|hand|readyState|focusTitle|mouseup|preloadImages|indexOf|Overlay|addOverlay|creditsHref|ie6SSL|getAnchorIndex|current|toString|cachedGet|creditsTarget|creditsTitle|_|nextSibling|Eval|setRequestHeader|creditsPosition|XMLHTTP|Microsoft|showOverlays|anchor|doPanels|genOverlayBox|gotOverlays|sleep|active|fullExpandOpacity|destroyOverlays|createFullExpand|javascript|fullExpandTitle|fullExpandPosition|writeCredits|showCredits|backCompat|styleSheets|destroyObject|htmlPrepareClose|ActiveXObject|restoreDuration|awake|offsetX|getOverlays|reOrder|rightpanel|leftpanel|offsetY|preloadAjax|creditsText|KDE|vendor|removeChild|open|flashvars|fadeInOut|easingClose|tmpMin|border|htmlSizeOperations|clear||getIframePageHeight|newHeight|hasExtendedContent|both|prepareNextOutline|attributes|split|correctRatio|gi|afterExpand|script|arguments|wmode|captionEval|Use|keyCode|button|text|drag|headingId|graphics|_self|shadow|HEAD|click|drop|keys|header|htmlE|doScroll|callee|returnValue|outlineStartOffset|footer|registerOverlay|http|headingText|com|captionId|HsExpander|xpand|fullExpandText|DOMContentLoaded|ig|createTextNode|captionText|forceAjaxReload|urlencoded|pageYOffset|send|white|Gecko|Type|application|www|innerHeight|link|toUpperCase|removeAttribute|responseText|blank|about|1001|clientHeight|innerWidth|Content|Macintosh||dummy|GET|zoomout|maincontentText|maincontentId|Msxml2|onreadystatechange|zoomin|maincontentEval|oPos|it|ra|Safari|Trident|With|write|Requested|headingEval|pauseTitle|tgt|actual|rb|Bottom|tgtArr|Expand|300|nodeName|insertBefore|front|Right|Top|AlphaImageLoader|DXImageTransform|progid|Powered|sizingMethod|scale|Left||Height|Width|boolean|allowSimultaneousLoading|onmouseover|flushImgSize|transparent|embedSWF|version|htmlCreate|flash|newWidth|Loading|static|frameborder|oncontextmenu|blockRightClick|Line|alert|debug|onmouseout|lineNumber|message|imageCreate|cancel|bring|expressInstallSwfurl|01|png|paddingTop|200px|https|protocol|1px|linearTween|outlines|pauseText|StopPlay|removeSWF|caption|useOnHtml|dragSensitivity|expression|fix|sqrt|ignoreMe|mouseover|attachEvent|toElement|fromElement|important|default|playTitle|Go|eval|SELECT|the|cellSpacing|borderCollapse|outlinesDir|fontSize|lineHeight|collapse|playText|IFRAME|clearInterval|homepage|splice|esc|Resize|setInterval'.split('|'),0,{})) diff --git a/gal/highslide/highslide.config.js b/gal/highslide/highslide.config.js new file mode 100644 index 0000000..1a8408d --- /dev/null +++ b/gal/highslide/highslide.config.js @@ -0,0 +1,42 @@ +/* + * Site-specific configuration settings for Highslide JS + */ + +hs.showCredits = true; +hs.creditsPosition = 'top right'; +hs.outlineType = 'rounded-black'; +hs.fadeInOut = false; +hs.align = 'center'; +hs.useBox = true; +hs.width = 1080; +hs.height = 840; +// hs.allowMultipleInstances = false; +hs.captionEval = 'this.thumb.title'; +hs.captionOverlay = { position: "top" }; +hs.expandDuration = 100; +hs.restoreDuration = 100; +hs.dimmingDuration = 100; +hs.dimmingOpacity = 0.8; +hs.transitionDuration = 100; +hs.thumbnailId = 'thumb1'; +hs.numberPosition = 'caption'; +hs.transitions = ['expand', 'crossfade']; + +hs.addSlideshow({ + interval: 5000, + repeat: false, + useControls: true, + fixedControls: 'fit', + overlayOptions: { + className: 'controls-in-heading', + opacity: 0.6, + position: 'top center', + hideOnMouseOut: true + }, + thumbstrip: { + mode: 'horizontal', + position: 'below', + relativeTo: 'expander' + } + +}); diff --git a/gal/highslide/highslide.css b/gal/highslide/highslide.css new file mode 100644 index 0000000..5494b6a --- /dev/null +++ b/gal/highslide/highslide.css @@ -0,0 +1,933 @@ +/** +* @file: highslide.css +* @version: 4.1.13 +*/ +.highslide-container div { + font-family: Verdana, Helvetica; + font-size: 10pt; +} +.highslide-container table { + background: none; + table-layout: auto; +} +.highslide { + outline: none; + text-decoration: none; +} +.highslide img { + border: 2px solid silver; +} +.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; +} +.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; + margin: 2px; + padding: 0; + 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; + list-style: none; +} +.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; +} +.mobile .highslide-html { + border: 1px solid silver; +} +.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: 5; + 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; + width: 90%; + margin: 1px 0 1px 5px; + 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%; + direction: ltr; +} +.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-overlay { + overflow: hidden !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 { + width: 60px; /* t=5481 */ +} +.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; +} + +/*********************/ +/* Customized styles */ +/*********************/ + +.highslide-wrapper, .highslide-outline { + background: #111111; +} +.highslide img { + border: 1px solid #D0D0D0; +} +.highslide:hover img { + border-color: #A0A0A0; +} +.highslide-active-anchor img { + visibility: visible; + border-color: #808080 !important; +} +.highslide-image { + border: 2px solid #111111; +} +.highslide-caption { + color: #CCCCCC; + padding: 2px; +} +.highslide-loading { + color: black; + border: 1px solid black; + background-color: white; + background-image: url(graphics/loader.white.gif); +} +.highslide-controls { + position: static !important; + margin: 0; + width: 120px !important; +} +.highslide-gallery ul li { + width: 130px; + height: 110px; + border: 1px solid #505; + margin: 2px; +} +.highslide-dimming { + background: black; +} diff --git a/gal/highslide/highslide.js b/gal/highslide/highslide.js new file mode 100644 index 0000000..9c543a0 --- /dev/null +++ b/gal/highslide/highslide.js @@ -0,0 +1,1891 @@ +/** + * Name: Highslide JS + * Version: 4.1.13 (2011-10-06) + * Config: default + * Author: Torstein Hønsi + * Support: www.highslide.com/support + * License: www.highslide.com/#license + */ +if (!hs) { 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', + 'pageOrigin', + '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: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : + parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), +ie : (document.all && !window.opera), +//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant? +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.ieLt9 && 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 (el.style[prop]) { + return el.style[prop]; + } else 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, + ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined'); + + var width = ieLt9 ? iebody.clientWidth : + (d.documentElement.clientWidth || self.innerWidth), + height = ieLt9 ? iebody.clientHeight : self.innerHeight; + hs.page = { + width: width, + height: height, + scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset, + scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset + }; + return hs.page; +}, + +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 || hs.getExpander(); + exp = last; + if (hs.upcoming) return false; + else hs.last = last; + hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + 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) return hs.transit(exp.getAdjacentAnchor(op), 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 (!e.relatedTarget) 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.ieLt7 = hs.ie && hs.uaVersion < 7; + hs.ieLt9 = hs.ie && hs.uaVersion < 9; + + hs.getPageSize(); + 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.ieLt7 && 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){ + try { + 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; + } catch (e) {} + } + } +}); + +hs.Outline = function (outlineType, onLoad) { + this.onLoad = onLoad; + this.outlineType = outlineType; + var v = hs.uaVersion, tr; + + this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 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.uaVersion < 525 ? 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 == 0 || 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; + + if (this.maxHeight && this.dim == 'x') + exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); + + 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 = this.pageOrigin || 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) { + if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); + else 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.uaVersion < 525) 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 = Math.min(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; + } + changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); + 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, changed) { + 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); + changed = true; + } + } + return changed; +}, + +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']; + return (as && 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) { + this[type] = hs.getNode(this.a['_'+ type + 'Id']); + if (!this[type]) { + var next = this.a.nextSibling; + while (next && !hs.isHsAnchor(next)) { + if ((new RegExp('highslide-'+ type)).test(next.className || null)) { + if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; + this[type] = hs.getNode(next.id); + 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.ieLt7 ? '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.ieLt7 && 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); + this.wrapper.style.height = this.y.get('wsize') +'px'; +}, + +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 : 'auto' + }, + 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.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, + ySize = this.y.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; + + var ypos = this.y.pos - (this.y.size - ySize) / 2; + if (ypos < hs.marginTop) ypos = hs.marginTop; + + this.moveTo(xpos, ypos); + 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(); +} + +}; +hs.langDefaults = hs.lang; +// history +var HsExpander = hs.Expander; +if (hs.ie && window == window.top) { + (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); + +// set handlers +hs.addEventListener(document, 'ready', function() { + if (hs.expandCursor) { + var style = hs.createElement('style', { type: 'text/css' }, null, + document.getElementsByTagName('HEAD')[0]), + backCompat = document.compatMode == 'BackCompat'; + + + function addRule(sel, dec) { + if (hs.ie && (hs.uaVersion < 9 || backCompat)) { + var last = document.styleSheets[document.styleSheets.length - 1]; + if (typeof(last.addRule) == "object") last.addRule(sel, dec); + } else { + style.appendChild(document.createTextNode(sel + " {" + dec + "}")); + } + } + function fix(prop) { + return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + + ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; + } + if (hs.expandCursor) addRule ('.highslide img', + 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); + } +}); +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); +} diff --git a/gal/highslide/highslide.packed.js b/gal/highslide/highslide.packed.js new file mode 100644 index 0000000..42837a2 --- /dev/null +++ b/gal/highslide/highslide.packed.js @@ -0,0 +1,9 @@ +/** + * Name: Highslide JS + * Version: 4.1.13 (2011-10-06) + * Config: default +packed + * Author: Torstein Hønsi + * Support: www.highslide.com/support + * License: www.highslide.com/#license + */ +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}('q(!m){u m={1F:{8l:\'6P\',6K:\'93...\',6L:\'6b 1L 92\',7T:\'6b 1L 91 1L 8Z\',88:\'90 1L 94 I (f)\',8e:\'95 2t 6I 6F\',8b:\'9a 1L 98 6I 6F 97\',5V:\'6b 1L 2h 1Y, 96 6O 8Y 1L 3c. 8X 8Q 8P S 1A 6O 79.\'},47:\'1c/8O/\',4l:\'8M.6A\',3S:\'8N.6A\',84:5c,7y:5c,43:15,7J:15,48:15,7N:15,3L:8R,7g:0.75,8j:G,5U:5,2R:2,8S:3,3V:1a,7z:\'2S 2o\',7O:1,7W:G,8x:\'8W://1c.8V/\',8o:\'8U\',7e:G,5t:[\'a\'],68:G,3Y:6W,3K:6W,3N:G,1h:\'9b-9c\',3U:[],5j:G,N:[],5i:[\'3N\',\'2d\',\'1h\',\'2R\',\'9u\',\'9t\',\'9s\',\'6R\',\'9q\',\'9r\',\'9v\',\'6X\',\'89\',\'68\',\'M\',\'16\',\'60\',\'3Y\',\'3K\',\'4X\',\'5q\',\'8h\',\'3b\',\'1J\',\'85\',\'86\',\'1l\'],1v:[],3F:0,9w:{x:[\'8n\',\'18\',\'6c\',\'2o\',\'7x\'],y:[\'42\',\'W\',\'6a\',\'2S\',\'4r\']},4B:{},6X:{},6R:{},2A:[],2Q:{},6m:{},4a:[],1R:/9A\\/4\\.0/.14(3W.4V)?8:6g((3W.4V.58().2X(/.+(?:6V|9z|9y|1P)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1P:(L.3R&&!1n.2r),4D:/9x/.14(3W.4V),8y:/9p.+6V:1\\.[0-8].+9o/.14(3W.4V),$:A(1t){q(1t)C L.9h(1t)},2e:A(2c,2v){2c[2c.X]=2v},Z:A(6S,3a,2F,6f,6U){u B=L.Z(6S);q(3a)m.2q(B,3a);q(6U)m.T(B,{9f:0,9d:\'3r\',5h:0});q(2F)m.T(B,2F);q(6f)6f.2g(B);C B},2q:A(B,3a){S(u x 3v 3a)B[x]=3a[x];C B},T:A(B,2F){S(u x 3v 2F){q(m.2Y&&x==\'1o\'){q(2F[x]>0.99)B.F.9e(\'3P\');K B.F.3P=\'7k(1o=\'+(2F[x]*1V)+\')\'}K B.F[x]=2F[x]}},3p:A(B,Q,25){u 2O,3h,2M;q(1m 25!=\'5I\'||25===H){u 2y=87;25={2Z:2y[2],1J:2y[3],5y:2y[4]}}q(1m 25.2Z!=\'3g\')25.2Z=5c;25.1J=1d[25.1J]||1d.6Z;25.4c=m.2q({},Q);S(u 2b 3v Q){u e=1S m.1k(B,25,2b);2O=6g(m.5s(B,2b))||0;3h=6g(Q[2b]);2M=2b!=\'1o\'?\'D\':\'\';e.2z(2O,3h,2M)}},5s:A(B,Q){q(B.F[Q]){C B.F[Q]}K q(L.63){C L.63.8B(B,H).8s(Q)}K{q(Q==\'1o\')Q=\'3P\';u 2v=B.8L[Q.31(/\\-(\\w)/g,A(a,b){C b.9j()})];q(Q==\'3P\')2v=2v.31(/7k\\(1o=([0-9]+)\\)/,A(a,b){C b/1V});C 2v===\'\'?1:2v}},4N:A(){u d=L,w=1n,3D=d.5a&&d.5a!=\'5K\'?d.3i:d.4J,2Y=m.1P&&(m.1R<9||1m 71==\'1Z\');u M=2Y?3D.7j:(d.3i.7j||4H.9n),16=2Y?3D.9m:4H.9l;m.2J={M:M,16:16,4w:2Y?3D.4w:71,4y:2Y?3D.4y:9k};C m.2J},62:A(B){u p={x:B.7n,y:B.7s};3m(B.7m){B=B.7m;p.x+=B.7n;p.y+=B.7s;q(B!=L.4J&&B!=L.3i){p.x-=B.4w;p.y-=B.4y}}C p},4b:A(a,21,2z,J){q(!a)a=m.Z(\'a\',H,{3q:\'3r\'},m.20);q(1m a.3E==\'A\')C 21;1z{1S m.46(a,21,2z);C 1a}1C(e){C G}},7a:A(){u 5X=0,54=-1,N=m.N,z,1p;S(u i=0;i5X){5X=1p;54=i}}}q(54==-1)m.2u=-1;K N[54].3k()},5r:A(a,3J){a.3E=a.3x;u p=a.3E?a.3E():H;a.3E=H;C(p&&1m p[3J]!=\'1Z\')?p[3J]:(1m m[3J]!=\'1Z\'?m[3J]:H)},5l:A(a){u 1l=m.5r(a,\'1l\');q(1l)C 1l;C a.3y},3B:A(1t){u 4s=m.$(1t),2U=m.6m[1t],a={};q(!4s&&!2U)C H;q(!2U){2U=4s.7f(G);2U.1t=\'\';m.6m[1t]=2U;C 4s}K{C 2U.7f(G)}},3t:A(d){q(d)m.5k.2g(d);m.5k.3G=\'\'},74:A(66,z){u 2G=z||m.2C();z=2G;q(m.2W)C 1a;K m.2G=2G;m.3d(L,1n.2r?\'4R\':\'4T\',m.3H);1z{m.2W=66;66.3x()}1C(e){m.2G=m.2W=H}1z{z.2h()}1C(e){}C 1a},4e:A(B,1W){u z=m.2C(B);q(z)C m.74(z.5m(1W),z);K C 1a},79:A(B){C m.4e(B,-1)},1A:A(B){C m.4e(B,1)},3H:A(e){q(!e)e=1n.1G;q(!e.1M)e.1M=e.6x;q(1m e.1M.7c!=\'1Z\')C G;u z=m.2C();u 1W=H;7u(e.8F){1q 70:q(z)z.5M();C G;1q 32:1q 34:1q 39:1q 40:1W=1;6r;1q 8:1q 33:1q 37:1q 38:1W=-1;6r;1q 27:1q 13:1W=0}q(1W!==H){m.3d(L,1n.2r?\'4R\':\'4T\',m.3H);q(!m.7e)C G;q(e.4F)e.4F();K e.8E=1a;q(z){q(1W==0){z.2h()}K{m.4e(z.R,1W)}C 1a}}C G},8G:A(O){m.2e(m.1v,m.2q(O,{2a:\'2a\'+m.3F++}))},65:A(6l,4u){u B,30=/^1c-V-([0-9]+)$/;B=6l;3m(B.2V){q(B.1t&&30.14(B.1t))C B.1t.31(30,"$1");B=B.2V}q(!4u){B=6l;3m(B.2V){q(B.4g&&m.4E(B)){S(u R=0;R1)C G;q(!e.1M)e.1M=e.6x;u B=e.1M;3m(B.2V&&!(/1c-(1Y|3c|4Z|2T)/.14(B.1g))){B=B.2V}u z=m.2C(B);q(z&&(z.6k||!z.3C))C G;q(z&&e.J==\'7o\'){q(e.1M.7c)C G;u 2X=B.1g.2X(/1c-(1Y|3c|2T)/);q(2X){m.1U={z:z,J:2X[1],18:z.x.E,M:z.x.I,W:z.y.E,16:z.y.I,72:e.4z,76:e.4o};m.1D(L,\'6w\',m.6D);q(e.4F)e.4F();q(/1c-(1Y|4Z)-5W/.14(z.11.1g)){z.3k();m.6B=G}C 1a}}K q(e.J==\'7i\'){m.3d(L,\'6w\',m.6D);q(m.1U){q(m.3e&&m.1U.J==\'1Y\')m.1U.z.11.F.2N=m.3e;u 2E=m.1U.2E;q(!2E&&!m.6B&&!/(3c|2T)/.14(m.1U.J)){z.2h()}K q(2E||(!2E&&m.8C)){m.1U.z.45(\'1i\')}m.6B=1a;m.1U=H}K q(/1c-1Y-5W/.14(B.1g)){B.F.2N=m.3e}}C 1a},6D:A(e){q(!m.1U)C G;q(!e)e=1n.1G;u a=m.1U,z=a.z;a.5b=e.4z-a.72;a.6o=e.4o-a.76;u 6n=1d.a7(1d.7q(a.5b,2)+1d.7q(a.6o,2));q(!a.2E)a.2E=(a.J!=\'1Y\'&&6n>0)||(6n>(m.al||5));q(a.2E&&e.4z>5&&e.4o>5){q(a.J==\'2T\')z.2T(a);K{z.5v(a.18+a.5b,a.W+a.6o);q(a.J==\'1Y\')z.11.F.2N=\'3c\'}}C 1a},8g:A(e){1z{q(!e)e=1n.1G;u 4C=/ao/i.14(e.J);q(!e.1M)e.1M=e.6x;q(!e.4v)e.4v=4C?e.an:e.9C;u z=m.2C(e.1M);q(!z.3C)C;q(!z||!e.4v||m.2C(e.4v,G)==z||m.1U)C;S(u i=0;i=k.1w.2Z+k.5x){k.2I=k.3h;k.E=k.5E=1;k.5C();k.1w.4c[k.Q]=G;u 5z=G;S(u i 3v k.1w.4c)q(k.1w.4c[i]!==G)5z=1a;q(5z){q(k.1w.5y)k.1w.5y.77(k.1Q)}C 1a}K{u n=t-k.5x;k.5E=n/k.1w.2Z;k.E=k.1w.1J(n,0,1,k.1w.2Z);k.2I=k.2O+((k.3h-k.2O)*k.E);k.5C()}C G}};m.2q(m.1k,{2x:{1o:A(1k){m.T(1k.1Q,{1o:1k.2I})},7r:A(1k){1z{q(1k.1Q.F&&1k.1Q.F[1k.Q]!=H)1k.1Q.F[1k.Q]=1k.2I+1k.2M;K 1k.1Q[1k.Q]=1k.2I}1C(e){}}}});m.41=A(1h,2P){k.2P=2P;k.1h=1h;u v=m.1R,4Y;k.5J=m.1P&&m.1R<7;q(!1h){q(2P)2P();C}m.6y();k.28=m.Z(\'28\',{9V:0},{1b:\'1i\',1e:\'29\',9X:\'9Y\',M:0},m.20,G);u 5R=m.Z(\'5R\',H,H,k.28,1);k.1H=[];S(u i=0;i<=8;i++){q(i%3==0)4Y=m.Z(\'4Y\',H,{16:\'2l\'},5R,G);k.1H[i]=m.Z(\'1H\',H,H,4Y,G);u F=i!=4?{9Z:0,aF:0}:{1e:\'6j\'};m.T(k.1H[i],F)}k.1H[4].1g=1h+\' 1c-19\';k.7t()};m.41.53={7t:A(){u 1l=m.47+(m.9K||"9O/")+k.1h+".9N";u 6T=m.4D&&m.1R<7v?m.20:H;k.2k=m.Z(\'1f\',H,{1e:\'29\',W:\'-3X\'},6T,G);u 6E=k;k.2k.4S=A(){6E.6N()};k.2k.1l=1l},6N:A(){u o=k.1j=k.2k.M/4,E=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1x={16:(2*o)+\'D\',M:(2*o)+\'D\'};S(u i=0;i<=8;i++){q(E[i]){q(k.5J){u w=(i==1||i==7)?\'1V%\':k.2k.M+\'D\';u 1O=m.Z(\'1O\',H,{M:\'1V%\',16:\'1V%\',1e:\'6j\',2L:\'1i\'},k.1H[i],G);m.Z(\'1O\',H,{3P:"a0:9U.9W.a1(a8=9I, 1l=\'"+k.2k.1l+"\')",1e:\'29\',M:w,16:k.2k.16+\'D\',18:(E[i][0]*o)+\'D\',W:(E[i][1]*o)+\'D\'},1O,G)}K{m.T(k.1H[i],{9J:\'5T(\'+k.2k.1l+\') \'+(E[i][0]*o)+\'D \'+(E[i][1]*o)+\'D\'})}q(1n.2r&&(i==3||i==5))m.Z(\'1O\',H,1x,k.1H[i],G);m.T(k.1H[i],1x)}}k.2k=H;q(m.2Q[k.1h])m.2Q[k.1h].4q();m.2Q[k.1h]=k;q(k.2P)k.2P()},3A:A(E,1j,6H,2p,1J){u z=k.z,9E=z.V.F,1j=1j||0,E=E||{x:z.x.E+1j,y:z.y.E+1j,w:z.x.P(\'1u\')-2*1j,h:z.y.P(\'1u\')-2*1j};q(6H)k.28.F.1b=(E.h>=4*k.1j)?\'1X\':\'1i\';m.T(k.28,{18:(E.x-k.1j)+\'D\',W:(E.y-k.1j)+\'D\',M:(E.w+2*k.1j)+\'D\'});E.w-=2*k.1j;E.h-=2*k.1j;m.T(k.1H[4],{M:E.w>=0?E.w+\'D\':0,16:E.h>=0?E.h+\'D\':0});q(k.5J)k.1H[3].F.16=k.1H[5].F.16=k.1H[4].F.16},4q:A(6Y){q(6Y)k.28.F.1b=\'1i\';K m.3t(k.28)}};m.4W=A(z,1x){k.z=z;k.1x=1x;k.2D=1x==\'x\'?\'ax\':\'av\';k.2w=k.2D.58();k.3O=1x==\'x\'?\'ar\':\'au\';k.5o=k.3O.58();k.5f=1x==\'x\'?\'az\':\'aA\';k.aG=k.5f.58();k.1B=k.2f=0};m.4W.53={P:A(R){7u(R){1q\'5O\':C k.1s+k.2j+(k.t-m.1E[\'1j\'+k.2D])/2;1q\'1u\':C k.I+2*k.Y+k.1B+k.2f;1q\'3o\':C k.55-k.2K-k.4I;1q\'5G\':C k.P(\'3o\')-2*k.Y-k.1B-k.2f;1q\'3Q\':C k.E-(k.z.19?k.z.19.1j:0);1q\'64\':C k.P(\'1u\')+(k.z.19?2*k.z.19.1j:0);1q\'4h\':C k.1y?1d.56((k.I-k.1y)/2):0}},5w:A(){k.Y=(k.z.11[\'1j\'+k.2D]-k.t)/2;k.4I=m[\'5h\'+k.5f]},5g:A(){k.t=k.z.B[k.2w]?aC(k.z.B[k.2w]):k.z.B[\'1j\'+k.2D];k.1s=k.z.1s[k.1x];k.2j=(k.z.B[\'1j\'+k.2D]-k.t)/2;q(k.1s==0||k.1s==-1){k.1s=(m.2J[k.2w]/2)+m.2J[\'2B\'+k.3O]}},5B:A(){u z=k.z;k.3n=\'2l\';k.E=k.1s-k.Y+k.2j;q(k.5q&&k.1x==\'x\')z.4X=1d.22(z.4X||k.U,z.5q*k.U/z.y.U);k.I=1d.22(k.U,z[\'67\'+k.2D]||k.U);k.1T=z.3N?1d.22(z[\'22\'+k.2D],k.U):k.U;q(z.3f&&z.2d){k.I=z[k.2w];k.1y=k.U}q(k.1x==\'x\'&&m.3V)k.1T=z.3Y;k.2K=m[\'5h\'+k.3O];k.2B=m.2J[\'2B\'+k.3O];k.55=m.2J[k.2w]},6h:A(i){u z=k.z;q(z.3f&&(z.2d||m.3V)){k.1y=i;k.I=1d.67(k.I,k.1y);z.11.F[k.5o]=k.P(\'4h\')+\'D\'}K k.I=i;z.11.F[k.2w]=i+\'D\';z.V.F[k.2w]=k.P(\'1u\')+\'D\';q(z.19)z.19.3A();q(k.1x==\'x\'&&z.1r)z.35(G)},5Z:A(i){k.E=i;k.z.V.F[k.5o]=i+\'D\';q(k.z.19)k.z.19.3A()}};m.46=A(a,21,2z,26){q(L.ab&&m.1P&&!m.5n){m.1D(L,\'2H\',A(){1S m.46(a,21,2z,26)});C}k.a=a;k.2z=2z;k.26=26||\'1Y\';k.3f=!k.ak;m.5j=1a;k.1v=[];m.6y();u R=k.R=m.N.X;S(u i=0;i(k.x.1y||k.x.I)){k.8p();q(k.1v.X==1)k.35()}}k.7U()}1C(e){k.5Q(e)}},3n:A(p,3l){u a5,a3=p.1M,1x=p==k.x?\'x\':\'y\';u 5D=1a;u 3s=p.z.3N;p.E=1d.56(p.E-((p.P(\'1u\')-p.t)/2));q(p.Ep.2B+p.55-p.4I){q(!3l&&5D&&3s){p.I=1d.22(p.I,p.P(1x==\'y\'?\'3o\':\'5G\'))}K q(p.P(\'1u\')1K){ 1N=24*1K;q(1Nk.3K&&x.I>k.3Y&&y.P(\'1u\')>y.P(\'3o\')){y.I-=10;q(1K)x.I=y.I*1K;k.35(0,1);2m=G}}C 2m},7U:A(){u x=k.x,y=k.y;k.45(\'1i\');k.6e(1,{V:{M:x.P(\'1u\'),16:y.P(\'1u\'),18:x.E,W:y.E},11:{18:x.1B+x.P(\'4h\'),W:y.1B+y.P(\'4h\'),M:x.1y||x.I,16:y.1y||y.I}},m.84)},6e:A(23,1L,2p){q(k.19&&!k.2R){q(23)k.19.3A();K k.19.4q()}q(!23)k.8v();u z=k,x=z.x,y=z.y,1J=k.1J;q(!23)1J=k.85||1J;u 7A=23?A(){q(z.19)z.19.28.F.1b="1X";5S(A(){z.7B()},50)}:A(){z.5P()};q(23)m.T(k.V,{M:x.t+\'D\',16:y.t+\'D\'});q(k.86){m.T(k.V,{1o:23?0:1});m.2q(1L.V,{1o:23})}m.3p(k.V,1L.V,{2Z:2p,1J:1J,2x:A(2v,2y){q(z.19&&z.2R&&2y.Q==\'W\'){u 3I=23?2y.E:1-2y.E;u E={w:x.t+(x.P(\'1u\')-x.t)*3I,h:y.t+(y.P(\'1u\')-y.t)*3I,x:x.1s+(x.E-x.1s)*3I,y:y.1s+(y.E-y.1s)*3I};z.19.3A(E,0,1)}}});m.3p(k.11,1L.11,2p,1J,7A);q(23){k.V.F.1b=\'1X\';k.11.F.1b=\'1X\';k.a.1g+=\' 1c-7P-7Q\'}},7B:A(){k.3C=G;k.3k();q(m.2W&&m.2W==k.a)m.2W=H;k.7w();u p=m.2J,5u=m.4B.x+p.4w,5p=m.4B.y+p.4y;k.6q=k.x.E<5u&&5uk.x.P(\'3Q\')+k.x.P(\'64\'));u 7M=(2n.y+2n.hk.y.P(\'3Q\')+k.y.P(\'64\'));u 4j=m.65(17[i]);q(!7G&&!7M&&4j!=k.R){q(!1I){17[i].3T(\'1i-2t\',\'[\'+k.R+\']\');17[i].61=17[i].F[Q];17[i].F[Q]=\'1i\'}K q(1I.7L(\'[\'+k.R+\']\')==-1){17[i].3T(\'1i-2t\',1I+\'[\'+k.R+\']\')}}K q((1I==\'[\'+k.R+\']\'||m.2u==4j)&&4j!=k.R){17[i].3T(\'1i-2t\',\'\');17[i].F[Q]=17[i].61||\'\'}K q(1I&&1I.7L(\'[\'+k.R+\']\')>-1){17[i].3T(\'1i-2t\',1I.31(\'[\'+k.R+\']\',\'\'))}}}}},3k:A(){k.V.F.1p=m.3L+=2;S(u i=0;i|---| |<--|----width------->| |---|<----- -# | | | | | | | -# | | | | | | | -# | | | | | | | -# | | | v | | | -# | | |---------------------| | | | -# | | | | v -# ----------------------------------- --- -# | | | -# ----------------------------------- --- -# ^ -# | bottom -# -# total = left + linksize + width + linksize + right - -# Decorations: top bottom left right -Decorations: 14 18 14 18 -ThumbWidth: 120 -ThumbHeight: 100 diff --git a/gal/nrt-blue/theme.pm b/gal/nrt-blue/theme.pm deleted file mode 100644 index 780ade0..0000000 --- a/gal/nrt-blue/theme.pm +++ /dev/null @@ -1,37 +0,0 @@ -# NRT Theme for MJ's Photo Gallery -# (c) 2003--2004 Martin Mares ; GPL'ed -# Theme images taken from the cthumb package (c) Carlos Puchol - -package Gallery::Theme; - -use strict; -use warnings; - -sub Init($) { - my ($u) = @_; - Gallery::SetOptions( - "StyleSheet" => "$u/style.css", - "ThumbW" => 114, - "ThumbH" => 94, - "TopImg" => "$u/top.png", - "TopH" => 14, - "BotImg" => "$u/bot.png", - "BotH" => 18, - "LeftImg" => "$u/left.png", - "LeftW" => 14, - "RightImg" => "$u/right.png", - "RightW" => 18, - "InteriorMargin" => 4, - "ParentImg" => "$u/back.png", - "ParentH" => 48, - "ParentW" => 48, - "BackImg" => "$u/prev.png", - "BackH" => 48, - "BackW" => 48, - "FwdImg" => "$u/next.png", - "FwdH" => 48, - "FwdW" => 48 - ); -} - -1; diff --git a/gal/nrt/back.png b/gal/nrt/back.png deleted file mode 100644 index c0c4cee..0000000 Binary files a/gal/nrt/back.png and /dev/null differ diff --git a/gal/nrt/bot.png b/gal/nrt/bot.png deleted file mode 100644 index 08c6683..0000000 Binary files a/gal/nrt/bot.png and /dev/null differ diff --git a/gal/nrt/left.png b/gal/nrt/left.png deleted file mode 100644 index 3bd3aed..0000000 Binary files a/gal/nrt/left.png and /dev/null differ diff --git a/gal/nrt/next.png b/gal/nrt/next.png deleted file mode 100644 index 72a4e39..0000000 Binary files a/gal/nrt/next.png and /dev/null differ diff --git a/gal/nrt/prev.png b/gal/nrt/prev.png deleted file mode 100644 index 71e11cd..0000000 Binary files a/gal/nrt/prev.png and /dev/null differ diff --git a/gal/nrt/right.png b/gal/nrt/right.png deleted file mode 100644 index 3e655dc..0000000 Binary files a/gal/nrt/right.png and /dev/null differ diff --git a/gal/nrt/style.css b/gal/nrt/style.css deleted file mode 100644 index b67b092..0000000 --- a/gal/nrt/style.css +++ /dev/null @@ -1,17 +0,0 @@ -.thf { margin: 0 0 0 0; padding: 0 0 0 0; float: left; border: none; } -.thumb { position: relative; width: 154px; height: 134px; background-color: black; } -.tt { position: absolute; top: 0; left: 0; } -.tl { position: absolute; top: 14px; left: 0; } -.ti { position: absolute; } -.tr { position: absolute; top: 14px; right: 0; } -.tb { position: absolute; bottom: 0; right: 0; } -.annot { width: 154px; text-align: center; } -IMG { border: none; } -H1 { text-align: center; } -H2 { text-align: center; } -P { clear: both; } -H2 { clear: both; } -.parent { text-align: center; } -.large { text-align: center; } -.back { float: left; } -.fwd { float: right; } diff --git a/gal/nrt/theme.conf b/gal/nrt/theme.conf deleted file mode 100644 index 4242eba..0000000 --- a/gal/nrt/theme.conf +++ /dev/null @@ -1,40 +0,0 @@ - -PicturesPerRow: 5 -BGColor: #ffffff -TextColor: #000000 -CommentColor: #000000 -FilmBGColor: #322207 -LinkColor: #000000 -ALinkColor: gold -VLinkColor: #000000 -LinkSize: 1 - -# linksize | top -# | v -# ------------------|---------------- --- -# | | | | -# ------------------v---------------- --- -# | | ______________________ | | ^ -# | | | ^ | | | | -# | | | | height | | | -# | | | | | | | -# l | | | | | | | right -# --->|---| |<--|----width------->| |---|<----- -# | | | | | | | -# | | | | | | | -# | | | | | | | -# | | | v | | | -# | | |---------------------| | | | -# | | | | v -# ----------------------------------- --- -# | | | -# ----------------------------------- --- -# ^ -# | bottom -# -# total = left + linksize + width + linksize + right - -# Decorations: top bottom left right -Decorations: 14 18 14 18 -ThumbWidth: 120 -ThumbHeight: 100 diff --git a/gal/nrt/theme.pm b/gal/nrt/theme.pm deleted file mode 100644 index 780ade0..0000000 --- a/gal/nrt/theme.pm +++ /dev/null @@ -1,37 +0,0 @@ -# NRT Theme for MJ's Photo Gallery -# (c) 2003--2004 Martin Mares ; GPL'ed -# Theme images taken from the cthumb package (c) Carlos Puchol - -package Gallery::Theme; - -use strict; -use warnings; - -sub Init($) { - my ($u) = @_; - Gallery::SetOptions( - "StyleSheet" => "$u/style.css", - "ThumbW" => 114, - "ThumbH" => 94, - "TopImg" => "$u/top.png", - "TopH" => 14, - "BotImg" => "$u/bot.png", - "BotH" => 18, - "LeftImg" => "$u/left.png", - "LeftW" => 14, - "RightImg" => "$u/right.png", - "RightW" => 18, - "InteriorMargin" => 4, - "ParentImg" => "$u/back.png", - "ParentH" => 48, - "ParentW" => 48, - "BackImg" => "$u/prev.png", - "BackH" => 48, - "BackW" => 48, - "FwdImg" => "$u/next.png", - "FwdH" => 48, - "FwdW" => 48 - ); -} - -1; diff --git a/gal/nrt/top.png b/gal/nrt/top.png deleted file mode 100644 index d8d5866..0000000 Binary files a/gal/nrt/top.png and /dev/null differ diff --git a/gal/plain/back.png b/gal/plain/back.png new file mode 100644 index 0000000..501909c Binary files /dev/null and b/gal/plain/back.png differ diff --git a/gal/plain/next.png b/gal/plain/next.png new file mode 100644 index 0000000..bdd1011 Binary files /dev/null and b/gal/plain/next.png differ diff --git a/gal/plain/prev.png b/gal/plain/prev.png new file mode 100644 index 0000000..68b2514 Binary files /dev/null and b/gal/plain/prev.png differ diff --git a/gal/plain/style.css b/gal/plain/style.css new file mode 100644 index 0000000..4e86e31 --- /dev/null +++ b/gal/plain/style.css @@ -0,0 +1,13 @@ +.thf { margin: 0 0 0 0; padding: 0 0 0 0; float: left; border: none; } +.thumb { position: relative; width: 130px; height: 110px; } +.ti { position: absolute; border: 1px solid #505; } +IMG { border: none; } +H1 { text-align: center; } +H2 { text-align: center; margin-bottom: 3ex; } +P { clear: both; } +H2 { clear: both; } +.parent { text-align: center; } +.large { text-align: center; } +.back { float: left; } +.fwd { float: right; } +A[href]:hover { background-color: #11001d; } diff --git a/gal2/FORMAT b/gal2/FORMAT deleted file mode 100644 index 67118ec..0000000 --- a/gal2/FORMAT +++ /dev/null @@ -1,34 +0,0 @@ -List of photos (gallery.list) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -One photo per line, tab-separated columns: - - File name (relative to OrigDir in config) - Identifier (16 hex digits) - Orientation: one of "l", "r", "d", "." - Transformation -- sequence of: - n normalize contrast - s sharpen - h equalize histogram - Title (UTF-8 string) - -Lines starting with "#" are ignored. - - -Photo meta-data (PhotoDir/gallery.meta or CacheDir/cache.meta) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Perl Storable containing a single hash. - -$meta->{photo}->{$identifier} is a hash of: - o orientation - xf transformation applied - w width after scaling - h height after scaling - title photo title - -The rest is present in cache.meta only: - -$meta->{sequence} is an array of photo IDs as they appear in the gallery. - -$meta->{thumb}->{$format}->{$identifier} is a hash of: - w thumbnail width - h thumbnail height diff --git a/gal2/Makefile b/gal2/Makefile deleted file mode 100644 index c57a4f3..0000000 --- a/gal2/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -$(eval $(dir-setup)) - -$(call lib-copy, UCW/Gallery.pm) -$(call lib-copy, $(addprefix UCW/Gallery/, Web.pm Archive.pm)) -$(call lib-copy, $(addprefix UCW/Gallery/Web/, Plain.pm NrtBlue.pm HighSlide.pm)) - -$(call copy, $(addprefix nrt-blue/,back.png bot.png left.png next.png prev.png right.png top.png style.css)) -$(call copy, $(addprefix plain/,back.png next.png prev.png style.css)) - -$(call copy, $(addprefix highslide/, highslide-ie6.css highslide.config.js highslide-with-gallery.js highslide.css)) -$(call copy, $(addprefix highslide/graphics/, \ - close.png closeX.png controlbar-black-border.gif controlbar-text-buttons.png controlbar-white-small.gif \ - controlbar-white.gif controlbar2.gif controlbar3.gif controlbar4-hover.gif controlbar4.gif fullexpand.gif \ - geckodimmer.png icon.gif loader.big.black.gif loader.big.white.gif loader.black.gif loader.white.gif \ - resize.gif scrollarrows.png zoom.png zoomin.cur zoomout.cur)) -$(call copy, $(addprefix highslide/graphics/outlines/, \ - beveled.png custom.png drop-shadow.png glossy-dark.png outer-glow.png rounded-black.png rounded-white.png)) diff --git a/gal2/UCW/Gallery.pm b/gal2/UCW/Gallery.pm deleted file mode 100644 index 3912868..0000000 --- a/gal2/UCW/Gallery.pm +++ /dev/null @@ -1,161 +0,0 @@ -# Simple Photo Gallery -# (c) 2003--2012 Martin Mares - -package UCW::Gallery; - -use strict; -use warnings; - -use Storable; - -### Class methods ### - -sub new($) { - my ($class) = @_; - my $self = { }; - $self->{cfg} = { - # Directories - OrigDir => '.', # Original images - PhotoDir => 'photo', # Scaled-down photos for web - CacheDir => 'cache', # Cache with meta-data and thumbnails - - # URL prefixes - PhotoUrlPrefix => 'photo/', - ThumbUrlPrefix => 'thumb/', - ThemeUrlPrefix => 'gal/', - - # Processing machinery settings - ScanDefaultTransform => 's', - PhotoMaxWidth => 1024, - PhotoMaxHeight => 1024, - ThumbFormats => {}, # Set up by themes - - # Titles and navigation - Title => 'An Unnamed Gallery', - SubTitle => "", - ParentURL => '../', - BackURL => "", - FwdURL => "", - }; - return bless $self, $class; -} - -sub load_config($) { - my $cfg = "./gallery.cf"; - my $self = do $cfg; - unless (defined $self) { - if ($@) { - die "Error parsing $cfg: $@"; - } elsif ($!) { - die "Cannot load $cfg: $!\n"; - } else { - die "Cannot load $cfg, check that it returns true\n"; - } - } - return $self; -} - -### Object methods ### - -sub get($$) { - my ($self, $key) = @_; - if (exists $self->{cfg}->{$key}) { - my $val = $self->{cfg}->{$key}; - defined $val or warn "Gallery: Config item $key is not set\n"; - return $val; - } else { - warn "Gallery: Config item $key does not exist\n"; - return; - } -} - -sub def($@) { - my $self = shift; - while (my $key = shift @_) { - my $val = shift @_; - !exists $self->{cfg}->{$key} or warn "Gallery: Re-definining config item $key\n"; - $self->{cfg}->{$key} = $val; - } -} - -sub set($@) { - my $self = shift; - while (my $key = shift @_) { - my $val = shift @_; - exists $self->{cfg}->{$key} or warn "Gallery: Config item $key does not exist\n"; - $self->{cfg}->{$key} = $val; - } -} - -sub get_config_keys($) { - my ($self) = @_; - return keys %{$self->{cfg}}; -} - -sub require_thumbnails($$$) { - my ($self, $w, $h) = @_; - my $fmt = "${w}x${h}"; - $self->{cfg}->{ThumbFormats}->{$fmt} = 1; - return $fmt; -} - -sub write_list($$$) { - my ($self, $file, $images) = @_; - open my $fh, '>:utf8', "$file.new" or die "Cannot create $file.new: $!\n"; - for my $i (@$images) { - print $fh join("\t", - $i->{file}, - $i->{id}, - $i->{orientation}, - $i->{xfrm}, - ($i->{title} eq '' ? '-' : $i->{title}), - ), "\n"; - } - close $fh; - rename "$file.new", $file or die "Cannot rename $file.new to $file: $!\n"; -} - -sub read_list($$) { - my ($self, $file) = @_; - my @images = (); - open my $fh, '<:utf8', $file or return; - while (<$fh>) { - chomp; - /^$/ and next; - /^#/ and next; - my $i = {}; - ($i->{file}, $i->{id}, $i->{orientation}, $i->{xfrm}, $i->{title}) = split /\t/; - if ($i->{title} eq '-') { $i->{title} = ""; } - push @images, $i; - } - close $fh; - return \@images; -} - -sub write_meta($$) { - my ($self, $file, $meta) = @_; - open my $fh, '>', "$file.new" or die "Cannot create $file.new: $!\n"; - Storable::nstore_fd($meta, $fh); - close $fh; - rename "$file.new", $file or die "Cannot rename $file.new to $file: $!\n"; -} - -sub read_meta($) { - my ($self, $file) = @_; - open my $fh, '<', $file or die "Cannot read $file: $!\n"; - my $meta = Storable::fd_retrieve($fh) or die "Cannot parse $file\n"; - close $fh; - return $meta; -} - -sub photo_meta_name($) { - my ($self) = @_; - return File::Spec->catfile($self->get('PhotoDir'), 'gallery.meta'); -} - -sub cache_meta_name($) { - my ($self) = @_; - return File::Spec->catfile($self->get('CacheDir'), 'cache.meta'); -} - -1; diff --git a/gal2/UCW/Gallery/Archive.pm b/gal2/UCW/Gallery/Archive.pm deleted file mode 100644 index fb7c40b..0000000 --- a/gal2/UCW/Gallery/Archive.pm +++ /dev/null @@ -1,34 +0,0 @@ -# Simple Photo Gallery: Archiving -# (c) 2003--2012 Martin Mares - -package UCW::Gallery::Archive; - -use strict; -use warnings; - -use Archive::Zip; -use File::Spec; -use UCW::CGI; - -sub send_archive($$) { - my ($gal, $meta) = @_; - - if (!$gal->get('WebAllowArchives')) { - UCW::CGI::http_error('403 Archiving forbidden by server configuration'); - return; - } - - my $zip = Archive::Zip->new; - my $cnt = 0; - for my $id (@{$meta->{sequence}}) { - $zip->addFile(File::Spec->catfile($gal->get('PhotoDir'), "$id.jpg"), sprintf("%03d.jpg", $cnt)) or die; - $cnt++; - } - - print "Content-type: application/zip\n"; - print "Content-Disposition: attachment; filename=gallery.zip\n"; - print "\n"; - $zip->writeToFileHandle(\*STDOUT, 0); -} - -42; diff --git a/gal2/UCW/Gallery/Web.pm b/gal2/UCW/Gallery/Web.pm deleted file mode 100644 index dbf913a..0000000 --- a/gal2/UCW/Gallery/Web.pm +++ /dev/null @@ -1,166 +0,0 @@ -# Simple Photo Gallery: Web Interface -# (c) 2003--2012 Martin Mares - -package UCW::Gallery::Web; - -use strict; -use warnings; - -use UCW::Gallery; -use UCW::CGI; -use File::Spec; - -my $show_img; -my $want_archive; - -my %args = ( - 'i' => { 'var' => \$show_img, 'check' => '\d+' }, - 'a' => { 'var' => \$want_archive }, -); - -sub error($) { - print "

    Bad luck, the script is broken. Sorry.\n

    $_[0]\n"; - print "\n"; -} - -sub get($$) { - my ($self, $key) = @_; - return $self->{gal}->get($key); -} - -sub extras($$) { - my ($self, $key) = @_; - my $val = $self->get($key); - if (ref $val eq 'CODE') { - return &$val($self->{gal}); - } else { - return $val; - } -} - -sub html_top($) { - my ($self) = @_; - my $title = UCW::CGI::html_escape($self->get('Title')); - my $hextras = $self->extras('WebHeadExtras'); - my $textras = $self->extras('WebTopExtras'); - my $theme_hextras = $self->theme_head_extras; - print < - -$hextras$theme_hextras$title - -$textras -EOF - $UCW::CGI::ErrorHandler::error_hook = \&error; -} - -sub html_bot($) { - my ($self) = @_; - print $self->extras('WebBotExtras'), "\n"; -} - -sub show_img($) { - my ($self) = @_; - - if ($show_img < 1 || $show_img > $self->{num_photos}) { - UCW::CGI::http_error('404 No such photo'); - return; - } - - my $meta = $self->{meta}; - my $id = $meta->{sequence}->[$show_img-1]; - my $m = $meta->{photo}->{$id} or die; - $self->html_top; - - $self->show_links(($show_img > 1 ? ("?i=".($show_img-1)) : ""), - ".", - ($show_img < $self->{num_photos} ? ("?i=".($show_img+1)) : "")); - - my $t = UCW::CGI::html_escape($m->{title}); - my $w = $m->{w}; - my $h = $m->{h}; - print "

    $t

    \n" if $t ne ""; - my $img = $self->get('PhotoUrlPrefix') . $id . '.jpg'; - print "

    $t\n"; - - $self->html_bot; -} - -sub show_pre_thumbs($) { - my ($self) = @_; -} - -sub show_post_thumbs($) { - my ($self) = @_; -} - -sub show_list($) { - my ($self) = @_; - $self->html_top; - - $self->show_links($self->get('BackURL'), $self->get('ParentURL'), $self->get('FwdURL')); - print "

    ", $self->get('Title'), "

    \n"; - my $subtitle = $self->get('SubTitle'); - print "

    $subtitle

    \n" if $subtitle ne ""; - $self->show_pre_thumbs; - - my $meta = $self->{meta}; - for my $idx (1..$self->{num_photos}) { - my $id = $meta->{sequence}->[$idx-1]; - my $click_url; - if ($self->get('WebImageSubpages')) { - $click_url = "?i=$idx"; - } else { - $click_url = $self->get('PhotoUrlPrefix') . "$id.jpg"; - } - $self->show_thumb($meta, $id, $click_url); - } - - $self->show_post_thumbs; - $self->html_bot(); -} - -sub dispatch($) { - my ($self) = @_; - binmode STDOUT, ':utf8'; - UCW::CGI::parse_args(\%args); - $self->{meta} = $self->{gal}->read_meta(File::Spec->catfile($self->get('CacheDir'), 'cache.meta')); - $self->{num_photos} = scalar @{$self->{meta}->{sequence}}; - - if ($want_archive) { - require UCW::Gallery::Archive; - UCW::Gallery::Archive::send_archive($self->{gal}, $self->{meta}); - } elsif ($show_img ne "") { - $self->show_img; - } else { - $self->show_list; - } -} - -sub attach($$) { - my ($class, $gal) = @_; - my $self = { gal => $gal }; - $gal->def( - WebFE => $self, - - # Extras are either strings or functions called with the current gallery object as parameter - WebHeadExtras => "", - WebTopExtras => "", - WebBotExtras => "", - - # Used by the theming logic - WebThemeCSS => undef, - - # 1 if thumbnail link to sub-pages with images, 0 if they link directly to image files - WebImageSubpages => 1, - - # If enabled, calling the CGI with a=zip produces a ZIP archive with all photos. - WebAllowArchives => 1, - ); - bless $self, $class; - return $self; -} - -42; diff --git a/gal2/UCW/Gallery/Web/HighSlide.pm b/gal2/UCW/Gallery/Web/HighSlide.pm deleted file mode 100644 index 5cb5f44..0000000 --- a/gal2/UCW/Gallery/Web/HighSlide.pm +++ /dev/null @@ -1,94 +0,0 @@ -# HighSlide JS Theme for MJ's Photo Gallery -# (c) 2012 Martin Mares ; GPL'ed - -package UCW::Gallery::Web::HighSlide; - -use strict; -use warnings; - -use UCW::Gallery; -use UCW::Gallery::Web; - -our @ISA = qw(UCW::Gallery::Web); - -my $theme_name = "plain"; -my $navw = 48; -my $navh = 48; -my $box_w = 130; -my $box_h = 110; -my $thumb_w = 114; -my $thumb_h = 94; - -sub theme_dir($) { - my ($self) = @_; - return $self->get('ThemeUrlPrefix') . $theme_name; -} - -sub theme_head_extras($) { - my ($self) = @_; - my $tdir = $self->theme_dir; - my $hsdir = $self->get('ThemeUrlPrefix') . "highslide"; - return < - - - - - -AMEN -} - -sub show_links($$$$) { - my ($self, $prev, $up, $next) = @_; - my $theme = $self->theme_dir; - print "

    "; - print ""; - print "Back" if $prev ne ""; - print "\n"; - printf ""; - printf "Forward" if $next ne ""; - print "\n"; - printf "Up" if $up ne ""; -} - -sub show_pre_thumbs($) { - my ($self) = @_; - print "\n

    \n\n"; -} - -sub show_thumb($) { - my ($self, $meta, $photo_id, $click_url) = @_; - my $theme = $self->theme_dir; - my $m = $meta->{photo}->{$photo_id}; - my $annot = UCW::CGI::html_escape($m->{title}); - my $tf = $self->{thumb_fmt}; - my $tm = $meta->{thumb}->{$tf}->{$photo_id} or die "No thumbnails for format $tf found!\n"; - my $tw = $tm->{w}; - my $th = $tm->{h}; - my $thumb = $self->get('ThumbUrlPrefix') . "$tf/$photo_id.jpg"; - # HighSlide requires title either for all images, or for none - my $tit = " title=\"$annot\""; - my $aid = $self->{hs_thumb_counter}++ ? "" : " id=thumb1"; - my $photo_url = $self->get('PhotoUrlPrefix') . "$photo_id.jpg"; - print "
  • "; - print "Photo\n"; -} - -sub attach($$) { - my ($class, $gal) = @_; - my $self = $class->SUPER::attach($gal); - $self->{thumb_fmt} = $gal->require_thumbnails($thumb_w, $thumb_h); - return $self; -} - -1; diff --git a/gal2/UCW/Gallery/Web/NrtBlue.pm b/gal2/UCW/Gallery/Web/NrtBlue.pm deleted file mode 100644 index 0d327f1..0000000 --- a/gal2/UCW/Gallery/Web/NrtBlue.pm +++ /dev/null @@ -1,83 +0,0 @@ -# NRT Theme for MJ's Photo Gallery -# (c) 2003--2012 Martin Mares ; GPL'ed -# Theme images taken from the cthumb package (c) Carlos Puchol - -package UCW::Gallery::Web::NrtBlue; - -use strict; -use warnings; - -use UCW::Gallery; -use UCW::Gallery::Web; - -our @ISA = qw(UCW::Gallery::Web); - -my $theme_name = "nrt-blue"; -my $navw = 48; -my $navh = 48; -my $thumb_w = 114; -my $thumb_h = 94; -my $interior_margin = 4; -my $left_w = 14; -my $right_w = 18; -my $top_h = 14; -my $bot_h = 18; - -sub theme_dir($) { - my ($self) = @_; - return $self->get('ThemeUrlPrefix') . $theme_name; -} - -sub theme_head_extras($) { - my ($self) = @_; - my $stylesheet = $self->theme_dir . "/style.css"; - return "\n"; -} - -sub show_links($$$$) { - my ($self, $prev, $up, $next) = @_; - my $theme = $self->theme_dir; - print "

    "; - print ""; - print "Back" if $prev ne ""; - print "\n"; - printf ""; - printf "Forward" if $next ne ""; - print "\n"; - printf "Up" if $up ne ""; -} - -sub show_thumb($) { - my ($self, $meta, $photo_id, $click_url) = @_; - my $theme = $self->theme_dir; - my $m = $meta->{photo}->{$photo_id}; - my $annot = UCW::CGI::html_escape($m->{title}); - my $tf = $self->{thumb_fmt}; - my $tm = $meta->{thumb}->{$tf}->{$photo_id} or die "No thumbnails for format $tf found!\n"; - my $tw = $tm->{w}; - my $th = $tm->{h}; - my $thumb = $self->get('ThumbUrlPrefix') . "$tf/$photo_id.jpg"; - my $side_w = $thumb_w + 2*$interior_margin; - my $side_h = $thumb_h + 2*$interior_margin; - my $box_w = $left_w + $side_w + $right_w; - my $box_h = $top_h + $side_h + $bot_h; - print "

    \n"; - print "\n"; - print "\n"; - my $ol = $left_w + $interior_margin + int(($thumb_w - $tw)/2); - my $ot = $top_h + $interior_margin + int(($thumb_h - $th)/2); - my $tit = ($annot ne "") ? " title=\"$annot\"" : ""; - print "Photo\n"; - print "\n"; - print "\n"; - print "
    \n\n"; -} - -sub attach($$) { - my ($class, $gal) = @_; - my $self = $class->SUPER::attach($gal); - $self->{thumb_fmt} = $gal->require_thumbnails($thumb_w, $thumb_h); - return $self; -} - -1; diff --git a/gal2/UCW/Gallery/Web/Plain.pm b/gal2/UCW/Gallery/Web/Plain.pm deleted file mode 100644 index 885095b..0000000 --- a/gal2/UCW/Gallery/Web/Plain.pm +++ /dev/null @@ -1,71 +0,0 @@ -# Plain Theme for MJ's Photo Gallery -# (c) 2012 Martin Mares ; GPL'ed - -package UCW::Gallery::Web::Plain; - -use strict; -use warnings; - -use UCW::Gallery; -use UCW::Gallery::Web; - -our @ISA = qw(UCW::Gallery::Web); - -my $theme_name = "plain"; -my $navw = 48; -my $navh = 48; -my $box_w = 130; -my $box_h = 110; -my $thumb_w = 114; -my $thumb_h = 94; - -sub theme_dir($) { - my ($self) = @_; - return $self->get('ThemeUrlPrefix') . $theme_name; -} - -sub theme_head_extras($) { - my ($self) = @_; - my $stylesheet = $self->theme_dir . "/style.css"; - return "\n"; -} - -sub show_links($$$$) { - my ($self, $prev, $up, $next) = @_; - my $theme = $self->theme_dir; - print "

    "; - print ""; - print "Back" if $prev ne ""; - print "\n"; - printf ""; - printf "Forward" if $next ne ""; - print "\n"; - printf "Up" if $up ne ""; -} - -sub show_thumb($) { - my ($self, $meta, $photo_id, $click_url) = @_; - my $theme = $self->theme_dir; - my $m = $meta->{photo}->{$photo_id}; - my $annot = UCW::CGI::html_escape($m->{title}); - my $tf = $self->{thumb_fmt}; - my $tm = $meta->{thumb}->{$tf}->{$photo_id} or die "No thumbnails for format $tf found!\n"; - my $tw = $tm->{w}; - my $th = $tm->{h}; - my $thumb = $self->get('ThumbUrlPrefix') . "$tf/$photo_id.jpg"; - print "

    \n"; - my $ol = int(($box_w - $tw)/2); - my $ot = int(($box_h - $th)/2); - my $tit = ($annot ne "") ? " title=\"$annot\"" : ""; - print "Photo\n"; - print "
    \n\n"; -} - -sub attach($$) { - my ($class, $gal) = @_; - my $self = $class->SUPER::attach($gal); - $self->{thumb_fmt} = $gal->require_thumbnails($thumb_w, $thumb_h); - return $self; -} - -1; diff --git a/gal2/bin/gal-cache b/gal2/bin/gal-cache deleted file mode 100755 index da9a291..0000000 --- a/gal2/bin/gal-cache +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -# UCW Gallery: Prepare cache -# (c) 2004--2012 Martin Mares - -use strict; -use warnings; - -use UCW::Gallery; -use Image::Magick; -use IO::Handle; -use File::Spec; -use File::Path; - -STDOUT->autoflush(1); - -my $gal = UCW::Gallery->load_config; - -print "Reading gallery.list\n"; -my $orig_list = $gal->read_list('gallery.list') or die "Cannot read gallery.list: $!\n"; - -my $photo_dir = $gal->get('PhotoDir'); -my $photo_meta = $gal->photo_meta_name; -print "Reading meta-data from $photo_meta\n"; --f $photo_meta or die "Cannot load $photo_meta\n"; -my $meta = $gal->read_meta($photo_meta); - -my $cache_dir = $gal->get('CacheDir'); -if (-d $cache_dir) { - print "Deleting old cache directory: $cache_dir\n"; - File::Path::remove_tree($cache_dir); -} -print "Creating cache directory: $cache_dir\n"; -File::Path::mkpath($cache_dir) or die "Unable to create $cache_dir: $!\n"; - -# Construct sequence and store photo titles -$meta->{sequence} = []; -for my $f (@$orig_list) { - push @{$meta->{sequence}}, $f->{id}; - my $m = $meta->{photo}->{$f->{id}} or die; - $m->{title} = $f->{title}; -} - -for my $thumb_fmt (keys %{$gal->get('ThumbFormats')}) { - my ($tw, $th) = ($thumb_fmt =~ m{^(\d+)x(\d+)$}) or die "Cannot parse thumbnail format $thumb_fmt\n"; - print "Generating $thumb_fmt thumbnails\n"; - my $thumb_meta = {}; - $meta->{thumb}->{$thumb_fmt} = $thumb_meta; - my $thumb_dir = File::Spec->catfile($cache_dir, $thumb_fmt); - -d $thumb_dir or File::Path::mkpath($thumb_dir) or die "Unable to create $thumb_dir: $!\n"; - - for my $id (@{$meta->{sequence}}) { - my $m = $meta->{photo}->{$id} or die; - print "\t$id: "; - - my $p = new Image::Magick; - my $photo = File::Spec->catfile($photo_dir, "$id.jpg"); - my $e; - $e = $p->Read($photo) and die "Error reading $photo: $e"; - - my $w = $m->{w}; - my $h = $m->{h}; - if ($w > $tw) { - my $s = $tw / $w; - $w = $w * $s; - $h = $h * $s; - } - if ($h > $th) { - my $s = $th / $h; - $w = $w * $s; - $h = $h * $s; - } - $w = int($w + .5); - $h = int($h + .5); - print "${w}x${h} "; - $p->Resize(width=>$w, height=>$h); - - my $out = File::Spec->catfile($thumb_dir, "$id.jpg"); - my $tmp = "$photo.new"; - $e = $p->Write($tmp) and die "Unable to write $tmp: $e"; - rename $tmp, $out or die "Unable to rename $tmp to $out: $!\n"; - - $thumb_meta->{$id} = { - 'w' => $w, - 'h' => $h, - }; - - print "... OK\n"; - } -} - -my $cache_meta = $gal->cache_meta_name; -print "Writing meta-data to $cache_meta\n"; -$gal->write_meta($cache_meta, $meta); diff --git a/gal2/bin/gal-dump-config b/gal2/bin/gal-dump-config deleted file mode 100755 index 600a9d5..0000000 --- a/gal2/bin/gal-dump-config +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/perl -# UCW Gallery: Show configuration variables -# (c) 2004--2012 Martin Mares - -use strict; -use warnings; - -use UCW::Gallery; -use Data::Dumper; - -my $gal = UCW::Gallery->load_config(); - -for my $k (sort $gal->get_config_keys) { - my $d = Data::Dumper->new([ $gal->get($k) ]); - $d->Terse(1); - print "$k=", $d->Dump; -} diff --git a/gal2/bin/gal-dump-meta b/gal2/bin/gal-dump-meta deleted file mode 100755 index 1734183..0000000 --- a/gal2/bin/gal-dump-meta +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/perl -# UCW Gallery: Dump meta-data -# (c) 2004--2012 Martin Mares - -use strict; -use warnings; - -use UCW::Gallery; -use Data::Dumper; - -@ARGV == 1 or die "Usage: $0 \n"; - -my $gal = UCW::Gallery->load_config; -my $meta = $gal->read_meta($ARGV[0]); -print Dumper($meta); diff --git a/gal2/bin/gal-from-gqview b/gal2/bin/gal-from-gqview deleted file mode 100755 index 138af5a..0000000 --- a/gal2/bin/gal-from-gqview +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/perl -# UCW Gallery: Extract image list from GQview collection -# (c) 2004--2012 Martin Mares - -use strict; -use warnings; - -while (<>) { - chomp; - /^#/ && next; - /^$/ && next; - if (/^"(.*)"$/) { - print "$1\n"; - } else { - die "Error parsing collection: $_"; - } -} diff --git a/gal2/bin/gal-gen b/gal2/bin/gal-gen deleted file mode 100755 index ce75896..0000000 --- a/gal2/bin/gal-gen +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/perl -# UCW Gallery: Generate published photos -# (c) 2004--2012 Martin Mares - -use strict; -use warnings; - -use UCW::Gallery; -use Image::Magick; -use IO::Handle; -use File::Spec; -use File::Path; - -STDOUT->autoflush(1); - -my $gal = UCW::Gallery->load_config; - -my $orig_list = $gal->read_list('gallery.list') or die "Cannot read gallery.list: $!\n"; - -my $photo_dir = $gal->get('PhotoDir'); -if (-d $photo_dir) { - print "Using existing output directory: $photo_dir\n"; -} else { - print "Creating output directory: $photo_dir\n"; - File::Path::mkpath($photo_dir) or die "Unable to create $photo_dir: $!\n"; -} - -my $photo_meta = $gal->photo_meta_name; -my $old_meta = {}; -if (-f $photo_meta) { - print "Reading old meta-data\n"; - $old_meta = $gal->read_meta($photo_meta); - # use Data::Dumper; print "Read old meta: ", Dumper($old_meta), "\n"; -} -my $meta = { 'photo' => {} }; - -for my $f (@$orig_list) { - my $id = $f->{id}; - my $rotate = $f->{orientation}; - my $xfrm = $f->{xfrm}; - print "$id: "; - - my $p = new Image::Magick; - my $orig = File::Spec->rel2abs($f->{file}, $gal->get('OrigDir')); - my ($orig_w, $orig_h, $orig_size, $orig_format) = $p->PingImage($orig) or die "Error reading $orig\n"; - print "${orig_w}x${orig_h} "; - - my ($w0, $h0) = ($rotate eq "l" || $rotate eq "r") ? ($orig_h, $orig_w) : ($orig_w, $orig_h); - my ($w, $h) = ($w0, $h0); - if ($w > $gal->get('PhotoMaxWidth')) { - my $s = $gal->get('PhotoMaxWidth') / $w; - $w = $w * $s; - $h = $h * $s; - } - if ($h > $gal->get('PhotoMaxHeight')) { - my $s = $gal->get('PhotoMaxHeight') / $h; - $w = $w * $s; - $h = $h * $s; - } - $w = int($w + .5); - $h = int($h + .5); - - my $m = { - 'o' => $rotate, - 'xf' => $xfrm, - 'w' => $w, - 'h' => $h, - }; - $meta->{photo}->{$id} = $m; - - my $om = $old_meta->{photo}->{$id}; - if ($om && - $om->{o} eq $m->{o} && - $om->{xf} eq $m->{xf} && - $om->{w} eq $m->{w} && - $om->{h} eq $m->{h}) { - print "... uptodate\n"; - next; - } - - my $e; - $e = $p->Read($orig) and die "Error reading $orig: $e"; - $p->Strip; - $p->SetAttribute(quality=>90); - - if ($xfrm =~ /s/) { - print "-> sharpen "; - $p->Sharpen(1); - } - if ($xfrm =~ /h/) { - print "-> equalize "; - $p->Equalize(); - } - if ($xfrm =~ /n/) { - print "-> normalize "; - $p->Normalize(); - } - - my $rot = 0; - if ($rotate eq "l") { $rot = 270; } - elsif ($rotate eq "r") { $rot = 90; } - elsif ($rotate eq "u") { $rot = 180; } - if ($rot) { - print "-> rotate $rot "; - $p->Rotate(degrees=>$rot); - } - - if ($w != $w0 || $h != $h0) { - print "-> ${w}x${h} "; - $p->Resize(width=>$w, height=>$h); - } - - my $photo = File::Spec->catfile($photo_dir, $id . ".jpg"); - my $tmp = "$photo.new"; - $e = $p->Write($tmp) and die "Unable to write $tmp: $e"; - rename $tmp, $photo or die "Cannot rename $tmp to $photo: $!\n"; - - print "... OK\n"; -} - -print "Cleaning up stale files\n"; -for my $f (<$photo_dir/*.jpg>) { - my ($vv, $dd, $id) = File::Spec->splitpath($f); - $id =~ s{\..*$}{}; - unless (defined $meta->{photo}->{$id}) { - print "$id: removing\n"; - unlink $f; - } -} - -print "Writing meta-data\n"; -$gal->write_meta($photo_meta, $meta); diff --git a/gal2/bin/gal-mj-digikam b/gal2/bin/gal-mj-digikam deleted file mode 100755 index e222e5d..0000000 --- a/gal2/bin/gal-mj-digikam +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Cwd; -use DBI; - -my $photos_root = $ENV{HOME} . '/photos'; - -my $album = $ARGV[0]; -if (!defined $album) { - my $cwd = getcwd; - $cwd =~ m{/photos/(.*)} or die "Cannot identify album from current directory, need to specify maunally.\n"; - $album = $1; -} - -if (! -f "gallery.cf") { - system 'gal', 'mj-init'; die if $?; -} - -my $dbfile = "$photos_root/digikam4.db"; -my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile", "", "") or die "Cannot access $dbfile\n"; - -my %alba = (); -for my $r (@{$dbh->selectall_arrayref( - 'SELECT a.id AS id, r.label AS label, a.relativePath AS rpath FROM Albums a JOIN AlbumRoots r ON (r.id = a.albumRoot)', - { Slice => {} })}) { - my $name = $r->{label} . $r->{rpath}; - # print "$name\n"; - $alba{$name} = $r->{id}; -} - -my $album_id = $alba{$album} // die "Unknown album $album\n"; -print "## Album $album: id=$album_id\n"; - -my ($tag_id) = $dbh->selectrow_array('SELECT id FROM Tags WHERE pid=0 AND name="web"'); -$tag_id // die "Cannot find web tag\n"; -print "## Tag ID: $tag_id\n"; - -open OUT, '|-', $ENV{GALLERY_ROOT} . '/bin/gal-scan' or die "Cannot feed gal scan\n"; -for my $r (@{$dbh->selectall_arrayref( - 'SELECT i.name AS name FROM Images i JOIN ImageTags t ON (i.id = t.imageid) WHERE i.album=? AND t.tagid=? ORDER BY i.name', - { Slice => {} }, - $album_id, $tag_id)}) { - print OUT "$photos_root/$album/" . $r->{name}, "\n"; -} -close OUT; diff --git a/gal2/bin/gal-mj-init b/gal2/bin/gal-mj-init deleted file mode 100755 index 1105254..0000000 --- a/gal2/bin/gal-mj-init +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -e - -if [ -f gallery.cf ] ; then - echo >&2 'gallery.cf already present, giving up!' - exit 1 -fi - -cat >gallery.cf <<'AMEN' -use strict; -use warnings; -use utf8; - -my $gal = require '../../default.cf'; -$gal->set( - Title => 'Unnamed', -); - -return $gal; -AMEN diff --git a/gal2/bin/gal-mj-map b/gal2/bin/gal-mj-map deleted file mode 100755 index b9f48d9..0000000 --- a/gal2/bin/gal-mj-map +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Digest::SHA; -use File::Find; - -STDOUT->autoflush(1); - -find({ - wanted => sub { - my $name = $File::Find::name; - $name =~ s{^\./}{}; - $name =~ m{^\d} or return; - $name =~ m{\.jpe?g$}i or return; - -f $name or return; - print "$name\t"; - - my $sha = Digest::SHA->new(1); - $sha->addfile($name) or die "Cannot hash $name\n"; - my $id = substr($sha->hexdigest, 0, 16); - print "$id\n"; - }, - no_chdir => 1, -}, "."); diff --git a/gal2/bin/gal-mj-migrate-check b/gal2/bin/gal-mj-migrate-check deleted file mode 100755 index 5936f32..0000000 --- a/gal2/bin/gal-mj-migrate-check +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl -# Check that thumbnail aspect ratios match pre-migration data - -use strict; -use warnings; - -use UCW::Gallery; - -my $gal = UCW::Gallery->load_config; -my $meta = $gal->read_meta($gal->cache_meta_name); - -open T, "gallery.thumb" or die "Cannot read gallery.thumb\n"; -my @thumbs = (); -while () { - chomp; - my ($name, $tw, $th) = split /\s+/; - push @thumbs, [ $tw, $th ]; -} -close T; - -for my $id (@{$meta->{sequence}}) { - my ($tw, $th) = @{shift @thumbs} or die; - my $ta = $tw / $th; - my $m = $meta->{photo}->{$id} or die; - my $pw = $m->{w}; - my $ph = $m->{h}; - my $pa = $pw / $ph; - if (abs($ta - $pa) > 0.05) { - if (abs($ta - 1/$pa) > 0.05) { - print STDERR "$id: Mismatched aspect ratio: orig $ta (${tw}x${th}) new $pa (${pw}x${ph})\n"; - } else { - print STDERR "$id: Mismatched rotation\n"; - } - } -} diff --git a/gal2/bin/gal-mj-upgrade b/gal2/bin/gal-mj-upgrade deleted file mode 100755 index 66c260f..0000000 --- a/gal2/bin/gal-mj-upgrade +++ /dev/null @@ -1,154 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use UCW::Gallery; -use File::Spec; -use Image::Magick; - -my $photos_root = $ENV{HOME} . '/photos'; - -my $album = $ARGV[0] // die "Usage: gal mj-upgrade \n"; -print "### $album ###\n"; - -### Scan photos.map ### - -my $year = $album; -$year =~ s{/.*}{}; -if ($album eq '2009/Fireworks') { $year = 2008; } -print "Loading map for $year\n"; -open M, "$photos_root/photos.map" or die "No map file found\n"; -my %map = (); -while () { - chomp; - m{^$year} or next; - my ($path, $hash) = split /\t/; - my $name = $path; - $name =~ s{.*/}{}; - if (defined $map{$name}) { - my $prev = $map{$name}; - if ($prev->{hash} ne $hash) { - print STDERR "Collision for $name: ", $prev->{path}, " vs. ", $path, "\n"; - } else { - # print STDERR "Harmless collision for $name: ", $prev->{path}, " vs. ", $path, "\n"; - } - } else { - $map{$name} = { path => $path, hash => $hash }; - } -} -close M; - -### Scan static list (if any) ### - -my @src = (); -if (open S, "../static/photos/$album/x") { - print "Found static list\n"; - while () { - chomp; - my @fields = split /\t/; - if (@fields == 4) { - push @src, { name => $fields[0], rotate => $fields[2], xform => $fields[3] }; - } elsif (@fields == 2) { - push @src, { name => $fields[0], rotate => $fields[1], xform => '.' }; - } else { - die "Error parsing gallery list: $_\n"; - } - } - close S; -} - -### Parse index.cgi and produce gallery.new ### - -open I, "$album/index.cgi" or die "Cannot find $album/index.cgi\n"; -open W, ">$album/gallery.new" or die "Cannot create $album/gallery.new\n"; -open T, ">$album/gallery.thumb" or die "Cannot create $album/gallery.thumb\n"; -my %opt = (); -my %found_dirs = (); -my @items = (); -while () { - chomp; - if (/^\s+"(\w+)" => "(.*)",?$/) { - $opt{$1} = $2; - print "Option: $1 = $2\n"; - } elsif (/^img\("([^"]+)(\.jpe?g)", "([^"]*)"\);\s*# (\S+)/) { - my $nr = $1; - my $ext = $2; - my $title = $3; - my $file = $4; - $file =~ s{^.*/}{}g; - - my $map = $map{$file}; - if (!$map) { - print STDERR "$album: No match for $file\n"; - next; - } - my $path = $map->{path}; - my ($vv, $dd, $ff) = File::Spec->splitpath($path); - $found_dirs{$dd} = 1; - - print "Image: $nr $path [$title]\n"; - my $src; - if (@src) { - if ($nr =~ m{^\d+$} && $nr <= @src) { - $src = $src[$nr-1]; - } else { - print STDERR "$album: Crooked refs ($nr)\n"; - } - } - - print W join("\t", - "$photos_root/$path", - $map->{hash}, - ($src ? $src->{rotate} : '-'), - ($src ? $src->{xform} : '.'), - ($title ne "" ? $title : '-'), - ), "\n"; - - - my $thumb = "../static/photos/$album/$nr-thumb.jpg"; - if (!-f $thumb) { - print STDERR "$album: Cannot find thumbnail for photo $nr ($thumb)\n"; - print T "1 1\n"; - } else { - my $im = new Image::Magick; - my ($thumb_w, $thumb_h, $thumb_size, $thumb_format) = $im->PingImage($thumb) or die "Error reading $thumb\n"; - print T "$thumb $thumb_w $thumb_h\n"; - } - } elsif (/^($|#|require|SetOptions|\)|Start|Finish)/) { - # Nothing important - } else { - print STDERR "$album/index.cgi: Parse error at line $.: $_\n"; - } -} -close T; -close W; -close I; - -if (scalar keys %found_dirs != 1) { - print STDERR "$album: Photos in multiple directories\n"; -} - -### Create gallery.cf ### - -open CF, ">$album/gallery.cf" or die "Cannot create $album/gallery.cf"; -print CF <<'AMEN' ; -use strict; -use warnings; -use utf8; - -my $gal = require '../../default.cf'; -$gal->set( -AMEN - -for my $cf (reverse sort keys %opt) { - print CF "\t$cf => \"", $opt{$cf}, "\",\n"; -} - -print CF <<'AMEN' ; -); - -return $gal; -AMEN - -close CF; diff --git a/gal2/bin/gal-mj-upload b/gal2/bin/gal-mj-upload deleted file mode 100755 index f33da42..0000000 --- a/gal2/bin/gal-mj-upload +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -print "## Updating Git\n"; -system "git", "pull"; -die if $?; - -print "## Ensuring that photos are generated\n"; -system "gal", "gen"; -die if $?; - -use Cwd; -my $cwd = getcwd; -my ($root, $album) = $cwd =~ m{(.*)/photos/(.*)} or die "Cannot identify album from current directory, giving up.\n"; -my $static = "$root/static/gallery/photo/$album"; --d $static or die "Cannot find generated photos in $static, giving up.\n"; - -print "## Uploading album $album\n"; -system "rs", "$static/", "jw:www/static/gallery/photo/$album/"; -die if $?; - -print "## Calling editor on index files\n"; -system 'vim', 'gallery.cf', "$root/photos/Makefile", "$root/photos/index.thtml"; -die if $?; - -print "## Committing to repository\n"; -system 'git', 'add', 'gallery.cf', 'gallery.list'; die if #?; -system 'git', 'add', "$root/photos/Makefile", "$root/photos/index.thtml"; die if $?; -system 'git', 'commit'; die if $?; -system 'git', 'push'; die if $?; - -print "## Pulling at the server\n"; -system "ssh", "jw", "cd web && git pull && make"; -die if $?; - -print "## Regenerating cache at the server\n"; -system "ssh", "jw", "cd web/photos/$album && ~/web/gal2/gal cache"; -die if $?; - -print "Done.\n"; diff --git a/gal2/bin/gal-scan b/gal2/bin/gal-scan deleted file mode 100755 index 0cdff94..0000000 --- a/gal2/bin/gal-scan +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/perl -# UCW Gallery: Scan images and generate image list -# (c) 2004--2012 Martin Mares - -use strict; -use warnings; - -use UCW::Gallery; -use File::Spec; -use Image::EXIF; -use Digest::SHA; -use Getopt::Long; - -if (@ARGV && $ARGV[0] eq '--help') { - die < - or: gal scan --update -AMEN -} - -my $update; -GetOptions( - 'update!' => \$update, -) or die "Try gal scan --help\n"; - -STDOUT->autoflush(1); -my $gal = UCW::Gallery->load_config; -my $orig_prefix = $gal->get('OrigDir'); -$orig_prefix =~ m{/$} or $orig_prefix .= '/'; - -my @source = (); -if ($update) { - print "Loading previous gallery.list\n"; - my $pg = $gal->read_list('gallery.list') or die "Unable to load gallery.list\n"; - @source = @{$pg}; -} elsif (@ARGV) { - for my $in (@ARGV) { - if (-f $in) { - push @source, { file => $in }; - } elsif (-d $in) { - opendir D, $in or die "Cannot scan directory $in: $!\n"; - my @p = (); - while (my $e = readdir D) { - my $f = File::Spec->canonpath(File::Spec->catfile($in, $e)); - if ($f =~ m{\.(jpe?g|png)$}i) { - push @p, $f; - } - } - closedir D; - push @source, map { { file => $_ } } sort @p; - } else { - die "$in is neither file nor directory\n"; - } - } -} else { - while () { - chomp; - push @source, { file => $_ }; - } -} - -print "Scanning photos\n"; -my @images = (); -foreach my $src (@source) { - my $name = $src->{file}; - if ($name =~ m{^/}) { - # Try to relativize to OrigDir - if (substr($name, 0, length $orig_prefix) eq $orig_prefix) { - $src->{file} = $name = substr($name, length $orig_prefix); - } - } - print "\t$name:"; - - my $path = File::Spec->rel2abs($name, $gal->get('OrigDir')); - -f $path or die "Cannot find $path\n"; - - if (!defined $src->{id}) { - my $sha = Digest::SHA->new(1); - $sha->addfile($path) or die "Cannot hash $path\n"; - $src->{id} = substr($sha->hexdigest, 0, 16); - } - print " id=", $src->{id}; - - if (!defined $src->{orientation} || $src->{orientation} eq '-') { - my $e = new Image::EXIF($path); - my $i = $e->get_all_info(); - if ($e->error) { - print "EXIF error: ", $e->error, "\n"; - $src->{orientation} = '.'; - } else { - # print STDERR Dumper($i), "\n"; - my $o = $i->{'image'}->{'Image Orientation'} || "Top, Left-Hand"; - if ($o eq "Top, Left-Hand") { $o = "."; } - elsif ($o eq "Right-Hand, Top") { $o = "r"; } - elsif ($o eq "Left-Hand, Bottom") { $o = "l"; } - elsif ($o eq "Bottom, Right-Hand") { $o = "d"; } - else { - print "Unrecognized orientation: $o\n"; - $o = "."; - } - $src->{orientation} = $o; - } - } - print " ori=", $src->{orientation}; - - defined $src->{xfrm} or $src->{xfrm} = $gal->get('ScanDefaultTransform'); - print " xfrm=", $src->{xfrm}; - - $src->{title} //= ''; - push @images, $src; - print "\n"; -} - -if (!$update) { - my $old = $gal->read_list('gallery.list'); - if ($old) { - print "Updating gallery.list\n"; - my %old_by_id = map { $_->{id} => $_ } @$old; - for my $i (@images) { - my $id = $i->{id}; - my $o = $old_by_id{$id}; - if ($o) { - print "\t$id: updated\n"; - $i->{orientation} = $o->{orientation}; - $i->{xfrm} = $o->{xfrm}; - $i->{title} = $o->{title}; - } else { - print "\t$id: new\n"; - } - delete $old_by_id{$id}; - } - for my $id (keys %old_by_id) { - print "\t$id: removed\n"; - } - } -} - -$gal->write_list('gallery.list', \@images); -print "Written gallery.list (", (scalar @images), " items)\n"; diff --git a/gal2/gal b/gal2/gal deleted file mode 100755 index f66c682..0000000 --- a/gal2/gal +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/perl -# UCW Gallery -- Master Program -# (c) 2012 Martin Mares - -use strict; -use warnings; -use Getopt::Long; - -use FindBin; -my $gallery_root = $FindBin::Bin; - -my $all; -my $threads = 4; - -sub show_help() { - print < - -General options: ---all Run on all galleries in subdirectories ---threads= Run in threads (default=4) - -Common commands: -scan Scan directory and obtain originals -gen Generate web photos from originals -cache Rebuild thumbnails and other cached info - -Other commands: -dump-config Show configuration settings -dump-meta Show contents of metadata files -from-gqview Parse gqview/geeqie collections -AMEN - exit 0; -} - -Getopt::Long::Configure('require_order'); -GetOptions( - "help" => \&show_help, - "version" => sub { - print "UCW Gallery 2.0 (c) 2004-2012 Martin Mares \n"; - }, - "all!" => \$all, - "threads=i" => \$threads, -) or die "Try `gal help' for more information.\n"; -Getopt::Long::Configure('default'); - -@ARGV or die "Missing subcommand.\n"; -my $sub = shift @ARGV; -$sub =~ /^[0-9a-zA-Z-]+$/ or die "Invalid subcommand $sub\n"; - -if ($sub eq 'help') { show_help(); } - -my $sub_path = "$gallery_root/bin/gal-$sub"; --x $sub_path or die "Unknown subcommand $sub\n"; - -$ENV{"GALLERY_ROOT"} = $gallery_root; -$ENV{"PERL5LIB"} = join(":", $gallery_root, $ENV{"PERL5LIB"} // ()); - -if (!$all) { - exec $sub_path, @ARGV; - die "Cannot execute $sub_path: $!\n"; -} - -### Parallel execution ### - -my @dirs = sort map { chomp; s{^\./}{}; s{\/gallery.cf}{}; $_; } `find . -mindepth 2 -name gallery.cf`; -my $done = 0; -my $need = @dirs; - -my $running = 0; -my $errors = 0; -my %pid_to_dir = (); - -while ($running || @dirs) { - if ($running == $threads || !@dirs) { - # Wait for children - my $pid = wait; die if $pid < 0; - my $dir = $pid_to_dir{$pid} or die; - if ($?) { - print "!! $dir FAILED [see $dir/gallery.log]"; - $errors++; - } else { - print "++ $dir"; - unlink "$dir/gallery.log"; - } - delete $pid_to_dir{$pid}; - $running--; - $done++; - print " (done $done/$need)\n"; - } else { - my $dir = shift @dirs; - print "<< $dir\n"; - my $pid = fork; - if (!$pid) { - close STDOUT; - open STDOUT, '>', "$dir/gallery.log" or die; - chdir $dir or die "Cannot chdir to $dir: $!\n"; - exec $sub_path, @ARGV; - die "Cannot execute $sub_path: $!\n"; - } - $pid_to_dir{$pid} = $dir; - $running++; - } -} - -print "$done jobs, $errors errors.\n"; -exit ($errors > 0); diff --git a/gal2/highslide/easing_equations.js b/gal2/highslide/easing_equations.js deleted file mode 100644 index f96a2b1..0000000 --- a/gal2/highslide/easing_equations.js +++ /dev/null @@ -1,282 +0,0 @@ -/* - Easing Equations v1.5 - May 1, 2003 - (c) 2003 Robert Penner, all rights reserved. - This work is subject to the terms in http://www.robertpenner.com/easing_terms_of_use.html. - - These tweening functions provide different flavors of - math-based motion under a consistent API. - - Types of easing: - - Linear - Quadratic - Cubic - Quartic - Quintic - Sinusoidal - Exponential - Circular - Elastic - Back - Bounce - - Changes: - 1.5 - added bounce easing - 1.4 - added elastic and back easing - 1.3 - tweaked the exponential easing functions to make endpoints exact - 1.2 - inline optimizations (changing t and multiplying in one step)--thanks to Tatsuo Kato for the idea - - Discussed in Chapter 7 of - Robert Penner's Programming Macromedia Flash MX - (including graphs of the easing equations) - - http://www.robertpenner.com/profmx - http://www.amazon.com/exec/obidos/ASIN/0072223561/robertpennerc-20 -*/ - - -// simple linear tweening - no easing -// t: current time, b: beginning value, c: change in value, d: duration -Math.linearTween = function (t, b, c, d) { - return c*t/d + b; -}; - - - ///////////// QUADRATIC EASING: t^2 /////////////////// - -// quadratic easing in - accelerating from zero velocity -// t: current time, b: beginning value, c: change in value, d: duration -// t and d can be in frames or seconds/milliseconds -Math.easeInQuad = function (t, b, c, d) { - return c*(t/=d)*t + b; -}; - -// quadratic easing out - decelerating to zero velocity -Math.easeOutQuad = function (t, b, c, d) { - return -c *(t/=d)*(t-2) + b; -}; - -// quadratic easing in/out - acceleration until halfway, then deceleration -Math.easeInOutQuad = function (t, b, c, d) { - if ((t/=d/2) < 1) return c/2*t*t + b; - return -c/2 * ((--t)*(t-2) - 1) + b; -}; - - - ///////////// CUBIC EASING: t^3 /////////////////////// - -// cubic easing in - accelerating from zero velocity -// t: current time, b: beginning value, c: change in value, d: duration -// t and d can be frames or seconds/milliseconds -Math.easeInCubic = function (t, b, c, d) { - return c*(t/=d)*t*t + b; -}; - -// cubic easing out - decelerating to zero velocity -Math.easeOutCubic = function (t, b, c, d) { - return c*((t=t/d-1)*t*t + 1) + b; -}; - -// cubic easing in/out - acceleration until halfway, then deceleration -Math.easeInOutCubic = function (t, b, c, d) { - if ((t/=d/2) < 1) return c/2*t*t*t + b; - return c/2*((t-=2)*t*t + 2) + b; -}; - - - ///////////// QUARTIC EASING: t^4 ///////////////////// - -// quartic easing in - accelerating from zero velocity -// t: current time, b: beginning value, c: change in value, d: duration -// t and d can be frames or seconds/milliseconds -Math.easeInQuart = function (t, b, c, d) { - return c*(t/=d)*t*t*t + b; -}; - -// quartic easing out - decelerating to zero velocity -Math.easeOutQuart = function (t, b, c, d) { - return -c * ((t=t/d-1)*t*t*t - 1) + b; -}; - -// quartic easing in/out - acceleration until halfway, then deceleration -Math.easeInOutQuart = function (t, b, c, d) { - if ((t/=d/2) < 1) return c/2*t*t*t*t + b; - return -c/2 * ((t-=2)*t*t*t - 2) + b; -}; - - - ///////////// QUINTIC EASING: t^5 //////////////////// - -// quintic easing in - accelerating from zero velocity -// t: current time, b: beginning value, c: change in value, d: duration -// t and d can be frames or seconds/milliseconds -Math.easeInQuint = function (t, b, c, d) { - return c*(t/=d)*t*t*t*t + b; -}; - -// quintic easing out - decelerating to zero velocity -Math.easeOutQuint = function (t, b, c, d) { - return c*((t=t/d-1)*t*t*t*t + 1) + b; -}; - -// quintic easing in/out - acceleration until halfway, then deceleration -Math.easeInOutQuint = function (t, b, c, d) { - if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; - return c/2*((t-=2)*t*t*t*t + 2) + b; -}; - - - - ///////////// SINUSOIDAL EASING: sin(t) /////////////// - -// sinusoidal easing in - accelerating from zero velocity -// t: current time, b: beginning value, c: change in position, d: duration -Math.easeInSine = function (t, b, c, d) { - return -c * Math.cos(t/d * (Math.PI/2)) + c + b; -}; - -// sinusoidal easing out - decelerating to zero velocity -Math.easeOutSine = function (t, b, c, d) { - return c * Math.sin(t/d * (Math.PI/2)) + b; -}; - -// sinusoidal easing in/out - accelerating until halfway, then decelerating -Math.easeInOutSine = function (t, b, c, d) { - return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; -}; - - - ///////////// EXPONENTIAL EASING: 2^t ///////////////// - -// exponential easing in - accelerating from zero velocity -// t: current time, b: beginning value, c: change in position, d: duration -Math.easeInExpo = function (t, b, c, d) { - return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; -}; - -// exponential easing out - decelerating to zero velocity -Math.easeOutExpo = function (t, b, c, d) { - return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; -}; - -// exponential easing in/out - accelerating until halfway, then decelerating -Math.easeInOutExpo = function (t, b, c, d) { - if (t==0) return b; - if (t==d) return b+c; - if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; - return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; -}; - - - /////////// CIRCULAR EASING: sqrt(1-t^2) ////////////// - -// circular easing in - accelerating from zero velocity -// t: current time, b: beginning value, c: change in position, d: duration -Math.easeInCirc = function (t, b, c, d) { - return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; -}; - -// circular easing out - decelerating to zero velocity -Math.easeOutCirc = function (t, b, c, d) { - return c * Math.sqrt(1 - (t=t/d-1)*t) + b; -}; - -// circular easing in/out - acceleration until halfway, then deceleration -Math.easeInOutCirc = function (t, b, c, d) { - if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; - return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; -}; - - - /////////// ELASTIC EASING: exponentially decaying sine wave ////////////// - -// t: current time, b: beginning value, c: change in value, d: duration, a: amplitude (optional), p: period (optional) -// t and d can be in frames or seconds/milliseconds - -Math.easeInElastic = function (t, b, c, d, a, p) { - if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; - if (a < Math.abs(c)) { a=c; var s=p/4; } - else var s = p/(2*Math.PI) * Math.asin (c/a); - return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; -}; - -Math.easeOutElastic = function (t, b, c, d, a, p) { - if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; - if (a < Math.abs(c)) { a=c; var s=p/4; } - else var s = p/(2*Math.PI) * Math.asin (c/a); - return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; -}; - -Math.easeInOutElastic = function (t, b, c, d, a, p) { - if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); - if (a < Math.abs(c)) { a=c; var s=p/4; } - else var s = p/(2*Math.PI) * Math.asin (c/a); - if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; - return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; -}; - - - /////////// BACK EASING: overshooting cubic easing: (s+1)*t^3 - s*t^2 ////////////// - -// back easing in - backtracking slightly, then reversing direction and moving to target -// t: current time, b: beginning value, c: change in value, d: duration, s: overshoot amount (optional) -// t and d can be in frames or seconds/milliseconds -// s controls the amount of overshoot: higher s means greater overshoot -// s has a default value of 1.70158, which produces an overshoot of 10 percent -// s==0 produces cubic easing with no overshoot -Math.easeInBack = function (t, b, c, d, s) { - if (s == undefined) s = 1.70158; - return c*(t/=d)*t*((s+1)*t - s) + b; -}; - -// back easing out - moving towards target, overshooting it slightly, then reversing and coming back to target -Math.easeOutBack = function (t, b, c, d, s) { - if (s == undefined) s = 1.70158; - return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; -}; - -// back easing in/out - backtracking slightly, then reversing direction and moving to target, -// then overshooting target, reversing, and finally coming back to target -Math.easeInOutBack = function (t, b, c, d, s) { - if (s == undefined) s = 1.70158; - if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; - return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; -}; - - - /////////// BOUNCE EASING: exponentially decaying parabolic bounce ////////////// - -// bounce easing in -// t: current time, b: beginning value, c: change in position, d: duration -Math.easeInBounce = function (t, b, c, d) { - return c - Math.easeOutBounce (d-t, 0, c, d) + b; -}; - -// bounce easing out -Math.easeOutBounce = function (t, b, c, d) { - if ((t/=d) < (1/2.75)) { - return c*(7.5625*t*t) + b; - } else if (t < (2/2.75)) { - return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; - } else if (t < (2.5/2.75)) { - return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; - } else { - return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; - } -}; - -// bounce easing in/out -Math.easeInOutBounce = function (t, b, c, d) { - if (t < d/2) return Math.easeInBounce (t*2, 0, c, d) * .5 + b; - return Math.easeOutBounce (t*2-d, 0, c, d) * .5 + c*.5 + b; -}; - - -//trace (">> Penner easing equations loaded"); - - - - - - diff --git a/gal2/highslide/graphics/close.png b/gal2/highslide/graphics/close.png deleted file mode 100644 index 4de4396..0000000 Binary files a/gal2/highslide/graphics/close.png and /dev/null differ diff --git a/gal2/highslide/graphics/closeX.png b/gal2/highslide/graphics/closeX.png deleted file mode 100644 index cf5d018..0000000 Binary files a/gal2/highslide/graphics/closeX.png and /dev/null differ diff --git a/gal2/highslide/graphics/controlbar-black-border.gif b/gal2/highslide/graphics/controlbar-black-border.gif deleted file mode 100644 index e2403fe..0000000 Binary files a/gal2/highslide/graphics/controlbar-black-border.gif and /dev/null differ diff --git a/gal2/highslide/graphics/controlbar-text-buttons.png b/gal2/highslide/graphics/controlbar-text-buttons.png deleted file mode 100644 index d2f72e0..0000000 Binary files a/gal2/highslide/graphics/controlbar-text-buttons.png and /dev/null differ diff --git a/gal2/highslide/graphics/controlbar-white-small.gif b/gal2/highslide/graphics/controlbar-white-small.gif deleted file mode 100644 index 462fce7..0000000 Binary files a/gal2/highslide/graphics/controlbar-white-small.gif and /dev/null differ diff --git a/gal2/highslide/graphics/controlbar-white.gif b/gal2/highslide/graphics/controlbar-white.gif deleted file mode 100644 index 1f143f5..0000000 Binary files a/gal2/highslide/graphics/controlbar-white.gif and /dev/null differ diff --git a/gal2/highslide/graphics/controlbar2.gif b/gal2/highslide/graphics/controlbar2.gif deleted file mode 100644 index 39ad652..0000000 Binary files a/gal2/highslide/graphics/controlbar2.gif and /dev/null differ diff --git a/gal2/highslide/graphics/controlbar3.gif b/gal2/highslide/graphics/controlbar3.gif deleted file mode 100644 index 3eebb81..0000000 Binary files a/gal2/highslide/graphics/controlbar3.gif and /dev/null differ diff --git a/gal2/highslide/graphics/controlbar4-hover.gif b/gal2/highslide/graphics/controlbar4-hover.gif deleted file mode 100644 index ca08b59..0000000 Binary files a/gal2/highslide/graphics/controlbar4-hover.gif and /dev/null differ diff --git a/gal2/highslide/graphics/controlbar4.gif b/gal2/highslide/graphics/controlbar4.gif deleted file mode 100644 index 7a3ad34..0000000 Binary files a/gal2/highslide/graphics/controlbar4.gif and /dev/null differ diff --git a/gal2/highslide/graphics/fullexpand.gif b/gal2/highslide/graphics/fullexpand.gif deleted file mode 100644 index 26d9ed0..0000000 Binary files a/gal2/highslide/graphics/fullexpand.gif and /dev/null differ diff --git a/gal2/highslide/graphics/geckodimmer.png b/gal2/highslide/graphics/geckodimmer.png deleted file mode 100644 index 309bb27..0000000 Binary files a/gal2/highslide/graphics/geckodimmer.png and /dev/null differ diff --git a/gal2/highslide/graphics/icon.gif b/gal2/highslide/graphics/icon.gif deleted file mode 100644 index b74a073..0000000 Binary files a/gal2/highslide/graphics/icon.gif and /dev/null differ diff --git a/gal2/highslide/graphics/loader.big.black.gif b/gal2/highslide/graphics/loader.big.black.gif deleted file mode 100644 index c95d05a..0000000 Binary files a/gal2/highslide/graphics/loader.big.black.gif and /dev/null differ diff --git a/gal2/highslide/graphics/loader.big.white.gif b/gal2/highslide/graphics/loader.big.white.gif deleted file mode 100644 index 3288d10..0000000 Binary files a/gal2/highslide/graphics/loader.big.white.gif and /dev/null differ diff --git a/gal2/highslide/graphics/loader.black.gif b/gal2/highslide/graphics/loader.black.gif deleted file mode 100644 index 0b31f6f..0000000 Binary files a/gal2/highslide/graphics/loader.black.gif and /dev/null differ diff --git a/gal2/highslide/graphics/loader.white.gif b/gal2/highslide/graphics/loader.white.gif deleted file mode 100644 index f2a1bc0..0000000 Binary files a/gal2/highslide/graphics/loader.white.gif and /dev/null differ diff --git a/gal2/highslide/graphics/outlines/beveled.png b/gal2/highslide/graphics/outlines/beveled.png deleted file mode 100644 index fc428f4..0000000 Binary files a/gal2/highslide/graphics/outlines/beveled.png and /dev/null differ diff --git a/gal2/highslide/graphics/outlines/custom.png b/gal2/highslide/graphics/outlines/custom.png deleted file mode 100644 index 2f20f70..0000000 Binary files a/gal2/highslide/graphics/outlines/custom.png and /dev/null differ diff --git a/gal2/highslide/graphics/outlines/drop-shadow.png b/gal2/highslide/graphics/outlines/drop-shadow.png deleted file mode 100644 index 0186c2e..0000000 Binary files a/gal2/highslide/graphics/outlines/drop-shadow.png and /dev/null differ diff --git a/gal2/highslide/graphics/outlines/glossy-dark.png b/gal2/highslide/graphics/outlines/glossy-dark.png deleted file mode 100644 index 3c64c0d..0000000 Binary files a/gal2/highslide/graphics/outlines/glossy-dark.png and /dev/null differ diff --git a/gal2/highslide/graphics/outlines/outer-glow.png b/gal2/highslide/graphics/outlines/outer-glow.png deleted file mode 100644 index 288d43f..0000000 Binary files a/gal2/highslide/graphics/outlines/outer-glow.png and /dev/null differ diff --git a/gal2/highslide/graphics/outlines/rounded-black.png b/gal2/highslide/graphics/outlines/rounded-black.png deleted file mode 100644 index a77e65d..0000000 Binary files a/gal2/highslide/graphics/outlines/rounded-black.png and /dev/null differ diff --git a/gal2/highslide/graphics/outlines/rounded-white.png b/gal2/highslide/graphics/outlines/rounded-white.png deleted file mode 100644 index 0d4b817..0000000 Binary files a/gal2/highslide/graphics/outlines/rounded-white.png and /dev/null differ diff --git a/gal2/highslide/graphics/resize.gif b/gal2/highslide/graphics/resize.gif deleted file mode 100644 index 9100de7..0000000 Binary files a/gal2/highslide/graphics/resize.gif and /dev/null differ diff --git a/gal2/highslide/graphics/scrollarrows.png b/gal2/highslide/graphics/scrollarrows.png deleted file mode 100644 index b3d5575..0000000 Binary files a/gal2/highslide/graphics/scrollarrows.png and /dev/null differ diff --git a/gal2/highslide/graphics/zoom.png b/gal2/highslide/graphics/zoom.png deleted file mode 100644 index 908612e..0000000 Binary files a/gal2/highslide/graphics/zoom.png and /dev/null differ diff --git a/gal2/highslide/graphics/zoomin.cur b/gal2/highslide/graphics/zoomin.cur deleted file mode 100644 index cb79124..0000000 Binary files a/gal2/highslide/graphics/zoomin.cur and /dev/null differ diff --git a/gal2/highslide/graphics/zoomout.cur b/gal2/highslide/graphics/zoomout.cur deleted file mode 100644 index acf6199..0000000 Binary files a/gal2/highslide/graphics/zoomout.cur and /dev/null differ diff --git a/gal2/highslide/highslide-full.js b/gal2/highslide/highslide-full.js deleted file mode 100644 index 9f7b3ef..0000000 --- a/gal2/highslide/highslide-full.js +++ /dev/null @@ -1,3320 +0,0 @@ -/** - * Name: Highslide JS - * Version: 4.1.13 (2011-10-06) - * Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash - * Author: Torstein Hønsi - * Support: www.highslide.com/support - * License: www.highslide.com/#license - */ -if (!hs) { 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', - 'pageOrigin', - '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: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : - parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), -ie : (document.all && !window.opera), -//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant? -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.ieLt9 && 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 (el.style[prop]) { - return el.style[prop]; - } else 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, - ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined'); - - var width = ieLt9 ? iebody.clientWidth : - (d.documentElement.clientWidth || self.innerWidth), - height = ieLt9 ? iebody.clientHeight : self.innerHeight; - hs.page = { - width: width, - height: height, - scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset, - scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset - }; - return hs.page; -}, - -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) { - isNew = true; - hs.dimmer = hs.createElement ('div', { - className: 'highslide-dimming highslide-viewport-size', - owner: '', - onclick: function() { - if (hs.fireEvent(hs, 'onDimmerClick')) - - hs.close(); - } - }, { - visibility: 'visible', - opacity: 0 - }, hs.container, true); - - if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) { - var body = document.body; - function pixDimmerSize() { - hs.setStyles(hs.dimmer, { - width: body.scrollWidth +'px', - height: body.scrollHeight +'px' - }); - } - pixDimmerSize(); - hs.addEventListener(window, 'resize', pixDimmerSize); - } - } - hs.dimmer.style.display = ''; - - var isNew = hs.dimmer.owner == ''; - hs.dimmer.owner += '|'+ exp.key; - - if (isNew) { - 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.dimmer.style.display = 'none'; - else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() { - hs.dimmer.style.display = 'none'; - }); -}, -transit : function (adj, exp) { - var last = exp || hs.getExpander(); - exp = last; - if (hs.upcoming) return false; - else hs.last = last; - hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); - 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) return hs.transit(exp.getAdjacentAnchor(op), 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); - 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.ieLt9 ? 'white' : 'none'), - opacity: 0.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 (!e.relatedTarget) 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.ieLt7 = hs.ie && hs.uaVersion < 7; - hs.ieLt9 = hs.ie && hs.uaVersion < 9; - - hs.getPageSize(); - 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 highslide-viewport-size' - }, { - 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.ieLt7 && 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){ - try { - 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; - } catch (e) {} - } - } -}); - -hs.Outline = function (outlineType, onLoad) { - this.onLoad = onLoad; - this.outlineType = outlineType; - var v = hs.uaVersion, tr; - - this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 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.uaVersion < 525 ? 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 == 0 || 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; - - if (this.maxHeight && this.dim == 'x') - exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); - - 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 (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try { - exp.iDoc.body.style.overflow = 'auto'; - } catch (e) {} - 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 = this.pageOrigin || 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) { - if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); - else 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.uaVersion < 525) 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, - height: 0, - 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 exp = this; - var ajax = new hs.Ajax(this.a, innerContent); - ajax.src = this.src; - 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.iDoc = 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; - if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try { - this.iDoc.body.style.overflow = 'hidden'; - } catch (e) {} - 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 = Math.min(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; - } - changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); - 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, changed) { - var x = this.x, y = this.y; - if (this.overlayBox && (this.isImage || this.allowHeightReduction)) { - 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); - changed = true; - } - } - return changed; -}, - -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); - } -}, - -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, from) { - if (!up) return; - var exp = this, - last = this.last, - x = this.x, - y = this.y, - lastX = last.x, - lastY = last.y, - wrapper = this.wrapper, - content = this.content, - overlayBox = this.overlayBox; - hs.removeEventListener(document, 'mousemove', hs.dragHandler); - - hs.setStyles(content, { - width: (x.imgSize || x.size) +'px', - height: (y.imgSize || y.size) +'px' - }); - if (overlayBox) overlayBox.style.overflow = 'visible'; - this.outline = last.outline; - if (this.outline) this.outline.exp = exp; - last.outline = null; - var fadeBox = hs.createElement('div', { - className: 'highslide-'+ this.contentType - }, { - position: 'absolute', - zIndex: 4, - overflow: 'hidden', - display: 'none' - } - ); - 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]); - } - wrapper.appendChild(fadeBox); - if (this.isHtml) hs.setStyles(this.mediumContent, { - left: 0, - top: 0 - }); - if (overlayBox) { - overlayBox.className = ''; - wrapper.appendChild(overlayBox); - } - fadeBox.style.display = ''; - last.content.style.display = 'none'; - - - if (hs.safari && hs.uaVersion < 525) { - this.wrapper.style.visibility = 'visible'; - } - hs.animate(wrapper, { - width: x.size - }, { - duration: hs.transitionDuration, - step: function(val, args) { - var pos = args.pos, - invPos = 1 - pos; - var prop, - size = {}, - props = ['pos', 'size', 'p1', 'p2']; - for (var n in props) { - prop = props[n]; - size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]); - size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]); - size.ximgSize = Math.round( - invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size)); - size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad')); - size.yimgSize = Math.round( - invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size)); - size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad')); - } - if (exp.outline) exp.outline.setPosition({ - x: size.xpos, - y: size.ypos, - w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb, - h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb - }); - last.wrapper.style.clip = 'rect(' - + (size.ypos - lastY.pos)+'px, ' - + (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, ' - + (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, ' - + (size.xpos - lastX.pos)+'px)'; - - hs.setStyles(content, { - top: (size.yp1 + y.get('imgPad')) +'px', - left: (size.xp1 + x.get('imgPad')) +'px', - marginTop: (y.pos - size.ypos) +'px', - marginLeft: (x.pos - size.xpos) +'px' - }); - hs.setStyles(wrapper, { - top: size.ypos +'px', - left: size.xpos +'px', - width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px', - height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px' - }); - hs.setStyles(fadeBox, { - width: (size.ximgSize || size.xsize) + 'px', - height: (size.yimgSize || size.ysize) +'px', - left: (size.xp1 + size.ximgPad) +'px', - top: (size.yp1 + size.yimgPad) +'px', - visibility: 'visible' - }); - - hs.setStyles(exp.oldImg, { - top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px', - left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px' - }); - - hs.setStyles(exp.newImg, { - opacity: pos, - top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px', - left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px' - }); - if (overlayBox) hs.setStyles(overlayBox, { - width: size.xsize + 'px', - height: size.ysize +'px', - left: (size.xp1 + x.cb) +'px', - top: (size.yp1 + y.cb) +'px' - }); - }, - complete: function () { - wrapper.style.visibility = content.style.visibility = 'visible'; - content.style.display = 'block'; - hs.discardElement(fadeBox); - exp.afterExpand(); - last.afterClose(); - exp.last = null; - } - - }); -}, -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 (as && !as[current + op] && this.slideshow && this.slideshow.repeat) { - if (op == 1) return as[0]; - else if (op == -1) return as[as.length-1]; - } - return (as && 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) { - this.createOverlay(hs.extend(ss.overlayOptions || {}, { - overlayId: ss.controls, - hsId: 'controls', - zIndex: 5 - })); - } - 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) { - this[type] = hs.getNode(this.a['_'+ type + 'Id']); - if (!this[type]) { - var next = this.a.nextSibling; - while (next && !hs.isHsAnchor(next)) { - if ((new RegExp('highslide-'+ type)).test(next.className || null)) { - if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; - this[type] = hs.getNode(next.id); - 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.ieLt7 ? '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.ieLt7 && 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); - this.wrapper.style.height = this.y.get('wsize') +'px'; -}, - -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'; - this.isExpanded = false; - 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 : 'auto' - }, - 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.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.slideshow) { - var c = this.slideshow.controls; - if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c); - } - for (var i = 0; i < this.overlays.length; i++) { - var o = hs.$('hsId'+ this.overlays[i]); - if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o); - } - 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, - ySize = this.y.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; - - var ypos = this.y.pos - (this.y.size - ySize) / 2; - if (ypos < hs.marginTop) ypos = hs.marginTop; - - this.moveTo(xpos, ypos); - 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.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'; - this.destroyOverlays(); - 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 () { - var xhr; - 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 { xhr = new XMLHttpRequest(); } - catch (e) { - try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } - catch (e) { - try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } - catch (e) { this.onError(); } - } - } - var pThis = this; - xhr.onreadystatechange = function() { - if(pThis.xhr.readyState == 4) { - if (pThis.id) pThis.getElementContent(); - else pThis.loadHTML(); - } - }; - var src = this.src; - this.xhr = xhr; - if (hs.forceAjaxReload) - src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime()); - xhr.open('GET', src, true); - xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.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.xhr.responseText, - regBody; - if (this.pre) hs.cachedGets[this.src] = s; - if (!hs.ie || hs.uaVersion >= 5.5) { - s = s.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 { - regBody = /(]*>|<\/body>)/ig; - if (regBody.test(s)) s = s.split(regBody)[hs.ieLt9 ? 1 : 2]; - - } - } - 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', - className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '') - }); - 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 (minTblPos > 0) minTblPos = 0; - 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, - title: a.title, - onclick: function() { - if (/highslide-active-anchor/.test(this.className)) return false; - 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 - } -}; -hs.langDefaults = hs.lang; -// history -var HsExpander = hs.Expander; -if (hs.ie && window == window.top) { - (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); - -// set handlers -hs.addEventListener(document, 'ready', function() { - if (hs.expandCursor || hs.dimmingOpacity) { - var style = hs.createElement('style', { type: 'text/css' }, null, - document.getElementsByTagName('HEAD')[0]), - backCompat = document.compatMode == 'BackCompat'; - - - function addRule(sel, dec) { - if (hs.ie && (hs.uaVersion < 9 || backCompat)) { - var last = document.styleSheets[document.styleSheets.length - 1]; - if (typeof(last.addRule) == "object") last.addRule(sel, dec); - } else { - style.appendChild(document.createTextNode(sel + " {" + dec + "}")); - } - } - function fix(prop) { - return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + - ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; - } - if (hs.expandCursor) addRule ('.highslide img', - 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); - addRule ('.highslide-viewport-size', - hs.ie && (hs.uaVersion < 7 || backCompat) ? - 'position: absolute; '+ - 'left:'+ fix('scrollLeft') + - 'top:'+ fix('scrollTop') + - 'width:'+ fix('clientWidth') + - 'height:'+ fix('clientHeight') : - 'position: fixed; width: 100%; height: 100%; left: 0; top: 0'); - } -}); -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); -} diff --git a/gal2/highslide/highslide-full.packed.js b/gal2/highslide/highslide-full.packed.js deleted file mode 100644 index d55a1bb..0000000 --- a/gal2/highslide/highslide-full.packed.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Name: Highslide JS - * Version: 4.1.13 (2011-10-06) - * Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash +packed - * Author: Torstein Hønsi - * Support: www.highslide.com/support - * License: www.highslide.com/#license - */ -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}('q(!m){A m={18:{97:\'aK\',aZ:\'fw...\',aY:\'8G 2i fP\',bD:\'8G 2i g0 2i eR\',9Z:\'eZ 2i fc D (f)\',cq:\'f8 by an ao\',cr:\'f4 2i f6 an ao fg\',8Y:\'aq\',8W:\'ay\',8Z:\'ag\',92:\'am\',90:\'am (eD)\',b0:\'eY\',ab:\'al\',au:\'al 1p (aj)\',ac:\'ah\',ad:\'ah 1p (aj)\',8s:\'aq (8w 1b)\',8X:\'ay (8w 3m)\',8V:\'ag\',ae:\'1:1\',3G:\'g7 %1 fz %2\',9W:\'8G 2i 26 2R, dC aA dE 2i 3u. dF 8w dB O 1D aA 3a.\'},5c:\'K/dw/\',7R:\'dv.5q\',6h:\'dx.5q\',6W:5Z,9A:5Z,4W:15,9B:15,4d:15,6L:15,4F:cY,be:0.75,9l:M,9f:5,3Y:2,ei:3,5S:1j,bz:\'4Q 3m\',bA:1,br:M,ct:\'em://K.eh/\',cs:\'ec\',aS:M,9w:[\'a\',\'5v\'],3q:[],cE:5Z,4b:0,87:50,6J:1j,6X:M,4D:M,3U:\'60\',7W:M,46:\'1M\',9n:\'1M\',b1:I,aC:I,a7:M,4s:aw,6k:aw,5Y:M,1Z:\'ev-dV\',8i:{2X:\'

    <6t>\'+\'<1H 1W="K-3a">\'+\'\'+\'<1C>{m.18.8Y}\'+\'\'+\'<1H 1W="K-3L">\'+\'\'+\'<1C>{m.18.ab}\'+\'\'+\'<1H 1W="K-3p">\'+\'\'+\'<1C>{m.18.ac}\'+\'\'+\'<1H 1W="K-1D">\'+\'\'+\'<1C>{m.18.8W}\'+\'\'+\'<1H 1W="K-3u">\'+\'\'+\'<1C>{m.18.8Z}\'+\'\'+\'<1H 1W="K-1a-2F">\'+\'\'+\'<1C>{m.18.ae}\'+\'\'+\'<1H 1W="K-26">\'+\'\'+\'<1C>{m.18.92}\'+\'\'+\'

    \',bd:\'

    <6t>\'+\'<1H 1W="K-3a">\'+\'\'+\'<1C>{m.18.8Y}\'+\'\'+\'<1H 1W="K-1D">\'+\'\'+\'<1C>{m.18.8W}\'+\'\'+\'<1H 1W="K-3u">\'+\'\'+\'<1C>{m.18.8Z}\'+\'\'+\'<1H 1W="K-26">\'+\'\'+\'<1C>{m.18.92}\'+\'\'+\'

    \'+\'

    \'+\'

    \'+\'<1C 1W="K-3O" 24="{m.18.b0}"><1C>\'+\'

    \'},64:[],a1:M,16:[],a4:[\'5Y\',\'3t\',\'46\',\'9n\',\'b1\',\'aC\',\'1Z\',\'3Y\',\'dU\',\'dM\',\'dL\',\'b3\',\'dK\',\'dI\',\'dJ\',\'b2\',\'cv\',\'a7\',\'42\',\'6l\',\'3q\',\'4b\',\'L\',\'N\',\'88\',\'6J\',\'6X\',\'4D\',\'dN\',\'dO\',\'dT\',\'2I\',\'7W\',\'4j\',\'4x\',\'3U\',\'8e\',\'a9\',\'4s\',\'6k\',\'6M\',\'9i\',\'aX\',\'2N\',\'2Q\',\'cF\',\'cD\',\'1e\'],1T:[],61:0,8g:{x:[\'bM\',\'1b\',\'4X\',\'3m\',\'bC\'],y:[\'5N\',\'Y\',\'9a\',\'4Q\',\'7E\']},7B:{},b2:{},b3:{},8e:{aG:{},29:{},aF:{}},4m:[],6u:[],4n:{},4R:[],7q:[],5a:[],7k:{},8c:{},7l:[],2t:/dP\\/4\\.0/.11(4A.6d)?8:8J((4A.6d.5G().3b(/.+(?:b9|dQ|e9|2h)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),2h:(W.6q&&!1S.3z),4M:/ea/.11(4A.6d),6y:/eu.+b9:1\\.[0-8].+es/.11(4A.6d),$:C(1v){q(1v)E W.9Q(1v)},2o:C(2a,3j){2a[2a.V]=3j},1d:C(ba,4l,49,6c,bh){A el=W.1d(ba);q(4l)m.3A(el,4l);q(bh)m.R(el,{94:0,8H:\'1E\',9D:0});q(49)m.R(el,49);q(6c)6c.1X(el);E el},3A:C(el,4l){O(A x 2Y 4l)el[x]=4l[x];E el},R:C(el,49){O(A x 2Y 49){q(m.3R&&x==\'1z\'){q(49[x]>0.99)el.G.ew(\'5Q\');J el.G.5Q=\'bg(1z=\'+(49[x]*2w)+\')\'}J el.G[x]=49[x]}},2z:C(el,1f,3C){A 4T,51,4w;q(1F 3C!=\'7j\'||3C===I){A 2H=c5;3C={4h:2H[2],2Q:2H[3],76:2H[4]}}q(1F 3C.4h!=\'3G\')3C.4h=5Z;3C.2Q=1h[3C.2Q]||1h.bj;3C.7g=m.3A({},1f);O(A 2Z 2Y 1f){A e=1J m.fx(el,3C,2Z);4T=8J(m.8I(el,2Z))||0;51=8J(1f[2Z]);4w=2Z!=\'1z\'?\'F\':\'\';e.3E(4T,51,4w)}},8I:C(el,1f){q(el.G[1f]){E el.G[1f]}J q(W.8L){E W.8L.cK(el,I).co(1f)}J{q(1f==\'1z\')1f=\'5Q\';A 3j=el.5y[1f.2k(/\\-(\\w)/g,C(a,b){E b.bi()})];q(1f==\'5Q\')3j=3j.2k(/bg\\(1z=([0-9]+)\\)/,C(a,b){E b/2w});E 3j===\'\'?1:3j}},7S:C(){A d=W,w=1S,63=d.7a&&d.7a!=\'8v\'?d.5h:d.19,3R=m.2h&&(m.2t<9||1F bf==\'1L\');A L=3R?63.8F:(d.5h.8F||7c.ep),N=3R?63.c4:7c.eo;m.4g={L:L,N:N,5O:3R?63.5O:bf,5R:3R?63.5R:ed};E m.4g},6K:C(el){q(/5v/i.11(el.3J)){A 7N=W.2C(\'1N\');O(A i=0;i<7N.V;i++){A u=7N[i].eb;q(u&&u.2k(/^.*?#/,\'\')==el.23.2Z){el=7N[i];5m}}}A p={x:el.4V,y:el.8O};5g(el.bb){el=el.bb;p.x+=el.4V;p.y+=el.8O;q(el!=W.19&&el!=W.5h){p.x-=el.5O;p.y-=el.5R}}E p},2F:C(a,29,3E,T){q(!a)a=m.1d(\'a\',I,{1o:\'1E\'},m.2b);q(1F a.6a==\'C\')E 29;q(T==\'3D\'){O(A i=0;i8d){8d=1B;7n=i}}}q(7n==-1)m.3d=-1;J 16[7n].3M()},43:C(a,6b){a.6a=a.2p;A p=a.6a?a.6a():I;a.6a=I;E(p&&1F p[6b]!=\'1L\')?p[6b]:(1F m[6b]!=\'1L\'?m[6b]:I)},7s:C(a){A 1e=m.43(a,\'1e\');q(1e)E 1e;E a.21},4J:C(1v){A 1P=m.$(1v),4q=m.8c[1v],a={};q(!1P&&!4q)E I;q(!4q){4q=1P.5J(M);4q.1v=\'\';m.8c[1v]=4q;E 1P}J{E 4q.5J(M)}},3B:C(d){q(d)m.9y.1X(d);m.9y.2d=\'\'},1u:C(B){q(!m.2v){84=M;m.2v=m.1d(\'P\',{1c:\'K-dc K-2x-D\',5r:\'\',2p:C(){q(m.1A(m,\'d3\'))m.26()}},{1n:\'1Y\',1z:0},m.2b,M);q(/(df|d2|cU|cT)/.11(4A.6d)){A 19=W.19;C 81(){m.R(m.2v,{L:19.cR+\'F\',N:19.cV+\'F\'})}81();m.2j(1S,\'3O\',81)}}m.2v.G.1o=\'\';A 84=m.2v.5r==\'\';m.2v.5r+=\'|\'+B.Q;q(84){q(m.6y&&m.aR)m.R(m.2v,{9t:\'7T(\'+m.5c+\'d0.ak)\',1z:1});J m.2z(m.2v,{1z:B.4b},m.87)}},9x:C(Q){q(!m.2v)E;q(1F Q!=\'1L\')m.2v.5r=m.2v.5r.2k(\'|\'+Q,\'\');q((1F Q!=\'1L\'&&m.2v.5r!=\'\')||(m.2q&&m.43(m.2q,\'4b\')))E;q(m.6y&&m.aR)m.2v.G.1o=\'1E\';J m.2z(m.2v,{1z:0},m.87,I,C(){m.2v.G.1o=\'1E\'})},8N:C(7z,B){A 1i=B||m.2G();B=1i;q(m.2q)E 1j;J m.1i=1i;m.4z(W,1S.3z?\'6U\':\'71\',m.68);1t{m.2q=7z;7z.2p()}1y(e){m.1i=m.2q=I}1t{q(!7z||B.3q[1]!=\'4e\')B.26()}1y(e){}E 1j},7O:C(el,2n){A B=m.2G(el);q(B)E m.8N(B.7V(2n),B);J E 1j},3a:C(el){E m.7O(el,-1)},1D:C(el){E m.7O(el,1)},68:C(e){q(!e)e=1S.2u;q(!e.2L)e.2L=e.9k;q(1F e.2L.9j!=\'1L\')E M;q(!m.1A(m,\'dz\',e))E M;A B=m.2G();A 2n=I;b6(e.dy){2c 70:q(B)B.7r();E M;2c 32:2n=2;5m;2c 34:2c 39:2c 40:2n=1;5m;2c 8:2c 33:2c 37:2c 38:2n=-1;5m;2c 27:2c 13:2n=0}q(2n!==I){q(2n!=2)m.4z(W,1S.3z?\'6U\':\'71\',m.68);q(!m.aS)E M;q(e.5n)e.5n();J e.c0=1j;q(B){q(2n==0){B.26()}J q(2n==2){q(B.1p)B.1p.cl()}J{q(B.1p)B.1p.3p();m.7O(B.Q,2n)}E 1j}}E M},du:C(14){m.2o(m.1T,m.3A(14,{22:\'22\'+m.61++}))},dt:C(1r){A 3c=1r.2N;q(1F 3c==\'7j\'){O(A i=0;i<3c.V;i++){A o={};O(A x 2Y 1r)o[x]=1r[x];o.2N=3c[i];m.2o(m.6u,o)}}J{m.2o(m.6u,1r)}},9U:C(7y,7h){A el,2m=/^K-U-([0-9]+)$/;el=7y;5g(el.23){q(el.6R!==1L)E el.6R;q(el.1v&&2m.11(el.1v))E el.1v.2k(2m,"$1");el=el.23}q(!7h){el=7y;5g(el.23){q(el.3J&&m.77(el)){O(A Q=0;Q1)E M;q(!e.2L)e.2L=e.9k;A el=e.2L;5g(el.23&&!(/K-(2R|3u|3D|3O)/.11(el.1c))){el=el.23}A B=m.2G(el);q(B&&(B.62||!B.55))E M;q(B&&e.T==\'8y\'){q(e.2L.9j)E M;A 3b=el.1c.3b(/K-(2R|3u|3O)/);q(3b){m.2y={B:B,T:3b[1],1b:B.x.H,L:B.x.D,Y:B.y.H,N:B.y.D,aV:e.7A,aO:e.7F};m.2j(W,\'7D\',m.6H);q(e.5n)e.5n();q(/K-(2R|3D)-9J/.11(B.S.1c)){B.3M();m.a6=M}E 1j}J q(/K-3D/.11(el.1c)&&m.3d!=B.Q){B.3M();B.59(\'1q\')}}J q(e.T==\'c3\'){m.4z(W,\'7D\',m.6H);q(m.2y){q(m.54&&m.2y.T==\'2R\')m.2y.B.S.G.4L=m.54;A 3I=m.2y.3I;q(!3I&&!m.a6&&!/(3u|3O)/.11(m.2y.T)){q(m.1A(B,\'dr\'))B.26()}J q(3I||(!3I&&m.aU)){m.2y.B.59(\'1q\')}q(m.2y.B.3W)m.2y.B.3W.G.1o=\'1E\';q(3I)m.1A(m.2y.B,\'do\',m.2y);m.a6=1j;m.2y=I}J q(/K-2R-9J/.11(el.1c)){el.G.4L=m.54}}E 1j},6H:C(e){q(!m.2y)E M;q(!e)e=1S.2u;A a=m.2y,B=a.B;q(B.1k){q(!B.3W)B.3W=m.1d(\'P\',I,{1l:\'2l\',L:B.x.D+\'F\',N:B.y.D+\'F\',1b:B.x.cb+\'F\',Y:B.y.cb+\'F\',1B:4,9t:(m.3R?\'eB\':\'1E\'),1z:0.eU},B.U,M);q(B.3W.G.1o==\'1E\')B.3W.G.1o=\'\'}a.dX=e.7A-a.aV;a.dY=e.7F-a.aO;A 9g=1h.fG(1h.aE(a.dX,2)+1h.aE(a.dY,2));q(!a.3I)a.3I=(a.T!=\'2R\'&&9g>0)||(9g>(m.fK||5));q(a.3I&&e.7A>5&&e.7F>5){q(!m.1A(B,\'fN\',a))E 1j;q(a.T==\'3O\')B.3O(a);J{B.9m(a.1b+a.dX,a.Y+a.dY);q(a.T==\'2R\')B.S.G.4L=\'3u\'}}E 1j},aP:C(e){1t{q(!e)e=1S.2u;A 66=/fM/i.11(e.T);q(!e.2L)e.2L=e.9k;q(!e.7P)e.7P=66?e.fE:e.fD;A B=m.2G(e.2L);q(!B.55)E;q(!B||!e.7P||m.2G(e.7P,M)==B||m.2y)E;m.1A(B,66?\'ft\':\'fr\',e);O(A i=0;i=k.1r.4h+k.9c){k.4o=k.51;k.H=k.96=1;k.82();k.1r.7g[k.1f]=M;A 9s=M;O(A i 2Y k.1r.7g)q(k.1r.7g[i]!==M)9s=1j;q(9s){q(k.1r.76)k.1r.76.ax(k.30)}E 1j}J{A n=t-k.9c;k.96=n/k.1r.4h;k.H=k.1r.2Q(n,0,1,k.1r.4h);k.4o=k.4T+((k.51-k.4T)*k.H);k.82()}E M}};m.3A(m.fx,{3P:{1z:C(fx){m.R(fx.30,{1z:fx.4o})},ap:C(fx){1t{q(fx.30.G&&fx.30.G[fx.1f]!=I)fx.30.G[fx.1f]=fx.4o+fx.4w;J fx.30[fx.1f]=fx.4o}1y(e){}}}});m.6r=C(1Z,3F){k.3F=3F;k.1Z=1Z;A v=m.2t,47;k.9G=m.2h&&m.2t<7;q(!1Z){q(3F)3F();E}m.7m();k.2g=m.1d(\'2g\',{eJ:0},{1n:\'1q\',1l:\'2l\',eN:\'eM\',L:0},m.2b,M);A 4G=m.1d(\'4G\',I,I,k.2g,1);k.2J=[];O(A i=0;i<=8;i++){q(i%3==0)47=m.1d(\'47\',I,{N:\'1M\'},4G,M);k.2J[i]=m.1d(\'2J\',I,I,47,M);A G=i!=4?{eL:0,eK:0}:{1l:\'4y\'};m.R(k.2J[i],G)}k.2J[4].1c=1Z+\' K-1g\';k.ai()};m.6r.5w={ai:C(){A 1e=m.5c+(m.f1||"fi/")+k.1Z+".ak";A ar=m.4M&&m.2t<73?m.2b:I;k.3V=m.1d(\'1N\',I,{1l:\'2l\',Y:\'-4v\'},ar,M);A 3v=k;k.3V.4N=C(){3v.az()};k.3V.1e=1e},az:C(){A o=k.1w=k.3V.L/4,H=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1u={N:(2*o)+\'F\',L:(2*o)+\'F\'};O(A i=0;i<=8;i++){q(H[i]){q(k.9G){A w=(i==1||i==7)?\'2w%\':k.3V.L+\'F\';A P=m.1d(\'P\',I,{L:\'2w%\',N:\'2w%\',1l:\'4y\',2e:\'1q\'},k.2J[i],M);m.1d(\'P\',I,{5Q:"fo:fn.bv.fm(fl=fe, 1e=\'"+k.3V.1e+"\')",1l:\'2l\',L:w,N:k.3V.N+\'F\',1b:(H[i][0]*o)+\'F\',Y:(H[i][1]*o)+\'F\'},P,M)}J{m.R(k.2J[i],{9t:\'7T(\'+k.3V.1e+\') \'+(H[i][0]*o)+\'F \'+(H[i][1]*o)+\'F\'})}q(1S.3z&&(i==3||i==5))m.1d(\'P\',I,1u,k.2J[i],M);m.R(k.2J[i],1u)}}k.3V=I;q(m.4n[k.1Z])m.4n[k.1Z].5U();m.4n[k.1Z]=k;q(k.3F)k.3F()},4C:C(H,1w,aB,4i,2Q){A B=k.B,5X=B.U.G,1w=1w||0,H=H||{x:B.x.H+1w,y:B.y.H+1w,w:B.x.Z(\'2f\')-2*1w,h:B.y.Z(\'2f\')-2*1w};q(aB)k.2g.G.1n=(H.h>=4*k.1w)?\'1Y\':\'1q\';m.R(k.2g,{1b:(H.x-k.1w)+\'F\',Y:(H.y-k.1w)+\'F\',L:(H.w+2*k.1w)+\'F\'});H.w-=2*k.1w;H.h-=2*k.1w;m.R(k.2J[4],{L:H.w>=0?H.w+\'F\':0,N:H.h>=0?H.h+\'F\':0});q(k.9G)k.2J[3].G.N=k.2J[5].G.N=k.2J[4].G.N},5U:C(bk){q(bk)k.2g.G.1n=\'1q\';J m.3B(k.2g)}};m.6A=C(B,1u){k.B=B;k.1u=1u;k.3l=1u==\'x\'?\'bY\':\'bW\';k.3k=k.3l.5G();k.6m=1u==\'x\'?\'cj\':\'c8\';k.6Y=k.6m.5G();k.9L=1u==\'x\'?\'c7\':\'bX\';k.b5=k.9L.5G();k.1G=k.36=0};m.6A.5w={Z:C(Q){b6(Q){2c\'9T\':E k.1K+k.3s+(k.t-m.2r[\'1w\'+k.3l])/2;2c\'9v\':E k.H+k.cb+k.1G+(k.D-m.2r[\'1w\'+k.3l])/2;2c\'2f\':E k.D+2*k.cb+k.1G+k.36;2c\'5e\':E k.4K-k.3o-k.4S;2c\'8D\':E k.Z(\'5e\')-2*k.cb-k.1G-k.36;2c\'6e\':E k.H-(k.B.1g?k.B.1g.1w:0);2c\'9R\':E k.Z(\'2f\')+(k.B.1g?2*k.B.1g.1w:0);2c\'2K\':E k.1V?1h.3e((k.D-k.1V)/2):0}},8a:C(){k.cb=(k.B.S[\'1w\'+k.3l]-k.t)/2;k.4S=m[\'9D\'+k.9L]},9M:C(){k.t=k.B.el[k.3k]?3H(k.B.el[k.3k]):k.B.el[\'1w\'+k.3l];k.1K=k.B.1K[k.1u];k.3s=(k.B.el[\'1w\'+k.3l]-k.t)/2;q(k.1K==0||k.1K==-1){k.1K=(m.4g[k.3k]/2)+m.4g[\'28\'+k.6m]}},8h:C(){A B=k.B;k.2T=\'1M\';q(B.9n==\'4X\')k.2T=\'4X\';J q(1J 4Y(k.6Y).11(B.46))k.2T=I;J q(1J 4Y(k.b5).11(B.46))k.2T=\'4t\';k.H=k.1K-k.cb+k.3s;q(k.9i&&k.1u==\'x\')B.6M=1h.31(B.6M||k.1a,B.9i*k.1a/B.y.1a);k.D=1h.31(k.1a,B[\'4t\'+k.3l]||k.1a);k.2U=B.5Y?1h.31(B[\'31\'+k.3l],k.1a):k.1a;q(B.2E&&B.3t){k.D=B[k.3k];k.1V=k.1a}q(k.1u==\'x\'&&m.5S)k.2U=B.4s;k.2L=B[\'2L\'+k.1u.bi()];k.3o=m[\'9D\'+k.6m];k.28=m.4g[\'28\'+k.6m];k.4K=m.4g[k.3k]},72:C(i){A B=k.B;q(B.2E&&(B.3t||m.5S)){k.1V=i;k.D=1h.4t(k.D,k.1V);B.S.G[k.6Y]=k.Z(\'2K\')+\'F\'}J k.D=i;B.S.G[k.3k]=i+\'F\';B.U.G[k.3k]=k.Z(\'2f\')+\'F\';q(B.1g)B.1g.4C();q(B.3W)B.3W.G[k.3k]=i+\'F\';q(k.1u==\'y\'&&B.5C&&B.19.G.N!=\'1M\')1t{B.5C.19.G.2e=\'1M\'}1y(e){}q(B.2A){A d=B.2s;q(k.9e===1L)k.9e=B.1s[\'1w\'+k.3l]-d[\'1w\'+k.3l];d.G[k.3k]=(k.D-k.9e)+\'F\';q(k.1u==\'x\')B.4c.G.L=\'1M\';q(B.19)B.19.G[k.3k]=\'1M\'}q(k.1u==\'x\'&&B.1x)B.57(M);q(k.1u==\'x\'&&B.1p&&B.2E){q(i==k.1a)B.1p.5d(\'1a-2F\');J B.1p.4u(\'1a-2F\')}},aa:C(i){k.H=i;k.B.U.G[k.6Y]=i+\'F\';q(k.B.1g)k.B.1g.4C()}};m.5A=C(a,29,3E,35){q(W.bS&&m.2h&&!m.9F){m.2j(W,\'41\',C(){1J m.5A(a,29,3E,35)});E}k.a=a;k.3E=3E;k.35=35||\'2R\';k.2A=(35==\'3D\');k.2E=!k.2A;m.a1=1j;k.1T=[];k.1i=m.1i;m.1i=I;m.7m();A Q=k.Q=m.16.V;O(A i=0;ip.28+p.4K-p.4S)p.H=p.28+p.4K-p.D-p.3o-p.4S-p.1G-p.36;q(p.H(k.x.1V||k.x.D)){k.bs();q(k.1T.V==1)k.57()}}k.a5()}1y(e){k.9o(e)}},91:C(6c,1M){A c=m.4p(6c,\'7J\',\'K-19\');q(/(1k|3x)/.11(k.2I)){q(k.4j)c.G.L=k.4j+\'F\';q(k.4x)c.G.N=k.4x+\'F\'}},6T:C(){q(k.aD)E;A B=k;k.19=m.4p(k.1s,\'7J\',\'K-19\');q(k.2I==\'1k\'){k.6n();A 5o=m.3w.5J(1);k.19.1X(5o);k.eP=k.1s.1O;q(!k.4j)k.4j=5o.1O;A 5b=k.1s.1U-k.19.1U,h=k.4x||m.4g.N-5b-m.4d-m.6L,4N=k.3U==\'60\'?\' 4N="q (m.16[\'+k.Q+\']) m.16[\'+k.Q+\'].69()" \':\'\';k.19.2d+=\'<1k 2Z="m\'+(1J 7K()).79()+\'" eQ="0" Q="\'+k.Q+\'" \'+\' G="L:\'+k.4j+\'F; N:\'+h+\'F" \'+4N+\' 1e="\'+k.1e+\'" >\';k.5o=k.19.2C(\'P\')[0];k.1k=k.19.2C(\'1k\')[0];q(k.3U==\'6x\')k.8A()}q(k.2I==\'3x\'){k.19.1v=k.19.1v||\'m-fY-1v-\'+k.Q;A a=k.8e;q(!a.29)a.29={};q(1F a.29.aN==\'1L\')a.29.aN=\'fR\';q(9p)9p.fT(k.1e,k.19.1v,k.4j,k.4x,a.g1||\'7\',a.gb,a.aG,a.29,a.aF)}k.aD=M},7Z:C(){q(k.1k&&!k.4x){k.1k.G.N=k.19.G.N=k.8p()+\'F\'}k.1s.1X(m.3w);q(!k.x.1a)k.x.1a=k.1s.1O;k.y.1a=k.1s.1U;k.1s.9q(m.3w);q(m.2h&&k.aL>3H(k.1s.5y.N)){k.aL=3H(k.1s.5y.N)}m.R(k.U,{1l:\'2l\',94:\'0\'});m.R(k.S,{L:k.x.t+\'F\',N:k.y.t+\'F\'})},8p:C(){A h;1t{A 2B=k.5C=k.1k.9O||k.1k.6g.W;A 3w=2B.1d(\'P\');3w.G.aJ=\'bc\';2B.19.1X(3w);h=3w.8O;q(m.2h)h+=3H(2B.19.5y.4d)+3H(2B.19.5y.6L)-1}1y(e){h=de}E h},8A:C(){A 5i=k.1s.1O-k.5o.1O;m.3B(k.5o);q(5i<0)5i=0;A 5b=k.1s.1U-k.1k.1U;q(k.5C&&!k.4x&&!k.N&&k.y.D==k.y.1a)1t{k.5C.19.G.2e=\'1q\'}1y(e){}m.R(k.1k,{L:1h.9Y(k.x.D-5i)+\'F\',N:1h.9Y(k.y.D-5b)+\'F\'});m.R(k.19,{L:k.1k.G.L,N:k.1k.G.N});k.52=k.1k;k.2s=k.52},b4:C(){k.91(k.1s);q(k.2I==\'3x\'&&k.3U==\'60\')k.6T();q(k.x.D1P.1U){1P.G.L=(3H(1P.G.L)+6E)+\'F\'}k.52=1P;k.2s=k.52}q(k.1k&&k.3U==\'60\')k.8A();q(!k.52&&k.y.Dk.2s.23.1U){4a("1t { m.16["+k.Q+"].2s.G.2e = \'1M\'; } 1y(e) {}",m.6W)}},b8:C(5v){A c=5v.fC.7G(\',\');O(A i=0;ip.28+p.4K-p.4S){q(!5u&&8C&&5s){p.D=1h.31(p.D,p.Z(1u==\'y\'?\'5e\':\'8D\'))}J q(p.Z(\'2f\')2M){ 3f=3y*2M;q(3fk.6k&&x.D>k.4s&&y.Z(\'2f\')>y.Z(\'5e\')){y.D-=10;q(2M)x.D=y.D*2M;k.57(0,1);3T=M}}E 3T},dS:C(){q(k.2s){A h=/1k/i.11(k.2s.3J)?(k.8p()+1)+\'F\':\'1M\';q(k.19)k.19.G.N=h;k.2s.G.N=h;k.y.72(k.1s.1U)}},a5:C(){A x=k.x,y=k.y;k.59(\'1q\');m.1A(k,\'et\');q(k.1p&&k.1p.2D)k.1p.2D.5t();k.9b(1,{U:{L:x.Z(\'2f\'),N:y.Z(\'2f\'),1b:x.H,Y:y.H},S:{1b:x.1G+x.Z(\'2K\'),Y:y.1G+y.Z(\'2K\'),L:x.1V||x.D,N:y.1V||y.D}},m.6W)},9b:C(1I,2i,4i){A 5M=k.3q,8o=1I?(k.1i?k.1i.a:I):m.2q,t=(5M[1]&&8o&&m.43(8o,\'3q\')[1]==5M[1])?5M[1]:5M[0];q(k[t]&&t!=\'2F\'){k[t](1I,2i);E}q(k.1g&&!k.3Y){q(1I)k.1g.4C();J k.1g.5U((k.2A&&k.4D))}q(!1I)k.78();A B=k,x=B.x,y=B.y,2Q=k.2Q;q(!1I)2Q=k.cF||2Q;A 6x=1I?C(){q(B.1g)B.1g.2g.G.1n="1Y";4a(C(){B.6I()},50)}:C(){B.5D()};q(1I)m.R(k.U,{L:x.t+\'F\',N:y.t+\'F\'});q(1I&&k.2A){m.R(k.U,{1b:(x.1K-x.cb+x.3s)+\'F\',Y:(y.1K-y.cb+y.3s)+\'F\'})}q(k.cD){m.R(k.U,{1z:1I?0:1});m.3A(2i.U,{1z:1I})}m.2z(k.U,2i.U,{4h:4i,2Q:2Q,3P:C(3j,2H){q(B.1g&&B.3Y&&2H.1f==\'Y\'){A 5W=1I?2H.H:1-2H.H;A H={w:x.t+(x.Z(\'2f\')-x.t)*5W,h:y.t+(y.Z(\'2f\')-y.t)*5W,x:x.1K+(x.H-x.1K)*5W,y:y.1K+(y.H-y.1K)*5W};B.1g.4C(H,0,1)}q(B.2A){q(2H.1f==\'1b\')B.4c.G.1b=(x.H-3j)+\'F\';q(2H.1f==\'Y\')B.4c.G.Y=(y.H-3j)+\'F\'}}});m.2z(k.S,2i.S,4i,2Q,6x);q(1I){k.U.G.1n=\'1Y\';k.S.G.1n=\'1Y\';q(k.2A)k.1s.G.1n=\'1Y\';k.a.1c+=\' K-4I-46\'}},6w:C(1I,2i){k.3Y=1j;A B=k,t=1I?m.6W:0;q(1I){m.2z(k.U,2i.U,0);m.R(k.U,{1z:0,1n:\'1Y\'});m.2z(k.S,2i.S,0);k.S.G.1n=\'1Y\';m.2z(k.U,{1z:1},t,I,C(){B.6I()})}q(k.1g){k.1g.2g.G.1B=k.U.G.1B;A 6Z=1I||-1,1w=k.1g.1w,8r=1I?3:1w,8q=1I?1w:3;O(A i=8r;6Z*i<=6Z*8q;i+=6Z,t+=25){(C(){A o=1I?8q-i:8r-i;4a(C(){B.1g.4C(0,o,1)},t)})()}}q(1I){}J{4a(C(){q(B.1g)B.1g.5U(B.4D);B.78();m.2z(B.U,{1z:0},m.9A,I,C(){B.5D()})},t)}},4e:C(1I,2i,8u){q(!1I)E;A B=k,1i=k.1i,x=k.x,y=k.y,3n=1i.x,3g=1i.y,U=k.U,S=k.S,1x=k.1x;m.4z(W,\'7D\',m.6H);m.R(S,{L:(x.1V||x.D)+\'F\',N:(y.1V||y.D)+\'F\'});q(1x)1x.G.2e=\'1Y\';k.1g=1i.1g;q(k.1g)k.1g.B=B;1i.1g=I;A 5l=m.1d(\'P\',{1c:\'K-\'+k.35},{1l:\'2l\',1B:4,2e:\'1q\',1o:\'1E\'});A 8t={cN:1i,cM:k};O(A n 2Y 8t){k[n]=8t[n].S.5J(1);m.R(k[n],{1l:\'2l\',8H:0,1n:\'1Y\'});5l.1X(k[n])}U.1X(5l);q(k.2A)m.R(k.4c,{1b:0,Y:0});q(1x){1x.1c=\'\';U.1X(1x)}5l.G.1o=\'\';1i.S.G.1o=\'1E\';q(m.4M&&m.2t<73){k.U.G.1n=\'1Y\'}m.2z(U,{L:x.D},{4h:m.cE,3P:C(3j,2H){A H=2H.H,4B=1-H;A 1f,D={},93=[\'H\',\'D\',\'1G\',\'36\'];O(A n 2Y 93){1f=93[n];D[\'x\'+1f]=1h.3e(4B*3n[1f]+H*x[1f]);D[\'y\'+1f]=1h.3e(4B*3g[1f]+H*y[1f]);D.cI=1h.3e(4B*(3n.1V||3n.D)+H*(x.1V||x.D));D.6S=1h.3e(4B*3n.Z(\'2K\')+H*x.Z(\'2K\'));D.cJ=1h.3e(4B*(3g.1V||3g.D)+H*(y.1V||y.D));D.6V=1h.3e(4B*3g.Z(\'2K\')+H*y.Z(\'2K\'))}q(B.1g)B.1g.4C({x:D.3h,y:D.3r,w:D.5L+D.44+D.8U+2*x.cb,h:D.5K+D.45+D.8T+2*y.cb});1i.U.G.d7=\'d6(\'+(D.3r-3g.H)+\'F, \'+(D.5L+D.44+D.8U+D.3h+2*3n.cb-3n.H)+\'F, \'+(D.5K+D.45+D.8T+D.3r+2*3g.cb-3g.H)+\'F, \'+(D.3h-3n.H)+\'F)\';m.R(S,{Y:(D.45+y.Z(\'2K\'))+\'F\',1b:(D.44+x.Z(\'2K\'))+\'F\',4d:(y.H-D.3r)+\'F\',4W:(x.H-D.3h)+\'F\'});m.R(U,{Y:D.3r+\'F\',1b:D.3h+\'F\',L:(D.44+D.8U+D.5L+2*x.cb)+\'F\',N:(D.45+D.8T+D.5K+2*y.cb)+\'F\'});m.R(5l,{L:(D.cI||D.5L)+\'F\',N:(D.cJ||D.5K)+\'F\',1b:(D.44+D.6S)+\'F\',Y:(D.45+D.6V)+\'F\',1n:\'1Y\'});m.R(B.cN,{Y:(3g.H-D.3r+3g.1G-D.45+3g.Z(\'2K\')-D.6V)+\'F\',1b:(3n.H-D.3h+3n.1G-D.44+3n.Z(\'2K\')-D.6S)+\'F\'});m.R(B.cM,{1z:H,Y:(y.H-D.3r+y.1G-D.45+y.Z(\'2K\')-D.6V)+\'F\',1b:(x.H-D.3h+x.1G-D.44+x.Z(\'2K\')-D.6S)+\'F\'});q(1x)m.R(1x,{L:D.5L+\'F\',N:D.5K+\'F\',1b:(D.44+x.cb)+\'F\',Y:(D.45+y.cb)+\'F\'})},76:C(){U.G.1n=S.G.1n=\'1Y\';S.G.1o=\'3X\';m.3B(5l);B.6I();1i.5D();B.1i=I}})},bQ:C(o,el){q(!k.1i)E 1j;O(A i=0;i\'+s+\'

    \'+k[k.6l].2d}}},a0:C(){q(!k.1i){O(A i=0;ik.x.Z(\'6e\')+k.x.Z(\'9R\'));A bG=(3N.y+3N.hk.y.Z(\'6e\')+k.y.Z(\'9R\'))}A 6F=m.9U(1m[i]);q(!bl&&!bG&&6F!=k.Q){q(!2S){1m[i].5F(\'1q-by\',\'[\'+k.Q+\']\');1m[i].9N=1m[i].G[1f];1m[i].G[1f]=\'1q\'}J q(2S.bF(\'[\'+k.Q+\']\')==-1){1m[i].5F(\'1q-by\',2S+\'[\'+k.Q+\']\')}}J q((2S==\'[\'+k.Q+\']\'||m.3d==6F)&&6F!=k.Q){1m[i].5F(\'1q-by\',\'\');1m[i].G[1f]=1m[i].9N||\'\'}J q(2S&&2S.bF(\'[\'+k.Q+\']\')>-1){1m[i].5F(\'1q-by\',2S.2k(\'[\'+k.Q+\']\',\'\'))}}}}},3M:C(){k.U.G.1B=m.4F+=2;O(A i=0;i14.23.1O)14.G.L=\'2w%\'}J q(14.23!=k.1x)k.1x.1X(14);q(/1b$/.11(p))14.G.1b=74+\'F\';q(/4X$/.11(p))m.R(14,{1b:\'50%\',4W:(74-1h.3e(14.1O/2))+\'F\'});q(/3m$/.11(p))14.G.3m=-74+\'F\';q(/^bM$/.11(p)){m.R(14,{3m:\'2w%\',9B:k.x.cb+\'F\',Y:-k.y.cb+\'F\',4Q:-k.y.cb+\'F\',2e:\'1M\'});k.x.1G=14.1O}J q(/^bC$/.11(p)){m.R(14,{1b:\'2w%\',4W:k.x.cb+\'F\',Y:-k.y.cb+\'F\',4Q:-k.y.cb+\'F\',2e:\'1M\'});k.x.36=14.1O}A 9d=14.23.1U;14.G.N=\'1M\';q(53&&14.1U>9d)14.G.N=m.3Z?9d+\'F\':\'2w%\';q(/^Y/.11(p))14.G.Y=6O+\'F\';q(/^9a/.11(p))m.R(14,{Y:\'50%\',4d:(6O-1h.3e(14.1U/2))+\'F\'});q(/^4Q/.11(p))14.G.4Q=-6O+\'F\';q(/^5N$/.11(p)){m.R(14,{1b:(-k.x.1G-k.x.cb)+\'F\',3m:(-k.x.36-k.x.cb)+\'F\',4Q:\'2w%\',6L:k.y.cb+\'F\',L:\'1M\'});k.y.1G=14.1U}J q(/^7E$/.11(p)){m.R(14,{1l:\'4y\',1b:(-k.x.1G-k.x.cb)+\'F\',3m:(-k.x.36-k.x.cb)+\'F\',Y:\'2w%\',4d:k.y.cb+\'F\',L:\'1M\'});k.y.36=14.1U;14.G.1l=\'2l\'}},bB:C(){k.a2([\'58\',\'9X\'],M);k.bq();q(k.9X)m.1A(k,\'eE\');q(k.58)m.1A(k,\'eF\');q(k.58&&k.a7)k.58.1c+=\' K-3u\';q(m.br)k.bp();O(A i=0;i=5.5){s=s.2k(1J 4Y(\']*>\',\'c9\'),\'\').2k(1J 4Y(\']*>.*?\',\'c9\'),\'\');q(k.1k){A 2B=k.1k.9O;q(!2B&&k.1k.6g)2B=k.1k.6g.W;q(!2B){A 3v=k;4a(C(){3v.6f()},25);E}2B.ca();2B.dg(s);2B.26();1t{s=2B.9Q(k.1v).2d}1y(e){1t{s=k.1k.W.9Q(k.1v).2d}1y(e){}}m.3B(k.1k)}J{7H=/(<19[^>]*>|<\\/19>)/db;q(7H.11(s))s=s.7G(7H)[m.3R?1:2]}}m.4p(k.S,\'7J\',\'K-19\').2d=s;k.3F();O(A x 2Y k)k[x]=I}};m.83=C(4k,1r){q(m.cX!==1j)m.95();k.4k=4k;O(A x 2Y 1r)k[x]=1r[x];q(k.cZ)k.cg();q(k.2D)k.2D=m.ci(k)};m.83.5w={cg:C(){k.2X=m.1d(\'P\',{2d:m.8b(m.8i.2X)},I,m.2b);A 6j=[\'3L\',\'3p\',\'3a\',\'1D\',\'3u\',\'1a-2F\',\'26\'];k.1Q={};A 3v=k;O(A i=0;i<6j.V;i++){k.1Q[6j[i]]=m.4p(k.2X,\'1H\',\'K-\'+6j[i]);k.4u(6j[i])}k.1Q.3p.G.1o=\'1E\'},ch:C(){q(k.cm||!k.2X)E;A B=m.16[k.4k],5q=B.7v(),2m=/7w$/;q(5q==0)k.5d(\'3a\');J q(2m.11(k.1Q.3a.2C(\'a\')[0].1c))k.4u(\'3a\');q(5q+1==m.4U.3i[B.2N||\'1E\'].V){k.5d(\'1D\');k.5d(\'3L\')}J q(2m.11(k.1Q.1D.2C(\'a\')[0].1c)){k.4u(\'1D\');k.4u(\'3L\')}},4u:C(1Q){q(!k.1Q)E;A cn=k,a=k.1Q[1Q].2C(\'a\')[0],2m=/7w$/;a.2p=C(){cn[1Q]();E 1j};q(2m.11(a.1c))a.1c=a.1c.2k(2m,\'\')},5d:C(1Q){q(!k.1Q)E;A a=k.1Q[1Q].2C(\'a\')[0];a.2p=C(){E 1j};q(!/7w$/.11(a.1c))a.1c+=\' 7w\'},cl:C(){q(k.42)k.3p();J k.3L()},3L:C(ck){q(k.1Q){k.1Q.3L.G.1o=\'1E\';k.1Q.3p.G.1o=\'\'}k.42=M;q(!ck)m.1D(k.4k)},3p:C(){q(k.1Q){k.1Q.3p.G.1o=\'1E\';k.1Q.3L.G.1o=\'\'}d9(k.42);k.42=I},3a:C(){k.3p();m.3a(k.1Q.3a)},1D:C(){k.3p();m.1D(k.1Q.1D)},3u:C(){},\'1a-2F\':C(){m.2G().7r()},26:C(){m.26(k.1Q.26)}};m.ci=C(1p){C 7p(B){m.3A(1r||{},{4P:4E,22:\'2D\',1c:\'K-2D-\'+5k+\'-14 \'+(1r.1c||\'\')});q(m.3Z)1r.6w=0;B.4O(1r);m.R(4E.23,{2e:\'1q\'})};C 28(3K){5t(1L,1h.3e(3K*4E[3S?\'1O\':\'1U\']*0.7))};C 5t(i,80){q(i===1L)O(A j=0;j<5I.V;j++){q(5I[j]==m.16[1p.4k].a){i=j;5m}}q(i===1L)E;A as=4E.2C(\'a\'),4I=as[i],48=4I.23,1b=3S?\'cj\':\'c8\',3m=3S?\'c7\':\'bX\',L=3S?\'bY\':\'bW\',4V=\'1w\'+1b,1O=\'1w\'+L,7e=P.23.23[1O],5j=7e-2g[1O],6o=3H(2g.G[3S?\'1b\':\'Y\'])||0,2O=6o,ej=20;q(80!==1L){2O=6o-80;q(5j>0)5j=0;q(2O>0)2O=0;q(2O<5j)2O=5j}J{O(A j=0;j0?as[i-1].23[4V]:48[4V],7Y=48[4V]+48[1O]+(as[i+1]?as[i+1].23[1O]:0);q(7Y>7e-6o)2O=7e-7Y;J q(7X<-6o)2O=-7X}A 8R=48[4V]+(48[1O]-7f[1O])/2+2O;m.2z(2g,3S?{1b:2O}:{Y:2O},I,\'8S\');m.2z(7f,3S?{1b:8R}:{Y:8R},I,\'8S\');8l.G.1o=2O<0?\'3X\':\'1E\';8M.G.1o=(2O>5j)?\'3X\':\'1E\'};A 5I=m.4U.3i[m.16[1p.4k].2N||\'1E\'],1r=1p.2D,5k=1r.5k||\'bV\',8K=(5k==\'en\'),4f=8K?[\'P\',\'6t\',\'1H\',\'1C\']:[\'2g\',\'4G\',\'47\',\'2J\'],3S=(5k==\'bV\'),4E=m.1d(\'P\',{1c:\'K-2D K-2D-\'+5k,2d:\'

    \'+\'<\'+4f[0]+\'><\'+4f[1]+\'>

    \'+\'

    \'+\'

    \'+\'

    \'},{1o:\'1E\'},m.2b),5E=4E.7L,P=5E[0],8l=5E[1],8M=5E[2],7f=5E[3],2g=P.ef,4G=4E.2C(4f[1])[0],47;O(A i=0;i<5I.V;i++){q(i==0||!3S)47=m.1d(4f[2],I,I,4G);(C(){A a=5I[i],48=m.1d(4f[3],I,I,47),ex=i;m.1d(\'a\',{21:a.21,24:a.24,2p:C(){q(/K-4I-46/.11(k.1c))E 1j;m.2G(k).3M();E m.8N(a)},2d:m.bT?m.bT(a):a.2d},I,48)})()}q(!8K){8l.2p=C(){28(-1)};8M.2p=C(){28(1)};m.2j(4G,W.eA!==1L?\'er\':\'eq\',C(e){A 3K=0;e=e||1S.2u;q(e.bU){3K=e.bU/dR;q(m.3z)3K=-3K}J q(e.bZ){3K=-e.bZ/3}q(3K)28(-3K*0.2);q(e.5n)e.5n();e.c0=1j})}E{7p:7p,5t:5t}};m.7o=m.18;A e8=m.5A;q(m.2h&&1S==1S.Y){(C(){1t{W.5h.e4(\'1b\')}1y(e){4a(c5.dZ,50);E}m.41()})()}m.2j(W,\'dW\',m.41);m.2j(1S,\'8B\',m.41);m.2j(W,\'41\',C(){q(m.7R||m.4b){A G=m.1d(\'G\',{T:\'e0/8I\'},I,W.2C(\'e1\')[0]),8E=W.7a==\'8v\';C 5P(8m,8n){q(m.2h&&(m.2t<9||8E)){A 1i=W.c6[W.c6.V-1];q(1F(1i.5P)=="7j")1i.5P(8m,8n)}J{G.1X(W.e6(8m+" {"+8n+"}"))}}C 5T(1f){E\'e5( ( ( ez = W.5h.\'+1f+\' ? W.5h.\'+1f+\' : W.19.\'+1f+\' ) ) + \\\'F\\\' );\'}q(m.7R)5P(\'.K 1N\',\'4L: 7T(\'+m.5c+m.7R+\'), 7Q !dA;\');5P(\'.K-2x-D\',m.2h&&(m.2t<7||8E)?\'1l: 2l; \'+\'1b:\'+5T(\'5O\')+\'Y:\'+5T(\'5R\')+\'L:\'+5T(\'8F\')+\'N:\'+5T(\'c4\'):\'1l: fV; L: 2w%; N: 2w%; 1b: 0; Y: 0\')}});m.2j(1S,\'3O\',C(){m.7S();q(m.2x)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', - 'pageOrigin', - '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: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : - parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), -ie : (document.all && !window.opera), -//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant? -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.ieLt9 && 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 (el.style[prop]) { - return el.style[prop]; - } else 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, - ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined'); - - var width = ieLt9 ? iebody.clientWidth : - (d.documentElement.clientWidth || self.innerWidth), - height = ieLt9 ? iebody.clientHeight : self.innerHeight; - hs.page = { - width: width, - height: height, - scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset, - scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset - }; - return hs.page; -}, - -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) { - isNew = true; - hs.dimmer = hs.createElement ('div', { - className: 'highslide-dimming highslide-viewport-size', - owner: '', - onclick: function() { - - hs.close(); - } - }, { - visibility: 'visible', - opacity: 0 - }, hs.container, true); - - if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) { - var body = document.body; - function pixDimmerSize() { - hs.setStyles(hs.dimmer, { - width: body.scrollWidth +'px', - height: body.scrollHeight +'px' - }); - } - pixDimmerSize(); - hs.addEventListener(window, 'resize', pixDimmerSize); - } - } - hs.dimmer.style.display = ''; - - var isNew = hs.dimmer.owner == ''; - hs.dimmer.owner += '|'+ exp.key; - - if (isNew) { - 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.dimmer.style.display = 'none'; - else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() { - hs.dimmer.style.display = 'none'; - }); -}, -transit : function (adj, exp) { - var last = exp || hs.getExpander(); - exp = last; - if (hs.upcoming) return false; - else hs.last = last; - hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); - 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) return hs.transit(exp.getAdjacentAnchor(op), 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'); - } - 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 (!e.relatedTarget) 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.ieLt7 = hs.ie && hs.uaVersion < 7; - hs.ieLt9 = hs.ie && hs.uaVersion < 9; - - hs.getPageSize(); - 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 highslide-viewport-size' - }, { - 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.ieLt7 && 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){ - try { - 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; - } catch (e) {} - } - } -}); - -hs.Outline = function (outlineType, onLoad) { - this.onLoad = onLoad; - this.outlineType = outlineType; - var v = hs.uaVersion, tr; - - this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 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.uaVersion < 525 ? 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 == 0 || 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; - - if (this.maxHeight && this.dim == 'x') - exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); - - 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 = this.pageOrigin || 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) { - if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); - else 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.uaVersion < 525) 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 = Math.min(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; - } - changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); - 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, changed) { - 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); - changed = true; - } - } - return changed; -}, - -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, from) { - if (!up) return; - var exp = this, - last = this.last, - x = this.x, - y = this.y, - lastX = last.x, - lastY = last.y, - wrapper = this.wrapper, - content = this.content, - overlayBox = this.overlayBox; - hs.removeEventListener(document, 'mousemove', hs.dragHandler); - - hs.setStyles(content, { - width: (x.imgSize || x.size) +'px', - height: (y.imgSize || y.size) +'px' - }); - if (overlayBox) overlayBox.style.overflow = 'visible'; - this.outline = last.outline; - if (this.outline) this.outline.exp = exp; - last.outline = null; - var fadeBox = hs.createElement('div', { - className: 'highslide-'+ this.contentType - }, { - position: 'absolute', - zIndex: 4, - overflow: 'hidden', - display: 'none' - } - ); - 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]); - } - wrapper.appendChild(fadeBox); - if (overlayBox) { - overlayBox.className = ''; - wrapper.appendChild(overlayBox); - } - fadeBox.style.display = ''; - last.content.style.display = 'none'; - - - if (hs.safari && hs.uaVersion < 525) { - this.wrapper.style.visibility = 'visible'; - } - hs.animate(wrapper, { - width: x.size - }, { - duration: hs.transitionDuration, - step: function(val, args) { - var pos = args.pos, - invPos = 1 - pos; - var prop, - size = {}, - props = ['pos', 'size', 'p1', 'p2']; - for (var n in props) { - prop = props[n]; - size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]); - size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]); - size.ximgSize = Math.round( - invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size)); - size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad')); - size.yimgSize = Math.round( - invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size)); - size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad')); - } - if (exp.outline) exp.outline.setPosition({ - x: size.xpos, - y: size.ypos, - w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb, - h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb - }); - last.wrapper.style.clip = 'rect(' - + (size.ypos - lastY.pos)+'px, ' - + (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, ' - + (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, ' - + (size.xpos - lastX.pos)+'px)'; - - hs.setStyles(content, { - top: (size.yp1 + y.get('imgPad')) +'px', - left: (size.xp1 + x.get('imgPad')) +'px', - marginTop: (y.pos - size.ypos) +'px', - marginLeft: (x.pos - size.xpos) +'px' - }); - hs.setStyles(wrapper, { - top: size.ypos +'px', - left: size.xpos +'px', - width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px', - height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px' - }); - hs.setStyles(fadeBox, { - width: (size.ximgSize || size.xsize) + 'px', - height: (size.yimgSize || size.ysize) +'px', - left: (size.xp1 + size.ximgPad) +'px', - top: (size.yp1 + size.yimgPad) +'px', - visibility: 'visible' - }); - - hs.setStyles(exp.oldImg, { - top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px', - left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px' - }); - - hs.setStyles(exp.newImg, { - opacity: pos, - top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px', - left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px' - }); - if (overlayBox) hs.setStyles(overlayBox, { - width: size.xsize + 'px', - height: size.ysize +'px', - left: (size.xp1 + x.cb) +'px', - top: (size.yp1 + y.cb) +'px' - }); - }, - complete: function () { - wrapper.style.visibility = content.style.visibility = 'visible'; - content.style.display = 'block'; - hs.discardElement(fadeBox); - exp.afterExpand(); - last.afterClose(); - exp.last = null; - } - - }); -}, -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 (as && !as[current + op] && this.slideshow && this.slideshow.repeat) { - if (op == 1) return as[0]; - else if (op == -1) return as[as.length-1]; - } - return (as && 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) { - this.createOverlay(hs.extend(ss.overlayOptions || {}, { - overlayId: ss.controls, - hsId: 'controls', - zIndex: 5 - })); - } - 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) { - this[type] = hs.getNode(this.a['_'+ type + 'Id']); - if (!this[type]) { - var next = this.a.nextSibling; - while (next && !hs.isHsAnchor(next)) { - if ((new RegExp('highslide-'+ type)).test(next.className || null)) { - if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; - this[type] = hs.getNode(next.id); - 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.ieLt7 ? '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.ieLt7 && 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); - this.wrapper.style.height = this.y.get('wsize') +'px'; -}, - -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 : 'auto' - }, - 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.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.slideshow) { - var c = this.slideshow.controls; - if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c); - } - for (var i = 0; i < this.overlays.length; i++) { - var o = hs.$('hsId'+ this.overlays[i]); - if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o); - } - 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, - ySize = this.y.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; - - var ypos = this.y.pos - (this.y.size - ySize) / 2; - if (ypos < hs.marginTop) ypos = hs.marginTop; - - this.moveTo(xpos, ypos); - 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); - this.destroyOverlays(); - 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', - className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '') - }); - 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 (minTblPos > 0) minTblPos = 0; - 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, - title: a.title, - onclick: function() { - if (/highslide-active-anchor/.test(this.className)) return false; - 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 - } -}; -hs.langDefaults = hs.lang; -// history -var HsExpander = hs.Expander; -if (hs.ie && window == window.top) { - (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); - -// set handlers -hs.addEventListener(document, 'ready', function() { - if (hs.expandCursor || hs.dimmingOpacity) { - var style = hs.createElement('style', { type: 'text/css' }, null, - document.getElementsByTagName('HEAD')[0]), - backCompat = document.compatMode == 'BackCompat'; - - - function addRule(sel, dec) { - if (hs.ie && (hs.uaVersion < 9 || backCompat)) { - var last = document.styleSheets[document.styleSheets.length - 1]; - if (typeof(last.addRule) == "object") last.addRule(sel, dec); - } else { - style.appendChild(document.createTextNode(sel + " {" + dec + "}")); - } - } - function fix(prop) { - return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + - ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; - } - if (hs.expandCursor) addRule ('.highslide img', - 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); - addRule ('.highslide-viewport-size', - hs.ie && (hs.uaVersion < 7 || backCompat) ? - 'position: absolute; '+ - 'left:'+ fix('scrollLeft') + - 'top:'+ fix('scrollTop') + - 'width:'+ fix('clientWidth') + - 'height:'+ fix('clientHeight') : - 'position: fixed; width: 100%; height: 100%; left: 0; top: 0'); - } -}); -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); -} diff --git a/gal2/highslide/highslide-with-gallery.packed.js b/gal2/highslide/highslide-with-gallery.packed.js deleted file mode 100644 index 449942c..0000000 --- a/gal2/highslide/highslide-with-gallery.packed.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Name: Highslide JS - * Version: 4.1.13 (2011-10-06) - * Config: default +slideshow +positioning +transitions +viewport +thumbstrip +packed - * Author: Torstein Hønsi - * Support: www.highslide.com/support - * License: www.highslide.com/#license - */ -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}('q(!m){u m={18:{9C:\'9t\',9f:\'bb...\',9g:\'8o 1L ba\',9Y:\'8o 1L bd 1L bw\',7p:\'bx 1L bl B (f)\',aS:\'bp by 8H 8I\',b0:\'bn 1L bj 8H 8I bz\',8T:\'8C\',8U:\'8D\',8w:\'8E\',8v:\'8J\',8t:\'8J (bv)\',bu:\'bg\',8P:\'8G\',8A:\'8G 1g (8B)\',8N:\'8F\',8M:\'8F 1g (8B)\',8S:\'8C (8l 14)\',8O:\'8D (8l 2V)\',8s:\'8E\',8r:\'1:1\',3n:\'b9 %1 bq %2\',84:\'8o 1L 26 2M, c4 8L c6 1L 3i. c0 8l c1 K 1p 8L 3c.\'},4p:\'L/bX/\',5M:\'bI.4y\',5m:\'bK.4y\',7f:53,8p:53,4L:15,9M:15,4j:15,9K:15,4z:bE,91:0.75,9j:J,7A:5,3B:2,bP:3,4R:1f,at:\'4g 2V\',aq:1,an:J,aF:\'bQ://L.c2/\',aE:\'bO\',8V:J,8e:[\'a\'],2Z:[],aL:53,3I:0,7G:50,3Q:\'2n\',6H:\'2n\',8y:H,8x:H,7v:J,5c:8R,5w:8R,5q:J,1B:\'bR-bS\',a6:{2B:\'<7V>\'+\'<1R 2s="L-3c">\'+\'\'+\'<23>{m.18.8T}\'+\'\'+\'<1R 2s="L-3r">\'+\'\'+\'<23>{m.18.8P}\'+\'\'+\'<1R 2s="L-2S">\'+\'\'+\'<23>{m.18.8N}\'+\'\'+\'<1R 2s="L-1p">\'+\'\'+\'<23>{m.18.8U}\'+\'\'+\'<1R 2s="L-3i">\'+\'\'+\'<23>{m.18.8w}\'+\'\'+\'<1R 2s="L-1a-2D">\'+\'\'+\'<23>{m.18.8r}\'+\'\'+\'<1R 2s="L-26">\'+\'\'+\'<23>{m.18.8v}\'+\'\'+\'\'},4X:[],6Z:J,W:[],6V:[\'5q\',\'30\',\'3Q\',\'6H\',\'8y\',\'8x\',\'1B\',\'3B\',\'bG\',\'bH\',\'bJ\',\'8u\',\'bW\',\'cd\',\'cc\',\'8z\',\'aW\',\'7v\',\'3D\',\'5b\',\'2Z\',\'3I\',\'M\',\'1b\',\'7B\',\'5c\',\'5w\',\'6F\',\'6R\',\'9i\',\'2t\',\'2r\',\'aT\',\'aD\',\'1G\'],1x:[],4V:0,7q:{x:[\'9H\',\'14\',\'4i\',\'2V\',\'9L\'],y:[\'4T\',\'11\',\'8h\',\'4g\',\'6D\']},66:{},8z:{},8u:{},3u:[],4U:[],48:{},7I:{},5G:[],21:/ca\\/4\\.0/.19(4B.5r)?8:8n((4B.5r.5Y().2H(/.+(?:9y|c9|ce|2m)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),2m:(R.52&&!1A.3q),4u:/cf/.19(4B.5r),5Z:/ci.+9y:1\\.[0-8].+cg/.19(4B.5r),$:z(1M){q(1M)D R.c7(1M)},2p:z(2o,3j){2o[2o.S]=3j},1c:z(9m,4k,3P,8b,9n){u C=R.1c(9m);q(4k)m.3b(C,4k);q(9n)m.V(C,{bY:0,aM:\'1F\',6S:0});q(3P)m.V(C,3P);q(8b)8b.2E(C);D C},3b:z(C,4k){K(u x 2T 4k)C[x]=4k[x];D C},V:z(C,3P){K(u x 2T 3P){q(m.4d&&x==\'1n\'){q(3P[x]>0.99)C.G.c5(\'5j\');I C.G.5j=\'9o(1n=\'+(3P[x]*28)+\')\'}I C.G[x]=3P[x]}},2b:z(C,Z,31){u 41,4v,47;q(1q 31!=\'6q\'||31===H){u 36=9V;31={3J:36[2],2r:36[3],63:36[4]}}q(1q 31.3J!=\'3n\')31.3J=53;31.2r=1d[31.2r]||1d.93;31.5S=m.3b({},Z);K(u 35 2T Z){u e=24 m.1E(C,31,35);41=8n(m.7U(C,35))||0;4v=8n(Z[35]);47=35!=\'1n\'?\'F\':\'\';e.3F(41,4v,47)}},7U:z(C,Z){q(C.G[Z]){D C.G[Z]}I q(R.6T){D R.6T.9P(C,H).9Q(Z)}I{q(Z==\'1n\')Z=\'5j\';u 3j=C.bf[Z.2j(/\\-(\\w)/g,z(a,b){D b.92()})];q(Z==\'5j\')3j=3j.2j(/9o\\(1n=([0-9]+)\\)/,z(a,b){D b/28});D 3j===\'\'?1:3j}},6v:z(){u d=R,w=1A,5d=d.6i&&d.6i!=\'7P\'?d.4l:d.3x,4d=m.2m&&(m.21<9||1q 9l==\'1C\');u M=4d?5d.8m:(d.4l.8m||5J.b2),1b=4d?5d.aK:5J.b3;m.3S={M:M,1b:1b,5l:4d?5d.5l:9l,5i:4d?5d.5i:be};D m.3S},6g:z(C){u p={x:C.4f,y:C.9h};4o(C.9k){C=C.9k;p.x+=C.4f;p.y+=C.9h;q(C!=R.3x&&C!=R.4l){p.x-=C.5l;p.y-=C.5i}}D p},2D:z(a,2O,3F,T){q(!a)a=m.1c(\'a\',H,{1u:\'1F\'},m.22);q(1q a.5u==\'z\')D 2O;2d{24 m.4Z(a,2O,3F);D 1f}1W(e){D J}},a4:z(C,4F,U){u 1i=C.2L(4F);K(u i=0;i<1i.S;i++){q((24 5X(U)).19(1i[i].U)){D 1i[i]}}D H},a7:z(s){s=s.2j(/\\s/g,\' \');u 1T=/{m\\.18\\.([^}]+)\\}/g,4S=s.2H(1T),18;q(4S)K(u i=0;i<4S.S;i++){18=4S[i].2j(1T,"$1");q(1q m.18[18]!=\'1C\')s=s.2j(4S[i],m.18[18])}D s},9w:z(){u 7J=0,6j=-1,W=m.W,A,1r;K(u i=0;i7J){7J=1r;6j=i}}}q(6j==-1)m.3v=-1;I W[6j].43()},5h:z(a,5p){a.5u=a.2G;u p=a.5u?a.5u():H;a.5u=H;D(p&&1q p[5p]!=\'1C\')?p[5p]:(1q m[5p]!=\'1C\'?m[5p]:H)},73:z(a){u 1G=m.5h(a,\'1G\');q(1G)D 1G;D a.1Y},4W:z(1M){u 3w=m.$(1M),45=m.7I[1M],a={};q(!3w&&!45)D H;q(!45){45=3w.7j(J);45.1M=\'\';m.7I[1M]=45;D 3w}I{D 45.7j(J)}},3H:z(d){q(d)m.8j.2E(d);m.8j.2R=\'\'},1m:z(A){q(!m.2a){7E=J;m.2a=m.1c(\'X\',{U:\'L-bk L-1Z-B\',4x:\'\',2G:z(){m.26()}},{1e:\'1D\',1n:0},m.22,J);q(/(bm|bt|bo|br)/.19(4B.5r)){u 3x=R.3x;z 7H(){m.V(m.2a,{M:3x.bA+\'F\',1b:3x.b5+\'F\'})}7H();m.1Q(1A,\'3O\',7H)}}m.2a.G.1u=\'\';u 7E=m.2a.4x==\'\';m.2a.4x+=\'|\'+A.P;q(7E){q(m.5Z&&m.9q)m.V(m.2a,{9e:\'5O(\'+m.4p+\'bh.97)\',1n:1});I m.2b(m.2a,{1n:A.3I},m.7G)}},7Q:z(P){q(!m.2a)D;q(1q P!=\'1C\')m.2a.4x=m.2a.4x.2j(\'|\'+P,\'\');q((1q P!=\'1C\'&&m.2a.4x!=\'\')||(m.1U&&m.5h(m.1U,\'3I\')))D;q(m.5Z&&m.9q)m.2a.G.1u=\'1F\';I m.2b(m.2a,{1n:0},m.7G,H,z(){m.2a.G.1u=\'1F\'})},83:z(6n,A){u Y=A||m.2h();A=Y;q(m.1U)D 1f;I m.Y=Y;m.49(R,1A.3q?\'5P\':\'5Q\',m.4N);2d{m.1U=6n;6n.2G()}1W(e){m.Y=m.1U=H}2d{q(!6n||A.2Z[1]!=\'3Y\')A.26()}1W(e){}D 1f},6d:z(C,1P){u A=m.2h(C);q(A)D m.83(A.7b(1P),A);I D 1f},3c:z(C){D m.6d(C,-1)},1p:z(C){D m.6d(C,1)},4N:z(e){q(!e)e=1A.29;q(!e.2i)e.2i=e.7l;q(1q e.2i.9x!=\'1C\')D J;u A=m.2h();u 1P=H;8Y(e.cq){1I 70:q(A)A.6k();D J;1I 32:1P=2;5B;1I 34:1I 39:1I 40:1P=1;5B;1I 8:1I 33:1I 37:1I 38:1P=-1;5B;1I 27:1I 13:1P=0}q(1P!==H){q(1P!=2)m.49(R,1A.3q?\'5P\':\'5Q\',m.4N);q(!m.8V)D J;q(e.4D)e.4D();I e.9W=1f;q(A){q(1P==0){A.26()}I q(1P==2){q(A.1g)A.1g.ad()}I{q(A.1g)A.1g.2S();m.6d(A.P,1P)}D 1f}}D J},d5:z(O){m.2p(m.1x,m.3b(O,{1H:\'1H\'+m.4V++}))},d4:z(1h){u 2C=1h.2t;q(1q 2C==\'6q\'){K(u i=0;i<2C.S;i++){u o={};K(u x 2T 1h)o[x]=1h[x];o.2t=2C[i];m.2p(m.4U,o)}}I{m.2p(m.4U,1h)}},86:z(7N,65){u C,1T=/^L-Q-([0-9]+)$/;C=7N;4o(C.1O){q(C.5F!==1C)D C.5F;q(C.1M&&1T.19(C.1M))D C.1M.2j(1T,"$1");C=C.1O}q(!65){C=7N;4o(C.1O){q(C.4F&&m.5L(C)){K(u P=0;P1)D J;q(!e.2i)e.2i=e.7l;u C=e.2i;4o(C.1O&&!(/L-(2M|3i|5W|3O)/.19(C.U))){C=C.1O}u A=m.2h(C);q(A&&(A.8c||!A.55))D J;q(A&&e.T==\'aH\'){q(e.2i.9x)D J;u 2H=C.U.2H(/L-(2M|3i|3O)/);q(2H){m.2I={A:A,T:2H[1],14:A.x.E,M:A.x.B,11:A.y.E,1b:A.y.B,9v:e.6c,9u:e.68};m.1Q(R,\'6o\',m.5V);q(e.4D)e.4D();q(/L-(2M|5W)-89/.19(A.17.U)){A.43();m.7R=J}D 1f}}I q(e.T==\'aA\'){m.49(R,\'6o\',m.5V);q(m.2I){q(m.4I&&m.2I.T==\'2M\')m.2I.A.17.G.46=m.4I;u 3y=m.2I.3y;q(!3y&&!m.7R&&!/(3i|3O)/.19(m.2I.T)){A.26()}I q(3y||(!3y&&m.d8)){m.2I.A.5s(\'1s\')}m.7R=1f;m.2I=H}I q(/L-2M-89/.19(C.U)){C.G.46=m.4I}}D 1f},5V:z(e){q(!m.2I)D J;q(!e)e=1A.29;u a=m.2I,A=a.A;a.5T=e.6c-a.9v;a.7o=e.68-a.9u;u 7s=1d.ck(1d.9r(a.5T,2)+1d.9r(a.7o,2));q(!a.3y)a.3y=(a.T!=\'2M\'&&7s>0)||(7s>(m.cX||5));q(a.3y&&e.6c>5&&e.68>5){q(a.T==\'3O\')A.3O(a);I{A.7C(a.14+a.5T,a.11+a.7o);q(a.T==\'2M\')A.17.G.46=\'3i\'}}D 1f},8Q:z(e){2d{q(!e)e=1A.29;u 6C=/cW/i.19(e.T);q(!e.2i)e.2i=e.7l;q(!e.6E)e.6E=6C?e.db:e.di;u A=m.2h(e.2i);q(!A.55)D;q(!A||!e.6E||m.2h(e.6E,J)==A||m.2I)D;K(u i=0;i=k.1h.3J+k.80){k.4c=k.4v;k.E=k.7X=1;k.8a();k.1h.5S[k.Z]=J;u 8d=J;K(u i 2T k.1h.5S)q(k.1h.5S[i]!==J)8d=1f;q(8d){q(k.1h.63)k.1h.63.95(k.2F)}D 1f}I{u n=t-k.80;k.7X=n/k.1h.3J;k.E=k.1h.2r(n,0,1,k.1h.3J);k.4c=k.41+((k.4v-k.41)*k.E);k.8a()}D J}};m.3b(m.1E,{3k:{1n:z(1E){m.V(1E.2F,{1n:1E.4c})},96:z(1E){2d{q(1E.2F.G&&1E.2F.G[1E.Z]!=H)1E.2F.G[1E.Z]=1E.4c+1E.47;I 1E.2F[1E.Z]=1E.4c}1W(e){}}}});m.4O=z(1B,3V){k.3V=3V;k.1B=1B;u v=m.21,3L;k.7h=m.2m&&m.21<7;q(!1B){q(3V)3V();D}m.71();k.1V=m.1c(\'1V\',{cr:0},{1e:\'1s\',1j:\'2v\',cC:\'cD\',M:0},m.22,J);u 4a=m.1c(\'4a\',H,H,k.1V,1);k.2e=[];K(u i=0;i<=8;i++){q(i%3==0)3L=m.1c(\'3L\',H,{1b:\'2n\'},4a,J);k.2e[i]=m.1c(\'2e\',H,H,3L,J);u G=i!=4?{cP:0,cO:0}:{1j:\'8i\'};m.V(k.2e[i],G)}k.2e[4].U=1B+\' L-16\';k.98()};m.4O.5o={98:z(){u 1G=m.4p+(m.cN||"cQ/")+k.1B+".97";u 9a=m.4u&&m.21<6t?m.22:H;k.3d=m.1c(\'1y\',H,{1j:\'2v\',11:\'-4P\'},9a,J);u 7T=k;k.3d.64=z(){7T.9b()};k.3d.1G=1G},9b:z(){u o=k.1k=k.3d.M/4,E=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1m={1b:(2*o)+\'F\',M:(2*o)+\'F\'};K(u i=0;i<=8;i++){q(E[i]){q(k.7h){u w=(i==1||i==7)?\'28%\':k.3d.M+\'F\';u X=m.1c(\'X\',H,{M:\'28%\',1b:\'28%\',1j:\'8i\',3a:\'1s\'},k.2e[i],J);m.1c(\'X\',H,{5j:"cL:cG.cF.cE(cH=cI, 1G=\'"+k.3d.1G+"\')",1j:\'2v\',M:w,1b:k.3d.1b+\'F\',14:(E[i][0]*o)+\'F\',11:(E[i][1]*o)+\'F\'},X,J)}I{m.V(k.2e[i],{9e:\'5O(\'+k.3d.1G+\') \'+(E[i][0]*o)+\'F \'+(E[i][1]*o)+\'F\'})}q(1A.3q&&(i==3||i==5))m.1c(\'X\',H,1m,k.2e[i],J);m.V(k.2e[i],1m)}}k.3d=H;q(m.48[k.1B])m.48[k.1B].5x();m.48[k.1B]=k;q(k.3V)k.3V()},3Z:z(E,1k,9d,3t,2r){u A=k.A,cK=A.Q.G,1k=1k||0,E=E||{x:A.x.E+1k,y:A.y.E+1k,w:A.x.N(\'1N\')-2*1k,h:A.y.N(\'1N\')-2*1k};q(9d)k.1V.G.1e=(E.h>=4*k.1k)?\'1D\':\'1s\';m.V(k.1V,{14:(E.x-k.1k)+\'F\',11:(E.y-k.1k)+\'F\',M:(E.w+2*k.1k)+\'F\'});E.w-=2*k.1k;E.h-=2*k.1k;m.V(k.2e[4],{M:E.w>=0?E.w+\'F\':0,1b:E.h>=0?E.h+\'F\':0});q(k.7h)k.2e[3].G.1b=k.2e[5].G.1b=k.2e[4].G.1b},5x:z(9c){q(9c)k.1V.G.1e=\'1s\';I m.3H(k.1V)}};m.6r=z(A,1m){k.A=A;k.1m=1m;k.3m=1m==\'x\'?\'ah\':\'au\';k.3G=k.3m.5Y();k.4M=1m==\'x\'?\'af\':\'ag\';k.6B=k.4M.5Y();k.7d=1m==\'x\'?\'a5\':\'a8\';k.90=k.7d.5Y();k.1o=k.2z=0};m.6r.5o={N:z(P){8Y(P){1I\'78\':D k.1K+k.3o+(k.t-m.1S[\'1k\'+k.3m])/2;1I\'6Q\':D k.E+k.cb+k.1o+(k.B-m.1S[\'1k\'+k.3m])/2;1I\'1N\':D k.B+2*k.cb+k.1o+k.2z;1I\'4n\':D k.3W-k.2P-k.3X;1I\'7a\':D k.N(\'4n\')-2*k.cb-k.1o-k.2z;1I\'5t\':D k.E-(k.A.16?k.A.16.1k:0);1I\'7M\':D k.N(\'1N\')+(k.A.16?2*k.A.16.1k:0);1I\'2f\':D k.1z?1d.2y((k.B-k.1z)/2):0}},74:z(){k.cb=(k.A.17[\'1k\'+k.3m]-k.t)/2;k.3X=m[\'6S\'+k.7d]},6X:z(){k.t=k.A.C[k.3G]?7L(k.A.C[k.3G]):k.A.C[\'1k\'+k.3m];k.1K=k.A.1K[k.1m];k.3o=(k.A.C[\'1k\'+k.3m]-k.t)/2;q(k.1K==0||k.1K==-1){k.1K=(m.3S[k.3G]/2)+m.3S[\'1J\'+k.4M]}},6P:z(){u A=k.A;k.2k=\'2n\';q(A.6H==\'4i\')k.2k=\'4i\';I q(24 5X(k.6B).19(A.3Q))k.2k=H;I q(24 5X(k.90).19(A.3Q))k.2k=\'56\';k.E=k.1K-k.cb+k.3o;q(k.6R&&k.1m==\'x\')A.6F=1d.2X(A.6F||k.1a,A.6R*k.1a/A.y.1a);k.B=1d.2X(k.1a,A[\'56\'+k.3m]||k.1a);k.2q=A.5q?1d.2X(A[\'2X\'+k.3m],k.1a):k.1a;q(A.3A&&A.30){k.B=A[k.3G];k.1z=k.1a}q(k.1m==\'x\'&&m.4R)k.2q=A.5c;k.2i=A[\'2i\'+k.1m.92()];k.2P=m[\'6S\'+k.4M];k.1J=m.3S[\'1J\'+k.4M];k.3W=m.3S[k.3G]},82:z(i){u A=k.A;q(A.3A&&(A.30||m.4R)){k.1z=i;k.B=1d.56(k.B,k.1z);A.17.G[k.6B]=k.N(\'2f\')+\'F\'}I k.B=i;A.17.G[k.3G]=i+\'F\';A.Q.G[k.3G]=k.N(\'1N\')+\'F\';q(A.16)A.16.3Z();q(k.1m==\'x\'&&A.1l)A.4K(J);q(k.1m==\'x\'&&A.1g&&A.3A){q(i==k.1a)A.1g.4J(\'1a-2D\');I A.1g.3T(\'1a-2D\')}},7Z:z(i){k.E=i;k.A.Q.G[k.6B]=i+\'F\';q(k.A.16)k.A.16.3Z()}};m.4Z=z(a,2O,3F,2Q){q(R.cs&&m.2m&&!m.6I){m.1Q(R,\'3s\',z(){24 m.4Z(a,2O,3F,2Q)});D}k.a=a;k.3F=3F;k.2Q=2Q||\'2M\';k.3A=!k.cp;m.6Z=1f;k.1x=[];k.Y=m.Y;m.Y=H;m.71();u P=k.P=m.W.S;K(u i=0;ip.1J+p.3W-p.3X)p.E=p.1J+p.3W-p.B-p.2P-p.3X-p.1o-p.2z;q(p.E(k.x.1z||k.x.B)){k.ap();q(k.1x.S==1)k.4K()}}k.aG()}1W(e){k.7D(e)}},2k:z(p,4C){u 4b,2l=p.2i,1m=p==k.x?\'x\':\'y\';q(2l&&2l.2H(/ /)){4b=2l.dh(\' \');2l=4b[0]}q(2l&&m.$(2l)){p.E=m.6g(m.$(2l))[1m];q(4b&&4b[1]&&4b[1].2H(/^[-]?[0-9]+F$/))p.E+=7L(4b[1]);q(p.Bp.1J+p.3W-p.3X){q(!4C&&79&&4q){p.B=1d.2X(p.B,p.N(1m==\'y\'?\'4n\':\'7a\'))}I q(p.N(\'1N\')2x){ 2A=2Y*2x;q(2Ak.5w&&x.B>k.5c&&y.N(\'1N\')>y.N(\'4n\')){y.B-=10;q(2x)x.B=y.B*2x;k.4K(0,1);3e=J}}D 3e},aG:z(){u x=k.x,y=k.y;k.5s(\'1s\');q(k.1g&&k.1g.2g)k.1g.2g.4G();k.8f(1,{Q:{M:x.N(\'1N\'),1b:y.N(\'1N\'),14:x.E,11:y.E},17:{14:x.1o+x.N(\'2f\'),11:y.1o+y.N(\'2f\'),M:x.1z||x.B,1b:y.1z||y.B}},m.7f)},8f:z(1t,1L,3t){u 5k=k.2Z,6M=1t?(k.Y?k.Y.a:H):m.1U,t=(5k[1]&&6M&&m.5h(6M,\'2Z\')[1]==5k[1])?5k[1]:5k[0];q(k[t]&&t!=\'2D\'){k[t](1t,1L);D}q(k.16&&!k.3B){q(1t)k.16.3Z();I k.16.5x()}q(!1t)k.67();u A=k,x=A.x,y=A.y,2r=k.2r;q(!1t)2r=k.aT||2r;u ay=1t?z(){q(A.16)A.16.1V.G.1e="1D";4r(z(){A.62()},50)}:z(){A.5v()};q(1t)m.V(k.Q,{M:x.t+\'F\',1b:y.t+\'F\'});q(k.aD){m.V(k.Q,{1n:1t?0:1});m.3b(1L.Q,{1n:1t})}m.2b(k.Q,1L.Q,{3J:3t,2r:2r,3k:z(3j,36){q(A.16&&A.3B&&36.Z==\'11\'){u 4Q=1t?36.E:1-36.E;u E={w:x.t+(x.N(\'1N\')-x.t)*4Q,h:y.t+(y.N(\'1N\')-y.t)*4Q,x:x.1K+(x.E-x.1K)*4Q,y:y.1K+(y.E-y.1K)*4Q};A.16.3Z(E,0,1)}}});m.2b(k.17,1L.17,3t,2r,ay);q(1t){k.Q.G.1e=\'1D\';k.17.G.1e=\'1D\';k.a.U+=\' L-42-3Q\'}},5n:z(1t,1L){k.3B=1f;u A=k,t=1t?m.7f:0;q(1t){m.2b(k.Q,1L.Q,0);m.V(k.Q,{1n:0,1e:\'1D\'});m.2b(k.17,1L.17,0);k.17.G.1e=\'1D\';m.2b(k.Q,{1n:1},t,H,z(){A.62()})}q(k.16){k.16.1V.G.1r=k.Q.G.1r;u 5D=1t||-1,1k=k.16.1k,7c=1t?3:1k,6Y=1t?1k:3;K(u i=7c;5D*i<=5D*6Y;i+=5D,t+=25){(z(){u o=1t?6Y-i:7c-i;4r(z(){A.16.3Z(0,o,1)},t)})()}}q(1t){}I{4r(z(){q(A.16)A.16.5x(A.cz);A.67();m.2b(A.Q,{1n:0},m.8p,H,z(){A.5v()})},t)}},3Y:z(1t,1L,72){q(!1t)D;u A=k,Y=k.Y,x=k.x,y=k.y,2W=Y.x,2U=Y.y,Q=k.Q,17=k.17,1l=k.1l;m.49(R,\'6o\',m.5V);m.V(17,{M:(x.1z||x.B)+\'F\',1b:(y.1z||y.B)+\'F\'});q(1l)1l.G.3a=\'1D\';k.16=Y.16;q(k.16)k.16.A=A;Y.16=H;u 4s=m.1c(\'X\',{U:\'L-\'+k.2Q},{1j:\'2v\',1r:4,3a:\'1s\',1u:\'1F\'});u 77={aO:Y,aR:k};K(u n 2T 77){k[n]=77[n].17.7j(1);m.V(k[n],{1j:\'2v\',aM:0,1e:\'1D\'});4s.2E(k[n])}Q.2E(4s);q(1l){1l.U=\'\';Q.2E(1l)}4s.G.1u=\'\';Y.17.G.1u=\'1F\';q(m.4u&&m.21<6t){k.Q.G.1e=\'1D\'}m.2b(Q,{M:x.B},{3J:m.aL,3k:z(3j,36){u E=36.E,3U=1-E;u Z,B={},6N=[\'E\',\'B\',\'1o\',\'2z\'];K(u n 2T 6N){Z=6N[n];B[\'x\'+Z]=1d.2y(3U*2W[Z]+E*x[Z]);B[\'y\'+Z]=1d.2y(3U*2U[Z]+E*y[Z]);B.aJ=1d.2y(3U*(2W.1z||2W.B)+E*(x.1z||x.B));B.6p=1d.2y(3U*2W.N(\'2f\')+E*x.N(\'2f\'));B.aN=1d.2y(3U*(2U.1z||2U.B)+E*(y.1z||y.B));B.6f=1d.2y(3U*2U.N(\'2f\')+E*y.N(\'2f\'))}q(A.16)A.16.3Z({x:B.2K,y:B.2J,w:B.58+B.3C+B.6O+2*x.cb,h:B.5a+B.3z+B.6W+2*y.cb});Y.Q.G.ct=\'cn(\'+(B.2J-2U.E)+\'F, \'+(B.58+B.3C+B.6O+B.2K+2*2W.cb-2W.E)+\'F, \'+(B.5a+B.3z+B.6W+B.2J+2*2U.cb-2U.E)+\'F, \'+(B.2K-2W.E)+\'F)\';m.V(17,{11:(B.3z+y.N(\'2f\'))+\'F\',14:(B.3C+x.N(\'2f\'))+\'F\',4j:(y.E-B.2J)+\'F\',4L:(x.E-B.2K)+\'F\'});m.V(Q,{11:B.2J+\'F\',14:B.2K+\'F\',M:(B.3C+B.6O+B.58+2*x.cb)+\'F\',1b:(B.3z+B.6W+B.5a+2*y.cb)+\'F\'});m.V(4s,{M:(B.aJ||B.58)+\'F\',1b:(B.aN||B.5a)+\'F\',14:(B.3C+B.6p)+\'F\',11:(B.3z+B.6f)+\'F\',1e:\'1D\'});m.V(A.aO,{11:(2U.E-B.2J+2U.1o-B.3z+2U.N(\'2f\')-B.6f)+\'F\',14:(2W.E-B.2K+2W.1o-B.3C+2W.N(\'2f\')-B.6p)+\'F\'});m.V(A.aR,{1n:E,11:(y.E-B.2J+y.1o-B.3z+y.N(\'2f\')-B.6f)+\'F\',14:(x.E-B.2K+x.1o-B.3C+x.N(\'2f\')-B.6p)+\'F\'});q(1l)m.V(1l,{M:B.58+\'F\',1b:B.5a+\'F\',14:(B.3C+x.cb)+\'F\',11:(B.3z+y.cb)+\'F\'})},63:z(){Q.G.1e=17.G.1e=\'1D\';17.G.1u=\'4H\';m.3H(4s);A.62();Y.5v();A.Y=H}})},9E:z(o,C){q(!k.Y)D 1f;K(u i=0;i\'+s+\'\'+k[k.5b].2R}}},aB:z(){q(!k.Y){K(u i=0;ik.x.N(\'5t\')+k.x.N(\'7M\'));u 9Z=(3g.y+3g.hk.y.N(\'5t\')+k.y.N(\'7M\'))}u 5H=m.86(1i[i]);q(!ax&&!9Z&&5H!=k.P){q(!2u){1i[i].5A(\'1s-by\',\'[\'+k.P+\']\');1i[i].88=1i[i].G[Z];1i[i].G[Z]=\'1s\'}I q(2u.9X(\'[\'+k.P+\']\')==-1){1i[i].5A(\'1s-by\',2u+\'[\'+k.P+\']\')}}I q((2u==\'[\'+k.P+\']\'||m.3v==5H)&&5H!=k.P){1i[i].5A(\'1s-by\',\'\');1i[i].G[Z]=1i[i].88||\'\'}I q(2u&&2u.9X(\'[\'+k.P+\']\')>-1){1i[i].5A(\'1s-by\',2u.2j(\'[\'+k.P+\']\',\'\'))}}}}},43:z(){k.Q.G.1r=m.4z+=2;K(u i=0;iO.1O.2c)O.G.M=\'28%\'}I q(O.1O!=k.1l)k.1l.2E(O);q(/14$/.19(p))O.G.14=5E+\'F\';q(/4i$/.19(p))m.V(O,{14:\'50%\',4L:(5E-1d.2y(O.2c/2))+\'F\'});q(/2V$/.19(p))O.G.2V=-5E+\'F\';q(/^9H$/.19(p)){m.V(O,{2V:\'28%\',9M:k.x.cb+\'F\',11:-k.y.cb+\'F\',4g:-k.y.cb+\'F\',3a:\'2n\'});k.x.1o=O.2c}I q(/^9L$/.19(p)){m.V(O,{14:\'28%\',4L:k.x.cb+\'F\',11:-k.y.cb+\'F\',4g:-k.y.cb+\'F\',3a:\'2n\'});k.x.2z=O.2c}u 8g=O.1O.3f;O.G.1b=\'2n\';q(4E&&O.3f>8g)O.G.1b=m.3E?8g+\'F\':\'28%\';q(/^11/.19(p))O.G.11=5C+\'F\';q(/^8h/.19(p))m.V(O,{11:\'50%\',4j:(5C-1d.2y(O.3f/2))+\'F\'});q(/^4g/.19(p))O.G.4g=-5C+\'F\';q(/^4T$/.19(p)){m.V(O,{14:(-k.x.1o-k.x.cb)+\'F\',2V:(-k.x.2z-k.x.cb)+\'F\',4g:\'28%\',9K:k.y.cb+\'F\',M:\'2n\'});k.y.1o=O.3f}I q(/^6D$/.19(p)){m.V(O,{1j:\'8i\',14:(-k.x.1o-k.x.cb)+\'F\',2V:(-k.x.2z-k.x.cb)+\'F\',11:\'28%\',4j:k.y.cb+\'F\',M:\'2n\'});k.y.2z=O.3f;O.G.1j=\'2v\'}},9J:z(){k.a2([\'6z\',\'dd\'],J);k.a3();q(k.6z&&k.7v)k.6z.U+=\' L-3i\';q(m.an)k.am();K(u i=0;i0)4w=0;q(2w>0)2w=0;q(2w<4w)2w=4w}I{K(u j=0;j0?as[i-1].1O[4f]:3M[4f],7x=3M[4f]+3M[2c]+(as[i+1]?as[i+1].1O[2c]:0);q(7x>6h-5z)2w=6h-7x;I q(7F<-5z)2w=-7F}u 7r=3M[4f]+(3M[2c]-6b[2c])/2+2w;m.2b(1V,3p?{14:2w}:{11:2w},H,\'7n\');m.2b(6b,3p?{14:7r}:{11:7r},H,\'7n\');7Y.G.1u=2w<0?\'4H\':\'1F\';85.G.1u=(2w>4w)?\'4H\':\'1F\'};u 51=m.3R.2N[m.W[1g.3N].2t||\'1F\'],1h=1g.2g,4m=1h.4m||\'ao\',81=(4m==\'bi\'),3K=81?[\'X\',\'7V\',\'1R\',\'23\']:[\'1V\',\'4a\',\'3L\',\'2e\'],3p=(4m==\'ao\'),4e=m.1c(\'X\',{U:\'L-2g L-2g-\'+4m,2R:\'\'+\'<\'+3K[0]+\'><\'+3K[1]+\'>\'+\'\'+\'\'+\'\'},{1u:\'1F\'},m.22),57=4e.6l,X=57[0],7Y=57[1],85=57[2],6b=57[3],1V=X.b7,4a=4e.2L(3K[1])[0],3L;K(u i=0;i<51.S;i++){q(i==0||!3p)3L=m.1c(3K[2],H,H,4a);(z(){u a=51[i],3M=m.1c(3K[3],H,H,3L),cj=i;m.1c(\'a\',{1Y:a.1Y,1X:a.1X,2G:z(){q(/L-42-3Q/.19(k.U))D 1f;m.2h(k).43();D m.83(a)},2R:m.9I?m.9I(a):a.2R},H,3M)})()}q(!81){7Y.2G=z(){1J(-1)};85.2G=z(){1J(1)};m.1Q(4a,R.c3!==1C?\'bB\':\'bZ\',z(e){u 3h=0;e=e||1A.29;q(e.9D){3h=e.9D/ch;q(m.3q)3h=-3h}I q(e.9N){3h=-e.9N/3}q(3h)1J(-3h*0.2);q(e.4D)e.4D();e.9W=1f})}D{6s:6s,4G:4G}};m.5U=m.18;u bC=m.4Z;q(m.2m&&1A==1A.11){(z(){2d{R.4l.bD(\'14\')}1W(e){4r(9V.bF,50);D}m.3s()})()}m.1Q(R,\'bL\',m.3s);m.1Q(1A,\'az\',m.3s);m.1Q(R,\'3s\',z(){q(m.5M||m.3I){u G=m.1c(\'G\',{T:\'bM/7U\'},H,R.2L(\'bT\')[0]),8k=R.6i==\'7P\';z 5e(7w,7W){q(m.2m&&(m.21<9||8k)){u Y=R.9S[R.9S.S-1];q(1q(Y.5e)=="6q")Y.5e(7w,7W)}I{G.2E(R.bU(7w+" {"+7W+"}"))}}z 5f(Z){D\'bV( ( ( bN = R.4l.\'+Z+\' ? R.4l.\'+Z+\' : R.3x.\'+Z+\' ) ) + \\\'F\\\' );\'}q(m.5M)5e(\'.L 1y\',\'46: 5O(\'+m.4p+m.5M+\'), 5R !c8;\');5e(\'.L-1Z-B\',m.2m&&(m.21<7||8k)?\'1j: 2v; \'+\'14:\'+5f(\'5l\')+\'11:\'+5f(\'5i\')+\'M:\'+5f(\'8m\')+\'1b:\'+5f(\'aK\'):\'1j: bc; M: 28%; 1b: 28%; 14: 0; 11: 0\')}});m.1Q(1A,\'3O\',z(){m.6v();q(m.1Z)K(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', - 'pageOrigin', - '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: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : - parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), -ie : (document.all && !window.opera), -//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant? -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.ieLt9 && 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 (el.style[prop]) { - return el.style[prop]; - } else 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, - ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined'); - - var width = ieLt9 ? iebody.clientWidth : - (d.documentElement.clientWidth || self.innerWidth), - height = ieLt9 ? iebody.clientHeight : self.innerHeight; - hs.page = { - width: width, - height: height, - scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset, - scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset - }; - return hs.page; -}, - -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 || hs.getExpander(); - exp = last; - if (hs.upcoming) return false; - else hs.last = last; - hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); - 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) return hs.transit(exp.getAdjacentAnchor(op), 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.ieLt9 ? 'white' : 'none'), - opacity: 0.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 (!e.relatedTarget) 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.ieLt7 = hs.ie && hs.uaVersion < 7; - hs.ieLt9 = hs.ie && hs.uaVersion < 9; - - hs.getPageSize(); - 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.ieLt7 && 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){ - try { - 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; - } catch (e) {} - } - } -}); - -hs.Outline = function (outlineType, onLoad) { - this.onLoad = onLoad; - this.outlineType = outlineType; - var v = hs.uaVersion, tr; - - this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 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.uaVersion < 525 ? 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 == 0 || 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; - - if (this.maxHeight && this.dim == 'x') - exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); - - 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 (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try { - exp.iDoc.body.style.overflow = 'auto'; - } catch (e) {} - 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 = this.pageOrigin || 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) { - if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); - else 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.uaVersion < 525) 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, - height: 0, - 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 exp = this; - var ajax = new hs.Ajax(this.a, innerContent); - ajax.src = this.src; - 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.iDoc = 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; - if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try { - this.iDoc.body.style.overflow = 'hidden'; - } catch (e) {} - 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 = Math.min(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; - } - changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); - 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, changed) { - var x = this.x, y = this.y; - if (this.overlayBox && (this.isImage || this.allowHeightReduction)) { - 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); - changed = true; - } - } - return changed; -}, - -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']; - return (as && 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) { - this[type] = hs.getNode(this.a['_'+ type + 'Id']); - if (!this[type]) { - var next = this.a.nextSibling; - while (next && !hs.isHsAnchor(next)) { - if ((new RegExp('highslide-'+ type)).test(next.className || null)) { - if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; - this[type] = hs.getNode(next.id); - 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.ieLt7 ? '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.ieLt7 && 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); - this.wrapper.style.height = this.y.get('wsize') +'px'; -}, - -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'; - this.isExpanded = false; - 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 : 'auto' - }, - 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.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, - ySize = this.y.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; - - var ypos = this.y.pos - (this.y.size - ySize) / 2; - if (ypos < hs.marginTop) ypos = hs.marginTop; - - this.moveTo(xpos, ypos); - 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 () { - var xhr; - 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 { xhr = new XMLHttpRequest(); } - catch (e) { - try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } - catch (e) { - try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } - catch (e) { this.onError(); } - } - } - var pThis = this; - xhr.onreadystatechange = function() { - if(pThis.xhr.readyState == 4) { - if (pThis.id) pThis.getElementContent(); - else pThis.loadHTML(); - } - }; - var src = this.src; - this.xhr = xhr; - if (hs.forceAjaxReload) - src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime()); - xhr.open('GET', src, true); - xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.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.xhr.responseText, - regBody; - if (this.pre) hs.cachedGets[this.src] = s; - if (!hs.ie || hs.uaVersion >= 5.5) { - s = s.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 { - regBody = /(]*>|<\/body>)/ig; - if (regBody.test(s)) s = s.split(regBody)[hs.ieLt9 ? 1 : 2]; - - } - } - hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s; - this.onLoad(); - for (var x in this) this[x] = null; -} -}; -hs.langDefaults = hs.lang; -// history -var HsExpander = hs.Expander; -if (hs.ie && window == window.top) { - (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); - -// set handlers -hs.addEventListener(document, 'ready', function() { - if (hs.expandCursor) { - var style = hs.createElement('style', { type: 'text/css' }, null, - document.getElementsByTagName('HEAD')[0]), - backCompat = document.compatMode == 'BackCompat'; - - - function addRule(sel, dec) { - if (hs.ie && (hs.uaVersion < 9 || backCompat)) { - var last = document.styleSheets[document.styleSheets.length - 1]; - if (typeof(last.addRule) == "object") last.addRule(sel, dec); - } else { - style.appendChild(document.createTextNode(sel + " {" + dec + "}")); - } - } - function fix(prop) { - return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + - ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; - } - if (hs.expandCursor) addRule ('.highslide img', - 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); - } -}); -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); -} diff --git a/gal2/highslide/highslide-with-html.packed.js b/gal2/highslide/highslide-with-html.packed.js deleted file mode 100644 index 6febacf..0000000 --- a/gal2/highslide/highslide-with-html.packed.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Name: Highslide JS - * Version: 4.1.13 (2011-10-06) - * Config: default +inline +ajax +iframe +flash +packed - * Author: Torstein Hønsi - * Support: www.highslide.com/support - * License: www.highslide.com/#license - */ -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}('q(!m){u m={1e:{89:\'8H\',8K:\'co...\',8G:\'6Q 2h cA\',9s:\'6Q 2h cB 2h c1\',9Y:\'bX 2h bT G (f)\',ag:\'c7 by 8g 8f\',9F:\'d3 2h d6 8g 8f dg\',91:\'8n\',8W:\'8e\',8R:\'9g\',8V:\'8j\',8U:\'8j (di)\',93:\'dj\',dd:\'8h\',d2:\'8h 8m (8l)\',cM:\'8k\',bR:\'8k 8m (8l)\',90:\'8n (6L 1f)\',8X:\'8e (6L 2G)\',8S:\'9g\',b8:\'1:1\',7h:\'6Q 2h 28 2D, aR 8Y aL 2h 3I. aH 6L aT W 1M 8Y 5n.\'},56:\'U/aN/\',5v:\'bG.6E\',4E:\'bB.6E\',7c:6j,a7:6j,4j:15,6m:15,3N:15,6f:15,4l:bt,8N:0.75,7m:J,71:5,3g:2,aZ:3,4M:1h,9Z:\'3E 2G\',9U:1,a1:J,9y:\'b2://U.b4/\',9E:\'aO\',8C:J,7B:[\'a\'],5D:1h,5A:J,48:J,31:\'4K\',82:J,7b:J,3O:8Z,4s:8Z,4I:J,1x:\'aS-aP\',8A:{8B:\'<1i 3n="U-aU"><92>\'+\'<3u 3n="U-5n">\'+\'\'+\'<2p>{m.1e.91}\'+\'\'+\'<3u 3n="U-1M">\'+\'\'+\'<2p>{m.1e.8W}\'+\'\'+\'<3u 3n="U-3I">\'+\'\'+\'<2p>{m.1e.8R}\'+\'\'+\'<3u 3n="U-28">\'+\'\'+\'<2p>{m.1e.8V}\'+\'\'+\'\'+\'<1i 3n="U-V">\'+\'<1i 3n="U-b0"><1i>\'+\'<2p 3n="U-3q" 2u="{m.1e.93}"><2p>\'+\'\'},4P:[],6n:J,P:[],6s:[\'4I\',\'2K\',\'1x\',\'3g\',\'b5\',\'bc\',\'aG\',\'9e\',\'aM\',\'b3\',\'bQ\',\'9c\',\'9K\',\'7b\',\'K\',\'M\',\'7f\',\'5D\',\'5A\',\'48\',\'bD\',\'bC\',\'bH\',\'2f\',\'82\',\'3i\',\'3J\',\'31\',\'7I\',\'78\',\'3O\',\'4s\',\'5X\',\'6N\',\'8d\',\'4h\',\'2g\',\'an\',\'am\',\'T\'],1Q:[],4y:0,bI:{x:[\'ad\',\'1f\',\'6H\',\'2G\',\'ac\'],y:[\'4U\',\'18\',\'6q\',\'3E\',\'6a\']},5R:{},9c:{},9e:{},7I:{al:{},1E:{},ay:{}},3t:[],3G:{},3C:[],5b:[],4o:[],5J:{},7k:{},6h:[],26:/bM\\/4\\.0/.16(46.5V)?8:6t((46.5V.5x().2Z(/.+(?:9f|bJ|bK|1L)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1L:(N.4F&&!1y.30),4X:/bL/.16(46.5V),7V:/bx.+9f:1\\.[0-8].+bi/.16(46.5V),$:B(1j){q(1j)D N.6F(1j)},20:B(1P,2R){1P[1P.1c]=2R},14:B(9b,3h,3l,4r,95){u C=N.14(9b);q(3h)m.3e(C,3h);q(95)m.Q(C,{6z:0,ap:\'24\',6V:0});q(3l)m.Q(C,3l);q(4r)4r.1G(C);D C},3e:B(C,3h){W(u x 3A 3h)C[x]=3h[x];D C},Q:B(C,3l){W(u x 3A 3l){q(m.2Y&&x==\'1B\'){q(3l[x]>0.99)C.F.bp(\'4C\');L C.F.4C=\'97(1B=\'+(3l[x]*2A)+\')\'}L C.F[x]=3l[x]}},41:B(C,1a,2P){u 3S,3Y,3P;q(1t 2P!=\'6W\'||2P===I){u 2S=aE;2P={3w:2S[2],2g:2S[3],83:2S[4]}}q(1t 2P.3w!=\'42\')2P.3w=6j;2P.2g=1r[2P.2g]||1r.8M;2P.5d=m.3e({},1a);W(u 2z 3A 1a){u e=1w m.1C(C,2P,2z);3S=6t(m.79(C,2z))||0;3Y=6t(1a[2z]);3P=2z!=\'1B\'?\'E\':\'\';e.2O(3S,3Y,3P)}},79:B(C,1a){q(C.F[1a]){D C.F[1a]}L q(N.87){D N.87.9k(C,I).9i(1a)}L{q(1a==\'1B\')1a=\'4C\';u 2R=C.4u[1a.2i(/\\-(\\w)/g,B(a,b){D b.bo()})];q(1a==\'4C\')2R=2R.2i(/97\\(1B=([0-9]+)\\)/,B(a,b){D b/2A});D 2R===\'\'?1:2R}},5y:B(){u d=N,w=1y,58=d.5G&&d.5G!=\'6M\'?d.44:d.V,2Y=m.1L&&(m.26<9||1t 8y==\'1X\');u K=2Y?58.8Q:(d.44.8Q||5o.bv),M=2Y?58.bu:5o.bm;m.3k={K:K,M:M,5T:2Y?58.5T:8y,5U:2Y?58.5U:bf};D m.3k},85:B(C){u p={x:C.8x,y:C.6G};3T(C.8p){C=C.8p;p.x+=C.8x;p.y+=C.6G;q(C!=N.V&&C!=N.44){p.x-=C.5T;p.y-=C.5U}}D p},53:B(a,1E,2O,R){q(!a)a=m.14(\'a\',I,{1O:\'24\'},m.1S);q(1t a.4V==\'B\')D 1E;q(R==\'2Q\'){W(u i=0;i7n){7n=1u;5g=i}}}q(5g==-1)m.2q=-1;L P[5g].3d()},3U:B(a,4R){a.4V=a.2M;u p=a.4V?a.4V():I;a.4V=I;D(p&&1t p[4R]!=\'1X\')?p[4R]:(1t m[4R]!=\'1X\'?m[4R]:I)},5m:B(a){u T=m.3U(a,\'T\');q(T)D T;D a.2v},3z:B(1j){u 1D=m.$(1j),3M=m.7k[1j],a={};q(!1D&&!3M)D I;q(!3M){3M=1D.61(J);3M.1j=\'\';m.7k[1j]=3M;D 1D}L{D 3M.61(J)}},3j:B(d){q(d)m.7g.1G(d);m.7g.2n=\'\'},8t:B(7F,A){u 3r=A||m.3v();A=3r;q(m.3B)D 1h;L m.3r=3r;m.4g(N,1y.30?\'5i\':\'5h\',m.4D);1m{m.3B=7F;7F.2M()}1l(e){m.3r=m.3B=I}1m{A.28()}1l(e){}D 1h},5k:B(C,2w){u A=m.3v(C);q(A)D m.8t(A.6B(2w),A);L D 1h},5n:B(C){D m.5k(C,-1)},1M:B(C){D m.5k(C,1)},4D:B(e){q(!e)e=1y.1Y;q(!e.2j)e.2j=e.6p;q(1t e.2j.7O!=\'1X\')D J;u A=m.3v();u 2w=I;8T(e.aI){1J 70:q(A)A.7i();D J;1J 32:1J 34:1J 39:1J 40:2w=1;7N;1J 8:1J 33:1J 37:1J 38:2w=-1;7N;1J 27:1J 13:2w=0}q(2w!==I){m.4g(N,1y.30?\'5i\':\'5h\',m.4D);q(!m.8C)D J;q(e.65)e.65();L e.aY=1h;q(A){q(2w==0){A.28()}L{m.5k(A.S,2w)}D 1h}}D J},b1:B(19){m.20(m.1Q,m.3e(19,{2F:\'2F\'+m.4y++}))},7S:B(7C,5M){u C,2t=/^U-Y-([0-9]+)$/;C=7C;3T(C.3a){q(C.1j&&2t.16(C.1j))D C.1j.2i(2t,"$1");C=C.3a}q(!5M){C=7C;3T(C.3a){q(C.4c&&m.5W(C)){W(u S=0;S1)D J;q(!e.2j)e.2j=e.6p;u C=e.2j;3T(C.3a&&!(/U-(2D|3I|2Q|3q)/.16(C.1p))){C=C.3a}u A=m.3v(C);q(A&&(A.4z||!A.4e))D J;q(A&&e.R==\'7H\'){q(e.2j.7O)D J;u 2Z=C.1p.2Z(/U-(2D|3I|3q)/);q(2Z){m.2a={A:A,R:2Z[1],1f:A.x.H,K:A.x.G,18:A.y.H,M:A.y.G,8J:e.5Q,8F:e.5f};m.1R(N,\'6o\',m.8a);q(e.65)e.65();q(/U-(2D|2Q)-7s/.16(A.O.1p)){A.3d();m.7p=J}D 1h}L q(/U-2Q/.16(C.1p)&&m.2q!=A.S){A.3d();A.4a(\'1n\')}}L q(e.R==\'9t\'){m.4g(N,\'6o\',m.8a);q(m.2a){q(m.4i&&m.2a.R==\'2D\')m.2a.A.O.F.3L=m.4i;u 3f=m.2a.3f;q(!3f&&!m.7p&&!/(3I|3q)/.16(m.2a.R)){A.28()}L q(3f||(!3f&&m.8O)){m.2a.A.4a(\'1n\')}q(m.2a.A.2W)m.2a.A.2W.F.1O=\'24\';m.7p=1h;m.2a=I}L q(/U-2D-7s/.16(C.1p)){C.F.3L=m.4i}}D 1h},8a:B(e){q(!m.2a)D J;q(!e)e=1y.1Y;u a=m.2a,A=a.A;q(A.11){q(!A.2W)A.2W=m.14(\'1i\',I,{1d:\'22\',K:A.x.G+\'E\',M:A.y.G+\'E\',1f:A.x.cb+\'E\',18:A.y.cb+\'E\',1u:4,94:(m.2Y?\'bh\':\'24\'),1B:0.cD},A.Y,J);q(A.2W.F.1O==\'24\')A.2W.F.1O=\'\'}a.5q=e.5Q-a.8J;a.5r=e.5f-a.8F;u 6A=1r.cU(1r.8E(a.5q,2)+1r.8E(a.5r,2));q(!a.3f)a.3f=(a.R!=\'2D\'&&6A>0)||(6A>(m.cR||5));q(a.3f&&e.5Q>5&&e.5f>5){q(a.R==\'3q\')A.3q(a);L{A.7x(a.1f+a.5q,a.18+a.5r);q(a.R==\'2D\')A.O.F.3L=\'3I\'}}D 1h},8c:B(e){1m{q(!e)e=1y.1Y;u 67=/cW/i.16(e.R);q(!e.2j)e.2j=e.6p;q(!e.6l)e.6l=67?e.cZ:e.cY;u A=m.3v(e.2j);q(!A.4e)D;q(!A||!e.6l||m.3v(e.6l,J)==A||m.2a)D;W(u i=0;i=k.1N.3w+k.84){k.3Q=k.3Y;k.H=k.80=1;k.7Q();k.1N.5d[k.1a]=J;u 86=J;W(u i 3A k.1N.5d)q(k.1N.5d[i]!==J)86=1h;q(86){q(k.1N.83)k.1N.83.8v(k.2k)}D 1h}L{u n=t-k.84;k.80=n/k.1N.3w;k.H=k.1N.2g(n,0,1,k.1N.3w);k.3Q=k.3S+((k.3Y-k.3S)*k.H);k.7Q()}D J}};m.3e(m.1C,{3o:{1B:B(1C){m.Q(1C.2k,{1B:1C.3Q})},8z:B(1C){1m{q(1C.2k.F&&1C.2k.F[1C.1a]!=I)1C.2k.F[1C.1a]=1C.3Q+1C.3P;L 1C.2k[1C.1a]=1C.3Q}1l(e){}}}});m.4L=B(1x,2J){k.2J=2J;k.1x=1x;u v=m.26,5O;k.6C=m.1L&&m.26<7;q(!1x){q(2J)2J();D}m.5N();k.2m=m.14(\'2m\',{d7:0},{1q:\'1n\',1d:\'22\',d8:\'dc\',K:0},m.1S,J);u 7W=m.14(\'7W\',I,I,k.2m,1);k.29=[];W(u i=0;i<=8;i++){q(i%3==0)5O=m.14(\'5O\',I,{M:\'1H\'},7W,J);k.29[i]=m.14(\'29\',I,I,5O,J);u F=i!=4?{db:0,da:0}:{1d:\'3K\'};m.Q(k.29[i],F)}k.29[4].1p=1x+\' U-1o\';k.8P()};m.4L.54={8P:B(){u T=m.56+(m.d9||"cL/")+k.1x+".cE";u 98=m.4X&&m.26<8i?m.1S:I;k.2X=m.14(\'1v\',I,{1d:\'22\',18:\'-3R\'},98,J);u 36=k;k.2X.3H=B(){36.96()};k.2X.T=T},96:B(){u o=k.1s=k.2X.K/4,H=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1F={M:(2*o)+\'E\',K:(2*o)+\'E\'};W(u i=0;i<=8;i++){q(H[i]){q(k.6C){u w=(i==1||i==7)?\'2A%\':k.2X.K+\'E\';u 1i=m.14(\'1i\',I,{K:\'2A%\',M:\'2A%\',1d:\'3K\',1W:\'1n\'},k.29[i],J);m.14(\'1i\',I,{4C:"c6:c5.9M.c4(c8=c9, T=\'"+k.2X.T+"\')",1d:\'22\',K:w,M:k.2X.M+\'E\',1f:(H[i][0]*o)+\'E\',18:(H[i][1]*o)+\'E\'},1i,J)}L{m.Q(k.29[i],{94:\'6X(\'+k.2X.T+\') \'+(H[i][0]*o)+\'E \'+(H[i][1]*o)+\'E\'})}q(1y.30&&(i==3||i==5))m.14(\'1i\',I,1F,k.29[i],J);m.Q(k.29[i],1F)}}k.2X=I;q(m.3G[k.1x])m.3G[k.1x].5l();m.3G[k.1x]=k;q(k.2J)k.2J()},4B:B(H,1s,9a,3b,2g){u A=k.A,4A=A.Y.F,1s=1s||0,H=H||{x:A.x.H+1s,y:A.y.H+1s,w:A.x.1b(\'1K\')-2*1s,h:A.y.1b(\'1K\')-2*1s};q(9a)k.2m.F.1q=(H.h>=4*k.1s)?\'2l\':\'1n\';m.Q(k.2m,{1f:(H.x-k.1s)+\'E\',18:(H.y-k.1s)+\'E\',K:(H.w+2*k.1s)+\'E\'});H.w-=2*k.1s;H.h-=2*k.1s;m.Q(k.29[4],{K:H.w>=0?H.w+\'E\':0,M:H.h>=0?H.h+\'E\':0});q(k.6C)k.29[3].F.M=k.29[5].F.M=k.29[4].F.M},5l:B(9d){q(9d)k.2m.F.1q=\'1n\';L m.3j(k.2m)}};m.5t=B(A,1F){k.A=A;k.1F=1F;k.2H=1F==\'x\'?\'cd\':\'cc\';k.2C=k.2H.5x();k.4J=1F==\'x\'?\'ca\':\'c3\';k.6J=k.4J.5x();k.6P=1F==\'x\'?\'c2\':\'bV\';k.bU=k.6P.5x();k.1V=k.2U=0};m.5t.54={1b:B(S){8T(S){1J\'7R\':D k.1A+k.2s+(k.t-m.21[\'1s\'+k.2H])/2;1J\'1K\':D k.G+2*k.cb+k.1V+k.2U;1J\'4b\':D k.5E-k.3y-k.5F;1J\'6K\':D k.1b(\'4b\')-2*k.cb-k.1V-k.2U;1J\'4w\':D k.H-(k.A.1o?k.A.1o.1s:0);1J\'88\':D k.1b(\'1K\')+(k.A.1o?2*k.A.1o.1s:0);1J\'5u\':D k.1T?1r.5Y((k.G-k.1T)/2):0}},6v:B(){k.cb=(k.A.O[\'1s\'+k.2H]-k.t)/2;k.5F=m[\'6V\'+k.6P]},6y:B(){k.t=k.A.C[k.2C]?49(k.A.C[k.2C]):k.A.C[\'1s\'+k.2H];k.1A=k.A.1A[k.1F];k.2s=(k.A.C[\'1s\'+k.2H]-k.t)/2;q(k.1A==0||k.1A==-1){k.1A=(m.3k[k.2C]/2)+m.3k[\'3s\'+k.4J]}},6u:B(){u A=k.A;k.3X=\'1H\';k.H=k.1A-k.cb+k.2s;q(k.6N&&k.1F==\'x\')A.5X=1r.2L(A.5X||k.Z,A.6N*k.Z/A.y.Z);k.G=1r.2L(k.Z,A[\'7l\'+k.2H]||k.Z);k.2E=A.4I?1r.2L(A[\'2L\'+k.2H],k.Z):k.Z;q(A.2o&&A.2K){k.G=A[k.2C];k.1T=k.Z}q(k.1F==\'x\'&&m.4M)k.2E=A.3O;k.3y=m[\'6V\'+k.4J];k.3s=m.3k[\'3s\'+k.4J];k.5E=m.3k[k.2C]},7J:B(i){u A=k.A;q(A.2o&&(A.2K||m.4M)){k.1T=i;k.G=1r.7l(k.G,k.1T);A.O.F[k.6J]=k.1b(\'5u\')+\'E\'}L k.G=i;A.O.F[k.2C]=i+\'E\';A.Y.F[k.2C]=k.1b(\'1K\')+\'E\';q(A.1o)A.1o.4B();q(A.2W)A.2W.F[k.2C]=i+\'E\';q(k.1F==\'y\'&&A.4v&&A.V.F.M!=\'1H\')1m{A.4v.V.F.1W=\'1H\'}1l(e){}q(A.1Z){u d=A.2c;q(k.7a===1X)k.7a=A.1g[\'1s\'+k.2H]-d[\'1s\'+k.2H];d.F[k.2C]=(k.G-k.7a)+\'E\';q(k.1F==\'x\')A.3D.F.K=\'1H\';q(A.V)A.V.F[k.2C]=\'1H\'}q(k.1F==\'x\'&&A.1z)A.4m(J)},7j:B(i){k.H=i;k.A.Y.F[k.6J]=i+\'E\';q(k.A.1o)k.A.1o.4B()}};m.4S=B(a,1E,2O,2B){q(N.9r&&m.1L&&!m.6Z){m.1R(N,\'3p\',B(){1w m.4S(a,1E,2O,2B)});D}k.a=a;k.2O=2O;k.2B=2B||\'2D\';k.1Z=(2B==\'2Q\');k.2o=!k.1Z;m.6n=1h;k.1Q=[];m.5N();u S=k.S=m.P.1c;W(u i=0;i(k.x.1T||k.x.G)){k.9W();q(k.1Q.1c==1)k.4m()}}k.7M()}1l(e){k.7w(e)}},7d:B(4r,1H){u c=m.4d(4r,\'5H\',\'U-V\');q(/(11|3c)/.16(k.2f)){q(k.3i)c.F.K=k.3i+\'E\';q(k.3J)c.F.M=k.3J+\'E\'}},5S:B(){q(k.av)D;u A=k;k.V=m.4d(k.1g,\'5H\',\'U-V\');q(k.2f==\'11\'){k.4t();u 4n=m.2I.61(1);k.V.1G(4n);k.cn=k.1g.2e;q(!k.3i)k.3i=4n.2e;u 45=k.1g.1I-k.V.1I,h=k.3J||m.3k.M-45-m.3N-m.6f,3H=k.31==\'4K\'?\' 3H="q (m.P[\'+k.S+\']) m.P[\'+k.S+\'].4x()" \':\'\';k.V.2n+=\'<11 2z="m\'+(1w 5s()).59()+\'" cq="0" S="\'+k.S+\'" \'+\' F="K:\'+k.3i+\'E; M:\'+h+\'E" \'+3H+\' T="\'+k.T+\'" >\';k.4n=k.V.3x(\'1i\')[0];k.11=k.V.3x(\'11\')[0];q(k.31==\'4O\')k.6S()}q(k.2f==\'3c\'){k.V.1j=k.V.1j||\'m-cm-1j-\'+k.S;u a=k.7I;q(!a.1E)a.1E={};q(1t a.1E.aF==\'1X\')a.1E.aF=\'ci\';q(7D)7D.cj(k.T,k.V.1j,k.3i,k.3J,a.ck||\'7\',a.cC,a.al,a.1E,a.ay)}k.av=J},76:B(){q(k.11&&!k.3J){k.11.F.M=k.V.F.M=k.at()+\'E\'}k.1g.1G(m.2I);q(!k.x.Z)k.x.Z=k.1g.2e;k.y.Z=k.1g.1I;k.1g.aj(m.2I);q(m.1L&&k.au>49(k.1g.4u.M)){k.au=49(k.1g.4u.M)}m.Q(k.Y,{1d:\'22\',6z:\'0\'});m.Q(k.O,{K:k.x.t+\'E\',M:k.y.t+\'E\'})},at:B(){u h;1m{u 1U=k.4v=k.11.6r||k.11.52.N;u 2I=1U.14(\'1i\');2I.F.ar=\'aw\';1U.V.1G(2I);h=2I.6G;q(m.1L)h+=49(1U.V.4u.3N)+49(1U.V.4u.6f)-1}1l(e){h=bY}D h},6S:B(){u 4k=k.1g.2e-k.4n.2e;m.3j(k.4n);q(4k<0)4k=0;u 45=k.1g.1I-k.11.1I;q(k.4v&&!k.3J&&!k.M&&k.y.G==k.y.Z)1m{k.4v.V.F.1W=\'1n\'}1l(e){}m.Q(k.11,{K:1r.7u(k.x.G-4k)+\'E\',M:1r.7u(k.y.G-45)+\'E\'});m.Q(k.V,{K:k.11.F.K,M:k.11.F.M});k.4p=k.11;k.2c=k.4p},aq:B(){k.7d(k.1g);q(k.2f==\'3c\'&&k.31==\'4K\')k.5S();q(k.x.G1D.1I){1D.F.K=(49(1D.F.K)+5C)+\'E\'}k.4p=1D;k.2c=k.4p}q(k.11&&k.31==\'4K\')k.6S();q(!k.4p&&k.y.Gk.2c.3a.1I){4T("1m { m.P["+k.S+"].2c.F.1W = \'1H\'; } 1l(e) {}",m.7c)}},3X:B(p,3W){u bW,bS=p.2j,1F=p==k.x?\'x\':\'y\';u 6R=1h;u 3V=p.A.4I;p.H=1r.5Y(p.H-((p.1b(\'1K\')-p.t)/2));q(p.Hp.3s+p.5E-p.5F){q(!3W&&6R&&3V){p.G=1r.2L(p.G,p.1b(1F==\'y\'?\'4b\':\'6K\'))}L q(p.1b(\'1K\')2d){ 2r=2N*2d;q(2rk.4s&&x.G>k.3O&&y.1b(\'1K\')>y.1b(\'4b\')){y.G-=10;q(2d)x.G=y.G*2d;k.4m(0,1);2V=J}}D 2V},7M:B(){u x=k.x,y=k.y;k.4a(\'1n\');k.7z(1,{Y:{K:x.1b(\'1K\'),M:y.1b(\'1K\'),1f:x.H,18:y.H},O:{1f:x.1V+x.1b(\'5u\'),18:y.1V+y.1b(\'5u\'),K:x.1T||x.G,M:y.1T||y.G}},m.7c)},7z:B(2y,2h,3b){q(k.1o&&!k.3g){q(2y)k.1o.4B();L k.1o.5l((k.1Z&&k.48))}q(!2y)k.9V();u A=k,x=A.x,y=A.y,2g=k.2g;q(!2y)2g=k.an||2g;u 4O=2y?B(){q(A.1o)A.1o.2m.F.1q="2l";4T(B(){A.aC()},50)}:B(){A.7A()};q(2y)m.Q(k.Y,{K:x.t+\'E\',M:y.t+\'E\'});q(2y&&k.1Z){m.Q(k.Y,{1f:(x.1A-x.cb+x.2s)+\'E\',18:(y.1A-y.cb+y.2s)+\'E\'})}q(k.am){m.Q(k.Y,{1B:2y?0:1});m.3e(2h.Y,{1B:2y})}m.41(k.Y,2h.Y,{3w:3b,2g:2g,3o:B(2R,2S){q(A.1o&&A.3g&&2S.1a==\'18\'){u 4G=2y?2S.H:1-2S.H;u H={w:x.t+(x.1b(\'1K\')-x.t)*4G,h:y.t+(y.1b(\'1K\')-y.t)*4G,x:x.1A+(x.H-x.1A)*4G,y:y.1A+(y.H-y.1A)*4G};A.1o.4B(H,0,1)}q(A.1Z){q(2S.1a==\'1f\')A.3D.F.1f=(x.H-2R)+\'E\';q(2S.1a==\'18\')A.3D.F.18=(y.H-2R)+\'E\'}}});m.41(k.O,2h.O,3b,2g,4O);q(2y){k.Y.F.1q=\'2l\';k.O.F.1q=\'2l\';q(k.1Z)k.1g.F.1q=\'2l\';k.a.1p+=\' U-9T-9O\'}},aC:B(){k.4e=J;k.3d();q(k.1Z&&k.31==\'4O\')k.5S();q(k.11){1m{u A=k,1U=k.11.6r||k.11.52.N;m.1R(1U,\'7H\',B(){q(m.2q!=A.S)A.3d()})}1l(e){}q(m.1L&&1t k.4z!=\'ce\')k.11.F.K=(k.3i-1)+\'E\'}q(m.3B&&m.3B==k.a)m.3B=I;k.ax();u p=m.3k,6I=m.5R.x+p.5T,6D=m.5R.y+p.5U;k.6x=k.x.H<6I&&6Ik.x.1b(\'4w\')+k.x.1b(\'88\'));u 9p=(2T.y+2T.hk.y.1b(\'4w\')+k.y.1b(\'88\'));u 5c=m.7S(1k[i]);q(!9o&&!9p&&5c!=k.S){q(!23){1k[i].4N(\'1n-by\',\'[\'+k.S+\']\');1k[i].7q=1k[i].F[1a];1k[i].F[1a]=\'1n\'}L q(23.9v(\'[\'+k.S+\']\')==-1){1k[i].4N(\'1n-by\',23+\'[\'+k.S+\']\')}}L q((23==\'[\'+k.S+\']\'||m.2q==5c)&&5c!=k.S){1k[i].4N(\'1n-by\',\'\');1k[i].F[1a]=1k[i].7q||\'\'}L q(23&&23.9v(\'[\'+k.S+\']\')>-1){1k[i].4N(\'1n-by\',23.2i(\'[\'+k.S+\']\',\'\'))}}}}},3d:B(){k.Y.F.1u=m.4l+=2;W(u i=0;i=5.5){s=s.2i(1w 5P(\']*>\',\'aB\'),\'\').2i(1w 5P(\']*>.*?\',\'aB\'),\'\');q(k.11){u 1U=k.11.6r;q(!1U&&k.11.52)1U=k.11.52.N;q(!1U){u 36=k;4T(B(){36.4Y()},25);D}1U.ak();1U.bO(s);1U.28();1m{s=1U.6F(k.1j).2n}1l(e){1m{s=k.11.N.6F(k.1j).2n}1l(e){}}m.3j(k.11)}L{5I=/(]*>|<\\/V>)/ba;q(5I.16(s))s=s.az(5I)[m.2Y?1:2]}}m.4d(k.O,\'5H\',\'U-V\').2n=s;k.2J();W(u x 3A k)k[x]=I}};m.5z=m.1e;u b6=m.4S;q(m.1L&&1y==1y.18){(B(){1m{N.44.aW(\'1f\')}1l(e){4T(aE.aX,50);D}m.3p()})()}m.1R(N,\'b9\',m.3p);m.1R(1y,\'7o\',m.3p);m.1R(N,\'3p\',B(){q(m.5v){u F=m.14(\'F\',{R:\'aK/79\'},I,N.3x(\'aQ\')[0]),a2=N.5G==\'6M\';B 5B(6U,6T){q(m.1L&&(m.26<9||a2)){u 3r=N.a3[N.a3.1c-1];q(1t(3r.5B)=="6W")3r.5B(6U,6T)}L{F.1G(N.bb(6U+" {"+6T+"}"))}}B cT(1a){D\'cS( ( ( cV = N.44.\'+1a+\' ? N.44.\'+1a+\' : N.V.\'+1a+\' ) ) + \\\'E\\\' );\'}q(m.5v)5B(\'.U 1v\',\'3L: 6X(\'+m.56+m.5v+\'), 5w !d0;\')}});m.1R(1y,\'3q\',B(){m.5y()});m.1R(N,\'6o\',B(e){m.5R={x:e.5Q,y:e.5f}});m.1R(N,\'7H\',m.7K);m.1R(N,\'9t\',m.7K);m.1R(N,\'3p\',m.4Z);m.1R(1y,\'7o\',m.9u);m.1R(1y,\'7o\',m.af)}',62,827,'||||||||||||||||||||this||hs||||if||||var||||||exp|function|el|return|px|style|size|pos|null|true|width|else|height|document|content|expanders|setStyles|type|key|src|highslide|body|for||wrapper|full||iframe|||createElement||test||top|overlay|prop|get|length|position|lang|left|innerContent|false|div|id|els|catch|try|hidden|outline|className|visibility|Math|offset|typeof|zIndex|img|new|outlineType|window|overlayBox|tpos|opacity|fx|node|params|dim|appendChild|auto|offsetHeight|case|wsize|ie|next|options|display|arr|overlays|addEventListener|container|imgSize|doc|p1|overflow|undefined|event|isHtml|push|loading|absolute|hiddenBy|none||uaVersion||close|td|dragArgs|xhr|scrollerDiv|ratio|offsetWidth|objectType|easing|to|replace|target|elem|visible|table|innerHTML|isImage|span|focusKey|xSize|tb|re|title|href|op|ajax|up|name|100|contentType|wh|image|minSize|hsId|right|ucwh|clearing|onLoad|useBox|min|onclick|ySize|custom|opt|html|val|args|elPos|p2|changed|releaseMask|graphic|ieLt9|match|opera|objectLoadTime||||func|pThis||||parentNode|dur|swf|focus|extend|hasDragged|outlineWhileAnimating|attribs|objectWidth|discardElement|page|styles|groups|class|step|ready|resize|last|scroll|timers|li|getExpander|duration|getElementsByTagName|marginMin|getNode|in|upcoming|sleeping|mediumContent|bottom|ieLt7|pendingOutlines|onload|move|objectHeight|relative|cursor|clone|marginTop|minWidth|unit|now|9999px|start|while|getParam|allowReduce|moveOnly|justify|end|images||animate|number|Id|documentElement|hDiff|navigator|cNode|preserveContent|parseInt|doShowHide|fitsize|tagName|getElementByClass|isExpanded|blurExp|removeEventListener|slideshowGroup|styleRestoreCursor|marginLeft|wDiff|zIndexCounter|sizeOverlayBox|ruler|cacheBindings|scrollingContent|htmls|parent|minHeight|showLoading|currentStyle|iDoc|opos|contentLoaded|idCounter|isClosing|stl|setPosition|filter|keyHandler|restoreCursor|all|fac|block|allowSizeReduction|uclt|before|Outline|padToMinWidth|setAttribute|after|preloadTheseImages|on|param|Expander|setTimeout|above|getParams|createOverlay|safari|loadHTML|getAnchors||cache|contentWindow|expand|prototype|matches|graphicsDir|mask|iebody|getTime|showHideElements|preloadTheseAjax|wrapperKey|curAnim|gotoEnd|clientY|topmostKey|keydown|keypress|Ajax|previousOrNext|destroy|getSrc|previous|self|positionOverlay|dX|dY|Date|Dimension|imgPad|expandCursor|pointer|toLowerCase|getPageSize|langDefaults|allowHeightReduction|addRule|kdeBugCorr|allowWidthReduction|clientSize|marginMax|compatMode|DIV|regBody|cachedGets|anchors|pre|expOnly|init|tr|RegExp|clientX|mouse|writeExtendedContent|scrollLeft|scrollTop|userAgent|isHsAnchor|maxWidth|round|hideOnMouseOut|overlayId|cloneNode|offY|tId|offX|preventDefault|heading|over|preloadFullImage|fullExpandLabel|below|thumbsUserSetId|ypos|sg|onLoadStarted|marginBottom|os|onReady|maincontent|250|xpos|relatedTarget|marginRight|continuePreloading|mousemove|srcElement|middle|contentDocument|overrides|parseFloat|calcExpanded|calcBorders|cancelLoading|mouseIsOver|calcThumb|padding|distance|getAdjacentAnchor|hasAlphaImageLoader|mY|cur|getElementById|offsetTop|center|mX|lt|maxsize|arrow|BackCompat|maxHeight|thumbnailId|ucrb|Click|hasMovedMin|correctIframeSize|dec|sel|margin|object|url|fitOverlayBox|isReady||numberOfImagesToPreload|ie6|panel|doWrapper||htmlGetSize|getInline|wrapperClassName|css|sizeDiff|dragByHeading|expandDuration|setObjContainerSize|credits|contentId|garbageBin|restoreTitle|doFullExpand|setPos|clones|max|allowMultipleInstances|topZ|load|hasFocused|origProp|preloadAjaxElement|blur|getCacheBinding|abs|onError|error|moveTo|run|changeSize|afterClose|openerTagNames|element|swfobject|getSelfRendered|adj|resizeTo|mousedown|swfOptions|setSize|mouseClickHandler|string|show|break|form|Create|update|loadingPos|getWrapperKey|location|fade|geckoMac|tbody|types|getElementContent|Text|state|connectOutline|cacheAjax|complete|startTime|getPosition|done|defaultView|osize|cssDirection|dragHandler|direction|wrapperMouseHandler|pageOrigin|Next|JS|Highslide|Play|525|Close|Pause|spacebar|slideshow|Previous|thumb|offsetParent|from|timerId|orig|transit|updateAnchors|call|replaceLang|offsetLeft|pageXOffset|_default|skin|contentWrapper|enableKeyListener|htmlExpand|pow|clickY|loadingTitle|ltr|detachEvent|clickX|loadingText|focusTopmost|easeInQuad|loadingOpacity|hasHtmlExpanders|preloadGraphic|clientWidth|moveText|moveTitle|switch|closeTitle|closeText|nextText|nextTitle|and|200|previousTitle|previousText|ul|resizeTitle|background|nopad|onGraphicLoad|alpha|appendTo||vis|tag|headingOverlay|hide|captionOverlay|rv|Move|preloadNext|getPropertyValue|getAttribute|getComputedStyle|hideIframes|hideSelects|XMLHttpRequest|clearsX|clearsY|hand|readyState|focusTitle|mouseup|preloadImages|indexOf|Overlay|addOverlay|creditsHref|ie6SSL|getAnchorIndex|current|toString|cachedGet|creditsTarget|creditsTitle|_|nextSibling|Eval|setRequestHeader|creditsPosition|XMLHTTP|Microsoft|showOverlays|anchor|doPanels|genOverlayBox|gotOverlays|sleep|active|fullExpandOpacity|destroyOverlays|createFullExpand|javascript|fullExpandTitle|fullExpandPosition|writeCredits|showCredits|backCompat|styleSheets|destroyObject|htmlPrepareClose|ActiveXObject|restoreDuration|awake|offsetX|getOverlays|reOrder|rightpanel|leftpanel|offsetY|preloadAjax|creditsText|KDE|vendor|removeChild|open|flashvars|fadeInOut|easingClose|tmpMin|border|htmlSizeOperations|clear||getIframePageHeight|newHeight|hasExtendedContent|both|prepareNextOutline|attributes|split|correctRatio|gi|afterExpand|script|arguments|wmode|captionEval|Use|keyCode|button|text|drag|headingId|graphics|_self|shadow|HEAD|click|drop|keys|header|htmlE|doScroll|callee|returnValue|outlineStartOffset|footer|registerOverlay|http|headingText|com|captionId|HsExpander|xpand|fullExpandText|DOMContentLoaded|ig|createTextNode|captionText|forceAjaxReload|urlencoded|pageYOffset|send|white|Gecko|Type|application|www|innerHeight|link|toUpperCase|removeAttribute|responseText|blank|about|1001|clientHeight|innerWidth|Content|Macintosh||dummy|GET|zoomout|maincontentText|maincontentId|Msxml2|onreadystatechange|zoomin|maincontentEval|oPos|it|ra|Safari|Trident|With|write|Requested|headingEval|pauseTitle|tgt|actual|rb|Bottom|tgtArr|Expand|300|nodeName|insertBefore|front|Right|Top|AlphaImageLoader|DXImageTransform|progid|Powered|sizingMethod|scale|Left||Height|Width|boolean|allowSimultaneousLoading|onmouseover|flushImgSize|transparent|embedSWF|version|htmlCreate|flash|newWidth|Loading|static|frameborder|oncontextmenu|blockRightClick|Line|alert|debug|onmouseout|lineNumber|message|imageCreate|cancel|bring|expressInstallSwfurl|01|png|paddingTop|200px|https|protocol|1px|linearTween|outlines|pauseText|StopPlay|removeSWF|caption|useOnHtml|dragSensitivity|expression|fix|sqrt|ignoreMe|mouseover|attachEvent|toElement|fromElement|important|default|playTitle|Go|eval|SELECT|the|cellSpacing|borderCollapse|outlinesDir|fontSize|lineHeight|collapse|playText|IFRAME|clearInterval|homepage|splice|esc|Resize|setInterval'.split('|'),0,{})) diff --git a/gal2/highslide/highslide.config.js b/gal2/highslide/highslide.config.js deleted file mode 100644 index 1a8408d..0000000 --- a/gal2/highslide/highslide.config.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Site-specific configuration settings for Highslide JS - */ - -hs.showCredits = true; -hs.creditsPosition = 'top right'; -hs.outlineType = 'rounded-black'; -hs.fadeInOut = false; -hs.align = 'center'; -hs.useBox = true; -hs.width = 1080; -hs.height = 840; -// hs.allowMultipleInstances = false; -hs.captionEval = 'this.thumb.title'; -hs.captionOverlay = { position: "top" }; -hs.expandDuration = 100; -hs.restoreDuration = 100; -hs.dimmingDuration = 100; -hs.dimmingOpacity = 0.8; -hs.transitionDuration = 100; -hs.thumbnailId = 'thumb1'; -hs.numberPosition = 'caption'; -hs.transitions = ['expand', 'crossfade']; - -hs.addSlideshow({ - interval: 5000, - repeat: false, - useControls: true, - fixedControls: 'fit', - overlayOptions: { - className: 'controls-in-heading', - opacity: 0.6, - position: 'top center', - hideOnMouseOut: true - }, - thumbstrip: { - mode: 'horizontal', - position: 'below', - relativeTo: 'expander' - } - -}); diff --git a/gal2/highslide/highslide.css b/gal2/highslide/highslide.css deleted file mode 100644 index 5494b6a..0000000 --- a/gal2/highslide/highslide.css +++ /dev/null @@ -1,933 +0,0 @@ -/** -* @file: highslide.css -* @version: 4.1.13 -*/ -.highslide-container div { - font-family: Verdana, Helvetica; - font-size: 10pt; -} -.highslide-container table { - background: none; - table-layout: auto; -} -.highslide { - outline: none; - text-decoration: none; -} -.highslide img { - border: 2px solid silver; -} -.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; -} -.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; - margin: 2px; - padding: 0; - 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; - list-style: none; -} -.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; -} -.mobile .highslide-html { - border: 1px solid silver; -} -.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: 5; - 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; - width: 90%; - margin: 1px 0 1px 5px; - 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%; - direction: ltr; -} -.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-overlay { - overflow: hidden !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 { - width: 60px; /* t=5481 */ -} -.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; -} - -/*********************/ -/* Customized styles */ -/*********************/ - -.highslide-wrapper, .highslide-outline { - background: #111111; -} -.highslide img { - border: 1px solid #D0D0D0; -} -.highslide:hover img { - border-color: #A0A0A0; -} -.highslide-active-anchor img { - visibility: visible; - border-color: #808080 !important; -} -.highslide-image { - border: 2px solid #111111; -} -.highslide-caption { - color: #CCCCCC; - padding: 2px; -} -.highslide-loading { - color: black; - border: 1px solid black; - background-color: white; - background-image: url(graphics/loader.white.gif); -} -.highslide-controls { - position: static !important; - margin: 0; - width: 120px !important; -} -.highslide-gallery ul li { - width: 130px; - height: 110px; - border: 1px solid #505; - margin: 2px; -} -.highslide-dimming { - background: black; -} diff --git a/gal2/highslide/highslide.js b/gal2/highslide/highslide.js deleted file mode 100644 index 9c543a0..0000000 --- a/gal2/highslide/highslide.js +++ /dev/null @@ -1,1891 +0,0 @@ -/** - * Name: Highslide JS - * Version: 4.1.13 (2011-10-06) - * Config: default - * Author: Torstein Hønsi - * Support: www.highslide.com/support - * License: www.highslide.com/#license - */ -if (!hs) { 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', - 'pageOrigin', - '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: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : - parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), -ie : (document.all && !window.opera), -//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant? -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.ieLt9 && 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 (el.style[prop]) { - return el.style[prop]; - } else 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, - ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined'); - - var width = ieLt9 ? iebody.clientWidth : - (d.documentElement.clientWidth || self.innerWidth), - height = ieLt9 ? iebody.clientHeight : self.innerHeight; - hs.page = { - width: width, - height: height, - scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset, - scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset - }; - return hs.page; -}, - -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 || hs.getExpander(); - exp = last; - if (hs.upcoming) return false; - else hs.last = last; - hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); - 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) return hs.transit(exp.getAdjacentAnchor(op), 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 (!e.relatedTarget) 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.ieLt7 = hs.ie && hs.uaVersion < 7; - hs.ieLt9 = hs.ie && hs.uaVersion < 9; - - hs.getPageSize(); - 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.ieLt7 && 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){ - try { - 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; - } catch (e) {} - } - } -}); - -hs.Outline = function (outlineType, onLoad) { - this.onLoad = onLoad; - this.outlineType = outlineType; - var v = hs.uaVersion, tr; - - this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 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.uaVersion < 525 ? 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 == 0 || 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; - - if (this.maxHeight && this.dim == 'x') - exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); - - 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 = this.pageOrigin || 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) { - if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); - else 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.uaVersion < 525) 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 = Math.min(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; - } - changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); - 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, changed) { - 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); - changed = true; - } - } - return changed; -}, - -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']; - return (as && 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) { - this[type] = hs.getNode(this.a['_'+ type + 'Id']); - if (!this[type]) { - var next = this.a.nextSibling; - while (next && !hs.isHsAnchor(next)) { - if ((new RegExp('highslide-'+ type)).test(next.className || null)) { - if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; - this[type] = hs.getNode(next.id); - 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.ieLt7 ? '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.ieLt7 && 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); - this.wrapper.style.height = this.y.get('wsize') +'px'; -}, - -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 : 'auto' - }, - 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.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, - ySize = this.y.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; - - var ypos = this.y.pos - (this.y.size - ySize) / 2; - if (ypos < hs.marginTop) ypos = hs.marginTop; - - this.moveTo(xpos, ypos); - 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(); -} - -}; -hs.langDefaults = hs.lang; -// history -var HsExpander = hs.Expander; -if (hs.ie && window == window.top) { - (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); - -// set handlers -hs.addEventListener(document, 'ready', function() { - if (hs.expandCursor) { - var style = hs.createElement('style', { type: 'text/css' }, null, - document.getElementsByTagName('HEAD')[0]), - backCompat = document.compatMode == 'BackCompat'; - - - function addRule(sel, dec) { - if (hs.ie && (hs.uaVersion < 9 || backCompat)) { - var last = document.styleSheets[document.styleSheets.length - 1]; - if (typeof(last.addRule) == "object") last.addRule(sel, dec); - } else { - style.appendChild(document.createTextNode(sel + " {" + dec + "}")); - } - } - function fix(prop) { - return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + - ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; - } - if (hs.expandCursor) addRule ('.highslide img', - 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); - } -}); -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); -} diff --git a/gal2/highslide/highslide.packed.js b/gal2/highslide/highslide.packed.js deleted file mode 100644 index 42837a2..0000000 --- a/gal2/highslide/highslide.packed.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Name: Highslide JS - * Version: 4.1.13 (2011-10-06) - * Config: default +packed - * Author: Torstein Hønsi - * Support: www.highslide.com/support - * License: www.highslide.com/#license - */ -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}('q(!m){u m={1F:{8l:\'6P\',6K:\'93...\',6L:\'6b 1L 92\',7T:\'6b 1L 91 1L 8Z\',88:\'90 1L 94 I (f)\',8e:\'95 2t 6I 6F\',8b:\'9a 1L 98 6I 6F 97\',5V:\'6b 1L 2h 1Y, 96 6O 8Y 1L 3c. 8X 8Q 8P S 1A 6O 79.\'},47:\'1c/8O/\',4l:\'8M.6A\',3S:\'8N.6A\',84:5c,7y:5c,43:15,7J:15,48:15,7N:15,3L:8R,7g:0.75,8j:G,5U:5,2R:2,8S:3,3V:1a,7z:\'2S 2o\',7O:1,7W:G,8x:\'8W://1c.8V/\',8o:\'8U\',7e:G,5t:[\'a\'],68:G,3Y:6W,3K:6W,3N:G,1h:\'9b-9c\',3U:[],5j:G,N:[],5i:[\'3N\',\'2d\',\'1h\',\'2R\',\'9u\',\'9t\',\'9s\',\'6R\',\'9q\',\'9r\',\'9v\',\'6X\',\'89\',\'68\',\'M\',\'16\',\'60\',\'3Y\',\'3K\',\'4X\',\'5q\',\'8h\',\'3b\',\'1J\',\'85\',\'86\',\'1l\'],1v:[],3F:0,9w:{x:[\'8n\',\'18\',\'6c\',\'2o\',\'7x\'],y:[\'42\',\'W\',\'6a\',\'2S\',\'4r\']},4B:{},6X:{},6R:{},2A:[],2Q:{},6m:{},4a:[],1R:/9A\\/4\\.0/.14(3W.4V)?8:6g((3W.4V.58().2X(/.+(?:6V|9z|9y|1P)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1P:(L.3R&&!1n.2r),4D:/9x/.14(3W.4V),8y:/9p.+6V:1\\.[0-8].+9o/.14(3W.4V),$:A(1t){q(1t)C L.9h(1t)},2e:A(2c,2v){2c[2c.X]=2v},Z:A(6S,3a,2F,6f,6U){u B=L.Z(6S);q(3a)m.2q(B,3a);q(6U)m.T(B,{9f:0,9d:\'3r\',5h:0});q(2F)m.T(B,2F);q(6f)6f.2g(B);C B},2q:A(B,3a){S(u x 3v 3a)B[x]=3a[x];C B},T:A(B,2F){S(u x 3v 2F){q(m.2Y&&x==\'1o\'){q(2F[x]>0.99)B.F.9e(\'3P\');K B.F.3P=\'7k(1o=\'+(2F[x]*1V)+\')\'}K B.F[x]=2F[x]}},3p:A(B,Q,25){u 2O,3h,2M;q(1m 25!=\'5I\'||25===H){u 2y=87;25={2Z:2y[2],1J:2y[3],5y:2y[4]}}q(1m 25.2Z!=\'3g\')25.2Z=5c;25.1J=1d[25.1J]||1d.6Z;25.4c=m.2q({},Q);S(u 2b 3v Q){u e=1S m.1k(B,25,2b);2O=6g(m.5s(B,2b))||0;3h=6g(Q[2b]);2M=2b!=\'1o\'?\'D\':\'\';e.2z(2O,3h,2M)}},5s:A(B,Q){q(B.F[Q]){C B.F[Q]}K q(L.63){C L.63.8B(B,H).8s(Q)}K{q(Q==\'1o\')Q=\'3P\';u 2v=B.8L[Q.31(/\\-(\\w)/g,A(a,b){C b.9j()})];q(Q==\'3P\')2v=2v.31(/7k\\(1o=([0-9]+)\\)/,A(a,b){C b/1V});C 2v===\'\'?1:2v}},4N:A(){u d=L,w=1n,3D=d.5a&&d.5a!=\'5K\'?d.3i:d.4J,2Y=m.1P&&(m.1R<9||1m 71==\'1Z\');u M=2Y?3D.7j:(d.3i.7j||4H.9n),16=2Y?3D.9m:4H.9l;m.2J={M:M,16:16,4w:2Y?3D.4w:71,4y:2Y?3D.4y:9k};C m.2J},62:A(B){u p={x:B.7n,y:B.7s};3m(B.7m){B=B.7m;p.x+=B.7n;p.y+=B.7s;q(B!=L.4J&&B!=L.3i){p.x-=B.4w;p.y-=B.4y}}C p},4b:A(a,21,2z,J){q(!a)a=m.Z(\'a\',H,{3q:\'3r\'},m.20);q(1m a.3E==\'A\')C 21;1z{1S m.46(a,21,2z);C 1a}1C(e){C G}},7a:A(){u 5X=0,54=-1,N=m.N,z,1p;S(u i=0;i5X){5X=1p;54=i}}}q(54==-1)m.2u=-1;K N[54].3k()},5r:A(a,3J){a.3E=a.3x;u p=a.3E?a.3E():H;a.3E=H;C(p&&1m p[3J]!=\'1Z\')?p[3J]:(1m m[3J]!=\'1Z\'?m[3J]:H)},5l:A(a){u 1l=m.5r(a,\'1l\');q(1l)C 1l;C a.3y},3B:A(1t){u 4s=m.$(1t),2U=m.6m[1t],a={};q(!4s&&!2U)C H;q(!2U){2U=4s.7f(G);2U.1t=\'\';m.6m[1t]=2U;C 4s}K{C 2U.7f(G)}},3t:A(d){q(d)m.5k.2g(d);m.5k.3G=\'\'},74:A(66,z){u 2G=z||m.2C();z=2G;q(m.2W)C 1a;K m.2G=2G;m.3d(L,1n.2r?\'4R\':\'4T\',m.3H);1z{m.2W=66;66.3x()}1C(e){m.2G=m.2W=H}1z{z.2h()}1C(e){}C 1a},4e:A(B,1W){u z=m.2C(B);q(z)C m.74(z.5m(1W),z);K C 1a},79:A(B){C m.4e(B,-1)},1A:A(B){C m.4e(B,1)},3H:A(e){q(!e)e=1n.1G;q(!e.1M)e.1M=e.6x;q(1m e.1M.7c!=\'1Z\')C G;u z=m.2C();u 1W=H;7u(e.8F){1q 70:q(z)z.5M();C G;1q 32:1q 34:1q 39:1q 40:1W=1;6r;1q 8:1q 33:1q 37:1q 38:1W=-1;6r;1q 27:1q 13:1W=0}q(1W!==H){m.3d(L,1n.2r?\'4R\':\'4T\',m.3H);q(!m.7e)C G;q(e.4F)e.4F();K e.8E=1a;q(z){q(1W==0){z.2h()}K{m.4e(z.R,1W)}C 1a}}C G},8G:A(O){m.2e(m.1v,m.2q(O,{2a:\'2a\'+m.3F++}))},65:A(6l,4u){u B,30=/^1c-V-([0-9]+)$/;B=6l;3m(B.2V){q(B.1t&&30.14(B.1t))C B.1t.31(30,"$1");B=B.2V}q(!4u){B=6l;3m(B.2V){q(B.4g&&m.4E(B)){S(u R=0;R1)C G;q(!e.1M)e.1M=e.6x;u B=e.1M;3m(B.2V&&!(/1c-(1Y|3c|4Z|2T)/.14(B.1g))){B=B.2V}u z=m.2C(B);q(z&&(z.6k||!z.3C))C G;q(z&&e.J==\'7o\'){q(e.1M.7c)C G;u 2X=B.1g.2X(/1c-(1Y|3c|2T)/);q(2X){m.1U={z:z,J:2X[1],18:z.x.E,M:z.x.I,W:z.y.E,16:z.y.I,72:e.4z,76:e.4o};m.1D(L,\'6w\',m.6D);q(e.4F)e.4F();q(/1c-(1Y|4Z)-5W/.14(z.11.1g)){z.3k();m.6B=G}C 1a}}K q(e.J==\'7i\'){m.3d(L,\'6w\',m.6D);q(m.1U){q(m.3e&&m.1U.J==\'1Y\')m.1U.z.11.F.2N=m.3e;u 2E=m.1U.2E;q(!2E&&!m.6B&&!/(3c|2T)/.14(m.1U.J)){z.2h()}K q(2E||(!2E&&m.8C)){m.1U.z.45(\'1i\')}m.6B=1a;m.1U=H}K q(/1c-1Y-5W/.14(B.1g)){B.F.2N=m.3e}}C 1a},6D:A(e){q(!m.1U)C G;q(!e)e=1n.1G;u a=m.1U,z=a.z;a.5b=e.4z-a.72;a.6o=e.4o-a.76;u 6n=1d.a7(1d.7q(a.5b,2)+1d.7q(a.6o,2));q(!a.2E)a.2E=(a.J!=\'1Y\'&&6n>0)||(6n>(m.al||5));q(a.2E&&e.4z>5&&e.4o>5){q(a.J==\'2T\')z.2T(a);K{z.5v(a.18+a.5b,a.W+a.6o);q(a.J==\'1Y\')z.11.F.2N=\'3c\'}}C 1a},8g:A(e){1z{q(!e)e=1n.1G;u 4C=/ao/i.14(e.J);q(!e.1M)e.1M=e.6x;q(!e.4v)e.4v=4C?e.an:e.9C;u z=m.2C(e.1M);q(!z.3C)C;q(!z||!e.4v||m.2C(e.4v,G)==z||m.1U)C;S(u i=0;i=k.1w.2Z+k.5x){k.2I=k.3h;k.E=k.5E=1;k.5C();k.1w.4c[k.Q]=G;u 5z=G;S(u i 3v k.1w.4c)q(k.1w.4c[i]!==G)5z=1a;q(5z){q(k.1w.5y)k.1w.5y.77(k.1Q)}C 1a}K{u n=t-k.5x;k.5E=n/k.1w.2Z;k.E=k.1w.1J(n,0,1,k.1w.2Z);k.2I=k.2O+((k.3h-k.2O)*k.E);k.5C()}C G}};m.2q(m.1k,{2x:{1o:A(1k){m.T(1k.1Q,{1o:1k.2I})},7r:A(1k){1z{q(1k.1Q.F&&1k.1Q.F[1k.Q]!=H)1k.1Q.F[1k.Q]=1k.2I+1k.2M;K 1k.1Q[1k.Q]=1k.2I}1C(e){}}}});m.41=A(1h,2P){k.2P=2P;k.1h=1h;u v=m.1R,4Y;k.5J=m.1P&&m.1R<7;q(!1h){q(2P)2P();C}m.6y();k.28=m.Z(\'28\',{9V:0},{1b:\'1i\',1e:\'29\',9X:\'9Y\',M:0},m.20,G);u 5R=m.Z(\'5R\',H,H,k.28,1);k.1H=[];S(u i=0;i<=8;i++){q(i%3==0)4Y=m.Z(\'4Y\',H,{16:\'2l\'},5R,G);k.1H[i]=m.Z(\'1H\',H,H,4Y,G);u F=i!=4?{9Z:0,aF:0}:{1e:\'6j\'};m.T(k.1H[i],F)}k.1H[4].1g=1h+\' 1c-19\';k.7t()};m.41.53={7t:A(){u 1l=m.47+(m.9K||"9O/")+k.1h+".9N";u 6T=m.4D&&m.1R<7v?m.20:H;k.2k=m.Z(\'1f\',H,{1e:\'29\',W:\'-3X\'},6T,G);u 6E=k;k.2k.4S=A(){6E.6N()};k.2k.1l=1l},6N:A(){u o=k.1j=k.2k.M/4,E=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1x={16:(2*o)+\'D\',M:(2*o)+\'D\'};S(u i=0;i<=8;i++){q(E[i]){q(k.5J){u w=(i==1||i==7)?\'1V%\':k.2k.M+\'D\';u 1O=m.Z(\'1O\',H,{M:\'1V%\',16:\'1V%\',1e:\'6j\',2L:\'1i\'},k.1H[i],G);m.Z(\'1O\',H,{3P:"a0:9U.9W.a1(a8=9I, 1l=\'"+k.2k.1l+"\')",1e:\'29\',M:w,16:k.2k.16+\'D\',18:(E[i][0]*o)+\'D\',W:(E[i][1]*o)+\'D\'},1O,G)}K{m.T(k.1H[i],{9J:\'5T(\'+k.2k.1l+\') \'+(E[i][0]*o)+\'D \'+(E[i][1]*o)+\'D\'})}q(1n.2r&&(i==3||i==5))m.Z(\'1O\',H,1x,k.1H[i],G);m.T(k.1H[i],1x)}}k.2k=H;q(m.2Q[k.1h])m.2Q[k.1h].4q();m.2Q[k.1h]=k;q(k.2P)k.2P()},3A:A(E,1j,6H,2p,1J){u z=k.z,9E=z.V.F,1j=1j||0,E=E||{x:z.x.E+1j,y:z.y.E+1j,w:z.x.P(\'1u\')-2*1j,h:z.y.P(\'1u\')-2*1j};q(6H)k.28.F.1b=(E.h>=4*k.1j)?\'1X\':\'1i\';m.T(k.28,{18:(E.x-k.1j)+\'D\',W:(E.y-k.1j)+\'D\',M:(E.w+2*k.1j)+\'D\'});E.w-=2*k.1j;E.h-=2*k.1j;m.T(k.1H[4],{M:E.w>=0?E.w+\'D\':0,16:E.h>=0?E.h+\'D\':0});q(k.5J)k.1H[3].F.16=k.1H[5].F.16=k.1H[4].F.16},4q:A(6Y){q(6Y)k.28.F.1b=\'1i\';K m.3t(k.28)}};m.4W=A(z,1x){k.z=z;k.1x=1x;k.2D=1x==\'x\'?\'ax\':\'av\';k.2w=k.2D.58();k.3O=1x==\'x\'?\'ar\':\'au\';k.5o=k.3O.58();k.5f=1x==\'x\'?\'az\':\'aA\';k.aG=k.5f.58();k.1B=k.2f=0};m.4W.53={P:A(R){7u(R){1q\'5O\':C k.1s+k.2j+(k.t-m.1E[\'1j\'+k.2D])/2;1q\'1u\':C k.I+2*k.Y+k.1B+k.2f;1q\'3o\':C k.55-k.2K-k.4I;1q\'5G\':C k.P(\'3o\')-2*k.Y-k.1B-k.2f;1q\'3Q\':C k.E-(k.z.19?k.z.19.1j:0);1q\'64\':C k.P(\'1u\')+(k.z.19?2*k.z.19.1j:0);1q\'4h\':C k.1y?1d.56((k.I-k.1y)/2):0}},5w:A(){k.Y=(k.z.11[\'1j\'+k.2D]-k.t)/2;k.4I=m[\'5h\'+k.5f]},5g:A(){k.t=k.z.B[k.2w]?aC(k.z.B[k.2w]):k.z.B[\'1j\'+k.2D];k.1s=k.z.1s[k.1x];k.2j=(k.z.B[\'1j\'+k.2D]-k.t)/2;q(k.1s==0||k.1s==-1){k.1s=(m.2J[k.2w]/2)+m.2J[\'2B\'+k.3O]}},5B:A(){u z=k.z;k.3n=\'2l\';k.E=k.1s-k.Y+k.2j;q(k.5q&&k.1x==\'x\')z.4X=1d.22(z.4X||k.U,z.5q*k.U/z.y.U);k.I=1d.22(k.U,z[\'67\'+k.2D]||k.U);k.1T=z.3N?1d.22(z[\'22\'+k.2D],k.U):k.U;q(z.3f&&z.2d){k.I=z[k.2w];k.1y=k.U}q(k.1x==\'x\'&&m.3V)k.1T=z.3Y;k.2K=m[\'5h\'+k.3O];k.2B=m.2J[\'2B\'+k.3O];k.55=m.2J[k.2w]},6h:A(i){u z=k.z;q(z.3f&&(z.2d||m.3V)){k.1y=i;k.I=1d.67(k.I,k.1y);z.11.F[k.5o]=k.P(\'4h\')+\'D\'}K k.I=i;z.11.F[k.2w]=i+\'D\';z.V.F[k.2w]=k.P(\'1u\')+\'D\';q(z.19)z.19.3A();q(k.1x==\'x\'&&z.1r)z.35(G)},5Z:A(i){k.E=i;k.z.V.F[k.5o]=i+\'D\';q(k.z.19)k.z.19.3A()}};m.46=A(a,21,2z,26){q(L.ab&&m.1P&&!m.5n){m.1D(L,\'2H\',A(){1S m.46(a,21,2z,26)});C}k.a=a;k.2z=2z;k.26=26||\'1Y\';k.3f=!k.ak;m.5j=1a;k.1v=[];m.6y();u R=k.R=m.N.X;S(u i=0;i(k.x.1y||k.x.I)){k.8p();q(k.1v.X==1)k.35()}}k.7U()}1C(e){k.5Q(e)}},3n:A(p,3l){u a5,a3=p.1M,1x=p==k.x?\'x\':\'y\';u 5D=1a;u 3s=p.z.3N;p.E=1d.56(p.E-((p.P(\'1u\')-p.t)/2));q(p.Ep.2B+p.55-p.4I){q(!3l&&5D&&3s){p.I=1d.22(p.I,p.P(1x==\'y\'?\'3o\':\'5G\'))}K q(p.P(\'1u\')1K){ 1N=24*1K;q(1Nk.3K&&x.I>k.3Y&&y.P(\'1u\')>y.P(\'3o\')){y.I-=10;q(1K)x.I=y.I*1K;k.35(0,1);2m=G}}C 2m},7U:A(){u x=k.x,y=k.y;k.45(\'1i\');k.6e(1,{V:{M:x.P(\'1u\'),16:y.P(\'1u\'),18:x.E,W:y.E},11:{18:x.1B+x.P(\'4h\'),W:y.1B+y.P(\'4h\'),M:x.1y||x.I,16:y.1y||y.I}},m.84)},6e:A(23,1L,2p){q(k.19&&!k.2R){q(23)k.19.3A();K k.19.4q()}q(!23)k.8v();u z=k,x=z.x,y=z.y,1J=k.1J;q(!23)1J=k.85||1J;u 7A=23?A(){q(z.19)z.19.28.F.1b="1X";5S(A(){z.7B()},50)}:A(){z.5P()};q(23)m.T(k.V,{M:x.t+\'D\',16:y.t+\'D\'});q(k.86){m.T(k.V,{1o:23?0:1});m.2q(1L.V,{1o:23})}m.3p(k.V,1L.V,{2Z:2p,1J:1J,2x:A(2v,2y){q(z.19&&z.2R&&2y.Q==\'W\'){u 3I=23?2y.E:1-2y.E;u E={w:x.t+(x.P(\'1u\')-x.t)*3I,h:y.t+(y.P(\'1u\')-y.t)*3I,x:x.1s+(x.E-x.1s)*3I,y:y.1s+(y.E-y.1s)*3I};z.19.3A(E,0,1)}}});m.3p(k.11,1L.11,2p,1J,7A);q(23){k.V.F.1b=\'1X\';k.11.F.1b=\'1X\';k.a.1g+=\' 1c-7P-7Q\'}},7B:A(){k.3C=G;k.3k();q(m.2W&&m.2W==k.a)m.2W=H;k.7w();u p=m.2J,5u=m.4B.x+p.4w,5p=m.4B.y+p.4y;k.6q=k.x.E<5u&&5uk.x.P(\'3Q\')+k.x.P(\'64\'));u 7M=(2n.y+2n.hk.y.P(\'3Q\')+k.y.P(\'64\'));u 4j=m.65(17[i]);q(!7G&&!7M&&4j!=k.R){q(!1I){17[i].3T(\'1i-2t\',\'[\'+k.R+\']\');17[i].61=17[i].F[Q];17[i].F[Q]=\'1i\'}K q(1I.7L(\'[\'+k.R+\']\')==-1){17[i].3T(\'1i-2t\',1I+\'[\'+k.R+\']\')}}K q((1I==\'[\'+k.R+\']\'||m.2u==4j)&&4j!=k.R){17[i].3T(\'1i-2t\',\'\');17[i].F[Q]=17[i].61||\'\'}K q(1I&&1I.7L(\'[\'+k.R+\']\')>-1){17[i].3T(\'1i-2t\',1I.31(\'[\'+k.R+\']\',\'\'))}}}}},3k:A(){k.V.F.1p=m.3L+=2;S(u i=0;i