Version Description
Download this release
Release Info
| Developer | cbaldelomar |
| Plugin | |
| Version | 1.2 |
| Comparing to | |
| See all releases | |
Version 1.2
- LICENSE +339 -0
- README.md +55 -0
- includes/css/admin.css +207 -0
- includes/css/magnific-popup.css +363 -0
- includes/css/style.css +197 -0
- includes/functions.php +421 -0
- includes/js/admin.js +31 -0
- includes/js/flexslider/README.mdown +144 -0
- includes/js/flexslider/changelog.txt +4 -0
- includes/js/flexslider/flexslider.css +96 -0
- includes/js/flexslider/fonts/flexslider-icon.eot +0 -0
- includes/js/flexslider/fonts/flexslider-icon.svg +19 -0
- includes/js/flexslider/fonts/flexslider-icon.ttf +0 -0
- includes/js/flexslider/fonts/flexslider-icon.woff +0 -0
- includes/js/flexslider/images/bg_play_pause.png +0 -0
- includes/js/flexslider/jquery.flexslider-min.js +5 -0
- includes/js/flexslider/jquery.flexslider.js +1128 -0
- includes/js/gallery.js +58 -0
- includes/js/jquery.magnific-popup.min.js +4 -0
- includes/js/masonry.pkgd.min.js +9 -0
- includes/js/woocommerce.product.js +20 -0
- includes/options.php +22 -0
- includes/scripts.php +52 -0
- includes/settings.php +244 -0
- includes/widgets.php +7 -0
- readme.txt +55 -0
- wc-gallery.php +30 -0
LICENSE
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
GNU GENERAL PUBLIC LICENSE
|
| 2 |
+
Version 2, June 1991
|
| 3 |
+
|
| 4 |
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
| 5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
| 6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 7 |
+
of this license document, but changing it is not allowed.
|
| 8 |
+
|
| 9 |
+
Preamble
|
| 10 |
+
|
| 11 |
+
The licenses for most software are designed to take away your
|
| 12 |
+
freedom to share and change it. By contrast, the GNU General Public
|
| 13 |
+
License is intended to guarantee your freedom to share and change free
|
| 14 |
+
software--to make sure the software is free for all its users. This
|
| 15 |
+
General Public License applies to most of the Free Software
|
| 16 |
+
Foundation's software and to any other program whose authors commit to
|
| 17 |
+
using it. (Some other Free Software Foundation software is covered by
|
| 18 |
+
the GNU Lesser General Public License instead.) You can apply it to
|
| 19 |
+
your programs, too.
|
| 20 |
+
|
| 21 |
+
When we speak of free software, we are referring to freedom, not
|
| 22 |
+
price. Our General Public Licenses are designed to make sure that you
|
| 23 |
+
have the freedom to distribute copies of free software (and charge for
|
| 24 |
+
this service if you wish), that you receive source code or can get it
|
| 25 |
+
if you want it, that you can change the software or use pieces of it
|
| 26 |
+
in new free programs; and that you know you can do these things.
|
| 27 |
+
|
| 28 |
+
To protect your rights, we need to make restrictions that forbid
|
| 29 |
+
anyone to deny you these rights or to ask you to surrender the rights.
|
| 30 |
+
These restrictions translate to certain responsibilities for you if you
|
| 31 |
+
distribute copies of the software, or if you modify it.
|
| 32 |
+
|
| 33 |
+
For example, if you distribute copies of such a program, whether
|
| 34 |
+
gratis or for a fee, you must give the recipients all the rights that
|
| 35 |
+
you have. You must make sure that they, too, receive or can get the
|
| 36 |
+
source code. And you must show them these terms so they know their
|
| 37 |
+
rights.
|
| 38 |
+
|
| 39 |
+
We protect your rights with two steps: (1) copyright the software, and
|
| 40 |
+
(2) offer you this license which gives you legal permission to copy,
|
| 41 |
+
distribute and/or modify the software.
|
| 42 |
+
|
| 43 |
+
Also, for each author's protection and ours, we want to make certain
|
| 44 |
+
that everyone understands that there is no warranty for this free
|
| 45 |
+
software. If the software is modified by someone else and passed on, we
|
| 46 |
+
want its recipients to know that what they have is not the original, so
|
| 47 |
+
that any problems introduced by others will not reflect on the original
|
| 48 |
+
authors' reputations.
|
| 49 |
+
|
| 50 |
+
Finally, any free program is threatened constantly by software
|
| 51 |
+
patents. We wish to avoid the danger that redistributors of a free
|
| 52 |
+
program will individually obtain patent licenses, in effect making the
|
| 53 |
+
program proprietary. To prevent this, we have made it clear that any
|
| 54 |
+
patent must be licensed for everyone's free use or not licensed at all.
|
| 55 |
+
|
| 56 |
+
The precise terms and conditions for copying, distribution and
|
| 57 |
+
modification follow.
|
| 58 |
+
|
| 59 |
+
GNU GENERAL PUBLIC LICENSE
|
| 60 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
| 61 |
+
|
| 62 |
+
0. This License applies to any program or other work which contains
|
| 63 |
+
a notice placed by the copyright holder saying it may be distributed
|
| 64 |
+
under the terms of this General Public License. The "Program", below,
|
| 65 |
+
refers to any such program or work, and a "work based on the Program"
|
| 66 |
+
means either the Program or any derivative work under copyright law:
|
| 67 |
+
that is to say, a work containing the Program or a portion of it,
|
| 68 |
+
either verbatim or with modifications and/or translated into another
|
| 69 |
+
language. (Hereinafter, translation is included without limitation in
|
| 70 |
+
the term "modification".) Each licensee is addressed as "you".
|
| 71 |
+
|
| 72 |
+
Activities other than copying, distribution and modification are not
|
| 73 |
+
covered by this License; they are outside its scope. The act of
|
| 74 |
+
running the Program is not restricted, and the output from the Program
|
| 75 |
+
is covered only if its contents constitute a work based on the
|
| 76 |
+
Program (independent of having been made by running the Program).
|
| 77 |
+
Whether that is true depends on what the Program does.
|
| 78 |
+
|
| 79 |
+
1. You may copy and distribute verbatim copies of the Program's
|
| 80 |
+
source code as you receive it, in any medium, provided that you
|
| 81 |
+
conspicuously and appropriately publish on each copy an appropriate
|
| 82 |
+
copyright notice and disclaimer of warranty; keep intact all the
|
| 83 |
+
notices that refer to this License and to the absence of any warranty;
|
| 84 |
+
and give any other recipients of the Program a copy of this License
|
| 85 |
+
along with the Program.
|
| 86 |
+
|
| 87 |
+
You may charge a fee for the physical act of transferring a copy, and
|
| 88 |
+
you may at your option offer warranty protection in exchange for a fee.
|
| 89 |
+
|
| 90 |
+
2. You may modify your copy or copies of the Program or any portion
|
| 91 |
+
of it, thus forming a work based on the Program, and copy and
|
| 92 |
+
distribute such modifications or work under the terms of Section 1
|
| 93 |
+
above, provided that you also meet all of these conditions:
|
| 94 |
+
|
| 95 |
+
a) You must cause the modified files to carry prominent notices
|
| 96 |
+
stating that you changed the files and the date of any change.
|
| 97 |
+
|
| 98 |
+
b) You must cause any work that you distribute or publish, that in
|
| 99 |
+
whole or in part contains or is derived from the Program or any
|
| 100 |
+
part thereof, to be licensed as a whole at no charge to all third
|
| 101 |
+
parties under the terms of this License.
|
| 102 |
+
|
| 103 |
+
c) If the modified program normally reads commands interactively
|
| 104 |
+
when run, you must cause it, when started running for such
|
| 105 |
+
interactive use in the most ordinary way, to print or display an
|
| 106 |
+
announcement including an appropriate copyright notice and a
|
| 107 |
+
notice that there is no warranty (or else, saying that you provide
|
| 108 |
+
a warranty) and that users may redistribute the program under
|
| 109 |
+
these conditions, and telling the user how to view a copy of this
|
| 110 |
+
License. (Exception: if the Program itself is interactive but
|
| 111 |
+
does not normally print such an announcement, your work based on
|
| 112 |
+
the Program is not required to print an announcement.)
|
| 113 |
+
|
| 114 |
+
These requirements apply to the modified work as a whole. If
|
| 115 |
+
identifiable sections of that work are not derived from the Program,
|
| 116 |
+
and can be reasonably considered independent and separate works in
|
| 117 |
+
themselves, then this License, and its terms, do not apply to those
|
| 118 |
+
sections when you distribute them as separate works. But when you
|
| 119 |
+
distribute the same sections as part of a whole which is a work based
|
| 120 |
+
on the Program, the distribution of the whole must be on the terms of
|
| 121 |
+
this License, whose permissions for other licensees extend to the
|
| 122 |
+
entire whole, and thus to each and every part regardless of who wrote it.
|
| 123 |
+
|
| 124 |
+
Thus, it is not the intent of this section to claim rights or contest
|
| 125 |
+
your rights to work written entirely by you; rather, the intent is to
|
| 126 |
+
exercise the right to control the distribution of derivative or
|
| 127 |
+
collective works based on the Program.
|
| 128 |
+
|
| 129 |
+
In addition, mere aggregation of another work not based on the Program
|
| 130 |
+
with the Program (or with a work based on the Program) on a volume of
|
| 131 |
+
a storage or distribution medium does not bring the other work under
|
| 132 |
+
the scope of this License.
|
| 133 |
+
|
| 134 |
+
3. You may copy and distribute the Program (or a work based on it,
|
| 135 |
+
under Section 2) in object code or executable form under the terms of
|
| 136 |
+
Sections 1 and 2 above provided that you also do one of the following:
|
| 137 |
+
|
| 138 |
+
a) Accompany it with the complete corresponding machine-readable
|
| 139 |
+
source code, which must be distributed under the terms of Sections
|
| 140 |
+
1 and 2 above on a medium customarily used for software interchange; or,
|
| 141 |
+
|
| 142 |
+
b) Accompany it with a written offer, valid for at least three
|
| 143 |
+
years, to give any third party, for a charge no more than your
|
| 144 |
+
cost of physically performing source distribution, a complete
|
| 145 |
+
machine-readable copy of the corresponding source code, to be
|
| 146 |
+
distributed under the terms of Sections 1 and 2 above on a medium
|
| 147 |
+
customarily used for software interchange; or,
|
| 148 |
+
|
| 149 |
+
c) Accompany it with the information you received as to the offer
|
| 150 |
+
to distribute corresponding source code. (This alternative is
|
| 151 |
+
allowed only for noncommercial distribution and only if you
|
| 152 |
+
received the program in object code or executable form with such
|
| 153 |
+
an offer, in accord with Subsection b above.)
|
| 154 |
+
|
| 155 |
+
The source code for a work means the preferred form of the work for
|
| 156 |
+
making modifications to it. For an executable work, complete source
|
| 157 |
+
code means all the source code for all modules it contains, plus any
|
| 158 |
+
associated interface definition files, plus the scripts used to
|
| 159 |
+
control compilation and installation of the executable. However, as a
|
| 160 |
+
special exception, the source code distributed need not include
|
| 161 |
+
anything that is normally distributed (in either source or binary
|
| 162 |
+
form) with the major components (compiler, kernel, and so on) of the
|
| 163 |
+
operating system on which the executable runs, unless that component
|
| 164 |
+
itself accompanies the executable.
|
| 165 |
+
|
| 166 |
+
If distribution of executable or object code is made by offering
|
| 167 |
+
access to copy from a designated place, then offering equivalent
|
| 168 |
+
access to copy the source code from the same place counts as
|
| 169 |
+
distribution of the source code, even though third parties are not
|
| 170 |
+
compelled to copy the source along with the object code.
|
| 171 |
+
|
| 172 |
+
4. You may not copy, modify, sublicense, or distribute the Program
|
| 173 |
+
except as expressly provided under this License. Any attempt
|
| 174 |
+
otherwise to copy, modify, sublicense or distribute the Program is
|
| 175 |
+
void, and will automatically terminate your rights under this License.
|
| 176 |
+
However, parties who have received copies, or rights, from you under
|
| 177 |
+
this License will not have their licenses terminated so long as such
|
| 178 |
+
parties remain in full compliance.
|
| 179 |
+
|
| 180 |
+
5. You are not required to accept this License, since you have not
|
| 181 |
+
signed it. However, nothing else grants you permission to modify or
|
| 182 |
+
distribute the Program or its derivative works. These actions are
|
| 183 |
+
prohibited by law if you do not accept this License. Therefore, by
|
| 184 |
+
modifying or distributing the Program (or any work based on the
|
| 185 |
+
Program), you indicate your acceptance of this License to do so, and
|
| 186 |
+
all its terms and conditions for copying, distributing or modifying
|
| 187 |
+
the Program or works based on it.
|
| 188 |
+
|
| 189 |
+
6. Each time you redistribute the Program (or any work based on the
|
| 190 |
+
Program), the recipient automatically receives a license from the
|
| 191 |
+
original licensor to copy, distribute or modify the Program subject to
|
| 192 |
+
these terms and conditions. You may not impose any further
|
| 193 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
| 194 |
+
You are not responsible for enforcing compliance by third parties to
|
| 195 |
+
this License.
|
| 196 |
+
|
| 197 |
+
7. If, as a consequence of a court judgment or allegation of patent
|
| 198 |
+
infringement or for any other reason (not limited to patent issues),
|
| 199 |
+
conditions are imposed on you (whether by court order, agreement or
|
| 200 |
+
otherwise) that contradict the conditions of this License, they do not
|
| 201 |
+
excuse you from the conditions of this License. If you cannot
|
| 202 |
+
distribute so as to satisfy simultaneously your obligations under this
|
| 203 |
+
License and any other pertinent obligations, then as a consequence you
|
| 204 |
+
may not distribute the Program at all. For example, if a patent
|
| 205 |
+
license would not permit royalty-free redistribution of the Program by
|
| 206 |
+
all those who receive copies directly or indirectly through you, then
|
| 207 |
+
the only way you could satisfy both it and this License would be to
|
| 208 |
+
refrain entirely from distribution of the Program.
|
| 209 |
+
|
| 210 |
+
If any portion of this section is held invalid or unenforceable under
|
| 211 |
+
any particular circumstance, the balance of the section is intended to
|
| 212 |
+
apply and the section as a whole is intended to apply in other
|
| 213 |
+
circumstances.
|
| 214 |
+
|
| 215 |
+
It is not the purpose of this section to induce you to infringe any
|
| 216 |
+
patents or other property right claims or to contest validity of any
|
| 217 |
+
such claims; this section has the sole purpose of protecting the
|
| 218 |
+
integrity of the free software distribution system, which is
|
| 219 |
+
implemented by public license practices. Many people have made
|
| 220 |
+
generous contributions to the wide range of software distributed
|
| 221 |
+
through that system in reliance on consistent application of that
|
| 222 |
+
system; it is up to the author/donor to decide if he or she is willing
|
| 223 |
+
to distribute software through any other system and a licensee cannot
|
| 224 |
+
impose that choice.
|
| 225 |
+
|
| 226 |
+
This section is intended to make thoroughly clear what is believed to
|
| 227 |
+
be a consequence of the rest of this License.
|
| 228 |
+
|
| 229 |
+
8. If the distribution and/or use of the Program is restricted in
|
| 230 |
+
certain countries either by patents or by copyrighted interfaces, the
|
| 231 |
+
original copyright holder who places the Program under this License
|
| 232 |
+
may add an explicit geographical distribution limitation excluding
|
| 233 |
+
those countries, so that distribution is permitted only in or among
|
| 234 |
+
countries not thus excluded. In such case, this License incorporates
|
| 235 |
+
the limitation as if written in the body of this License.
|
| 236 |
+
|
| 237 |
+
9. The Free Software Foundation may publish revised and/or new versions
|
| 238 |
+
of the General Public License from time to time. Such new versions will
|
| 239 |
+
be similar in spirit to the present version, but may differ in detail to
|
| 240 |
+
address new problems or concerns.
|
| 241 |
+
|
| 242 |
+
Each version is given a distinguishing version number. If the Program
|
| 243 |
+
specifies a version number of this License which applies to it and "any
|
| 244 |
+
later version", you have the option of following the terms and conditions
|
| 245 |
+
either of that version or of any later version published by the Free
|
| 246 |
+
Software Foundation. If the Program does not specify a version number of
|
| 247 |
+
this License, you may choose any version ever published by the Free Software
|
| 248 |
+
Foundation.
|
| 249 |
+
|
| 250 |
+
10. If you wish to incorporate parts of the Program into other free
|
| 251 |
+
programs whose distribution conditions are different, write to the author
|
| 252 |
+
to ask for permission. For software which is copyrighted by the Free
|
| 253 |
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
| 254 |
+
make exceptions for this. Our decision will be guided by the two goals
|
| 255 |
+
of preserving the free status of all derivatives of our free software and
|
| 256 |
+
of promoting the sharing and reuse of software generally.
|
| 257 |
+
|
| 258 |
+
NO WARRANTY
|
| 259 |
+
|
| 260 |
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
| 261 |
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
| 262 |
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
| 263 |
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
| 264 |
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
| 265 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
| 266 |
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
| 267 |
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
| 268 |
+
REPAIR OR CORRECTION.
|
| 269 |
+
|
| 270 |
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 271 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
| 272 |
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
| 273 |
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
| 274 |
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
| 275 |
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
| 276 |
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
| 277 |
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
| 278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
| 279 |
+
|
| 280 |
+
END OF TERMS AND CONDITIONS
|
| 281 |
+
|
| 282 |
+
How to Apply These Terms to Your New Programs
|
| 283 |
+
|
| 284 |
+
If you develop a new program, and you want it to be of the greatest
|
| 285 |
+
possible use to the public, the best way to achieve this is to make it
|
| 286 |
+
free software which everyone can redistribute and change under these terms.
|
| 287 |
+
|
| 288 |
+
To do so, attach the following notices to the program. It is safest
|
| 289 |
+
to attach them to the start of each source file to most effectively
|
| 290 |
+
convey the exclusion of warranty; and each file should have at least
|
| 291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
| 292 |
+
|
| 293 |
+
{description}
|
| 294 |
+
Copyright (C) {year} {fullname}
|
| 295 |
+
|
| 296 |
+
This program is free software; you can redistribute it and/or modify
|
| 297 |
+
it under the terms of the GNU General Public License as published by
|
| 298 |
+
the Free Software Foundation; either version 2 of the License, or
|
| 299 |
+
(at your option) any later version.
|
| 300 |
+
|
| 301 |
+
This program is distributed in the hope that it will be useful,
|
| 302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 304 |
+
GNU General Public License for more details.
|
| 305 |
+
|
| 306 |
+
You should have received a copy of the GNU General Public License along
|
| 307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
| 308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
| 309 |
+
|
| 310 |
+
Also add information on how to contact you by electronic and paper mail.
|
| 311 |
+
|
| 312 |
+
If the program is interactive, make it output a short notice like this
|
| 313 |
+
when it starts in an interactive mode:
|
| 314 |
+
|
| 315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
| 316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 317 |
+
This is free software, and you are welcome to redistribute it
|
| 318 |
+
under certain conditions; type `show c' for details.
|
| 319 |
+
|
| 320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
| 321 |
+
parts of the General Public License. Of course, the commands you use may
|
| 322 |
+
be called something other than `show w' and `show c'; they could even be
|
| 323 |
+
mouse-clicks or menu items--whatever suits your program.
|
| 324 |
+
|
| 325 |
+
You should also get your employer (if you work as a programmer) or your
|
| 326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
| 327 |
+
necessary. Here is a sample; alter the names:
|
| 328 |
+
|
| 329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
| 330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
| 331 |
+
|
| 332 |
+
{signature of Ty Coon}, 1 April 1989
|
| 333 |
+
Ty Coon, President of Vice
|
| 334 |
+
|
| 335 |
+
This General Public License does not permit incorporating your program into
|
| 336 |
+
proprietary programs. If your program is a subroutine library, you may
|
| 337 |
+
consider it more useful to permit linking proprietary applications with the
|
| 338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
| 339 |
+
Public License instead of this License.
|
README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WordPress Canvas Gallery #
|
| 2 |
+
|
| 3 |
+
**Contributors:** cbaldelomar
|
| 4 |
+
**Donate link:** http://webplantmedia.com/pay-now/
|
| 5 |
+
**Tags:** masonry gallery, pinterest style gallery, pinterest gallery, gallery slider, slider gallery, carousel gallery, carousel, slider
|
| 6 |
+
**Requires at least:** 3.7
|
| 7 |
+
**Tested up to:** 3.7.1
|
| 8 |
+
**Stable tag:** trunk
|
| 9 |
+
**License:** GPLv2 or later
|
| 10 |
+
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
+
|
| 12 |
+
Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
|
| 13 |
+
|
| 14 |
+
## Description ##
|
| 15 |
+
|
| 16 |
+
See the galleries in action.
|
| 17 |
+
|
| 18 |
+
1. [WordPress Canvas Galleries](http://wordpresscanvas.com/features/gallery/)
|
| 19 |
+
2. [WordPress Canvas Slider & Carousel](http://wordpresscanvas.com/features/gallery/slider-carousel/)
|
| 20 |
+
3. [WordPress Canvas Gallery Columns](http://wordpresscanvas.com/features/gallery/gallery-columns/)
|
| 21 |
+
|
| 22 |
+
### Professional Support
|
| 23 |
+
|
| 24 |
+
If you need professional plugin support from me, the plugin author, you can contact me at [WordPress Canvas](http://wordpresscanvas.com/).
|
| 25 |
+
|
| 26 |
+
### Plugin Development
|
| 27 |
+
|
| 28 |
+
If you're a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it's [GitHub repository](https://github.com/webplantmedia/wc-gallery).
|
| 29 |
+
|
| 30 |
+
### Donations
|
| 31 |
+
|
| 32 |
+
Yes, I do accept donations. If you want to buy me a sandwich or something, you can do so from my [payment page](http://webplantmedia.com/pay-now/). I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are always a nice incentive.
|
| 33 |
+
|
| 34 |
+
## Installation ##
|
| 35 |
+
|
| 36 |
+
1. Uzip the `wc-gallery.zip` folder.
|
| 37 |
+
2. Upload the `wc-gallery` folder to your `/wp-content/plugins` directory.
|
| 38 |
+
3. In your WordPress dashboard, head over to the *Plugins* section.
|
| 39 |
+
4. Activate *WordPress Canvas Gallery*.
|
| 40 |
+
|
| 41 |
+
## Frequently Asked Questions ##
|
| 42 |
+
|
| 43 |
+
### How do I use the shortcodes?
|
| 44 |
+
|
| 45 |
+
Insert a gallery through your dashboard. You will see extra dropdown settings when configuring your gallery
|
| 46 |
+
|
| 47 |
+
## Changelog ##
|
| 48 |
+
|
| 49 |
+
### Version 1.2
|
| 50 |
+
|
| 51 |
+
* Removed fancybox and added another image popup library with a friendly license.
|
| 52 |
+
|
| 53 |
+
### Version 1.1
|
| 54 |
+
|
| 55 |
+
* Plugin released. Everything is new!
|
includes/css/admin.css
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* CSS Hacks
|
| 3 |
+
*
|
| 4 |
+
* Needed common CSS trick
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
.wc-gallery-clearfix:after {
|
| 8 |
+
visibility: hidden;
|
| 9 |
+
display: block;
|
| 10 |
+
font-size: 0;
|
| 11 |
+
content: " ";
|
| 12 |
+
clear: both;
|
| 13 |
+
height: 0;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.wc-gallery-clearfix { display: inline-block; }
|
| 17 |
+
|
| 18 |
+
* html .wc-gallery-clearfix {
|
| 19 |
+
height: 1%;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.wc-gallery-clearfix { display: block; }
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* Google Fonts
|
| 27 |
+
*
|
| 28 |
+
* Styles for Fonts subpage in Wordpress dashboard
|
| 29 |
+
*/
|
| 30 |
+
|
| 31 |
+
.wc-gallery-font-table {
|
| 32 |
+
height: 300px;
|
| 33 |
+
width: 450px;
|
| 34 |
+
overflow-y: scroll;
|
| 35 |
+
overflow-x: hidden;
|
| 36 |
+
border: 1px solid #e5e5e5;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.wc-gallery-font-row {
|
| 40 |
+
clear: both;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.wc-gallery-font-row:nth-child(even) {
|
| 44 |
+
background-color: #e5e5e5;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.wc-gallery-font-title {
|
| 48 |
+
width: 200px;
|
| 49 |
+
float: left;
|
| 50 |
+
padding-right: 10px;
|
| 51 |
+
text-align: right;
|
| 52 |
+
white-space: nowrap;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.wc-gallery-font-variants {
|
| 56 |
+
width: 200px;
|
| 57 |
+
float: left;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
#wc-gallery-font-preview {
|
| 61 |
+
font-size: 28px;
|
| 62 |
+
line-height: 1.5;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.wc-gallery-font-preview-text {
|
| 66 |
+
margin-right: 10px;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.wc-gallery-font-row-remove {
|
| 70 |
+
vertical-align: middle;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.wc-gallery-font-preview-row {
|
| 74 |
+
margin-bottom: 15px;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
/**
|
| 79 |
+
* Less Variables
|
| 80 |
+
*/
|
| 81 |
+
|
| 82 |
+
.wc-gallery-variables-preview {
|
| 83 |
+
margin-right: 190px;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.wc-gallery-variables-table {
|
| 87 |
+
border: 1px solid #e5e5e5;
|
| 88 |
+
width: 97%;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.wc-gallery-variables-table tr:nth-child(even) {
|
| 92 |
+
background-color: #e5e5e5;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.wc-gallery-variables-table td {
|
| 96 |
+
padding: 3px;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
/**
|
| 101 |
+
* Border Fields
|
| 102 |
+
*/
|
| 103 |
+
|
| 104 |
+
.wc-gallery-font-hover-fields .wc-gallery-text-decoration,
|
| 105 |
+
.wc-gallery-border-fields .wc-gallery-border-style,
|
| 106 |
+
.wc-gallery-border-fields .wp-border-width,
|
| 107 |
+
.wc-gallery-border-fields .wp-picker-container {
|
| 108 |
+
margin-bottom: 7px;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
/**
|
| 113 |
+
* Font Fields
|
| 114 |
+
*/
|
| 115 |
+
|
| 116 |
+
.wc-gallery-font-fields .wc-gallery-font-teaser,
|
| 117 |
+
.wc-gallery-font-fields .wp-picker-container,
|
| 118 |
+
.wc-gallery-font-fields select,
|
| 119 |
+
.wc-gallery-font-fields input {
|
| 120 |
+
margin-bottom: 7px;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.wc-gallery-font-teaser {
|
| 124 |
+
display: block;
|
| 125 |
+
line-height: 1.5;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.wc-gallery-font-appearance-fields select,
|
| 129 |
+
.wc-gallery-font-appearance-fields .wp-picker-container {
|
| 130 |
+
margin-bottom: 7px;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
/**
|
| 135 |
+
* Media Gallery
|
| 136 |
+
*
|
| 137 |
+
* Styles for media gallery
|
| 138 |
+
*/
|
| 139 |
+
|
| 140 |
+
.wp-media-buttons-icon {
|
| 141 |
+
background: url('../../../../../../../wp-admin/images/media-button.png') no-repeat top left;
|
| 142 |
+
display: inline-block;
|
| 143 |
+
width: 16px;
|
| 144 |
+
height: 16px;
|
| 145 |
+
vertical-align: text-top;
|
| 146 |
+
margin: 0 2px;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
.wc-gallery-preview-image img {
|
| 150 |
+
max-width: 700px;
|
| 151 |
+
max-height: 200px;
|
| 152 |
+
background: #FAFAFA;
|
| 153 |
+
border-color: #ccc #eee #eee #ccc;
|
| 154 |
+
border-style: solid;
|
| 155 |
+
border-width: 1px;
|
| 156 |
+
padding: 5px;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.widget .wc-gallery-preview-image img {
|
| 160 |
+
padding: 0;
|
| 161 |
+
border-width: 0;
|
| 162 |
+
max-width: 100%;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
.wc-gallery-preview-image {
|
| 166 |
+
margin-bottom: 5px;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.wc-gallery-upload-font-textarea {
|
| 170 |
+
max-width: 900px;
|
| 171 |
+
height: 210px;
|
| 172 |
+
width: 97%;
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
.wc-gallery-social-media-field .button,
|
| 176 |
+
.wc-gallery-social-media-field input,
|
| 177 |
+
.wc-gallery-image-field .button,
|
| 178 |
+
.wc-gallery-image-field input,
|
| 179 |
+
.wc-gallery-background-options .button,
|
| 180 |
+
.wc-gallery-background-options select,
|
| 181 |
+
.wc-gallery-background-options input {
|
| 182 |
+
margin-bottom: 7px;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
/**
|
| 187 |
+
* Theme Options Display
|
| 188 |
+
*
|
| 189 |
+
* Specific style for theme options pages
|
| 190 |
+
*/
|
| 191 |
+
|
| 192 |
+
.wc-gallery-theme-options-display .form-table tr:nth-child(odd) {
|
| 193 |
+
background-color: #f2f2f2;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
.wc-gallery-textarea {
|
| 197 |
+
max-width: 900px;
|
| 198 |
+
height: 150px;
|
| 199 |
+
width: 97%;
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
.wc-gallery-ajax-submit-button #submit {
|
| 203 |
+
outline: 0;
|
| 204 |
+
}
|
| 205 |
+
.wc-gallery-ajax-submit-button #compile-status {
|
| 206 |
+
margin-left: 5px;
|
| 207 |
+
}
|
includes/css/magnific-popup.css
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Magnific Popup CSS */
|
| 2 |
+
.mfp-bg {
|
| 3 |
+
top: 0;
|
| 4 |
+
left: 0;
|
| 5 |
+
width: 100%;
|
| 6 |
+
height: 100%;
|
| 7 |
+
z-index: 1042;
|
| 8 |
+
overflow: hidden;
|
| 9 |
+
position: fixed;
|
| 10 |
+
background: #0b0b0b;
|
| 11 |
+
opacity: 0.8;
|
| 12 |
+
filter: alpha(opacity=80); }
|
| 13 |
+
|
| 14 |
+
.mfp-wrap {
|
| 15 |
+
top: 0;
|
| 16 |
+
left: 0;
|
| 17 |
+
width: 100%;
|
| 18 |
+
height: 100%;
|
| 19 |
+
z-index: 1043;
|
| 20 |
+
position: fixed;
|
| 21 |
+
outline: none !important;
|
| 22 |
+
-webkit-backface-visibility: hidden; }
|
| 23 |
+
|
| 24 |
+
.mfp-container {
|
| 25 |
+
text-align: center;
|
| 26 |
+
position: absolute;
|
| 27 |
+
width: 100%;
|
| 28 |
+
height: 100%;
|
| 29 |
+
left: 0;
|
| 30 |
+
top: 0;
|
| 31 |
+
padding: 0 8px;
|
| 32 |
+
-webkit-box-sizing: border-box;
|
| 33 |
+
-moz-box-sizing: border-box;
|
| 34 |
+
box-sizing: border-box; }
|
| 35 |
+
|
| 36 |
+
.mfp-container:before {
|
| 37 |
+
content: '';
|
| 38 |
+
display: inline-block;
|
| 39 |
+
height: 100%;
|
| 40 |
+
vertical-align: middle; }
|
| 41 |
+
|
| 42 |
+
.mfp-align-top .mfp-container:before {
|
| 43 |
+
display: none; }
|
| 44 |
+
|
| 45 |
+
.mfp-content {
|
| 46 |
+
position: relative;
|
| 47 |
+
display: inline-block;
|
| 48 |
+
vertical-align: middle;
|
| 49 |
+
margin: 0 auto;
|
| 50 |
+
text-align: left;
|
| 51 |
+
z-index: 1045; }
|
| 52 |
+
|
| 53 |
+
.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
|
| 54 |
+
width: 100%;
|
| 55 |
+
cursor: auto; }
|
| 56 |
+
|
| 57 |
+
.mfp-ajax-cur {
|
| 58 |
+
cursor: progress; }
|
| 59 |
+
|
| 60 |
+
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
| 61 |
+
cursor: -moz-zoom-out;
|
| 62 |
+
cursor: -webkit-zoom-out;
|
| 63 |
+
cursor: zoom-out; }
|
| 64 |
+
|
| 65 |
+
.mfp-zoom {
|
| 66 |
+
cursor: pointer;
|
| 67 |
+
cursor: -webkit-zoom-in;
|
| 68 |
+
cursor: -moz-zoom-in;
|
| 69 |
+
cursor: zoom-in; }
|
| 70 |
+
|
| 71 |
+
.mfp-auto-cursor .mfp-content {
|
| 72 |
+
cursor: auto; }
|
| 73 |
+
|
| 74 |
+
.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter {
|
| 75 |
+
-webkit-user-select: none;
|
| 76 |
+
-moz-user-select: none;
|
| 77 |
+
user-select: none; }
|
| 78 |
+
|
| 79 |
+
.mfp-loading.mfp-figure {
|
| 80 |
+
display: none; }
|
| 81 |
+
|
| 82 |
+
.mfp-hide {
|
| 83 |
+
display: none !important; }
|
| 84 |
+
|
| 85 |
+
.mfp-preloader {
|
| 86 |
+
color: #cccccc;
|
| 87 |
+
position: absolute;
|
| 88 |
+
top: 50%;
|
| 89 |
+
width: auto;
|
| 90 |
+
text-align: center;
|
| 91 |
+
margin-top: -0.8em;
|
| 92 |
+
left: 8px;
|
| 93 |
+
right: 8px;
|
| 94 |
+
z-index: 1044; }
|
| 95 |
+
.mfp-preloader a {
|
| 96 |
+
color: #cccccc; }
|
| 97 |
+
.mfp-preloader a:hover {
|
| 98 |
+
color: white; }
|
| 99 |
+
|
| 100 |
+
.mfp-s-ready .mfp-preloader {
|
| 101 |
+
display: none; }
|
| 102 |
+
|
| 103 |
+
.mfp-s-error .mfp-content {
|
| 104 |
+
display: none; }
|
| 105 |
+
|
| 106 |
+
button.mfp-close, button.mfp-arrow {
|
| 107 |
+
overflow: visible;
|
| 108 |
+
cursor: pointer;
|
| 109 |
+
background: transparent;
|
| 110 |
+
border: 0;
|
| 111 |
+
-webkit-appearance: none;
|
| 112 |
+
display: block;
|
| 113 |
+
outline: none;
|
| 114 |
+
padding: 0;
|
| 115 |
+
z-index: 1046;
|
| 116 |
+
-webkit-box-shadow: none;
|
| 117 |
+
box-shadow: none; }
|
| 118 |
+
button::-moz-focus-inner {
|
| 119 |
+
padding: 0;
|
| 120 |
+
border: 0; }
|
| 121 |
+
|
| 122 |
+
.mfp-close {
|
| 123 |
+
width: 44px;
|
| 124 |
+
height: 44px;
|
| 125 |
+
line-height: 44px;
|
| 126 |
+
position: absolute;
|
| 127 |
+
right: 0;
|
| 128 |
+
top: 0;
|
| 129 |
+
text-decoration: none;
|
| 130 |
+
text-align: center;
|
| 131 |
+
opacity: 0.65;
|
| 132 |
+
padding: 0 0 18px 10px;
|
| 133 |
+
color: white;
|
| 134 |
+
font-style: normal;
|
| 135 |
+
font-size: 28px;
|
| 136 |
+
font-family: Arial, Baskerville, monospace; }
|
| 137 |
+
.mfp-close:hover, .mfp-close:focus {
|
| 138 |
+
opacity: 1; }
|
| 139 |
+
.mfp-close:active {
|
| 140 |
+
top: 1px; }
|
| 141 |
+
|
| 142 |
+
.mfp-close-btn-in .mfp-close {
|
| 143 |
+
color: #333333; }
|
| 144 |
+
|
| 145 |
+
.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
|
| 146 |
+
color: white;
|
| 147 |
+
right: -6px;
|
| 148 |
+
text-align: right;
|
| 149 |
+
padding-right: 6px;
|
| 150 |
+
width: 100%; }
|
| 151 |
+
|
| 152 |
+
.mfp-counter {
|
| 153 |
+
position: absolute;
|
| 154 |
+
top: 0;
|
| 155 |
+
right: 0;
|
| 156 |
+
color: #cccccc;
|
| 157 |
+
font-size: 12px;
|
| 158 |
+
line-height: 18px; }
|
| 159 |
+
|
| 160 |
+
.mfp-arrow {
|
| 161 |
+
position: absolute;
|
| 162 |
+
opacity: 0.65;
|
| 163 |
+
margin: 0;
|
| 164 |
+
top: 50%;
|
| 165 |
+
margin-top: -55px;
|
| 166 |
+
padding: 0;
|
| 167 |
+
width: 90px;
|
| 168 |
+
height: 110px;
|
| 169 |
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
|
| 170 |
+
.mfp-arrow:active {
|
| 171 |
+
margin-top: -54px; }
|
| 172 |
+
.mfp-arrow:hover, .mfp-arrow:focus {
|
| 173 |
+
opacity: 1; }
|
| 174 |
+
.mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
|
| 175 |
+
content: '';
|
| 176 |
+
display: block;
|
| 177 |
+
width: 0;
|
| 178 |
+
height: 0;
|
| 179 |
+
position: absolute;
|
| 180 |
+
left: 0;
|
| 181 |
+
top: 0;
|
| 182 |
+
margin-top: 35px;
|
| 183 |
+
margin-left: 35px;
|
| 184 |
+
border: medium inset transparent; }
|
| 185 |
+
.mfp-arrow:after, .mfp-arrow .mfp-a {
|
| 186 |
+
border-top-width: 13px;
|
| 187 |
+
border-bottom-width: 13px;
|
| 188 |
+
top: 8px; }
|
| 189 |
+
.mfp-arrow:before, .mfp-arrow .mfp-b {
|
| 190 |
+
border-top-width: 21px;
|
| 191 |
+
border-bottom-width: 21px; }
|
| 192 |
+
|
| 193 |
+
.mfp-arrow-left {
|
| 194 |
+
left: 0; }
|
| 195 |
+
.mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
|
| 196 |
+
border-right: 17px solid white;
|
| 197 |
+
margin-left: 31px; }
|
| 198 |
+
.mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
|
| 199 |
+
margin-left: 25px;
|
| 200 |
+
border-right: 27px solid #3f3f3f; }
|
| 201 |
+
|
| 202 |
+
.mfp-arrow-right {
|
| 203 |
+
right: 0; }
|
| 204 |
+
.mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
|
| 205 |
+
border-left: 17px solid white;
|
| 206 |
+
margin-left: 39px; }
|
| 207 |
+
.mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
|
| 208 |
+
border-left: 27px solid #3f3f3f; }
|
| 209 |
+
|
| 210 |
+
.mfp-iframe-holder {
|
| 211 |
+
padding-top: 40px;
|
| 212 |
+
padding-bottom: 40px; }
|
| 213 |
+
.mfp-iframe-holder .mfp-content {
|
| 214 |
+
line-height: 0;
|
| 215 |
+
width: 100%;
|
| 216 |
+
max-width: 900px; }
|
| 217 |
+
.mfp-iframe-holder .mfp-close {
|
| 218 |
+
top: -40px; }
|
| 219 |
+
|
| 220 |
+
.mfp-iframe-scaler {
|
| 221 |
+
width: 100%;
|
| 222 |
+
height: 0;
|
| 223 |
+
overflow: hidden;
|
| 224 |
+
padding-top: 56.25%; }
|
| 225 |
+
.mfp-iframe-scaler iframe {
|
| 226 |
+
position: absolute;
|
| 227 |
+
display: block;
|
| 228 |
+
top: 0;
|
| 229 |
+
left: 0;
|
| 230 |
+
width: 100%;
|
| 231 |
+
height: 100%;
|
| 232 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
| 233 |
+
background: black; }
|
| 234 |
+
|
| 235 |
+
/* Main image in popup */
|
| 236 |
+
img.mfp-img {
|
| 237 |
+
width: auto;
|
| 238 |
+
max-width: 100%;
|
| 239 |
+
height: auto;
|
| 240 |
+
display: block;
|
| 241 |
+
line-height: 0;
|
| 242 |
+
-webkit-box-sizing: border-box;
|
| 243 |
+
-moz-box-sizing: border-box;
|
| 244 |
+
box-sizing: border-box;
|
| 245 |
+
padding: 40px 0 40px;
|
| 246 |
+
margin: 0 auto; }
|
| 247 |
+
|
| 248 |
+
/* The shadow behind the image */
|
| 249 |
+
.mfp-figure {
|
| 250 |
+
line-height: 0; }
|
| 251 |
+
.mfp-figure:after {
|
| 252 |
+
content: '';
|
| 253 |
+
position: absolute;
|
| 254 |
+
left: 0;
|
| 255 |
+
top: 40px;
|
| 256 |
+
bottom: 40px;
|
| 257 |
+
display: block;
|
| 258 |
+
right: 0;
|
| 259 |
+
width: auto;
|
| 260 |
+
height: auto;
|
| 261 |
+
z-index: -1;
|
| 262 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
| 263 |
+
background: #444444; }
|
| 264 |
+
.mfp-figure small {
|
| 265 |
+
color: #bdbdbd;
|
| 266 |
+
display: block;
|
| 267 |
+
font-size: 12px;
|
| 268 |
+
line-height: 14px; }
|
| 269 |
+
|
| 270 |
+
.mfp-bottom-bar {
|
| 271 |
+
margin-top: -36px;
|
| 272 |
+
position: absolute;
|
| 273 |
+
top: 100%;
|
| 274 |
+
left: 0;
|
| 275 |
+
width: 100%;
|
| 276 |
+
cursor: auto; }
|
| 277 |
+
|
| 278 |
+
.mfp-title {
|
| 279 |
+
text-align: left;
|
| 280 |
+
line-height: 18px;
|
| 281 |
+
color: #f3f3f3;
|
| 282 |
+
word-wrap: break-word;
|
| 283 |
+
padding-right: 36px; }
|
| 284 |
+
|
| 285 |
+
.mfp-image-holder .mfp-content {
|
| 286 |
+
max-width: 100%; }
|
| 287 |
+
|
| 288 |
+
.mfp-gallery .mfp-image-holder .mfp-figure {
|
| 289 |
+
cursor: pointer; }
|
| 290 |
+
|
| 291 |
+
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
| 292 |
+
/**
|
| 293 |
+
* Remove all paddings around the image on small screen
|
| 294 |
+
*/
|
| 295 |
+
.mfp-img-mobile .mfp-image-holder {
|
| 296 |
+
padding-left: 0;
|
| 297 |
+
padding-right: 0; }
|
| 298 |
+
.mfp-img-mobile img.mfp-img {
|
| 299 |
+
padding: 0; }
|
| 300 |
+
.mfp-img-mobile .mfp-figure {
|
| 301 |
+
/* The shadow behind the image */ }
|
| 302 |
+
.mfp-img-mobile .mfp-figure:after {
|
| 303 |
+
top: 0;
|
| 304 |
+
bottom: 0; }
|
| 305 |
+
.mfp-img-mobile .mfp-figure small {
|
| 306 |
+
display: inline;
|
| 307 |
+
margin-left: 5px; }
|
| 308 |
+
.mfp-img-mobile .mfp-bottom-bar {
|
| 309 |
+
background: rgba(0, 0, 0, 0.6);
|
| 310 |
+
bottom: 0;
|
| 311 |
+
margin: 0;
|
| 312 |
+
top: auto;
|
| 313 |
+
padding: 3px 5px;
|
| 314 |
+
position: fixed;
|
| 315 |
+
-webkit-box-sizing: border-box;
|
| 316 |
+
-moz-box-sizing: border-box;
|
| 317 |
+
box-sizing: border-box; }
|
| 318 |
+
.mfp-img-mobile .mfp-bottom-bar:empty {
|
| 319 |
+
padding: 0; }
|
| 320 |
+
.mfp-img-mobile .mfp-counter {
|
| 321 |
+
right: 5px;
|
| 322 |
+
top: 3px; }
|
| 323 |
+
.mfp-img-mobile .mfp-close {
|
| 324 |
+
top: 0;
|
| 325 |
+
right: 0;
|
| 326 |
+
width: 35px;
|
| 327 |
+
height: 35px;
|
| 328 |
+
line-height: 35px;
|
| 329 |
+
background: rgba(0, 0, 0, 0.6);
|
| 330 |
+
position: fixed;
|
| 331 |
+
text-align: center;
|
| 332 |
+
padding: 0; } }
|
| 333 |
+
|
| 334 |
+
@media all and (max-width: 900px) {
|
| 335 |
+
.mfp-arrow {
|
| 336 |
+
-webkit-transform: scale(0.75);
|
| 337 |
+
transform: scale(0.75); }
|
| 338 |
+
.mfp-arrow-left {
|
| 339 |
+
-webkit-transform-origin: 0;
|
| 340 |
+
transform-origin: 0; }
|
| 341 |
+
.mfp-arrow-right {
|
| 342 |
+
-webkit-transform-origin: 100%;
|
| 343 |
+
transform-origin: 100%; }
|
| 344 |
+
.mfp-container {
|
| 345 |
+
padding-left: 6px;
|
| 346 |
+
padding-right: 6px; } }
|
| 347 |
+
|
| 348 |
+
.mfp-ie7 .mfp-img {
|
| 349 |
+
padding: 0; }
|
| 350 |
+
.mfp-ie7 .mfp-bottom-bar {
|
| 351 |
+
width: 600px;
|
| 352 |
+
left: 50%;
|
| 353 |
+
margin-left: -300px;
|
| 354 |
+
margin-top: 5px;
|
| 355 |
+
padding-bottom: 5px; }
|
| 356 |
+
.mfp-ie7 .mfp-container {
|
| 357 |
+
padding: 0; }
|
| 358 |
+
.mfp-ie7 .mfp-content {
|
| 359 |
+
padding-top: 44px; }
|
| 360 |
+
.mfp-ie7 .mfp-close {
|
| 361 |
+
top: 0;
|
| 362 |
+
right: 0;
|
| 363 |
+
padding-top: 0; }
|
includes/css/style.css
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* [gallery]
|
| 3 |
+
* ----------------------------------------------------------------------------
|
| 4 |
+
*/
|
| 5 |
+
.wc-gallery .gallery {
|
| 6 |
+
margin-bottom: 20px;
|
| 7 |
+
margin-left: 0px;
|
| 8 |
+
margin-right: 0px;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
.wc-gallery .gallery-center {
|
| 12 |
+
margin-left: auto;
|
| 13 |
+
margin-right: auto;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.wc-gallery .gallery.gallery-default .gallery-item {
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.wc-gallery .gallery-item {
|
| 20 |
+
float: left; /* added this so images don't stack before masonry kicks in */
|
| 21 |
+
margin: 0;
|
| 22 |
+
overflow: hidden;
|
| 23 |
+
position: relative;
|
| 24 |
+
margin-bottom: 5px;
|
| 25 |
+
max-width: none !important;
|
| 26 |
+
}
|
| 27 |
+
.wc-gallery .gallery-item .gallery-icon,
|
| 28 |
+
.wc-gallery .gallery-item .gallery-caption {
|
| 29 |
+
margin-right: 5px;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.wc-gallery .gallery .gallery-icon a {
|
| 33 |
+
display: block;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.wc-gallery .gallery.gallery-with-border .gallery-icon a {
|
| 37 |
+
border: 1px solid #eeeeee;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/* firefox can't handle 100% and masonry calculations. overflows slightly. */
|
| 41 |
+
.wc-gallery .gallery-columns-1 .gallery-item {
|
| 42 |
+
width: 99.9%;
|
| 43 |
+
}
|
| 44 |
+
.wc-gallery .gallery-columns-2 .gallery-item {
|
| 45 |
+
width: 49.95%;
|
| 46 |
+
}
|
| 47 |
+
.wc-gallery .gallery-columns-3 .gallery-item {
|
| 48 |
+
width: 33.3%;
|
| 49 |
+
}
|
| 50 |
+
.wc-gallery .gallery-columns-4 .gallery-item {
|
| 51 |
+
width: 24.975%;
|
| 52 |
+
}
|
| 53 |
+
.wc-gallery .gallery-columns-5 .gallery-item {
|
| 54 |
+
width: 19.98%;
|
| 55 |
+
}
|
| 56 |
+
.wc-gallery .gallery-columns-6 .gallery-item {
|
| 57 |
+
width: 16.65%;
|
| 58 |
+
}
|
| 59 |
+
.wc-gallery .gallery-columns-7 .gallery-item {
|
| 60 |
+
width: 14.2714285714%;
|
| 61 |
+
}
|
| 62 |
+
.wc-gallery .gallery-columns-8 .gallery-item {
|
| 63 |
+
width: 12.4875%;
|
| 64 |
+
}
|
| 65 |
+
.wc-gallery .gallery-columns-9 .gallery-item {
|
| 66 |
+
width: 11.1%;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.wc-gallery .gallery-caption {
|
| 70 |
+
margin: 0;
|
| 71 |
+
max-height: 50%;
|
| 72 |
+
min-height: 0;
|
| 73 |
+
box-shadow: none;
|
| 74 |
+
opacity: 1;
|
| 75 |
+
position: relative;
|
| 76 |
+
background-color: #eeeeee;
|
| 77 |
+
color: #666666;
|
| 78 |
+
bottom: 0;
|
| 79 |
+
left: 0;
|
| 80 |
+
right: 0;
|
| 81 |
+
text-align: left;
|
| 82 |
+
/* -webkit-transition: opacity 400ms ease; */
|
| 83 |
+
/* transition: opacity 400ms ease; */
|
| 84 |
+
|
| 85 |
+
-ms-word-break: break-all;
|
| 86 |
+
word-break: break-all;
|
| 87 |
+
|
| 88 |
+
/* Non standard for webkit */
|
| 89 |
+
word-break: break-word;
|
| 90 |
+
|
| 91 |
+
-webkit-hyphens: auto;
|
| 92 |
+
-moz-hyphens: auto;
|
| 93 |
+
hyphens: auto;
|
| 94 |
+
|
| 95 |
+
width: auto;
|
| 96 |
+
}
|
| 97 |
+
.wc-gallery .gallery-caption:after,
|
| 98 |
+
.wc-gallery .gallery-caption:before {
|
| 99 |
+
box-shadow: none;
|
| 100 |
+
min-height: 0;
|
| 101 |
+
position:relative;
|
| 102 |
+
display: none;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.wc-gallery .gallery-captions-on-hover .gallery-caption {
|
| 106 |
+
background: rgba(255, 255, 255, .8);
|
| 107 |
+
position: absolute;
|
| 108 |
+
display: none;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.wc-gallery .gallery-captions-on-hover .gallery-item:hover .gallery-caption {
|
| 112 |
+
display: block;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
@media (max-width: 480px) {
|
| 116 |
+
body .wc-gallery .gallery.gallery-columns-9 .gallery-item,
|
| 117 |
+
body .wc-gallery .gallery.gallery-columns-8 .gallery-item,
|
| 118 |
+
body .wc-gallery .gallery.gallery-columns-7 .gallery-item,
|
| 119 |
+
body .wc-gallery .gallery.gallery-columns-6 .gallery-item,
|
| 120 |
+
body .wc-gallery .gallery.gallery-columns-5 .gallery-item,
|
| 121 |
+
body .wc-gallery .gallery.gallery-columns-4 .gallery-item,
|
| 122 |
+
body .wc-gallery .gallery.gallery-columns-3 .gallery-item,
|
| 123 |
+
body .wc-gallery .gallery.gallery-columns-2 .gallery-item,
|
| 124 |
+
body .wc-gallery .gallery.gallery-columns-1 .gallery-item {
|
| 125 |
+
width: 99.9%;
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
/**
|
| 130 |
+
* [gallery flexslider]
|
| 131 |
+
* ----------------------------------------------------------------------------
|
| 132 |
+
*/
|
| 133 |
+
.wc-gallery .gallery.wcflexslider {
|
| 134 |
+
line-height: 1;
|
| 135 |
+
border-width: 0;
|
| 136 |
+
-webkit-border-radius: 0px;
|
| 137 |
+
-moz-border-radius: 0px;
|
| 138 |
+
-o-border-radius: 0px;
|
| 139 |
+
border-radius: 0px;
|
| 140 |
+
-webkit-box-shadow: none;
|
| 141 |
+
-moz-box-shadow: none;
|
| 142 |
+
-o-box-shadow: none;
|
| 143 |
+
box-shadow: none;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.wc-gallery .gallery.wcflexslider .wcflex-control-paging li a {
|
| 147 |
+
background-color: #eeeeee;
|
| 148 |
+
box-shadow: none;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.wc-gallery .gallery.wcflexslider .wcflex-control-paging li a.wcflex-active {
|
| 152 |
+
background-color: #cccccc;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.wc-gallery .gallery.wcflexslider .wcflex-direction-nav a {
|
| 156 |
+
color: rgba(0,0,0,0.8);
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.wc-gallery .gallery.wcflexslider .wcflex-slide-item {
|
| 160 |
+
position: relative;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.wc-gallery .gallery.wcflexslider .wcflex-slide-item .wcflex-center-slide {
|
| 164 |
+
position: relative;
|
| 165 |
+
margin-left: auto;
|
| 166 |
+
margin-right: auto;
|
| 167 |
+
}
|
| 168 |
+
.wc-gallery .gallery.wcflexslider .wcflex-slide-item .wp-caption-text {
|
| 169 |
+
padding: 5px 10px;
|
| 170 |
+
opacity: 0.7;
|
| 171 |
+
position: absolute;
|
| 172 |
+
bottom: 0;
|
| 173 |
+
left: 0;
|
| 174 |
+
right: 0;
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
.wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-prev { left: 0px; }
|
| 178 |
+
.wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-next { right: 0px; }
|
| 179 |
+
.wc-gallery .gallery.wcflexslider:hover .wcflex-prev { left: 10px; }
|
| 180 |
+
.wc-gallery .gallery.wcflexslider:hover .wcflex-next { right: 10px; }
|
| 181 |
+
|
| 182 |
+
@media screen and (max-width: 860px) {
|
| 183 |
+
.wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-prev { left: 10px;}
|
| 184 |
+
.wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-next { right: 10px;}
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
/*
|
| 188 |
+
* Image Popup
|
| 189 |
+
*/
|
| 190 |
+
.mfp-close:hover,
|
| 191 |
+
.mfp-close:active,
|
| 192 |
+
.mfp-close:focus,
|
| 193 |
+
.mfp-arrow:hover,
|
| 194 |
+
.mfp-arrow:active,
|
| 195 |
+
.mfp-arrow:focus {
|
| 196 |
+
background-color: transparent;
|
| 197 |
+
}
|
includes/functions.php
ADDED
|
@@ -0,0 +1,421 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* The Gallery shortcode.
|
| 4 |
+
*
|
| 5 |
+
* This implements the functionality of the Gallery Shortcode for displaying
|
| 6 |
+
* WordPress images on a post.
|
| 7 |
+
*
|
| 8 |
+
* @since 2.5.0
|
| 9 |
+
*
|
| 10 |
+
* @param array $attr Attributes of the shortcode.
|
| 11 |
+
* @return string HTML content to display gallery.
|
| 12 |
+
*/
|
| 13 |
+
function wc_gallery_shortcode($blank, $attr) {
|
| 14 |
+
$post = get_post();
|
| 15 |
+
|
| 16 |
+
static $instance = 0;
|
| 17 |
+
$instance++;
|
| 18 |
+
|
| 19 |
+
// We're trusting author input, so let's at least make sure it looks like a valid orderby statement
|
| 20 |
+
if ( isset( $attr['orderby'] ) ) {
|
| 21 |
+
$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
|
| 22 |
+
if ( !$attr['orderby'] )
|
| 23 |
+
unset( $attr['orderby'] );
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
extract(shortcode_atts(array(
|
| 27 |
+
'order' => 'ASC',
|
| 28 |
+
'orderby' => 'menu_order ID',
|
| 29 |
+
'id' => $post ? $post->ID : 0,
|
| 30 |
+
'itemtag' => 'dl',
|
| 31 |
+
'icontag' => 'dt',
|
| 32 |
+
'captiontag' => 'dd',
|
| 33 |
+
'captions' => 'show',
|
| 34 |
+
'columns' => 3,
|
| 35 |
+
'link' => 'post',
|
| 36 |
+
'size' => 'thumbnail',
|
| 37 |
+
'targetsize' => 'large',
|
| 38 |
+
'display' => 'masonry',
|
| 39 |
+
'customlink' => 'false',
|
| 40 |
+
'class' => '',
|
| 41 |
+
'include' => '',
|
| 42 |
+
'exclude' => ''
|
| 43 |
+
), $attr, 'gallery'));
|
| 44 |
+
|
| 45 |
+
$id = intval($id);
|
| 46 |
+
if ( 'RAND' == $order )
|
| 47 |
+
$orderby = 'none';
|
| 48 |
+
|
| 49 |
+
if ( !empty($include) ) {
|
| 50 |
+
$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
|
| 51 |
+
|
| 52 |
+
$attachments = array();
|
| 53 |
+
foreach ( $_attachments as $key => $val ) {
|
| 54 |
+
$attachments[$val->ID] = $_attachments[$key];
|
| 55 |
+
}
|
| 56 |
+
} elseif ( !empty($exclude) ) {
|
| 57 |
+
$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
|
| 58 |
+
} else {
|
| 59 |
+
$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
if ( empty($attachments) )
|
| 63 |
+
return '';
|
| 64 |
+
|
| 65 |
+
if ( is_feed() ) {
|
| 66 |
+
$output = "\n";
|
| 67 |
+
foreach ( $attachments as $att_id => $attachment )
|
| 68 |
+
$output .= wp_get_attachment_link($att_id, $size, true) . "\n";
|
| 69 |
+
return $output;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
$itemtag = tag_escape($itemtag);
|
| 73 |
+
$captiontag = tag_escape($captiontag);
|
| 74 |
+
$icontag = tag_escape($icontag);
|
| 75 |
+
$valid_tags = wp_kses_allowed_html( 'post' );
|
| 76 |
+
if ( ! isset( $valid_tags[ $itemtag ] ) )
|
| 77 |
+
$itemtag = 'dl';
|
| 78 |
+
if ( ! isset( $valid_tags[ $captiontag ] ) )
|
| 79 |
+
$captiontag = 'dd';
|
| 80 |
+
if ( ! isset( $valid_tags[ $icontag ] ) )
|
| 81 |
+
$icontag = 'dt';
|
| 82 |
+
|
| 83 |
+
$columns = intval($columns);
|
| 84 |
+
$itemwidth = $columns > 0 ? floor(100/$columns) : 100;
|
| 85 |
+
$float = is_rtl() ? 'right' : 'left';
|
| 86 |
+
|
| 87 |
+
$selector = "gallery-{$instance}";
|
| 88 |
+
|
| 89 |
+
$gallery_style = $gallery_div = '';
|
| 90 |
+
if ( apply_filters( 'use_default_gallery_style', true ) )
|
| 91 |
+
$gallery_style = "
|
| 92 |
+
<style type='text/css'>
|
| 93 |
+
#{$selector} {
|
| 94 |
+
margin: auto;
|
| 95 |
+
}
|
| 96 |
+
#{$selector} .gallery-item {
|
| 97 |
+
float: {$float};
|
| 98 |
+
margin-top: 10px;
|
| 99 |
+
text-align: center;
|
| 100 |
+
width: {$itemwidth}%;
|
| 101 |
+
}
|
| 102 |
+
#{$selector} img {
|
| 103 |
+
border: 2px solid #cfcfcf;
|
| 104 |
+
}
|
| 105 |
+
#{$selector} .gallery-caption {
|
| 106 |
+
margin-left: 0;
|
| 107 |
+
}
|
| 108 |
+
/* see gallery_shortcode() in wp-includes/media.php */
|
| 109 |
+
</style>";
|
| 110 |
+
$size_class = sanitize_html_class( $size );
|
| 111 |
+
|
| 112 |
+
$showcaptions = 'hide' == $captions ? false : true;
|
| 113 |
+
$customlink = 'true' == $customlink ? true : false;
|
| 114 |
+
$class = explode( ' ', $class );
|
| 115 |
+
|
| 116 |
+
if ( 'slider' == $display ) {
|
| 117 |
+
wp_enqueue_script( 'wc-gallery-flexslider' );
|
| 118 |
+
wp_enqueue_script( 'wc-gallery' );
|
| 119 |
+
|
| 120 |
+
$class[] = 'wc-gallery';
|
| 121 |
+
$class[] = 'gallery';
|
| 122 |
+
$class[] = 'wcslider';
|
| 123 |
+
$class[] = 'wcflexslider';
|
| 124 |
+
$gallery_div = "<div class='".implode( ' ', $class )."'>";
|
| 125 |
+
$gallery_div .= "<ul id='$selector' class='slides'>";
|
| 126 |
+
$output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
|
| 127 |
+
|
| 128 |
+
$i = 0;
|
| 129 |
+
foreach ( $attachments as $id => $attachment ) {
|
| 130 |
+
if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
|
| 131 |
+
continue;
|
| 132 |
+
list($src, $width, $height) = $img;
|
| 133 |
+
$image_output = "<img src='{$src}' width='{$width}' height='{$height}' />";
|
| 134 |
+
$image_meta = wp_get_attachment_metadata( $id );
|
| 135 |
+
|
| 136 |
+
$orientation = '';
|
| 137 |
+
if ( isset( $image_meta['height'], $image_meta['width'] ) )
|
| 138 |
+
$orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
|
| 139 |
+
|
| 140 |
+
$output .= "
|
| 141 |
+
<li class='wcflex-slide-item'>
|
| 142 |
+
$image_output";
|
| 143 |
+
if ( $showcaptions && $captiontag && trim($attachment->post_excerpt) ) {
|
| 144 |
+
$output .= "
|
| 145 |
+
<div class='wp-caption-text gallery-caption'>
|
| 146 |
+
" . wptexturize($attachment->post_excerpt) . "
|
| 147 |
+
</div>";
|
| 148 |
+
}
|
| 149 |
+
$output .= "</li>";
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
$output .= "</ul></div>\n";
|
| 153 |
+
}
|
| 154 |
+
else if ( 'carousel' == $display ) {
|
| 155 |
+
wp_enqueue_script( 'wc-gallery-flexslider' );
|
| 156 |
+
wp_enqueue_script( 'wc-gallery' );
|
| 157 |
+
|
| 158 |
+
$class[] = 'wc-gallery';
|
| 159 |
+
$class[] = 'gallery';
|
| 160 |
+
$class[] = 'wccarousel';
|
| 161 |
+
$class[] = 'wcflexslider';
|
| 162 |
+
$gallery_div = "<div class='".implode( ' ', $class )."'>";
|
| 163 |
+
$gallery_div .= "<ul id='$selector' class='slides'>";
|
| 164 |
+
$output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
|
| 165 |
+
|
| 166 |
+
$i = 0;
|
| 167 |
+
foreach ( $attachments as $id => $attachment ) {
|
| 168 |
+
if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
|
| 169 |
+
continue;
|
| 170 |
+
list($src, $width, $height) = $img;
|
| 171 |
+
$image_output = "<img src='{$src}' width='{$width}' height='{$height}' />";
|
| 172 |
+
$image_meta = wp_get_attachment_metadata( $id );
|
| 173 |
+
|
| 174 |
+
$orientation = '';
|
| 175 |
+
if ( isset( $image_meta['height'], $image_meta['width'] ) )
|
| 176 |
+
$orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
|
| 177 |
+
|
| 178 |
+
$output .= "
|
| 179 |
+
<li class='wcflex-slide-item'>
|
| 180 |
+
<div class='wcflex-center-slide' style='width:{$width}px'>
|
| 181 |
+
$image_output";
|
| 182 |
+
if ( $showcaptions && $captiontag && trim($attachment->post_excerpt) ) {
|
| 183 |
+
$output .= "
|
| 184 |
+
<div class='wp-caption-text gallery-caption'>
|
| 185 |
+
" . wptexturize($attachment->post_excerpt) . "
|
| 186 |
+
</div>";
|
| 187 |
+
}
|
| 188 |
+
$output .= "</div></li>";
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
$output .= "</ul></div>\n";
|
| 192 |
+
}
|
| 193 |
+
else {
|
| 194 |
+
wp_enqueue_script( 'wc-gallery-popup' );
|
| 195 |
+
wp_enqueue_script( 'wc-gallery' );
|
| 196 |
+
|
| 197 |
+
if ( in_array( $size, array( 'thumbnail', 'wcsquare' ) ) )
|
| 198 |
+
$display = 'default';
|
| 199 |
+
|
| 200 |
+
if ( 'large' == $size && 1 == $columns )
|
| 201 |
+
$display = 'default';
|
| 202 |
+
|
| 203 |
+
$class[] = "wc-gallery";
|
| 204 |
+
$class[] = "gallery";
|
| 205 |
+
$class[] = "gallery-{$display}";
|
| 206 |
+
$class[] = "galleryid-{$id}";
|
| 207 |
+
$class[] = "gallery-columns-{$columns}";
|
| 208 |
+
$class[] = "gallery-size-{$size_class}";
|
| 209 |
+
// custom links should not call popup
|
| 210 |
+
if ( ! $customlink )
|
| 211 |
+
$class[] = "gallery-link-{$link}";
|
| 212 |
+
|
| 213 |
+
if ( 'onhover' == $captions )
|
| 214 |
+
$class[] = 'gallery-captions-on-hover';
|
| 215 |
+
|
| 216 |
+
$class = implode( ' ', $class );
|
| 217 |
+
|
| 218 |
+
$gallery_div .= "<div id='$selector' class='{$class}'>";
|
| 219 |
+
$output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
|
| 220 |
+
|
| 221 |
+
$i = 0;
|
| 222 |
+
foreach ( $attachments as $id => $attachment ) {
|
| 223 |
+
if ( ! empty( $link ) && 'file' === $link ) {
|
| 224 |
+
$image_output = wc_gallery_get_attachment_link( $id, $size, false, false, false, $targetsize, $customlink );
|
| 225 |
+
$image_output = preg_replace( '/^<a /', '<a rel="gallery-'.$instance.'" ', $image_output );
|
| 226 |
+
}
|
| 227 |
+
elseif ( ! empty( $link ) && 'none' === $link )
|
| 228 |
+
$image_output = wp_get_attachment_image( $id, $size, false );
|
| 229 |
+
else
|
| 230 |
+
$image_output = wp_get_attachment_link( $id, $size, true, false );
|
| 231 |
+
|
| 232 |
+
$image_meta = wp_get_attachment_metadata( $id );
|
| 233 |
+
|
| 234 |
+
$orientation = '';
|
| 235 |
+
if ( isset( $image_meta['height'], $image_meta['width'] ) )
|
| 236 |
+
$orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
|
| 237 |
+
|
| 238 |
+
$output .= "<{$itemtag} class='gallery-item'>";
|
| 239 |
+
$output .= "
|
| 240 |
+
<{$icontag} class='gallery-icon {$orientation}'>
|
| 241 |
+
$image_output
|
| 242 |
+
</{$icontag}>";
|
| 243 |
+
if ( $showcaptions && $captiontag && trim($attachment->post_excerpt) ) {
|
| 244 |
+
$output .= "
|
| 245 |
+
<{$captiontag} class='wp-caption-text gallery-caption'>
|
| 246 |
+
" . wptexturize($attachment->post_excerpt) . "
|
| 247 |
+
</{$captiontag}>";
|
| 248 |
+
}
|
| 249 |
+
$output .= "</{$itemtag}>";
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
$output .= "</div>\n";
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
return '<div class="wc-gallery">' . $output . '</div>';
|
| 256 |
+
}
|
| 257 |
+
add_filter( 'post_gallery', 'wc_gallery_shortcode', 10, 2 );
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
/**
|
| 261 |
+
* Retrieve an attachment page link using an image or icon, if possible.
|
| 262 |
+
*
|
| 263 |
+
* @since 2.5.0
|
| 264 |
+
* @uses apply_filters() Calls 'wp_get_attachment_link' filter on HTML content with same parameters as function.
|
| 265 |
+
*
|
| 266 |
+
* @param int $id Optional. Post ID.
|
| 267 |
+
* @param string $size Optional, default is 'thumbnail'. Size of image, either array or string.
|
| 268 |
+
* @param bool $permalink Optional, default is false. Whether to add permalink to image.
|
| 269 |
+
* @param bool $icon Optional, default is false. Whether to include icon.
|
| 270 |
+
* @param string|bool $text Optional, default is false. If string, then will be link text.
|
| 271 |
+
* @return string HTML content.
|
| 272 |
+
*/
|
| 273 |
+
function wc_gallery_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false, $targetsize = 'large', $customlink = false ) {
|
| 274 |
+
$id = intval( $id );
|
| 275 |
+
$_post = get_post( $id );
|
| 276 |
+
|
| 277 |
+
if ( empty( $_post ) || ( 'attachment' != $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) )
|
| 278 |
+
return __( 'Missing Attachment' );
|
| 279 |
+
|
| 280 |
+
if ( $customlink ) {
|
| 281 |
+
$url = get_post_meta( $_post->ID, _WC_GALLERY_PREFIX . 'custom_image_link', true );
|
| 282 |
+
}
|
| 283 |
+
else if ( $permalink ) {
|
| 284 |
+
$url = get_attachment_link( $_post->ID );
|
| 285 |
+
}
|
| 286 |
+
else if ( $targetsize ) {
|
| 287 |
+
if ( $img = wp_get_attachment_image_src( $_post->ID, $targetsize ) )
|
| 288 |
+
$url = $img[0];
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
$post_title = esc_attr( $_post->post_title );
|
| 292 |
+
|
| 293 |
+
if ( $text )
|
| 294 |
+
$link_text = $text;
|
| 295 |
+
elseif ( $size && 'none' != $size )
|
| 296 |
+
$link_text = wp_get_attachment_image( $id, $size, $icon );
|
| 297 |
+
else
|
| 298 |
+
$link_text = '';
|
| 299 |
+
|
| 300 |
+
if ( trim( $link_text ) == '' )
|
| 301 |
+
$link_text = $_post->post_title;
|
| 302 |
+
|
| 303 |
+
return apply_filters( 'wp_get_attachment_link', "<a href='$url' title='$post_title'>$link_text</a>", $id, $size, $permalink, $icon, $text );
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
|
| 307 |
+
/**
|
| 308 |
+
* Outputs a view template which can be used with wp.media.template
|
| 309 |
+
*/
|
| 310 |
+
function wc_gallery_print_media_templates() {
|
| 311 |
+
$display_types = array(
|
| 312 |
+
'masonry' => __( 'Gallery', 'wc_gallery' ),
|
| 313 |
+
'carousel' => __( 'Carousel', 'wc_gallery' ),
|
| 314 |
+
'slider' => __( 'Slider', 'wc_gallery' ),
|
| 315 |
+
);
|
| 316 |
+
?>
|
| 317 |
+
<script type="text/html" id="tmpl-wc-gallery-settings">
|
| 318 |
+
<label class="setting">
|
| 319 |
+
<span><?php _e( 'Display', 'wc_gallery' ); ?></span>
|
| 320 |
+
<select class="display" name="display" data-setting="display">
|
| 321 |
+
<?php foreach ( $display_types as $key => $value ) : ?>
|
| 322 |
+
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'default' ); ?>><?php echo esc_html( $value ); ?></option>
|
| 323 |
+
<?php endforeach; ?>
|
| 324 |
+
</select>
|
| 325 |
+
</label>
|
| 326 |
+
|
| 327 |
+
<label class="setting">
|
| 328 |
+
<span><?php _e( 'Size', 'wc_gallery' ); ?></span>
|
| 329 |
+
<select class="size" name="size" data-setting="size">
|
| 330 |
+
<?
|
| 331 |
+
$sizes = apply_filters( 'image_size_names_choose', array(
|
| 332 |
+
'thumbnail' => __('Thumbnail'),
|
| 333 |
+
'medium' => __('Medium'),
|
| 334 |
+
'large' => __('Large'),
|
| 335 |
+
'full' => __('Full Size'),
|
| 336 |
+
) );
|
| 337 |
+
?>
|
| 338 |
+
|
| 339 |
+
<?php foreach ( $sizes as $key => $name ) : ?>
|
| 340 |
+
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'thumbnail' ); ?>><?php echo esc_html( $name ); ?></option>
|
| 341 |
+
<?php endforeach; ?>
|
| 342 |
+
</select>
|
| 343 |
+
</label>
|
| 344 |
+
|
| 345 |
+
<label class="setting">
|
| 346 |
+
<span><?php _e( 'Target Size', 'wc_gallery' ); ?></span>
|
| 347 |
+
<select class="targetsize" name="targetsize" data-setting="targetsize">
|
| 348 |
+
<?php foreach ( $sizes as $key => $name ) : ?>
|
| 349 |
+
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'large' ); ?>><?php echo esc_html( $name ); ?></option>
|
| 350 |
+
<?php endforeach; ?>
|
| 351 |
+
</select>
|
| 352 |
+
</label>
|
| 353 |
+
|
| 354 |
+
<?php
|
| 355 |
+
$captions = array(
|
| 356 |
+
'show' => __( 'Show', 'wc_gallery' ),
|
| 357 |
+
'onhover' => __( 'On Image Hover', 'wc_gallery' ),
|
| 358 |
+
'hide' => __( 'Hide', 'wc_gallery' )
|
| 359 |
+
);
|
| 360 |
+
?>
|
| 361 |
+
<label class="setting">
|
| 362 |
+
<span><?php _e( 'Show Captions', 'wc_gallery' ); ?></span>
|
| 363 |
+
<select class="captions" name="captions" data-setting="captions">
|
| 364 |
+
<?php foreach ( $captions as $key => $value ) : ?>
|
| 365 |
+
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'show' ); ?>><?php echo esc_html( $value ); ?></option>
|
| 366 |
+
<?php endforeach; ?>
|
| 367 |
+
</select>
|
| 368 |
+
</label>
|
| 369 |
+
|
| 370 |
+
<label class="setting">
|
| 371 |
+
<span><?php _e( 'Custom Link', 'wc_gallery' ); ?></span>
|
| 372 |
+
<input type="checkbox" name="customlink" data-setting="customlink" />
|
| 373 |
+
</label>
|
| 374 |
+
|
| 375 |
+
<label class="setting">
|
| 376 |
+
<span><?php _e( 'Class', 'wc_gallery' ); ?></span>
|
| 377 |
+
<input type="text" name="class" data-setting="class" />
|
| 378 |
+
</label>
|
| 379 |
+
</script>
|
| 380 |
+
<?php
|
| 381 |
+
}
|
| 382 |
+
add_action( 'print_media_templates', 'wc_gallery_print_media_templates' );
|
| 383 |
+
|
| 384 |
+
/**
|
| 385 |
+
* Adds custom fields to attachment page
|
| 386 |
+
* http://wpengineer.com/2076/add-custom-field-attachment-in-wordpress/
|
| 387 |
+
*
|
| 388 |
+
* @param mixed $form_fields
|
| 389 |
+
* @param mixed $post
|
| 390 |
+
* @access public
|
| 391 |
+
* @return void
|
| 392 |
+
*/
|
| 393 |
+
function wc_gallery_attachment_fields_to_edit( $form_fields, $post) {
|
| 394 |
+
$form_fields['wc_gallery_custom_image_link'] = array(
|
| 395 |
+
"label" => __( "Link To" ),
|
| 396 |
+
"input" => "text",
|
| 397 |
+
"value" => get_post_meta( $post->ID, _WC_GALLERY_PREFIX . "custom_image_link", true )
|
| 398 |
+
);
|
| 399 |
+
return $form_fields;
|
| 400 |
+
}
|
| 401 |
+
add_filter( "attachment_fields_to_edit", "wc_gallery_attachment_fields_to_edit", null, 2 );
|
| 402 |
+
|
| 403 |
+
/**
|
| 404 |
+
* Save custom input in media panel to custom field
|
| 405 |
+
* and validate hyperlink inserted.
|
| 406 |
+
*
|
| 407 |
+
* @param mixed $post
|
| 408 |
+
* @param mixed $attachment
|
| 409 |
+
* @access public
|
| 410 |
+
* @return void
|
| 411 |
+
*/
|
| 412 |
+
function wc_gallery_attachment_fields_to_save( $post, $attachment) {
|
| 413 |
+
if( isset( $attachment['wc_gallery_custom_image_link'] ) ){
|
| 414 |
+
update_post_meta( $post['ID'], _WC_GALLERY_PREFIX . 'custom_image_link', esc_url_raw( $attachment['wc_gallery_custom_image_link'] ) );
|
| 415 |
+
}
|
| 416 |
+
return $post;
|
| 417 |
+
}
|
| 418 |
+
add_filter( "attachment_fields_to_save", "wc_gallery_attachment_fields_to_save", null, 2 );
|
| 419 |
+
|
| 420 |
+
// This theme uses its own gallery styles.
|
| 421 |
+
add_filter( 'use_default_gallery_style', '__return_false' );
|
includes/js/admin.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function ($) {
|
| 2 |
+
"use strict";
|
| 3 |
+
|
| 4 |
+
var media = wp.media;
|
| 5 |
+
|
| 6 |
+
// Wrap the render() function to append controls.
|
| 7 |
+
media.view.Settings.Gallery = media.view.Settings.Gallery.extend({
|
| 8 |
+
render: function() {
|
| 9 |
+
var $el = this.$el;
|
| 10 |
+
|
| 11 |
+
media.view.Settings.prototype.render.apply( this, arguments );
|
| 12 |
+
|
| 13 |
+
// Append the layout template and update the settings.
|
| 14 |
+
$el.append( media.template( 'wc-gallery-settings' ) );
|
| 15 |
+
media.gallery.defaults.display = 'masonry'; // lil hack that lets media know there's a layout attribute.
|
| 16 |
+
media.gallery.defaults.size = 'thumbnail'; // lil hack that lets media know there's a layout attribute.
|
| 17 |
+
media.gallery.defaults.targetsize = 'large'; // lil hack that lets media know there's a layout attribute.
|
| 18 |
+
media.gallery.defaults.captions = 'show'; // lil hack that lets media know there's a layout attribute.
|
| 19 |
+
media.gallery.defaults.customlink = false; // lil hack that lets media know there's a layout attribute.
|
| 20 |
+
media.gallery.defaults.class = ''; // lil hack that lets media know there's a layout attribute.
|
| 21 |
+
this.update.apply( this, ['display'] );
|
| 22 |
+
this.update.apply( this, ['size'] );
|
| 23 |
+
this.update.apply( this, ['targetsize'] );
|
| 24 |
+
this.update.apply( this, ['captions'] );
|
| 25 |
+
this.update.apply( this, ['customlink'] );
|
| 26 |
+
this.update.apply( this, ['class'] );
|
| 27 |
+
|
| 28 |
+
return this;
|
| 29 |
+
}
|
| 30 |
+
});
|
| 31 |
+
})(jQuery);
|
includes/js/flexslider/README.mdown
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FlexSlider 2
|
| 2 |
+
http://www.woothemes.com/flexslider/ - Copyright (c) 2012 WooThemes
|
| 3 |
+
|
| 4 |
+
## Updates
|
| 5 |
+
|
| 6 |
+
** Version 2.2.0**
|
| 7 |
+
|
| 8 |
+
- Fixed event handler conflicts with devices that are both click and touch enabled. e.g., Windows 8.
|
| 9 |
+
- Made all slider variables public, stored in `slider.vars`. This allows manipulation of `slider.vars.minItems` and `slider.vars.maxItems` on the fly to create different fluid grids at certain breakpoints. [Check out this example demonstrating a basic technique](http://flexslider.woothemes.com/dynamic-carousel-min-max.html)
|
| 10 |
+
- Fixed calculations that were causing strange issues with paging and certain FlexSliders to move out of alignment.
|
| 11 |
+
|
| 12 |
+
*Be sure to test v2.2.0 with your current slider, before pushing live, to ensure everything is playing nicely.*
|
| 13 |
+
|
| 14 |
+
-----
|
| 15 |
+
|
| 16 |
+
## General Notes
|
| 17 |
+
FlexSlider is no longer licensed under the MIT license. FlexSlider now shares the common licensed used for all WooThemes themes, GPLv2.
|
| 18 |
+
|
| 19 |
+
In an effort to move the plugin forward, support for jQuery 1.3.2 has been dropped. The plugin now requires jQuery 1.4.2+. If you don't have access to the later versions of jQuery, [FlexSlider 1.8](https://github.com/woothemes/FlexSlider/tree/flexslider1) should be a perfectly suitable substitute for your needs!
|
| 20 |
+
|
| 21 |
+
Your old styles and properties *might not work out of the box*. Some property names have been changed, noted below, as well as namespacing prefixes being applied to all elements. This means that `.flex-direction-nav .next` is now `.flex-direction-nav .flex-next` by default. The namespacing property is exposed, free for you to change.
|
| 22 |
+
|
| 23 |
+
No more overflow hidden woes! The plugin now generates a viewport element to handle the tedious task of working around overflow hidden. Yay!
|
| 24 |
+
|
| 25 |
+
The slider element is now accessible outside of the callback API via the jQuery .data() method. Example use: `$('#slider').data('flexslider')`
|
| 26 |
+
|
| 27 |
+
Helper strings have been added for performing actions quickly on FlexSlider elements. Example uses:
|
| 28 |
+
|
| 29 |
+
- `$('#slider').flexslider("play") //Play slideshow`
|
| 30 |
+
- `$('#slider').flexslider("pause") //Pause slideshow`
|
| 31 |
+
- `$('#slider').flexslider("stop") //Stop slideshow`
|
| 32 |
+
- `$('#slider').flexslider("next") //Go to next slide`
|
| 33 |
+
- `$('#slider').flexslider("prev") //Go to previous slide`
|
| 34 |
+
- `$('#slider').flexslider(3) //Go fourth slide`
|
| 35 |
+
|
| 36 |
+
Two new methods are available for adding/removing slides, `slider.addSlide()` and `slider.removeSlide()`. More details about this coming soon.
|
| 37 |
+
|
| 38 |
+
- `slider.addSlide(obj, pos)` accepts two parameters, a string/jQuery object and an index.
|
| 39 |
+
- `slider.removeSlide(obj)` accepts one parameter, either an object to be removed, or an index.
|
| 40 |
+
|
| 41 |
+
## Examples
|
| 42 |
+
|
| 43 |
+
- [Basic Slider](http://flexslider.woothemes.com/)
|
| 44 |
+
- [Slider w/thumbnail controlNav pattern](http://flexslider.woothemes.com/thumbnail-controlnav.html)
|
| 45 |
+
- [Slider w/thumbnail slider](http://flexslider.woothemes.com/thumbnail-slider.html)
|
| 46 |
+
- [Basic Carousel](http://flexslider.woothemes.com/basic-carousel.html)
|
| 47 |
+
- [Carousel with min and max ranges](http://flexslider.woothemes.com/carousel-min-max.html)
|
| 48 |
+
- [Video with Vimeo API](http://flexslider.woothemes.com/video.html)
|
| 49 |
+
- [Video with Wistia API](http://flexslider.woothemes.com/video-wistia.html)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
## Properties
|
| 53 |
+
|
| 54 |
+
### namespace: *{new}*
|
| 55 |
+
`namespace` controls the prefixes attached to elements created by the plugin. In previous releases, only certain elements were tagged with a prefix class, which was causing class generalization issues for some users. FlexSlider now prefixes all generated elements with the appropriate namespace.
|
| 56 |
+
|
| 57 |
+
*Hint: `namespace` can be an empty string.*
|
| 58 |
+
|
| 59 |
+
### selector: *{new}*
|
| 60 |
+
The markup structure for FlexSlider has been limited to a "ul.slide li" pattern in previous versions of FlexSlider; no longer. You can now take full control of the markup structure used for your FlexSlider. The `selector` pattern "{container} > {slide}" is mandatory, allowing the plugin to predictably interpret the selector property. Omitting the ">" from the selector is not suggested, but is possible if your markup doesn't follow the immediate descendant pattern.
|
| 61 |
+
|
| 62 |
+
*Examples: "section > article", ".slides > .slide", "#hero .slide"*
|
| 63 |
+
|
| 64 |
+
### easing: *{new}*
|
| 65 |
+
`easing` allows support for jQuery easing! Default options provided by jQuery are "swing" and "linear," but more can be used by included the jQuery Easing plugin. *If you chose a non-existent easing method, the slider will break.*
|
| 66 |
+
|
| 67 |
+
*Note: You need to set `useCSS: false` to force transitions in browsers that support translate3d.*
|
| 68 |
+
*Optional: [jQuery Easing Plugin](http://gsgd.co.uk/sandbox/jquery/easing/)*
|
| 69 |
+
|
| 70 |
+
### direction: *{changed}*
|
| 71 |
+
Previously called "slideDirection" in v1.8 and below.
|
| 72 |
+
|
| 73 |
+
### reverse: *{new}*
|
| 74 |
+
`reverse` will reverse the animation direction of the slider. Meaning, horizontal sliders can move from right to left, and vertical sliders can move bottom to top.
|
| 75 |
+
|
| 76 |
+
### smoothHeight: *{new}*
|
| 77 |
+
`smoothHeight` allows for smooth height transitions between slides. This property currently works for the fade and horizontal slide animation. The property has no effect on horizontal sliding carousels, however.
|
| 78 |
+
|
| 79 |
+
### startAt: *{changed}*
|
| 80 |
+
Previously called "slideToStart" in v1.8 and below.
|
| 81 |
+
|
| 82 |
+
### animationSpeed: *{changed}*
|
| 83 |
+
Previously called "animationDuration" in v1.8 and below.
|
| 84 |
+
|
| 85 |
+
### initDelay: *{new}*
|
| 86 |
+
`initDelay` will delay the initial slideshow of a slider, given in milliseconds. The slider will still initialize, generating controls and displaying the first image, but the slideshow will wait until the `initDelay` time has completed before starting the slideshow.
|
| 87 |
+
|
| 88 |
+
### useCSS: *{new}*
|
| 89 |
+
`useCSS` allow users to override using CSS3 for animation. Translate3d still has numerous bugs that can crop up and wreak havoc, so this is a great property to play with if you are experiencing unexplainable issues in Webkit browsers.
|
| 90 |
+
|
| 91 |
+
*Hint: Use conditionals to enable/disable the use of CSS3 on desktops and mobile devices. Mobile devices, in my experience, do not share many of the translate3d bugs seen on desktop browsers.*
|
| 92 |
+
|
| 93 |
+
### touch: *{new}*
|
| 94 |
+
`touch` allows users to exclude touch swipe functionality from their sliders.
|
| 95 |
+
|
| 96 |
+
### keyboard: *{changed}*
|
| 97 |
+
Previously called "keyboardNav" in v1.8 and below.
|
| 98 |
+
|
| 99 |
+
### multipleKeyboard *{new}*
|
| 100 |
+
`multipleKeyboard` allows users to override the default plugin keyboard behavior, enabling keyboard control of more than one slider on the page. This means that all visible sliders will animate, at the same time, via keyboard input.
|
| 101 |
+
|
| 102 |
+
*Hint: You can use `multipleKeyboard` to allow keyboard navigation on pages where multiple sliders are present, but only one is visible.*
|
| 103 |
+
|
| 104 |
+
### mousewheel: *{updated}*
|
| 105 |
+
`mousewheel` now requires the jQuery Mousewheel plugin. There are a few reasons for this, but primarily because there is no need for FlexSlider itself to reinvent the awkward complexity of mousewheel interactivity that is handled perfectly by the Mousewheel plugin.
|
| 106 |
+
|
| 107 |
+
*Required: [jQuery Mousewheel Plugin](https://github.com/brandonaaron/jquery-mousewheel)*
|
| 108 |
+
|
| 109 |
+
### controlsContainer: *{updated}*
|
| 110 |
+
`controlsContainer` is one of the more painstaking, potentially confusing properties within FlexSlider. First, the property is no longer required to workaround `overflow: hidden` on slide animation. Second, the property now accepts a **jQuery object**, giving you precise control over the object you want. The plugin no longer attempts to guess what element you are selecting.
|
| 111 |
+
|
| 112 |
+
### sync: *{new}*
|
| 113 |
+
`sync` is a new property that will allow other slider(s) to hook into the current slider via a given selector. The selector should describe an object that has already been initialized as a FlexSlider. Right now, `sync` will synchronize animation, play, and pause behaviors. More behaviors can be added in the future as the property matures.
|
| 114 |
+
|
| 115 |
+
*[Example of sync being used](http://flex.madebymufffin.com/examples/basic-carousel.html)*
|
| 116 |
+
|
| 117 |
+
### asNavFor: *{new}*
|
| 118 |
+
Description to be added.
|
| 119 |
+
|
| 120 |
+
### itemWidth: *{new}*
|
| 121 |
+
`itemWidth` is the primary property for the new carousel options. Without this property, your slider is not considered a carousel. To use `itemWidth`, give an integer value of the width of your individual slides. This should include borders and paddings applied to your slides; a total width measurement.
|
| 122 |
+
|
| 123 |
+
### itemMargin: *{new}*
|
| 124 |
+
`itemMargin` describes the gutter between the slide elements. If each slide has a margin-left of 10px, your itemMargin value would be 10. If elements have margin: 0 10px, your itemMargin would be 20.
|
| 125 |
+
|
| 126 |
+
### minItems: *{new}*
|
| 127 |
+
`minItems` describes the minimum number of slide elements that should be visible in the carousel. When the slider reaches the minimum item count, the slides will resize fluidly with the slider.
|
| 128 |
+
|
| 129 |
+
### maxItems: *{new}*
|
| 130 |
+
`maxItems` describes the maximum number of slide elements that should be visible in the carousel. When the slider reaches the maximum item count, the slides will resize fluidly with the sider.
|
| 131 |
+
|
| 132 |
+
### move: *{new}*
|
| 133 |
+
`move` determines how many slides should be animated within the carousel. When left at 0, the slider will animate the number of visible slides. If any value greater than 0 is given, the slider will animate that number of slides in the carousel on each animation interval.
|
| 134 |
+
|
| 135 |
+
*Hint: The move property will be ignored if the value is higher than the number of visible slides, which can be utilized in responsive design.*
|
| 136 |
+
|
| 137 |
+
### added: *{new}*
|
| 138 |
+
`added()` is a new callback event fired in the new slider.addSlide() function.
|
| 139 |
+
|
| 140 |
+
### removed: *{new}*
|
| 141 |
+
`removed()` is a new callback event fired in the new slider.removeSlide() function.
|
| 142 |
+
|
| 143 |
+
### allowOneSlide: *{new}*
|
| 144 |
+
Boolean. Whether or not you'd like FlexSlider to initialize as usual if only one slide is present.
|
includes/js/flexslider/changelog.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FLEXSLIDER CHANGELOG
|
| 2 |
+
|
| 3 |
+
2013.02.15 - Version 2.0
|
| 4 |
+
* Added changelog.txt
|
includes/js/flexslider/flexslider.css
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* jQuery FlexSlider v2.2.0
|
| 3 |
+
* http://www.woothemes.com/flexslider/
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2012 WooThemes
|
| 6 |
+
* Free to use under the GPLv2 license.
|
| 7 |
+
* http://www.gnu.org/licenses/gpl-2.0.html
|
| 8 |
+
*
|
| 9 |
+
* Contributing author: Tyler Smith (@mbmufffin)
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
/* Browser Resets
|
| 14 |
+
*********************************/
|
| 15 |
+
.wcflex-container a:active,
|
| 16 |
+
.wcflexslider a:active,
|
| 17 |
+
.wcflex-container a:focus,
|
| 18 |
+
.wcflexslider a:focus {outline: none;}
|
| 19 |
+
.slides,
|
| 20 |
+
.wcflex-control-nav,
|
| 21 |
+
.wcflex-direction-nav {margin: 0; padding: 0; list-style: none;}
|
| 22 |
+
|
| 23 |
+
/* Icon Fonts
|
| 24 |
+
*********************************/
|
| 25 |
+
/* Font-face Icons */
|
| 26 |
+
@font-face {
|
| 27 |
+
font-family: 'flexslider-icon';
|
| 28 |
+
src:url('fonts/flexslider-icon.eot');
|
| 29 |
+
src:url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'),
|
| 30 |
+
url('fonts/flexslider-icon.woff') format('woff'),
|
| 31 |
+
url('fonts/flexslider-icon.ttf') format('truetype'),
|
| 32 |
+
url('fonts/flexslider-icon.svg#flexslider-icon') format('svg');
|
| 33 |
+
font-weight: normal;
|
| 34 |
+
font-style: normal;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
/* FlexSlider Necessary Styles
|
| 38 |
+
*********************************/
|
| 39 |
+
.wcflexslider {margin: 0; padding: 0;}
|
| 40 |
+
.wcflexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
|
| 41 |
+
.wcflexslider .slides img {width: 100%; display: block;}
|
| 42 |
+
.wcflex-pauseplay span {text-transform: capitalize;}
|
| 43 |
+
|
| 44 |
+
/* Clearfix for the .slides element */
|
| 45 |
+
.slides:after {content: "\0020"; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
|
| 46 |
+
html[xmlns] .slides {display: block;}
|
| 47 |
+
* html .slides {height: 1%;}
|
| 48 |
+
|
| 49 |
+
/* No JavaScript Fallback */
|
| 50 |
+
/* If you are not using another script, such as Modernizr, make sure you
|
| 51 |
+
* include js that eliminates this class on page load */
|
| 52 |
+
.no-js .slides > li:first-child {display: block;}
|
| 53 |
+
|
| 54 |
+
/* FlexSlider Default Theme
|
| 55 |
+
*********************************/
|
| 56 |
+
.wcflexslider { margin: 0 0 60px; background: #fff; border: 4px solid #fff; position: relative; -webkit-border-radius: 4px; -moz-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2); -moz-box-shadow: 0 1px 4px rgba(0,0,0,.2); -o-box-shadow: 0 1px 4px rgba(0,0,0,.2); box-shadow: 0 1px 4px rgba(0,0,0,.2); zoom: 1; }
|
| 57 |
+
.wcflex-viewport { max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; }
|
| 58 |
+
.loading .wcflex-viewport { max-height: 300px; }
|
| 59 |
+
.wcflexslider .slides { zoom: 1; }
|
| 60 |
+
.carousel li { margin-right: 5px; }
|
| 61 |
+
|
| 62 |
+
/* Direction Nav */
|
| 63 |
+
.wcflex-direction-nav {*height: 0;}
|
| 64 |
+
.wcflex-direction-nav a { display: block; width: 40px; height: 40px; margin: -20px 0 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; color: rgba(0,0,0,0.8); text-shadow: 1px 1px 0 rgba(255,255,255,0.3); -webkit-transition: all .3s ease; -moz-transition: all .3s ease; transition: all .3s ease; }
|
| 65 |
+
.wcflex-direction-nav .wcflex-prev { left: -50px; }
|
| 66 |
+
.wcflex-direction-nav .wcflex-next { right: -50px; text-align: right; }
|
| 67 |
+
.wcflexslider:hover .wcflex-prev { opacity: 0.7; left: 10px; }
|
| 68 |
+
.wcflexslider:hover .wcflex-next { opacity: 0.7; right: 10px; }
|
| 69 |
+
.wcflexslider:hover .wcflex-next:hover, .wcflexslider:hover .wcflex-prev:hover { opacity: 1; }
|
| 70 |
+
.wcflex-direction-nav .wcflex-disabled { opacity: 0!important; filter:alpha(opacity=0); cursor: default; }
|
| 71 |
+
.wcflex-direction-nav a:before { font-family: "flexslider-icon"; font-size: 40px; display: inline-block; content: '\f001'; }
|
| 72 |
+
.wcflex-direction-nav a.wcflex-next:before { content: '\f002'; }
|
| 73 |
+
|
| 74 |
+
/* Pause/Play */
|
| 75 |
+
.wcflex-pauseplay a { display: block; width: 20px; height: 20px; position: absolute; bottom: 5px; left: 10px; opacity: 0.8; z-index: 10; overflow: hidden; cursor: pointer; color: #000; }
|
| 76 |
+
.wcflex-pauseplay a:before { font-family: "flexslider-icon"; font-size: 20px; display: inline-block; content: '\f004'; }
|
| 77 |
+
.wcflex-pauseplay a:hover { opacity: 1; }
|
| 78 |
+
.wcflex-pauseplay a.wcflex-play:before { content: '\f003'; }
|
| 79 |
+
|
| 80 |
+
/* Control Nav */
|
| 81 |
+
.wcflex-control-nav {width: 100%; position: absolute; bottom: -40px; text-align: center;}
|
| 82 |
+
.wcflex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;}
|
| 83 |
+
.wcflex-control-paging li a {width: 11px; height: 11px; display: block; background: #666; background: rgba(0,0,0,0.5); cursor: pointer; text-indent: -9999px; -webkit-border-radius: 20px; -moz-border-radius: 20px; -o-border-radius: 20px; border-radius: 20px; -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -moz-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -o-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); box-shadow: inset 0 0 3px rgba(0,0,0,0.3); }
|
| 84 |
+
.wcflex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); }
|
| 85 |
+
.wcflex-control-paging li a.wcflex-active { background: #000; background: rgba(0,0,0,0.9); cursor: default; }
|
| 86 |
+
|
| 87 |
+
.wcflex-control-thumbs {margin: 5px 0 0; position: static; overflow: hidden;}
|
| 88 |
+
.wcflex-control-thumbs li {width: 25%; float: left; margin: 0;}
|
| 89 |
+
.wcflex-control-thumbs img {width: 100%; display: block; opacity: .7; cursor: pointer;}
|
| 90 |
+
.wcflex-control-thumbs img:hover {opacity: 1;}
|
| 91 |
+
.wcflex-control-thumbs .wcflex-active {opacity: 1; cursor: default;}
|
| 92 |
+
|
| 93 |
+
@media screen and (max-width: 860px) {
|
| 94 |
+
.wcflex-direction-nav .wcflex-prev { opacity: 1; left: 10px;}
|
| 95 |
+
.wcflex-direction-nav .wcflex-next { opacity: 1; right: 10px;}
|
| 96 |
+
}
|
includes/js/flexslider/fonts/flexslider-icon.eot
ADDED
|
Binary file
|
includes/js/flexslider/fonts/flexslider-icon.svg
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" standalone="no"?>
|
| 2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
| 3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
| 4 |
+
<metadata>
|
| 5 |
+
This is a custom SVG font generated by IcoMoon.
|
| 6 |
+
<iconset grid="14"></iconset>
|
| 7 |
+
</metadata>
|
| 8 |
+
<defs>
|
| 9 |
+
<font id="flexslider-icon" horiz-adv-x="448" >
|
| 10 |
+
<font-face units-per-em="448" ascent="384" descent="-64" />
|
| 11 |
+
<missing-glyph horiz-adv-x="448" />
|
| 12 |
+
<glyph unicode="" d="M 185.50-9.25l-163.00,162.75q-9.25,9.25 -9.25,22.625t 9.25,22.625l 163.00,162.75q 9.25,9.25 22.625,9.25t 22.625-9.25l 18.75-18.75q 9.25-9.25 9.25-22.625t-9.25-22.625l-121.50-121.50l 121.50-121.25q 9.25-9.50 9.25-22.75t-9.25-22.50l-18.75-18.75q-9.25-9.25 -22.625-9.25t-22.625,9.25z" horiz-adv-x="288" />
|
| 13 |
+
<glyph unicode="" d="M 274.75,176.00q0.00-13.00 -9.25-22.75l-163.00-162.75q-9.25-9.25 -22.50-9.25t-22.50,9.25l-19.00,18.75q-9.25,9.75 -9.25,22.75q0.00,13.25 9.25,22.50l 121.50,121.50l-121.50,121.25q-9.25,9.75 -9.25,22.75q0.00,13.25 9.25,22.50l 19.00,18.75q 9.00,9.50 22.50,9.50t 22.50-9.50l 163.00-162.75q 9.25-9.25 9.25-22.50z" horiz-adv-x="288" />
|
| 14 |
+
<glyph unicode="" d="M 346.00,152.25l-332.00-184.50q-5.75-3.25 -9.875-0.75t-4.125,9.00l0.00,368.00 q0.00,6.50 4.125,9.00t 9.875-0.75l 332.00-184.50q 5.75-3.25 5.75-7.75t-5.75-7.75z" horiz-adv-x="352" />
|
| 15 |
+
<glyph unicode="" d="M 384.00,336.00l0.00-352.00 q0.00-6.50 -4.75-11.25t-11.25-4.75l-128.00,0.00 q-6.50,0.00 -11.25,4.75t-4.75,11.25l0.00,352.00 q0.00,6.50 4.75,11.25t 11.25,4.75l 128.00,0.00 q 6.50,0.00 11.25-4.75t 4.75-11.25zM 160.00,336.00l0.00-352.00 q0.00-6.50 -4.75-11.25t-11.25-4.75l-128.00,0.00 q-6.50,0.00 -11.25,4.75t-4.75,11.25l0.00,352.00 q0.00,6.50 4.75,11.25t 11.25,4.75l 128.00,0.00 q 6.50,0.00 11.25-4.75t 4.75-11.25z" horiz-adv-x="384" />
|
| 16 |
+
<glyph unicode="" d="M 402.75,208.00q0.00-13.25 -9.25-22.50l-162.75-162.75q-9.50-9.50 -22.75-9.50q-13.50,0.00 -22.50,9.50l-162.75,162.75q-9.50,9.00 -9.50,22.50q0.00,13.25 9.50,22.75l 18.50,18.75q 9.75,9.25 22.75,9.25q 13.25,0.00 22.50-9.25l 121.50-121.50l 121.50,121.50q 9.25,9.25 22.50,9.25q 13.00,0.00 22.75-9.25l 18.75-18.75q 9.25-9.75 9.25-22.75z" horiz-adv-x="416" />
|
| 17 |
+
<glyph unicode=" " horiz-adv-x="224" />
|
| 18 |
+
<glyph class="hidden" unicode="" d="M0,384L 448 -64L0 -64 z" horiz-adv-x="0" />
|
| 19 |
+
</font></defs></svg>
|
includes/js/flexslider/fonts/flexslider-icon.ttf
ADDED
|
Binary file
|
includes/js/flexslider/fonts/flexslider-icon.woff
ADDED
|
Binary file
|
includes/js/flexslider/images/bg_play_pause.png
ADDED
|
Binary file
|
includes/js/flexslider/jquery.flexslider-min.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* jQuery wcflexSlider v2.2.0
|
| 3 |
+
* Copyright 2012 WooThemes
|
| 4 |
+
* Contributing Author: Tyler Smith
|
| 5 |
+
*/(function(e){e.wcflexslider=function(t,n){var r=e(t);r.vars=e.extend({},e.wcflexslider.defaults,n);var i=r.vars.namespace,s=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,o=("ontouchstart"in window||s||window.DocumentTouch&&document instanceof DocumentTouch)&&r.vars.touch,u="click touchend MSPointerUp",a="",f,l=r.vars.direction==="vertical",c=r.vars.reverse,h=r.vars.itemWidth>0,p=r.vars.animation==="fade",d=r.vars.asNavFor!=="",v={},m=!0;e.data(t,"wcflexslider",r);v={init:function(){r.animating=!1;r.currentSlide=parseInt(r.vars.startAt?r.vars.startAt:0);isNaN(r.currentSlide)&&(r.currentSlide=0);r.animatingTo=r.currentSlide;r.atEnd=r.currentSlide===0||r.currentSlide===r.last;r.containerSelector=r.vars.selector.substr(0,r.vars.selector.search(" "));r.slides=e(r.vars.selector,r);r.container=e(r.containerSelector,r);r.count=r.slides.length;r.syncExists=e(r.vars.sync).length>0;r.vars.animation==="slide"&&(r.vars.animation="swing");r.prop=l?"top":"marginLeft";r.args={};r.manualPause=!1;r.stopped=!1;r.started=!1;r.startTimeout=null;r.transitions=!r.vars.video&&!p&&r.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(e.style[t[n]]!==undefined){r.pfx=t[n].replace("Perspective","").toLowerCase();r.prop="-"+r.pfx+"-transform";return!0}return!1}();r.vars.controlsContainer!==""&&(r.controlsContainer=e(r.vars.controlsContainer).length>0&&e(r.vars.controlsContainer));r.vars.manualControls!==""&&(r.manualControls=e(r.vars.manualControls).length>0&&e(r.vars.manualControls));if(r.vars.randomize){r.slides.sort(function(){return Math.round(Math.random())-.5});r.container.empty().append(r.slides)}r.doMath();r.setup("init");r.vars.controlNav&&v.controlNav.setup();r.vars.directionNav&&v.directionNav.setup();r.vars.keyboard&&(e(r.containerSelector).length===1||r.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!r.animating&&(t===39||t===37)){var n=t===39?r.getTarget("next"):t===37?r.getTarget("prev"):!1;r.wcflexAnimate(n,r.vars.pauseOnAction)}});r.vars.mousewheel&&r.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=t<0?r.getTarget("next"):r.getTarget("prev");r.wcflexAnimate(s,r.vars.pauseOnAction)});r.vars.pausePlay&&v.pausePlay.setup();r.vars.slideshow&&r.vars.pauseInvisible&&v.pauseInvisible.init();if(r.vars.slideshow){r.vars.pauseOnHover&&r.hover(function(){!r.manualPlay&&!r.manualPause&&r.pause()},function(){!r.manualPause&&!r.manualPlay&&!r.stopped&&r.play()});if(!r.vars.pauseInvisible||!v.pauseInvisible.isHidden())r.vars.initDelay>0?r.startTimeout=setTimeout(r.play,r.vars.initDelay):r.play()}d&&v.asNav.setup();o&&r.vars.touch&&v.touch();(!p||p&&r.vars.smoothHeight)&&e(window).bind("resize orientationchange focus",v.resize);r.find("img").attr("draggable","false");setTimeout(function(){r.vars.start(r)},200)},asNav:{setup:function(){r.asNav=!0;r.animatingTo=Math.floor(r.currentSlide/r.move);r.currentItem=r.currentSlide;r.slides.removeClass(i+"active-slide").eq(r.currentItem).addClass(i+"active-slide");if(!s)r.slides.click(function(t){t.preventDefault();var n=e(this),s=n.index(),o=n.offset().left-e(r).scrollLeft();if(o<=0&&n.hasClass(i+"active-slide"))r.wcflexAnimate(r.getTarget("prev"),!0);else if(!e(r.vars.asNavFor).data("wcflexslider").animating&&!n.hasClass(i+"active-slide")){r.direction=r.currentItem<s?"next":"prev";r.wcflexAnimate(s,r.vars.pauseOnAction,!1,!0,!0)}});else{t._slider=r;r.slides.each(function(){var t=this;t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",function(e){e.preventDefault();e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1);t.addEventListener("MSGestureTap",function(t){t.preventDefault();var n=e(this),i=n.index();if(!e(r.vars.asNavFor).data("wcflexslider").animating&&!n.hasClass("active")){r.direction=r.currentItem<i?"next":"prev";r.wcflexAnimate(i,r.vars.pauseOnAction,!1,!0,!0)}})})}}},controlNav:{setup:function(){r.manualControls?v.controlNav.setupManual():v.controlNav.setupPaging()},setupPaging:function(){var t=r.vars.controlNav==="thumbnails"?"control-thumbs":"control-paging",n=1,s,o;r.controlNavScaffold=e('<ol class="'+i+"control-nav "+i+t+'"></ol>');if(r.pagingCount>1)for(var f=0;f<r.pagingCount;f++){o=r.slides.eq(f);s=r.vars.controlNav==="thumbnails"?'<img src="'+o.attr("data-thumb")+'"/>':"<a>"+n+"</a>";if("thumbnails"===r.vars.controlNav&&!0===r.vars.thumbCaptions){var l=o.attr("data-thumbcaption");""!=l&&undefined!=l&&(s+='<span class="'+i+'caption">'+l+"</span>")}r.controlNavScaffold.append("<li>"+s+"</li>");n++}r.controlsContainer?e(r.controlsContainer).append(r.controlNavScaffold):r.append(r.controlNavScaffold);v.controlNav.set();v.controlNav.active();r.controlNavScaffold.delegate("a, img",u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){r.direction=s>r.currentSlide?"next":"prev";r.wcflexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},setupManual:function(){r.controlNav=r.manualControls;v.controlNav.active();r.controlNav.bind(u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){s>r.currentSlide?r.direction="next":r.direction="prev";r.wcflexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},set:function(){var t=r.vars.controlNav==="thumbnails"?"img":"a";r.controlNav=e("."+i+"control-nav li "+t,r.controlsContainer?r.controlsContainer:r)},active:function(){r.controlNav.removeClass(i+"active").eq(r.animatingTo).addClass(i+"active")},update:function(t,n){r.pagingCount>1&&t==="add"?r.controlNavScaffold.append(e("<li><a>"+r.count+"</a></li>")):r.pagingCount===1?r.controlNavScaffold.find("li").remove():r.controlNav.eq(n).closest("li").remove();v.controlNav.set();r.pagingCount>1&&r.pagingCount!==r.controlNav.length?r.update(n,t):v.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+i+'direction-nav"><li><a class="'+i+'prev" href="#">'+r.vars.prevText+'</a></li><li><a class="'+i+'next" href="#">'+r.vars.nextText+"</a></li></ul>");if(r.controlsContainer){e(r.controlsContainer).append(t);r.directionNav=e("."+i+"direction-nav li a",r.controlsContainer)}else{r.append(t);r.directionNav=e("."+i+"direction-nav li a",r)}v.directionNav.update();r.directionNav.bind(u,function(t){t.preventDefault();var n;if(a===""||a===t.type){n=e(this).hasClass(i+"next")?r.getTarget("next"):r.getTarget("prev");r.wcflexAnimate(n,r.vars.pauseOnAction)}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";r.pagingCount===1?r.directionNav.addClass(e).attr("tabindex","-1"):r.vars.animationLoop?r.directionNav.removeClass(e).removeAttr("tabindex"):r.animatingTo===0?r.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):r.animatingTo===r.last?r.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):r.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('<div class="'+i+'pauseplay"><a></a></div>');if(r.controlsContainer){r.controlsContainer.append(t);r.pausePlay=e("."+i+"pauseplay a",r.controlsContainer)}else{r.append(t);r.pausePlay=e("."+i+"pauseplay a",r)}v.pausePlay.update(r.vars.slideshow?i+"pause":i+"play");r.pausePlay.bind(u,function(t){t.preventDefault();if(a===""||a===t.type)if(e(this).hasClass(i+"pause")){r.manualPause=!0;r.manualPlay=!1;r.pause()}else{r.manualPause=!1;r.manualPlay=!0;r.play()}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(e){e==="play"?r.pausePlay.removeClass(i+"pause").addClass(i+"play").html(r.vars.playText):r.pausePlay.removeClass(i+"play").addClass(i+"pause").html(r.vars.pauseText)}},touch:function(){var e,n,i,o,u,a,f=!1,d=0,v=0,m=0;if(!s){t.addEventListener("touchstart",g,!1);function g(s){if(r.animating)s.preventDefault();else if(window.navigator.msPointerEnabled||s.touches.length===1){r.pause();o=l?r.h:r.w;a=Number(new Date);d=s.touches[0].pageX;v=s.touches[0].pageY;i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o;e=l?v:d;n=l?d:v;t.addEventListener("touchmove",y,!1);t.addEventListener("touchend",b,!1)}}function y(t){d=t.touches[0].pageX;v=t.touches[0].pageY;u=l?e-v:e-d;f=l?Math.abs(u)<Math.abs(d-n):Math.abs(u)<Math.abs(v-n);var s=500;if(!f||Number(new Date)-a>s){t.preventDefault();if(!p&&r.transitions){r.vars.animationLoop||(u/=r.currentSlide===0&&u<0||r.currentSlide===r.last&&u>0?Math.abs(u)/o+2:1);r.setProps(i+u,"setTouch")}}}function b(s){t.removeEventListener("touchmove",y,!1);if(r.animatingTo===r.currentSlide&&!f&&u!==null){var l=c?-u:u,h=l>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(h)&&(Number(new Date)-a<550&&Math.abs(l)>50||Math.abs(l)>o/2)?r.wcflexAnimate(h,r.vars.pauseOnAction):p||r.wcflexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}t.removeEventListener("touchend",b,!1);e=null;n=null;u=null;i=null}}else{t.style.msTouchAction="none";t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",w,!1);t._slider=r;t.addEventListener("MSGestureChange",E,!1);t.addEventListener("MSGestureEnd",S,!1);function w(e){e.stopPropagation();if(r.animating)e.preventDefault();else{r.pause();t._gesture.addPointer(e.pointerId);m=0;o=l?r.h:r.w;a=Number(new Date);i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o}}function E(e){e.stopPropagation();var n=e.target._slider;if(!n)return;var r=-e.translationX,s=-e.translationY;m+=l?s:r;u=m;f=l?Math.abs(m)<Math.abs(-r):Math.abs(m)<Math.abs(-s);if(e.detail===e.MSGESTURE_FLAG_INERTIA){setImmediate(function(){t._gesture.stop()});return}if(!f||Number(new Date)-a>500){e.preventDefault();if(!p&&n.transitions){n.vars.animationLoop||(u=m/(n.currentSlide===0&&m<0||n.currentSlide===n.last&&m>0?Math.abs(m)/o+2:1));n.setProps(i+u,"setTouch")}}}function S(t){t.stopPropagation();var r=t.target._slider;if(!r)return;if(r.animatingTo===r.currentSlide&&!f&&u!==null){var s=c?-u:u,l=s>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(l)&&(Number(new Date)-a<550&&Math.abs(s)>50||Math.abs(s)>o/2)?r.wcflexAnimate(l,r.vars.pauseOnAction):p||r.wcflexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}e=null;n=null;u=null;i=null;m=0}}},resize:function(){if(!r.animating&&r.is(":visible")){h||r.doMath();if(p)v.smoothHeight();else if(h){r.slides.width(r.computedW);r.update(r.pagingCount);r.setProps()}else if(l){r.viewport.height(r.h);r.setProps(r.h,"setTotal")}else{r.vars.smoothHeight&&v.smoothHeight();r.newSlides.width(r.computedW);r.setProps(r.computedW,"setTotal")}}},smoothHeight:function(e){if(!l||p){var t=p?r:r.viewport;e?t.animate({height:r.slides.eq(r.animatingTo).height()},e):t.height(r.slides.eq(r.animatingTo).height())}},sync:function(t){var n=e(r.vars.sync).data("wcflexslider"),i=r.animatingTo;switch(t){case"animate":n.wcflexAnimate(i,r.vars.pauseOnAction,!1,!0);break;case"play":!n.playing&&!n.asNav&&n.play();break;case"pause":n.pause()}},pauseInvisible:{visProp:null,init:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)e[t]+"Hidden"in document&&(v.pauseInvisible.visProp=e[t]+"Hidden");if(v.pauseInvisible.visProp){var n=v.pauseInvisible.visProp.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(n,function(){v.pauseInvisible.isHidden()?r.startTimeout?clearTimeout(r.startTimeout):r.pause():r.started?r.play():r.vars.initDelay>0?setTimeout(r.play,r.vars.initDelay):r.play()})}},isHidden:function(){return document[v.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(f);f=setTimeout(function(){a=""},3e3)}};r.wcflexAnimate=function(t,n,s,u,a){!r.vars.animationLoop&&t!==r.currentSlide&&(r.direction=t>r.currentSlide?"next":"prev");d&&r.pagingCount===1&&(r.direction=r.currentItem<t?"next":"prev");if(!r.animating&&(r.canAdvance(t,a)||s)&&r.is(":visible")){if(d&&u){var f=e(r.vars.asNavFor).data("wcflexslider");r.atEnd=t===0||t===r.count-1;f.wcflexAnimate(t,!0,!1,!0,a);r.direction=r.currentItem<t?"next":"prev";f.direction=r.direction;if(Math.ceil((t+1)/r.visible)-1===r.currentSlide||t===0){r.currentItem=t;r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");return!1}r.currentItem=t;r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");t=Math.floor(t/r.visible)}r.animating=!0;r.animatingTo=t;n&&r.pause();r.vars.before(r);r.syncExists&&!a&&v.sync("animate");r.vars.controlNav&&v.controlNav.active();h||r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");r.atEnd=t===0||t===r.last;r.vars.directionNav&&v.directionNav.update();if(t===r.last){r.vars.end(r);r.vars.animationLoop||r.pause()}if(!p){var m=l?r.slides.filter(":first").height():r.computedW,g,y,b;if(h){g=r.vars.itemMargin;b=(r.itemW+g)*r.move*r.animatingTo;y=b>r.limit&&r.visible!==1?r.limit:b}else r.currentSlide===0&&t===r.count-1&&r.vars.animationLoop&&r.direction!=="next"?y=c?(r.count+r.cloneOffset)*m:0:r.currentSlide===r.last&&t===0&&r.vars.animationLoop&&r.direction!=="prev"?y=c?0:(r.count+1)*m:y=c?(r.count-1-t+r.cloneOffset)*m:(t+r.cloneOffset)*m;r.setProps(y,"",r.vars.animationSpeed);if(r.transitions){if(!r.vars.animationLoop||!r.atEnd){r.animating=!1;r.currentSlide=r.animatingTo}r.container.unbind("webkitTransitionEnd transitionend");r.container.bind("webkitTransitionEnd transitionend",function(){r.wrapup(m)})}else r.container.animate(r.args,r.vars.animationSpeed,r.vars.easing,function(){r.wrapup(m)})}else if(!o){r.slides.eq(r.currentSlide).css({zIndex:1}).animate({opacity:0},r.vars.animationSpeed,r.vars.easing);r.slides.eq(t).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing,r.wrapup)}else{r.slides.eq(r.currentSlide).css({opacity:0,zIndex:1});r.slides.eq(t).css({opacity:1,zIndex:2});r.wrapup(m)}r.vars.smoothHeight&&v.smoothHeight(r.vars.animationSpeed)}};r.wrapup=function(e){!p&&!h&&(r.currentSlide===0&&r.animatingTo===r.last&&r.vars.animationLoop?r.setProps(e,"jumpEnd"):r.currentSlide===r.last&&r.animatingTo===0&&r.vars.animationLoop&&r.setProps(e,"jumpStart"));r.animating=!1;r.currentSlide=r.animatingTo;r.vars.after(r)};r.animateSlides=function(){!r.animating&&m&&r.wcflexAnimate(r.getTarget("next"))};r.pause=function(){clearInterval(r.animatedSlides);r.animatedSlides=null;r.playing=!1;r.vars.pausePlay&&v.pausePlay.update("play");r.syncExists&&v.sync("pause")};r.play=function(){r.playing&&clearInterval(r.animatedSlides);r.animatedSlides=r.animatedSlides||setInterval(r.animateSlides,r.vars.slideshowSpeed);r.started=r.playing=!0;r.vars.pausePlay&&v.pausePlay.update("pause");r.syncExists&&v.sync("play")};r.stop=function(){r.pause();r.stopped=!0};r.canAdvance=function(e,t){var n=d?r.pagingCount-1:r.last;return t?!0:d&&r.currentItem===r.count-1&&e===0&&r.direction==="prev"?!0:d&&r.currentItem===0&&e===r.pagingCount-1&&r.direction!=="next"?!1:e===r.currentSlide&&!d?!1:r.vars.animationLoop?!0:r.atEnd&&r.currentSlide===0&&e===n&&r.direction!=="next"?!1:r.atEnd&&r.currentSlide===n&&e===0&&r.direction==="next"?!1:!0};r.getTarget=function(e){r.direction=e;return e==="next"?r.currentSlide===r.last?0:r.currentSlide+1:r.currentSlide===0?r.last:r.currentSlide-1};r.setProps=function(e,t,n){var i=function(){var n=e?e:(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo,i=function(){if(h)return t==="setTouch"?e:c&&r.animatingTo===r.last?0:c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:r.animatingTo===r.last?r.limit:n;switch(t){case"setTotal":return c?(r.count-1-r.currentSlide+r.cloneOffset)*e:(r.currentSlide+r.cloneOffset)*e;case"setTouch":return c?e:e;case"jumpEnd":return c?e:r.count*e;case"jumpStart":return c?r.count*e:e;default:return e}}();return i*-1+"px"}();if(r.transitions){i=l?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)";n=n!==undefined?n/1e3+"s":"0s";r.container.css("-"+r.pfx+"-transition-duration",n)}r.args[r.prop]=i;(r.transitions||n===undefined)&&r.container.css(r.args)};r.setup=function(t){if(!p){var n,s;if(t==="init"){r.viewport=e('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(r).append(r.container);r.cloneCount=0;r.cloneOffset=0;if(c){s=e.makeArray(r.slides).reverse();r.slides=e(s);r.container.empty().append(r.slides)}}if(r.vars.animationLoop&&!h){r.cloneCount=2;r.cloneOffset=1;t!=="init"&&r.container.find(".clone").remove();r.container.append(r.slides.first().clone().addClass("clone").attr("aria-hidden","true")).prepend(r.slides.last().clone().addClass("clone").attr("aria-hidden","true"))}r.newSlides=e(r.vars.selector,r);n=c?r.count-1-r.currentSlide+r.cloneOffset:r.currentSlide+r.cloneOffset;if(l&&!h){r.container.height((r.count+r.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){r.newSlides.css({display:"block"});r.doMath();r.viewport.height(r.h);r.setProps(n*r.h,"init")},t==="init"?100:0)}else{r.container.width((r.count+r.cloneCount)*200+"%");r.setProps(n*r.computedW,"init");setTimeout(function(){r.doMath();r.newSlides.css({width:r.computedW,"float":"left",display:"block"});r.vars.smoothHeight&&v.smoothHeight()},t==="init"?100:0)}}else{r.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"});t==="init"&&(o?r.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+r.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(r.currentSlide).css({opacity:1,zIndex:2}):r.slides.css({opacity:0,display:"block",zIndex:1}).eq(r.currentSlide).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing));r.vars.smoothHeight&&v.smoothHeight()}h||r.slides.removeClass(i+"active-slide").eq(r.currentSlide).addClass(i+"active-slide")};r.doMath=function(){var e=r.slides.first(),t=r.vars.itemMargin,n=r.vars.minItems,i=r.vars.maxItems;r.w=r.viewport===undefined?r.width():r.viewport.width();r.h=e.height();r.boxPadding=e.outerWidth()-e.width();if(h){r.itemT=r.vars.itemWidth+t;r.minW=n?n*r.itemT:r.w;r.maxW=i?i*r.itemT-t:r.w;r.itemW=r.minW>r.w?(r.w-t*(n-1))/n:r.maxW<r.w?(r.w-t*(i-1))/i:r.vars.itemWidth>r.w?r.w:r.vars.itemWidth;r.visible=Math.floor(r.w/r.itemW);r.move=r.vars.move>0&&r.vars.move<r.visible?r.vars.move:r.visible;r.pagingCount=Math.ceil((r.count-r.visible)/r.move+1);r.last=r.pagingCount-1;r.limit=r.pagingCount===1?0:r.vars.itemWidth>r.w?r.itemW*(r.count-1)+t*(r.count-1):(r.itemW+t)*r.count-r.w-t}else{r.itemW=r.w;r.pagingCount=r.count;r.last=r.count-1}r.computedW=r.itemW-r.boxPadding};r.update=function(e,t){r.doMath();if(!h){e<r.currentSlide?r.currentSlide+=1:e<=r.currentSlide&&e!==0&&(r.currentSlide-=1);r.animatingTo=r.currentSlide}if(r.vars.controlNav&&!r.manualControls)if(t==="add"&&!h||r.pagingCount>r.controlNav.length)v.controlNav.update("add");else if(t==="remove"&&!h||r.pagingCount<r.controlNav.length){if(h&&r.currentSlide>r.last){r.currentSlide-=1;r.animatingTo-=1}v.controlNav.update("remove",r.last)}r.vars.directionNav&&v.directionNav.update()};r.addSlide=function(t,n){var i=e(t);r.count+=1;r.last=r.count-1;l&&c?n!==undefined?r.slides.eq(r.count-n).after(i):r.container.prepend(i):n!==undefined?r.slides.eq(n).before(i):r.container.append(i);r.update(n,"add");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.added(r)};r.removeSlide=function(t){var n=isNaN(t)?r.slides.index(e(t)):t;r.count-=1;r.last=r.count-1;isNaN(t)?e(t,r.slides).remove():l&&c?r.slides.eq(r.last).remove():r.slides.eq(t).remove();r.doMath();r.update(n,"remove");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.removed(r)};v.init()};e(window).blur(function(e){focused=!1}).focus(function(e){focused=!0});e.wcflexslider.defaults={namespace:"wcflex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};e.fn.wcflexslider=function(t){t===undefined&&(t={});if(typeof t=="object")return this.each(function(){var n=e(this),r=t.selector?t.selector:".slides > li",i=n.find(r);if(i.length===1&&t.allowOneSlide===!0||i.length===0){i.fadeIn(400);t.start&&t.start(n)}else n.data("wcflexslider")===undefined&&new e.wcflexslider(this,t)});var n=e(this).data("wcflexslider");switch(t){case"play":n.play();break;case"pause":n.pause();break;case"stop":n.stop();break;case"next":n.wcflexAnimate(n.getTarget("next"),!0);break;case"prev":case"previous":n.wcflexAnimate(n.getTarget("prev"),!0);break;default:typeof t=="number"&&n.wcflexAnimate(t,!0)}}})(jQuery);
|
includes/js/flexslider/jquery.flexslider.js
ADDED
|
@@ -0,0 +1,1128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* jQuery FlexSlider v2.2.0
|
| 3 |
+
* Copyright 2012 WooThemes
|
| 4 |
+
* Contributing Author: Tyler Smith
|
| 5 |
+
*/
|
| 6 |
+
;
|
| 7 |
+
(function ($) {
|
| 8 |
+
|
| 9 |
+
//FlexSlider: Object Instance
|
| 10 |
+
$.flexslider = function(el, options) {
|
| 11 |
+
var slider = $(el);
|
| 12 |
+
|
| 13 |
+
// making variables public
|
| 14 |
+
slider.vars = $.extend({}, $.flexslider.defaults, options);
|
| 15 |
+
|
| 16 |
+
var namespace = slider.vars.namespace,
|
| 17 |
+
msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
|
| 18 |
+
touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
|
| 19 |
+
// depricating this idea, as devices are being released with both of these events
|
| 20 |
+
//eventType = (touch) ? "touchend" : "click",
|
| 21 |
+
eventType = "click touchend MSPointerUp",
|
| 22 |
+
watchedEvent = "",
|
| 23 |
+
watchedEventClearTimer,
|
| 24 |
+
vertical = slider.vars.direction === "vertical",
|
| 25 |
+
reverse = slider.vars.reverse,
|
| 26 |
+
carousel = (slider.vars.itemWidth > 0),
|
| 27 |
+
fade = slider.vars.animation === "fade",
|
| 28 |
+
asNav = slider.vars.asNavFor !== "",
|
| 29 |
+
methods = {},
|
| 30 |
+
focused = true;
|
| 31 |
+
|
| 32 |
+
// Store a reference to the slider object
|
| 33 |
+
$.data(el, "flexslider", slider);
|
| 34 |
+
|
| 35 |
+
// Private slider methods
|
| 36 |
+
methods = {
|
| 37 |
+
init: function() {
|
| 38 |
+
slider.animating = false;
|
| 39 |
+
// Get current slide and make sure it is a number
|
| 40 |
+
slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0) );
|
| 41 |
+
if ( isNaN( slider.currentSlide ) ) slider.currentSlide = 0;
|
| 42 |
+
slider.animatingTo = slider.currentSlide;
|
| 43 |
+
slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
|
| 44 |
+
slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
|
| 45 |
+
slider.slides = $(slider.vars.selector, slider);
|
| 46 |
+
slider.container = $(slider.containerSelector, slider);
|
| 47 |
+
slider.count = slider.slides.length;
|
| 48 |
+
// SYNC:
|
| 49 |
+
slider.syncExists = $(slider.vars.sync).length > 0;
|
| 50 |
+
// SLIDE:
|
| 51 |
+
if (slider.vars.animation === "slide") slider.vars.animation = "swing";
|
| 52 |
+
slider.prop = (vertical) ? "top" : "marginLeft";
|
| 53 |
+
slider.args = {};
|
| 54 |
+
// SLIDESHOW:
|
| 55 |
+
slider.manualPause = false;
|
| 56 |
+
slider.stopped = false;
|
| 57 |
+
//PAUSE WHEN INVISIBLE
|
| 58 |
+
slider.started = false;
|
| 59 |
+
slider.startTimeout = null;
|
| 60 |
+
// TOUCH/USECSS:
|
| 61 |
+
slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
|
| 62 |
+
var obj = document.createElement('div'),
|
| 63 |
+
props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
|
| 64 |
+
for (var i in props) {
|
| 65 |
+
if ( obj.style[ props[i] ] !== undefined ) {
|
| 66 |
+
slider.pfx = props[i].replace('Perspective','').toLowerCase();
|
| 67 |
+
slider.prop = "-" + slider.pfx + "-transform";
|
| 68 |
+
return true;
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
return false;
|
| 72 |
+
}());
|
| 73 |
+
// CONTROLSCONTAINER:
|
| 74 |
+
if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
|
| 75 |
+
// MANUAL:
|
| 76 |
+
if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);
|
| 77 |
+
|
| 78 |
+
// RANDOMIZE:
|
| 79 |
+
if (slider.vars.randomize) {
|
| 80 |
+
slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
|
| 81 |
+
slider.container.empty().append(slider.slides);
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
slider.doMath();
|
| 85 |
+
|
| 86 |
+
// INIT
|
| 87 |
+
slider.setup("init");
|
| 88 |
+
|
| 89 |
+
// CONTROLNAV:
|
| 90 |
+
if (slider.vars.controlNav) methods.controlNav.setup();
|
| 91 |
+
|
| 92 |
+
// DIRECTIONNAV:
|
| 93 |
+
if (slider.vars.directionNav) methods.directionNav.setup();
|
| 94 |
+
|
| 95 |
+
// KEYBOARD:
|
| 96 |
+
if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
|
| 97 |
+
$(document).bind('keyup', function(event) {
|
| 98 |
+
var keycode = event.keyCode;
|
| 99 |
+
if (!slider.animating && (keycode === 39 || keycode === 37)) {
|
| 100 |
+
var target = (keycode === 39) ? slider.getTarget('next') :
|
| 101 |
+
(keycode === 37) ? slider.getTarget('prev') : false;
|
| 102 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
| 103 |
+
}
|
| 104 |
+
});
|
| 105 |
+
}
|
| 106 |
+
// MOUSEWHEEL:
|
| 107 |
+
if (slider.vars.mousewheel) {
|
| 108 |
+
slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
|
| 109 |
+
event.preventDefault();
|
| 110 |
+
var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
| 111 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
| 112 |
+
});
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
// PAUSEPLAY
|
| 116 |
+
if (slider.vars.pausePlay) methods.pausePlay.setup();
|
| 117 |
+
|
| 118 |
+
//PAUSE WHEN INVISIBLE
|
| 119 |
+
if (slider.vars.slideshow && slider.vars.pauseInvisible) methods.pauseInvisible.init();
|
| 120 |
+
|
| 121 |
+
// SLIDSESHOW
|
| 122 |
+
if (slider.vars.slideshow) {
|
| 123 |
+
if (slider.vars.pauseOnHover) {
|
| 124 |
+
slider.hover(function() {
|
| 125 |
+
if (!slider.manualPlay && !slider.manualPause) slider.pause();
|
| 126 |
+
}, function() {
|
| 127 |
+
if (!slider.manualPause && !slider.manualPlay && !slider.stopped) slider.play();
|
| 128 |
+
});
|
| 129 |
+
}
|
| 130 |
+
// initialize animation
|
| 131 |
+
//If we're visible, or we don't use PageVisibility API
|
| 132 |
+
if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
|
| 133 |
+
(slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
// ASNAV:
|
| 138 |
+
if (asNav) methods.asNav.setup();
|
| 139 |
+
|
| 140 |
+
// TOUCH
|
| 141 |
+
if (touch && slider.vars.touch) methods.touch();
|
| 142 |
+
|
| 143 |
+
// FADE&&SMOOTHHEIGHT || SLIDE:
|
| 144 |
+
if (!fade || (fade && slider.vars.smoothHeight)) $(window).bind("resize orientationchange focus", methods.resize);
|
| 145 |
+
|
| 146 |
+
slider.find("img").attr("draggable", "false");
|
| 147 |
+
|
| 148 |
+
// API: start() Callback
|
| 149 |
+
setTimeout(function(){
|
| 150 |
+
slider.vars.start(slider);
|
| 151 |
+
}, 200);
|
| 152 |
+
},
|
| 153 |
+
asNav: {
|
| 154 |
+
setup: function() {
|
| 155 |
+
slider.asNav = true;
|
| 156 |
+
slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
|
| 157 |
+
slider.currentItem = slider.currentSlide;
|
| 158 |
+
slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
|
| 159 |
+
if(!msGesture){
|
| 160 |
+
slider.slides.click(function(e){
|
| 161 |
+
e.preventDefault();
|
| 162 |
+
var $slide = $(this),
|
| 163 |
+
target = $slide.index();
|
| 164 |
+
var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
|
| 165 |
+
if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
|
| 166 |
+
slider.flexAnimate(slider.getTarget("prev"), true);
|
| 167 |
+
} else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
|
| 168 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
| 169 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
|
| 170 |
+
}
|
| 171 |
+
});
|
| 172 |
+
}else{
|
| 173 |
+
el._slider = slider;
|
| 174 |
+
slider.slides.each(function (){
|
| 175 |
+
var that = this;
|
| 176 |
+
that._gesture = new MSGesture();
|
| 177 |
+
that._gesture.target = that;
|
| 178 |
+
that.addEventListener("MSPointerDown", function (e){
|
| 179 |
+
e.preventDefault();
|
| 180 |
+
if(e.currentTarget._gesture)
|
| 181 |
+
e.currentTarget._gesture.addPointer(e.pointerId);
|
| 182 |
+
}, false);
|
| 183 |
+
that.addEventListener("MSGestureTap", function (e){
|
| 184 |
+
e.preventDefault();
|
| 185 |
+
var $slide = $(this),
|
| 186 |
+
target = $slide.index();
|
| 187 |
+
if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
|
| 188 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
| 189 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
|
| 190 |
+
}
|
| 191 |
+
});
|
| 192 |
+
});
|
| 193 |
+
}
|
| 194 |
+
}
|
| 195 |
+
},
|
| 196 |
+
controlNav: {
|
| 197 |
+
setup: function() {
|
| 198 |
+
if (!slider.manualControls) {
|
| 199 |
+
methods.controlNav.setupPaging();
|
| 200 |
+
} else { // MANUALCONTROLS:
|
| 201 |
+
methods.controlNav.setupManual();
|
| 202 |
+
}
|
| 203 |
+
},
|
| 204 |
+
setupPaging: function() {
|
| 205 |
+
var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
|
| 206 |
+
j = 1,
|
| 207 |
+
item,
|
| 208 |
+
slide;
|
| 209 |
+
|
| 210 |
+
slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
|
| 211 |
+
|
| 212 |
+
if (slider.pagingCount > 1) {
|
| 213 |
+
for (var i = 0; i < slider.pagingCount; i++) {
|
| 214 |
+
slide = slider.slides.eq(i);
|
| 215 |
+
item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>';
|
| 216 |
+
if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
|
| 217 |
+
var captn = slide.attr( 'data-thumbcaption' );
|
| 218 |
+
if ( '' != captn && undefined != captn ) item += '<span class="' + namespace + 'caption">' + captn + '</span>';
|
| 219 |
+
}
|
| 220 |
+
slider.controlNavScaffold.append('<li>' + item + '</li>');
|
| 221 |
+
j++;
|
| 222 |
+
}
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
// CONTROLSCONTAINER:
|
| 226 |
+
(slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
|
| 227 |
+
methods.controlNav.set();
|
| 228 |
+
|
| 229 |
+
methods.controlNav.active();
|
| 230 |
+
|
| 231 |
+
slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
|
| 232 |
+
event.preventDefault();
|
| 233 |
+
|
| 234 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
| 235 |
+
var $this = $(this),
|
| 236 |
+
target = slider.controlNav.index($this);
|
| 237 |
+
|
| 238 |
+
if (!$this.hasClass(namespace + 'active')) {
|
| 239 |
+
slider.direction = (target > slider.currentSlide) ? "next" : "prev";
|
| 240 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
| 241 |
+
}
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
// setup flags to prevent event duplication
|
| 245 |
+
if (watchedEvent === "") {
|
| 246 |
+
watchedEvent = event.type;
|
| 247 |
+
}
|
| 248 |
+
methods.setToClearWatchedEvent();
|
| 249 |
+
|
| 250 |
+
});
|
| 251 |
+
},
|
| 252 |
+
setupManual: function() {
|
| 253 |
+
slider.controlNav = slider.manualControls;
|
| 254 |
+
methods.controlNav.active();
|
| 255 |
+
|
| 256 |
+
slider.controlNav.bind(eventType, function(event) {
|
| 257 |
+
event.preventDefault();
|
| 258 |
+
|
| 259 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
| 260 |
+
var $this = $(this),
|
| 261 |
+
target = slider.controlNav.index($this);
|
| 262 |
+
|
| 263 |
+
if (!$this.hasClass(namespace + 'active')) {
|
| 264 |
+
(target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
|
| 265 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
| 266 |
+
}
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
// setup flags to prevent event duplication
|
| 270 |
+
if (watchedEvent === "") {
|
| 271 |
+
watchedEvent = event.type;
|
| 272 |
+
}
|
| 273 |
+
methods.setToClearWatchedEvent();
|
| 274 |
+
});
|
| 275 |
+
},
|
| 276 |
+
set: function() {
|
| 277 |
+
var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
|
| 278 |
+
slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
|
| 279 |
+
},
|
| 280 |
+
active: function() {
|
| 281 |
+
slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
|
| 282 |
+
},
|
| 283 |
+
update: function(action, pos) {
|
| 284 |
+
if (slider.pagingCount > 1 && action === "add") {
|
| 285 |
+
slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
|
| 286 |
+
} else if (slider.pagingCount === 1) {
|
| 287 |
+
slider.controlNavScaffold.find('li').remove();
|
| 288 |
+
} else {
|
| 289 |
+
slider.controlNav.eq(pos).closest('li').remove();
|
| 290 |
+
}
|
| 291 |
+
methods.controlNav.set();
|
| 292 |
+
(slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
|
| 293 |
+
}
|
| 294 |
+
},
|
| 295 |
+
directionNav: {
|
| 296 |
+
setup: function() {
|
| 297 |
+
var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');
|
| 298 |
+
|
| 299 |
+
// CONTROLSCONTAINER:
|
| 300 |
+
if (slider.controlsContainer) {
|
| 301 |
+
$(slider.controlsContainer).append(directionNavScaffold);
|
| 302 |
+
slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
|
| 303 |
+
} else {
|
| 304 |
+
slider.append(directionNavScaffold);
|
| 305 |
+
slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
methods.directionNav.update();
|
| 309 |
+
|
| 310 |
+
slider.directionNav.bind(eventType, function(event) {
|
| 311 |
+
event.preventDefault();
|
| 312 |
+
var target;
|
| 313 |
+
|
| 314 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
| 315 |
+
target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
|
| 316 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
// setup flags to prevent event duplication
|
| 320 |
+
if (watchedEvent === "") {
|
| 321 |
+
watchedEvent = event.type;
|
| 322 |
+
}
|
| 323 |
+
methods.setToClearWatchedEvent();
|
| 324 |
+
});
|
| 325 |
+
},
|
| 326 |
+
update: function() {
|
| 327 |
+
var disabledClass = namespace + 'disabled';
|
| 328 |
+
if (slider.pagingCount === 1) {
|
| 329 |
+
slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
|
| 330 |
+
} else if (!slider.vars.animationLoop) {
|
| 331 |
+
if (slider.animatingTo === 0) {
|
| 332 |
+
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
|
| 333 |
+
} else if (slider.animatingTo === slider.last) {
|
| 334 |
+
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
|
| 335 |
+
} else {
|
| 336 |
+
slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
|
| 337 |
+
}
|
| 338 |
+
} else {
|
| 339 |
+
slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
|
| 340 |
+
}
|
| 341 |
+
}
|
| 342 |
+
},
|
| 343 |
+
pausePlay: {
|
| 344 |
+
setup: function() {
|
| 345 |
+
var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>');
|
| 346 |
+
|
| 347 |
+
// CONTROLSCONTAINER:
|
| 348 |
+
if (slider.controlsContainer) {
|
| 349 |
+
slider.controlsContainer.append(pausePlayScaffold);
|
| 350 |
+
slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
|
| 351 |
+
} else {
|
| 352 |
+
slider.append(pausePlayScaffold);
|
| 353 |
+
slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
|
| 357 |
+
|
| 358 |
+
slider.pausePlay.bind(eventType, function(event) {
|
| 359 |
+
event.preventDefault();
|
| 360 |
+
|
| 361 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
| 362 |
+
if ($(this).hasClass(namespace + 'pause')) {
|
| 363 |
+
slider.manualPause = true;
|
| 364 |
+
slider.manualPlay = false;
|
| 365 |
+
slider.pause();
|
| 366 |
+
} else {
|
| 367 |
+
slider.manualPause = false;
|
| 368 |
+
slider.manualPlay = true;
|
| 369 |
+
slider.play();
|
| 370 |
+
}
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
// setup flags to prevent event duplication
|
| 374 |
+
if (watchedEvent === "") {
|
| 375 |
+
watchedEvent = event.type;
|
| 376 |
+
}
|
| 377 |
+
methods.setToClearWatchedEvent();
|
| 378 |
+
});
|
| 379 |
+
},
|
| 380 |
+
update: function(state) {
|
| 381 |
+
(state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
|
| 382 |
+
}
|
| 383 |
+
},
|
| 384 |
+
touch: function() {
|
| 385 |
+
var startX,
|
| 386 |
+
startY,
|
| 387 |
+
offset,
|
| 388 |
+
cwidth,
|
| 389 |
+
dx,
|
| 390 |
+
startT,
|
| 391 |
+
scrolling = false,
|
| 392 |
+
localX = 0,
|
| 393 |
+
localY = 0,
|
| 394 |
+
accDx = 0;
|
| 395 |
+
|
| 396 |
+
if(!msGesture){
|
| 397 |
+
el.addEventListener('touchstart', onTouchStart, false);
|
| 398 |
+
|
| 399 |
+
function onTouchStart(e) {
|
| 400 |
+
if (slider.animating) {
|
| 401 |
+
e.preventDefault();
|
| 402 |
+
} else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
|
| 403 |
+
slider.pause();
|
| 404 |
+
// CAROUSEL:
|
| 405 |
+
cwidth = (vertical) ? slider.h : slider. w;
|
| 406 |
+
startT = Number(new Date());
|
| 407 |
+
// CAROUSEL:
|
| 408 |
+
|
| 409 |
+
// Local vars for X and Y points.
|
| 410 |
+
localX = e.touches[0].pageX;
|
| 411 |
+
localY = e.touches[0].pageY;
|
| 412 |
+
|
| 413 |
+
offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
|
| 414 |
+
(carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
| 415 |
+
(carousel && slider.currentSlide === slider.last) ? slider.limit :
|
| 416 |
+
(carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
|
| 417 |
+
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
|
| 418 |
+
startX = (vertical) ? localY : localX;
|
| 419 |
+
startY = (vertical) ? localX : localY;
|
| 420 |
+
|
| 421 |
+
el.addEventListener('touchmove', onTouchMove, false);
|
| 422 |
+
el.addEventListener('touchend', onTouchEnd, false);
|
| 423 |
+
}
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
function onTouchMove(e) {
|
| 427 |
+
// Local vars for X and Y points.
|
| 428 |
+
|
| 429 |
+
localX = e.touches[0].pageX;
|
| 430 |
+
localY = e.touches[0].pageY;
|
| 431 |
+
|
| 432 |
+
dx = (vertical) ? startX - localY : startX - localX;
|
| 433 |
+
scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
|
| 434 |
+
|
| 435 |
+
var fxms = 500;
|
| 436 |
+
|
| 437 |
+
if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
|
| 438 |
+
e.preventDefault();
|
| 439 |
+
if (!fade && slider.transitions) {
|
| 440 |
+
if (!slider.vars.animationLoop) {
|
| 441 |
+
dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
|
| 442 |
+
}
|
| 443 |
+
slider.setProps(offset + dx, "setTouch");
|
| 444 |
+
}
|
| 445 |
+
}
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
function onTouchEnd(e) {
|
| 449 |
+
// finish the touch by undoing the touch session
|
| 450 |
+
el.removeEventListener('touchmove', onTouchMove, false);
|
| 451 |
+
|
| 452 |
+
if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
|
| 453 |
+
var updateDx = (reverse) ? -dx : dx,
|
| 454 |
+
target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
| 455 |
+
|
| 456 |
+
if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
|
| 457 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
| 458 |
+
} else {
|
| 459 |
+
if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
|
| 460 |
+
}
|
| 461 |
+
}
|
| 462 |
+
el.removeEventListener('touchend', onTouchEnd, false);
|
| 463 |
+
|
| 464 |
+
startX = null;
|
| 465 |
+
startY = null;
|
| 466 |
+
dx = null;
|
| 467 |
+
offset = null;
|
| 468 |
+
}
|
| 469 |
+
}else{
|
| 470 |
+
el.style.msTouchAction = "none";
|
| 471 |
+
el._gesture = new MSGesture();
|
| 472 |
+
el._gesture.target = el;
|
| 473 |
+
el.addEventListener("MSPointerDown", onMSPointerDown, false);
|
| 474 |
+
el._slider = slider;
|
| 475 |
+
el.addEventListener("MSGestureChange", onMSGestureChange, false);
|
| 476 |
+
el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
|
| 477 |
+
|
| 478 |
+
function onMSPointerDown(e){
|
| 479 |
+
e.stopPropagation();
|
| 480 |
+
if (slider.animating) {
|
| 481 |
+
e.preventDefault();
|
| 482 |
+
}else{
|
| 483 |
+
slider.pause();
|
| 484 |
+
el._gesture.addPointer(e.pointerId);
|
| 485 |
+
accDx = 0;
|
| 486 |
+
cwidth = (vertical) ? slider.h : slider. w;
|
| 487 |
+
startT = Number(new Date());
|
| 488 |
+
// CAROUSEL:
|
| 489 |
+
|
| 490 |
+
offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
|
| 491 |
+
(carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
| 492 |
+
(carousel && slider.currentSlide === slider.last) ? slider.limit :
|
| 493 |
+
(carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
|
| 494 |
+
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
|
| 495 |
+
}
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
function onMSGestureChange(e) {
|
| 499 |
+
e.stopPropagation();
|
| 500 |
+
var slider = e.target._slider;
|
| 501 |
+
if(!slider){
|
| 502 |
+
return;
|
| 503 |
+
}
|
| 504 |
+
var transX = -e.translationX,
|
| 505 |
+
transY = -e.translationY;
|
| 506 |
+
|
| 507 |
+
//Accumulate translations.
|
| 508 |
+
accDx = accDx + ((vertical) ? transY : transX);
|
| 509 |
+
dx = accDx;
|
| 510 |
+
scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
|
| 511 |
+
|
| 512 |
+
if(e.detail === e.MSGESTURE_FLAG_INERTIA){
|
| 513 |
+
setImmediate(function (){
|
| 514 |
+
el._gesture.stop();
|
| 515 |
+
});
|
| 516 |
+
|
| 517 |
+
return;
|
| 518 |
+
}
|
| 519 |
+
|
| 520 |
+
if (!scrolling || Number(new Date()) - startT > 500) {
|
| 521 |
+
e.preventDefault();
|
| 522 |
+
if (!fade && slider.transitions) {
|
| 523 |
+
if (!slider.vars.animationLoop) {
|
| 524 |
+
dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
|
| 525 |
+
}
|
| 526 |
+
slider.setProps(offset + dx, "setTouch");
|
| 527 |
+
}
|
| 528 |
+
}
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
function onMSGestureEnd(e) {
|
| 532 |
+
e.stopPropagation();
|
| 533 |
+
var slider = e.target._slider;
|
| 534 |
+
if(!slider){
|
| 535 |
+
return;
|
| 536 |
+
}
|
| 537 |
+
if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
|
| 538 |
+
var updateDx = (reverse) ? -dx : dx,
|
| 539 |
+
target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
| 540 |
+
|
| 541 |
+
if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
|
| 542 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
| 543 |
+
} else {
|
| 544 |
+
if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
|
| 545 |
+
}
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
startX = null;
|
| 549 |
+
startY = null;
|
| 550 |
+
dx = null;
|
| 551 |
+
offset = null;
|
| 552 |
+
accDx = 0;
|
| 553 |
+
}
|
| 554 |
+
}
|
| 555 |
+
},
|
| 556 |
+
resize: function() {
|
| 557 |
+
if (!slider.animating && slider.is(':visible')) {
|
| 558 |
+
if (!carousel) slider.doMath();
|
| 559 |
+
|
| 560 |
+
if (fade) {
|
| 561 |
+
// SMOOTH HEIGHT:
|
| 562 |
+
methods.smoothHeight();
|
| 563 |
+
} else if (carousel) { //CAROUSEL:
|
| 564 |
+
slider.slides.width(slider.computedW);
|
| 565 |
+
slider.update(slider.pagingCount);
|
| 566 |
+
slider.setProps();
|
| 567 |
+
}
|
| 568 |
+
else if (vertical) { //VERTICAL:
|
| 569 |
+
slider.viewport.height(slider.h);
|
| 570 |
+
slider.setProps(slider.h, "setTotal");
|
| 571 |
+
} else {
|
| 572 |
+
// SMOOTH HEIGHT:
|
| 573 |
+
if (slider.vars.smoothHeight) methods.smoothHeight();
|
| 574 |
+
slider.newSlides.width(slider.computedW);
|
| 575 |
+
slider.setProps(slider.computedW, "setTotal");
|
| 576 |
+
}
|
| 577 |
+
}
|
| 578 |
+
},
|
| 579 |
+
smoothHeight: function(dur) {
|
| 580 |
+
if (!vertical || fade) {
|
| 581 |
+
var $obj = (fade) ? slider : slider.viewport;
|
| 582 |
+
(dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
|
| 583 |
+
}
|
| 584 |
+
},
|
| 585 |
+
sync: function(action) {
|
| 586 |
+
var $obj = $(slider.vars.sync).data("flexslider"),
|
| 587 |
+
target = slider.animatingTo;
|
| 588 |
+
|
| 589 |
+
switch (action) {
|
| 590 |
+
case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
|
| 591 |
+
case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
|
| 592 |
+
case "pause": $obj.pause(); break;
|
| 593 |
+
}
|
| 594 |
+
},
|
| 595 |
+
pauseInvisible: {
|
| 596 |
+
visProp: null,
|
| 597 |
+
init: function() {
|
| 598 |
+
var prefixes = ['webkit','moz','ms','o'];
|
| 599 |
+
|
| 600 |
+
if ('hidden' in document) return 'hidden';
|
| 601 |
+
for (var i = 0; i < prefixes.length; i++) {
|
| 602 |
+
if ((prefixes[i] + 'Hidden') in document)
|
| 603 |
+
methods.pauseInvisible.visProp = prefixes[i] + 'Hidden';
|
| 604 |
+
}
|
| 605 |
+
if (methods.pauseInvisible.visProp) {
|
| 606 |
+
var evtname = methods.pauseInvisible.visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
|
| 607 |
+
document.addEventListener(evtname, function() {
|
| 608 |
+
if (methods.pauseInvisible.isHidden()) {
|
| 609 |
+
if(slider.startTimeout) clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
|
| 610 |
+
else slider.pause(); //Or just pause
|
| 611 |
+
}
|
| 612 |
+
else {
|
| 613 |
+
if(slider.started) slider.play(); //Initiated before, just play
|
| 614 |
+
else (slider.vars.initDelay > 0) ? setTimeout(slider.play, slider.vars.initDelay) : slider.play(); //Didn't init before: simply init or wait for it
|
| 615 |
+
}
|
| 616 |
+
});
|
| 617 |
+
}
|
| 618 |
+
},
|
| 619 |
+
isHidden: function() {
|
| 620 |
+
return document[methods.pauseInvisible.visProp] || false;
|
| 621 |
+
}
|
| 622 |
+
},
|
| 623 |
+
setToClearWatchedEvent: function() {
|
| 624 |
+
clearTimeout(watchedEventClearTimer);
|
| 625 |
+
watchedEventClearTimer = setTimeout(function() {
|
| 626 |
+
watchedEvent = "";
|
| 627 |
+
}, 3000);
|
| 628 |
+
}
|
| 629 |
+
}
|
| 630 |
+
|
| 631 |
+
// public methods
|
| 632 |
+
slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
|
| 633 |
+
if (!slider.vars.animationLoop && target !== slider.currentSlide) {
|
| 634 |
+
slider.direction = (target > slider.currentSlide) ? "next" : "prev";
|
| 635 |
+
}
|
| 636 |
+
|
| 637 |
+
if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
| 638 |
+
|
| 639 |
+
if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
|
| 640 |
+
if (asNav && withSync) {
|
| 641 |
+
var master = $(slider.vars.asNavFor).data('flexslider');
|
| 642 |
+
slider.atEnd = target === 0 || target === slider.count - 1;
|
| 643 |
+
master.flexAnimate(target, true, false, true, fromNav);
|
| 644 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
| 645 |
+
master.direction = slider.direction;
|
| 646 |
+
|
| 647 |
+
if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
|
| 648 |
+
slider.currentItem = target;
|
| 649 |
+
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
|
| 650 |
+
target = Math.floor(target/slider.visible);
|
| 651 |
+
} else {
|
| 652 |
+
slider.currentItem = target;
|
| 653 |
+
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
|
| 654 |
+
return false;
|
| 655 |
+
}
|
| 656 |
+
}
|
| 657 |
+
|
| 658 |
+
slider.animating = true;
|
| 659 |
+
slider.animatingTo = target;
|
| 660 |
+
|
| 661 |
+
// SLIDESHOW:
|
| 662 |
+
if (pause) slider.pause();
|
| 663 |
+
|
| 664 |
+
// API: before() animation Callback
|
| 665 |
+
slider.vars.before(slider);
|
| 666 |
+
|
| 667 |
+
// SYNC:
|
| 668 |
+
if (slider.syncExists && !fromNav) methods.sync("animate");
|
| 669 |
+
|
| 670 |
+
// CONTROLNAV
|
| 671 |
+
if (slider.vars.controlNav) methods.controlNav.active();
|
| 672 |
+
|
| 673 |
+
// !CAROUSEL:
|
| 674 |
+
// CANDIDATE: slide active class (for add/remove slide)
|
| 675 |
+
if (!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide');
|
| 676 |
+
|
| 677 |
+
// INFINITE LOOP:
|
| 678 |
+
// CANDIDATE: atEnd
|
| 679 |
+
slider.atEnd = target === 0 || target === slider.last;
|
| 680 |
+
|
| 681 |
+
// DIRECTIONNAV:
|
| 682 |
+
if (slider.vars.directionNav) methods.directionNav.update();
|
| 683 |
+
|
| 684 |
+
if (target === slider.last) {
|
| 685 |
+
// API: end() of cycle Callback
|
| 686 |
+
slider.vars.end(slider);
|
| 687 |
+
// SLIDESHOW && !INFINITE LOOP:
|
| 688 |
+
if (!slider.vars.animationLoop) slider.pause();
|
| 689 |
+
}
|
| 690 |
+
|
| 691 |
+
// SLIDE:
|
| 692 |
+
if (!fade) {
|
| 693 |
+
var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
|
| 694 |
+
margin, slideString, calcNext;
|
| 695 |
+
|
| 696 |
+
// INFINITE LOOP / REVERSE:
|
| 697 |
+
if (carousel) {
|
| 698 |
+
//margin = (slider.vars.itemWidth > slider.w) ? slider.vars.itemMargin * 2 : slider.vars.itemMargin;
|
| 699 |
+
margin = slider.vars.itemMargin;
|
| 700 |
+
calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
|
| 701 |
+
slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
|
| 702 |
+
} else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
|
| 703 |
+
slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
|
| 704 |
+
} else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
|
| 705 |
+
slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
|
| 706 |
+
} else {
|
| 707 |
+
slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
|
| 708 |
+
}
|
| 709 |
+
slider.setProps(slideString, "", slider.vars.animationSpeed);
|
| 710 |
+
if (slider.transitions) {
|
| 711 |
+
if (!slider.vars.animationLoop || !slider.atEnd) {
|
| 712 |
+
slider.animating = false;
|
| 713 |
+
slider.currentSlide = slider.animatingTo;
|
| 714 |
+
}
|
| 715 |
+
slider.container.unbind("webkitTransitionEnd transitionend");
|
| 716 |
+
slider.container.bind("webkitTransitionEnd transitionend", function() {
|
| 717 |
+
slider.wrapup(dimension);
|
| 718 |
+
});
|
| 719 |
+
} else {
|
| 720 |
+
slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
|
| 721 |
+
slider.wrapup(dimension);
|
| 722 |
+
});
|
| 723 |
+
}
|
| 724 |
+
} else { // FADE:
|
| 725 |
+
if (!touch) {
|
| 726 |
+
//slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing);
|
| 727 |
+
//slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
|
| 728 |
+
|
| 729 |
+
slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
|
| 730 |
+
slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
|
| 731 |
+
|
| 732 |
+
} else {
|
| 733 |
+
slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
|
| 734 |
+
slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
|
| 735 |
+
slider.wrapup(dimension);
|
| 736 |
+
}
|
| 737 |
+
}
|
| 738 |
+
// SMOOTH HEIGHT:
|
| 739 |
+
if (slider.vars.smoothHeight) methods.smoothHeight(slider.vars.animationSpeed);
|
| 740 |
+
}
|
| 741 |
+
}
|
| 742 |
+
slider.wrapup = function(dimension) {
|
| 743 |
+
// SLIDE:
|
| 744 |
+
if (!fade && !carousel) {
|
| 745 |
+
if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
|
| 746 |
+
slider.setProps(dimension, "jumpEnd");
|
| 747 |
+
} else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
|
| 748 |
+
slider.setProps(dimension, "jumpStart");
|
| 749 |
+
}
|
| 750 |
+
}
|
| 751 |
+
slider.animating = false;
|
| 752 |
+
slider.currentSlide = slider.animatingTo;
|
| 753 |
+
// API: after() animation Callback
|
| 754 |
+
slider.vars.after(slider);
|
| 755 |
+
}
|
| 756 |
+
|
| 757 |
+
// SLIDESHOW:
|
| 758 |
+
slider.animateSlides = function() {
|
| 759 |
+
if (!slider.animating && focused ) slider.flexAnimate(slider.getTarget("next"));
|
| 760 |
+
}
|
| 761 |
+
// SLIDESHOW:
|
| 762 |
+
slider.pause = function() {
|
| 763 |
+
clearInterval(slider.animatedSlides);
|
| 764 |
+
slider.animatedSlides = null;
|
| 765 |
+
slider.playing = false;
|
| 766 |
+
// PAUSEPLAY:
|
| 767 |
+
if (slider.vars.pausePlay) methods.pausePlay.update("play");
|
| 768 |
+
// SYNC:
|
| 769 |
+
if (slider.syncExists) methods.sync("pause");
|
| 770 |
+
}
|
| 771 |
+
// SLIDESHOW:
|
| 772 |
+
slider.play = function() {
|
| 773 |
+
if (slider.playing) clearInterval(slider.animatedSlides);
|
| 774 |
+
slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
|
| 775 |
+
slider.started = slider.playing = true;
|
| 776 |
+
// PAUSEPLAY:
|
| 777 |
+
if (slider.vars.pausePlay) methods.pausePlay.update("pause");
|
| 778 |
+
// SYNC:
|
| 779 |
+
if (slider.syncExists) methods.sync("play");
|
| 780 |
+
}
|
| 781 |
+
// STOP:
|
| 782 |
+
slider.stop = function () {
|
| 783 |
+
slider.pause();
|
| 784 |
+
slider.stopped = true;
|
| 785 |
+
}
|
| 786 |
+
slider.canAdvance = function(target, fromNav) {
|
| 787 |
+
// ASNAV:
|
| 788 |
+
var last = (asNav) ? slider.pagingCount - 1 : slider.last;
|
| 789 |
+
return (fromNav) ? true :
|
| 790 |
+
(asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
|
| 791 |
+
(asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
|
| 792 |
+
(target === slider.currentSlide && !asNav) ? false :
|
| 793 |
+
(slider.vars.animationLoop) ? true :
|
| 794 |
+
(slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
|
| 795 |
+
(slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
|
| 796 |
+
true;
|
| 797 |
+
}
|
| 798 |
+
slider.getTarget = function(dir) {
|
| 799 |
+
slider.direction = dir;
|
| 800 |
+
if (dir === "next") {
|
| 801 |
+
return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
|
| 802 |
+
} else {
|
| 803 |
+
return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
|
| 804 |
+
}
|
| 805 |
+
}
|
| 806 |
+
|
| 807 |
+
// SLIDE:
|
| 808 |
+
slider.setProps = function(pos, special, dur) {
|
| 809 |
+
var target = (function() {
|
| 810 |
+
var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
|
| 811 |
+
posCalc = (function() {
|
| 812 |
+
if (carousel) {
|
| 813 |
+
return (special === "setTouch") ? pos :
|
| 814 |
+
(reverse && slider.animatingTo === slider.last) ? 0 :
|
| 815 |
+
(reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
| 816 |
+
(slider.animatingTo === slider.last) ? slider.limit : posCheck;
|
| 817 |
+
} else {
|
| 818 |
+
switch (special) {
|
| 819 |
+
case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
|
| 820 |
+
case "setTouch": return (reverse) ? pos : pos;
|
| 821 |
+
case "jumpEnd": return (reverse) ? pos : slider.count * pos;
|
| 822 |
+
case "jumpStart": return (reverse) ? slider.count * pos : pos;
|
| 823 |
+
default: return pos;
|
| 824 |
+
}
|
| 825 |
+
}
|
| 826 |
+
}());
|
| 827 |
+
|
| 828 |
+
return (posCalc * -1) + "px";
|
| 829 |
+
}());
|
| 830 |
+
|
| 831 |
+
if (slider.transitions) {
|
| 832 |
+
target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
|
| 833 |
+
dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
|
| 834 |
+
slider.container.css("-" + slider.pfx + "-transition-duration", dur);
|
| 835 |
+
}
|
| 836 |
+
|
| 837 |
+
slider.args[slider.prop] = target;
|
| 838 |
+
if (slider.transitions || dur === undefined) slider.container.css(slider.args);
|
| 839 |
+
}
|
| 840 |
+
|
| 841 |
+
slider.setup = function(type) {
|
| 842 |
+
// SLIDE:
|
| 843 |
+
if (!fade) {
|
| 844 |
+
var sliderOffset, arr;
|
| 845 |
+
|
| 846 |
+
if (type === "init") {
|
| 847 |
+
slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
|
| 848 |
+
// INFINITE LOOP:
|
| 849 |
+
slider.cloneCount = 0;
|
| 850 |
+
slider.cloneOffset = 0;
|
| 851 |
+
// REVERSE:
|
| 852 |
+
if (reverse) {
|
| 853 |
+
arr = $.makeArray(slider.slides).reverse();
|
| 854 |
+
slider.slides = $(arr);
|
| 855 |
+
slider.container.empty().append(slider.slides);
|
| 856 |
+
}
|
| 857 |
+
}
|
| 858 |
+
// INFINITE LOOP && !CAROUSEL:
|
| 859 |
+
if (slider.vars.animationLoop && !carousel) {
|
| 860 |
+
slider.cloneCount = 2;
|
| 861 |
+
slider.cloneOffset = 1;
|
| 862 |
+
// clear out old clones
|
| 863 |
+
if (type !== "init") slider.container.find('.clone').remove();
|
| 864 |
+
slider.container.append(slider.slides.first().clone().addClass('clone').attr('aria-hidden', 'true')).prepend(slider.slides.last().clone().addClass('clone').attr('aria-hidden', 'true'));
|
| 865 |
+
}
|
| 866 |
+
slider.newSlides = $(slider.vars.selector, slider);
|
| 867 |
+
|
| 868 |
+
sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
|
| 869 |
+
// VERTICAL:
|
| 870 |
+
if (vertical && !carousel) {
|
| 871 |
+
slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
|
| 872 |
+
setTimeout(function(){
|
| 873 |
+
slider.newSlides.css({"display": "block"});
|
| 874 |
+
slider.doMath();
|
| 875 |
+
slider.viewport.height(slider.h);
|
| 876 |
+
slider.setProps(sliderOffset * slider.h, "init");
|
| 877 |
+
}, (type === "init") ? 100 : 0);
|
| 878 |
+
} else {
|
| 879 |
+
slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
|
| 880 |
+
slider.setProps(sliderOffset * slider.computedW, "init");
|
| 881 |
+
setTimeout(function(){
|
| 882 |
+
slider.doMath();
|
| 883 |
+
slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
|
| 884 |
+
// SMOOTH HEIGHT:
|
| 885 |
+
if (slider.vars.smoothHeight) methods.smoothHeight();
|
| 886 |
+
}, (type === "init") ? 100 : 0);
|
| 887 |
+
}
|
| 888 |
+
} else { // FADE:
|
| 889 |
+
slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
|
| 890 |
+
if (type === "init") {
|
| 891 |
+
if (!touch) {
|
| 892 |
+
//slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
|
| 893 |
+
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
|
| 894 |
+
} else {
|
| 895 |
+
slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
|
| 896 |
+
}
|
| 897 |
+
}
|
| 898 |
+
// SMOOTH HEIGHT:
|
| 899 |
+
if (slider.vars.smoothHeight) methods.smoothHeight();
|
| 900 |
+
}
|
| 901 |
+
// !CAROUSEL:
|
| 902 |
+
// CANDIDATE: active slide
|
| 903 |
+
if (!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide");
|
| 904 |
+
}
|
| 905 |
+
|
| 906 |
+
|
| 907 |
+
slider.doMath = function() {
|
| 908 |
+
var slide = slider.slides.first(),
|
| 909 |
+
slideMargin = slider.vars.itemMargin,
|
| 910 |
+
minItems = slider.vars.minItems,
|
| 911 |
+
maxItems = slider.vars.maxItems;
|
| 912 |
+
|
| 913 |
+
slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
|
| 914 |
+
slider.h = slide.height();
|
| 915 |
+
slider.boxPadding = slide.outerWidth() - slide.width();
|
| 916 |
+
|
| 917 |
+
// CAROUSEL:
|
| 918 |
+
if (carousel) {
|
| 919 |
+
slider.itemT = slider.vars.itemWidth + slideMargin;
|
| 920 |
+
slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
|
| 921 |
+
slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
|
| 922 |
+
slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
|
| 923 |
+
(slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
|
| 924 |
+
(slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
|
| 925 |
+
|
| 926 |
+
slider.visible = Math.floor(slider.w/(slider.itemW));
|
| 927 |
+
slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
|
| 928 |
+
slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
|
| 929 |
+
slider.last = slider.pagingCount - 1;
|
| 930 |
+
slider.limit = (slider.pagingCount === 1) ? 0 :
|
| 931 |
+
(slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
|
| 932 |
+
} else {
|
| 933 |
+
slider.itemW = slider.w;
|
| 934 |
+
slider.pagingCount = slider.count;
|
| 935 |
+
slider.last = slider.count - 1;
|
| 936 |
+
}
|
| 937 |
+
slider.computedW = slider.itemW - slider.boxPadding;
|
| 938 |
+
}
|
| 939 |
+
|
| 940 |
+
|
| 941 |
+
slider.update = function(pos, action) {
|
| 942 |
+
slider.doMath();
|
| 943 |
+
|
| 944 |
+
// update currentSlide and slider.animatingTo if necessary
|
| 945 |
+
if (!carousel) {
|
| 946 |
+
if (pos < slider.currentSlide) {
|
| 947 |
+
slider.currentSlide += 1;
|
| 948 |
+
} else if (pos <= slider.currentSlide && pos !== 0) {
|
| 949 |
+
slider.currentSlide -= 1;
|
| 950 |
+
}
|
| 951 |
+
slider.animatingTo = slider.currentSlide;
|
| 952 |
+
}
|
| 953 |
+
|
| 954 |
+
// update controlNav
|
| 955 |
+
if (slider.vars.controlNav && !slider.manualControls) {
|
| 956 |
+
if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
|
| 957 |
+
methods.controlNav.update("add");
|
| 958 |
+
} else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
|
| 959 |
+
if (carousel && slider.currentSlide > slider.last) {
|
| 960 |
+
slider.currentSlide -= 1;
|
| 961 |
+
slider.animatingTo -= 1;
|
| 962 |
+
}
|
| 963 |
+
methods.controlNav.update("remove", slider.last);
|
| 964 |
+
}
|
| 965 |
+
}
|
| 966 |
+
// update directionNav
|
| 967 |
+
if (slider.vars.directionNav) methods.directionNav.update();
|
| 968 |
+
|
| 969 |
+
}
|
| 970 |
+
|
| 971 |
+
slider.addSlide = function(obj, pos) {
|
| 972 |
+
var $obj = $(obj);
|
| 973 |
+
|
| 974 |
+
slider.count += 1;
|
| 975 |
+
slider.last = slider.count - 1;
|
| 976 |
+
|
| 977 |
+
// append new slide
|
| 978 |
+
if (vertical && reverse) {
|
| 979 |
+
(pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
|
| 980 |
+
} else {
|
| 981 |
+
(pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
|
| 982 |
+
}
|
| 983 |
+
|
| 984 |
+
// update currentSlide, animatingTo, controlNav, and directionNav
|
| 985 |
+
slider.update(pos, "add");
|
| 986 |
+
|
| 987 |
+
// update slider.slides
|
| 988 |
+
slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
|
| 989 |
+
// re-setup the slider to accomdate new slide
|
| 990 |
+
slider.setup();
|
| 991 |
+
|
| 992 |
+
//FlexSlider: added() Callback
|
| 993 |
+
slider.vars.added(slider);
|
| 994 |
+
}
|
| 995 |
+
slider.removeSlide = function(obj) {
|
| 996 |
+
var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
|
| 997 |
+
|
| 998 |
+
// update count
|
| 999 |
+
slider.count -= 1;
|
| 1000 |
+
slider.last = slider.count - 1;
|
| 1001 |
+
|
| 1002 |
+
// remove slide
|
| 1003 |
+
if (isNaN(obj)) {
|
| 1004 |
+
$(obj, slider.slides).remove();
|
| 1005 |
+
} else {
|
| 1006 |
+
(vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
|
| 1007 |
+
}
|
| 1008 |
+
|
| 1009 |
+
// update currentSlide, animatingTo, controlNav, and directionNav
|
| 1010 |
+
slider.doMath();
|
| 1011 |
+
slider.update(pos, "remove");
|
| 1012 |
+
|
| 1013 |
+
// update slider.slides
|
| 1014 |
+
slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
|
| 1015 |
+
// re-setup the slider to accomdate new slide
|
| 1016 |
+
slider.setup();
|
| 1017 |
+
|
| 1018 |
+
// FlexSlider: removed() Callback
|
| 1019 |
+
slider.vars.removed(slider);
|
| 1020 |
+
}
|
| 1021 |
+
|
| 1022 |
+
//FlexSlider: Initialize
|
| 1023 |
+
methods.init();
|
| 1024 |
+
}
|
| 1025 |
+
|
| 1026 |
+
// Ensure the slider isn't focussed if the window loses focus.
|
| 1027 |
+
$( window ).blur( function ( e ) {
|
| 1028 |
+
focused = false;
|
| 1029 |
+
}).focus( function ( e ) {
|
| 1030 |
+
focused = true;
|
| 1031 |
+
});
|
| 1032 |
+
|
| 1033 |
+
//FlexSlider: Default Settings
|
| 1034 |
+
$.flexslider.defaults = {
|
| 1035 |
+
namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
|
| 1036 |
+
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
|
| 1037 |
+
animation: "fade", //String: Select your animation type, "fade" or "slide"
|
| 1038 |
+
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
|
| 1039 |
+
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
|
| 1040 |
+
reverse: false, //{NEW} Boolean: Reverse the animation direction
|
| 1041 |
+
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
|
| 1042 |
+
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
|
| 1043 |
+
startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
|
| 1044 |
+
slideshow: true, //Boolean: Animate slider automatically
|
| 1045 |
+
slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds
|
| 1046 |
+
animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
|
| 1047 |
+
initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds
|
| 1048 |
+
randomize: false, //Boolean: Randomize slide order
|
| 1049 |
+
thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
|
| 1050 |
+
|
| 1051 |
+
// Usability features
|
| 1052 |
+
pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
|
| 1053 |
+
pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
|
| 1054 |
+
pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
|
| 1055 |
+
useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available
|
| 1056 |
+
touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
|
| 1057 |
+
video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
|
| 1058 |
+
|
| 1059 |
+
// Primary Controls
|
| 1060 |
+
controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
|
| 1061 |
+
directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false)
|
| 1062 |
+
prevText: "Previous", //String: Set the text for the "previous" directionNav item
|
| 1063 |
+
nextText: "Next", //String: Set the text for the "next" directionNav item
|
| 1064 |
+
|
| 1065 |
+
// Secondary Navigation
|
| 1066 |
+
keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys
|
| 1067 |
+
multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
|
| 1068 |
+
mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
|
| 1069 |
+
pausePlay: false, //Boolean: Create pause/play dynamic element
|
| 1070 |
+
pauseText: "Pause", //String: Set the text for the "pause" pausePlay item
|
| 1071 |
+
playText: "Play", //String: Set the text for the "play" pausePlay item
|
| 1072 |
+
|
| 1073 |
+
// Special properties
|
| 1074 |
+
controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
|
| 1075 |
+
manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
|
| 1076 |
+
sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
|
| 1077 |
+
asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
|
| 1078 |
+
|
| 1079 |
+
// Carousel Options
|
| 1080 |
+
itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
|
| 1081 |
+
itemMargin: 0, //{NEW} Integer: Margin between carousel items.
|
| 1082 |
+
minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
|
| 1083 |
+
maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
|
| 1084 |
+
move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
|
| 1085 |
+
allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
|
| 1086 |
+
|
| 1087 |
+
// Callback API
|
| 1088 |
+
start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
|
| 1089 |
+
before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
|
| 1090 |
+
after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
|
| 1091 |
+
end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
|
| 1092 |
+
added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added
|
| 1093 |
+
removed: function(){} //{NEW} Callback: function(slider) - Fires after a slide is removed
|
| 1094 |
+
}
|
| 1095 |
+
|
| 1096 |
+
|
| 1097 |
+
//FlexSlider: Plugin Function
|
| 1098 |
+
$.fn.flexslider = function(options) {
|
| 1099 |
+
if (options === undefined) options = {};
|
| 1100 |
+
|
| 1101 |
+
if (typeof options === "object") {
|
| 1102 |
+
return this.each(function() {
|
| 1103 |
+
var $this = $(this),
|
| 1104 |
+
selector = (options.selector) ? options.selector : ".slides > li",
|
| 1105 |
+
$slides = $this.find(selector);
|
| 1106 |
+
|
| 1107 |
+
if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
|
| 1108 |
+
$slides.fadeIn(400);
|
| 1109 |
+
if (options.start) options.start($this);
|
| 1110 |
+
} else if ($this.data('flexslider') === undefined) {
|
| 1111 |
+
new $.flexslider(this, options);
|
| 1112 |
+
}
|
| 1113 |
+
});
|
| 1114 |
+
} else {
|
| 1115 |
+
// Helper strings to quickly perform functions on the slider
|
| 1116 |
+
var $slider = $(this).data('flexslider');
|
| 1117 |
+
switch (options) {
|
| 1118 |
+
case "play": $slider.play(); break;
|
| 1119 |
+
case "pause": $slider.pause(); break;
|
| 1120 |
+
case "stop": $slider.stop(); break;
|
| 1121 |
+
case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
|
| 1122 |
+
case "prev":
|
| 1123 |
+
case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
|
| 1124 |
+
default: if (typeof options === "number") $slider.flexAnimate(options, true);
|
| 1125 |
+
}
|
| 1126 |
+
}
|
| 1127 |
+
}
|
| 1128 |
+
})(jQuery);
|
includes/js/gallery.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* @author Chris Baldelomar
|
| 3 |
+
* @website http://wordpresscanvas.com/
|
| 4 |
+
*/
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
( function( $ ) {
|
| 8 |
+
"use strict";
|
| 9 |
+
|
| 10 |
+
var body = $( 'body' ),
|
| 11 |
+
_window = $( window );
|
| 12 |
+
|
| 13 |
+
$(document).ready(function(){
|
| 14 |
+
if ( $.isFunction( $.fn.masonry ) ) {
|
| 15 |
+
var $gallery = $('.gallery-masonry').masonry( {
|
| 16 |
+
columnWidth: '.gallery-item',
|
| 17 |
+
itemSelector: '.gallery-item',
|
| 18 |
+
gutter: 0
|
| 19 |
+
} );
|
| 20 |
+
|
| 21 |
+
_window.load(function() {
|
| 22 |
+
$gallery.masonry();
|
| 23 |
+
});
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
if( jQuery().magnificPopup) {
|
| 27 |
+
$('.gallery-link-file').each( function() {
|
| 28 |
+
$(this).magnificPopup({
|
| 29 |
+
delegate: '.gallery-icon a',
|
| 30 |
+
gallery: {
|
| 31 |
+
enabled: true
|
| 32 |
+
},
|
| 33 |
+
type:'image',
|
| 34 |
+
image: {
|
| 35 |
+
titleSrc: function(item) {
|
| 36 |
+
return $(item.el).parent().next('.gallery-caption').html();
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
});
|
| 40 |
+
});
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
if( jQuery().wcflexslider) {
|
| 44 |
+
$(window).load(function() {
|
| 45 |
+
$('.gallery.wcslider.wcflexslider').wcflexslider({
|
| 46 |
+
smoothHeight: false,
|
| 47 |
+
slideshow: false,
|
| 48 |
+
animation:"fade"
|
| 49 |
+
});
|
| 50 |
+
$('.gallery.wccarousel.wcflexslider').wcflexslider({
|
| 51 |
+
smoothHeight: false,
|
| 52 |
+
animation: "slide",
|
| 53 |
+
slideshow: false
|
| 54 |
+
});
|
| 55 |
+
});
|
| 56 |
+
}
|
| 57 |
+
});
|
| 58 |
+
} )( jQuery );
|
includes/js/jquery.magnific-popup.min.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*! Magnific Popup - v0.9.8 - 2013-10-26
|
| 2 |
+
* http://dimsemenov.com/plugins/magnific-popup/
|
| 3 |
+
* Copyright (c) 2013 Dmitry Semenov; */
|
| 4 |
+
(function(e){var t,i,n,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",v="."+g,h="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,i){t.ev.on(g+e+v,i)},k=function(t,i,n,o){var r=document.createElement("div");return r.className="mfp-"+t,n&&(r.innerHTML=n),o?i&&i.appendChild(r):(r=e(r),i&&r.appendTo(i)),r},T=function(i,n){t.ev.triggerHandler(g+i,n),t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,e.isArray(n)?n:[n]))},E=function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},S=function(i){return i===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=i),t.currTemplate.closeBtn},P=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},_=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var i=navigator.appVersion;t.isIE7=-1!==i.indexOf("MSIE 7."),t.isIE8=-1!==i.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(i),t.isIOS=/iphone|ipad|ipod/gi.test(i),t.supportsTransition=_(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=e(document.body),o=e(document),t.popupsCache={}},open:function(i){var n;if(i.isObj===!1){t.items=i.items.toArray(),t.index=0;var r,s=i.items;for(n=0;s.length>n;n++)if(r=s[n],r.parsed&&(r=r.el[0]),r===i.el[0]){t.index=n;break}}else t.items=e.isArray(i.items)?i.items:[i.items],t.index=i.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=i.mainEl&&i.mainEl.length?i.mainEl.eq(0):o,i.key?(t.popupsCache[i.key]||(t.popupsCache[i.key]={}),t.currTemplate=t.popupsCache[i.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,i),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+v,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+v,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(n=0;l.length>n;n++){var c=l[n];c=c.charAt(0).toUpperCase()+c.slice(1),t["init"+c].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,i,n){i.close_replaceWith=S(n.type)}),a+=" mfp-close-btn-in"):t.wrap.append(S())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+v,function(e){27===e.keyCode&&t.close()}),I.on("resize"+v,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var d=t.wH=I.height(),u={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(u.marginRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):u.overflow="hidden");var g=t.st.mainClass;return t.isIE7&&(g+=" mfp-ie7"),g&&t._addClassToMFP(g),t.updateItemHTML(),T("BuildControls"),e("html").css(u),t.bgOverlay.add(t.wrap).prependTo(document.body),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(h),E()):t.bgOverlay.addClass(h),o.on("focusin"+v,function(i){return i.target===t.wrap[0]||e.contains(t.wrap[0],i.target)?void 0:(E(),!1)})},16),t.isOpen=!0,t.updateSize(d),T(f),i},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var i=C+" "+h+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(i+=t.st.mainClass+" "),t._removeClassFromMFP(i),t.fixedContentPos){var n={marginRight:""};t.isIE7?e("body, html").css("overflow",""):n.overflow="",e("html").css(n)}o.off("keyup"+v+" focusin"+v),t.ev.off(v),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,n=window.innerHeight*i;t.wrap.css("height",n),t.wH=n}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var i=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),i.parsed||(i=t.parseEl(t.index));var n=i.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",n]),t.currItem=i,!t.currTemplate[n]){var o=t.st[n]?t.st[n].markup:!1;T("FirstMarkupParse",o),t.currTemplate[n]=o?e(o):!0}r&&r!==i.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+n.charAt(0).toUpperCase()+n.slice(1)](i,t.currTemplate[n]);t.appendContent(a,n),i.preloaded=!0,T(m,i),r=i.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,i){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[i]===!0?t.content.find(".mfp-close").length||t.content.append(S()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var n=t.items[i],o=n.type;if(n=n.tagName?{el:e(n)}:{data:n,src:n.src},n.el){for(var r=t.types,a=0;r.length>a;a++)if(n.el.hasClass("mfp-"+r[a])){o=r[a];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=o||t.st.type||"inline",n.index=i,n.parsed=!0,t.items[i]=n,T("ElementParse",n),t.items[i]},addGroup:function(e,i){var n=function(n){n.mfpEl=this,t._openClick(n,e,i)};i||(i={});var o="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(o).on(o,n)):(i.isObj=!1,i.delegate?e.off(o).on(o,i.delegate,n):(i.items=e,e.off(o).on(o,n)))},_openClick:function(i,n,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==i.which&&!i.ctrlKey&&!i.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),o.el=e(i.mfpEl),o.delegate&&(o.items=n.find(o.delegate)),t.open(o)}},updateStatus:function(e,n){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),n||"loading"!==e||(n=t.st.tLoading);var o={status:e,text:n};T("UpdateStatus",o),e=o.status,n=o.text,t.preloader.html(n),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),i=e}},_checkIfClose:function(i){if(!e(i).hasClass(y)){var n=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(n&&o)return!0;if(!t.content||e(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||e.contains(t.content[0],i)){if(n)return!0}else if(o&&e.contains(document,i))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_parseMarkup:function(t,i,n){var o;n.data&&(i=e.extend(n.data,i)),T(p,[t,i,n]),e.each(i,function(e,i){if(void 0===i||i===!1)return!0;if(o=e.split("_"),o.length>1){var n=t.find(v+"-"+o[0]);if(n.length>0){var r=o[1];"replaceWith"===r?n[0]!==i[0]&&n.replaceWith(i):"img"===r?n.is("img")?n.attr("src",i):n.replaceWith('<img src="'+i+'" class="'+n.attr("class")+'" />'):n.attr(o[1],i)}}else t.find(v+"-"+e).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,i){return P(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(e.magnificPopup.defaults[t]=i.options),e.extend(this.proto,i.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(i){P();var n=e(this);if("string"==typeof i)if("open"===i){var o,r=b?n.data("magnificPopup"):n[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=n,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},n,r)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else i=e.extend(!0,{},i),b?n.data("magnificPopup",i):n[0].magnificPopup=i,t.addGroup(n,i);return n};var O,z,M,B="inline",H=function(){M&&(z.after(M.addClass(O)).detach(),M=null)};e.magnificPopup.registerModule(B,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(B),x(l+"."+B,function(){H()})},getInline:function(i,n){if(H(),i.src){var o=t.st.inline,r=e(i.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(z||(O=o.hiddenClass,z=k(O),O="mfp-"+O),M=r.after(z).detach().removeClass(O)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return i.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var L,A="ajax",F=function(){L&&n.removeClass(L)},j=function(){F(),t.req&&t.req.abort()};e.magnificPopup.registerModule(A,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(A),L=t.st.ajax.cursor,x(l+"."+A,j),x("BeforeChange."+A,j)},getAjax:function(i){L&&n.addClass(L),t.updateStatus("loading");var o=e.extend({url:i.src,success:function(n,o,r){var a={data:n,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),A),i.finished=!0,F(),E(),setTimeout(function(){t.wrap.addClass(h)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){F(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var N,W=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=t.st.image.titleSrc;if(n){if(e.isFunction(n))return n.call(t,i);if(i.el)return i.el.attr(n)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,i=".image";t.types.push("image"),x(f+i,function(){"image"===t.currItem.type&&e.cursor&&n.addClass(e.cursor)}),x(l+i,function(){e.cursor&&n.removeClass(e.cursor),I.off("resize"+v)}),x("Resize"+i,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,N&&clearInterval(N),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],o=function(r){N&&clearInterval(N),N=setInterval(function(){return n.naturalWidth>0?(t._onImageHasSize(e),void 0):(i>200&&clearInterval(N),i++,3===i?o(10):40===i?o(50):100===i&&o(500),void 0)},r)};o(1)},getImage:function(i,n){var o=0,r=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",s.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},s=t.st.image,l=n.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",i.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=i.src,l.is("img")&&(i.img=i.img.clone()),i.img[0].naturalWidth>0&&(i.hasSize=!0)}return t._parseMarkup(n,{title:W(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(N&&clearInterval(N),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var R,Z=function(){return void 0===R&&(R=void 0!==document.createElement("p").style.MozTransform),R};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,i=t.st.zoom,n=".zoom";if(i.enabled&&t.supportsTransition){var o,r,a=i.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+i.duration/1e3+"s "+i.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=n,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+n,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+n,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+n,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var n;n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=n.offset(),r=parseInt(n.css("padding-top"),10),a=parseInt(n.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:n.width(),height:(b?n.innerHeight():n[0].offsetHeight)-a-r};return Z()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var q="iframe",D="//about:blank",K=function(e){if(t.currTemplate[q]){var i=t.currTemplate[q].find("iframe");i.length&&(e||(i[0].src=D),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(q,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(q),x("BeforeChange",function(e,t,i){t!==i&&(t===q?K():i===q&&K(!0))}),x(l+"."+q,function(){K()})},getIframe:function(i,n){var o=i.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(n,a,i),t.updateStatus("ready"),n}}});var Y=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},U=function(e,t,i){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,n=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,i&&i.enabled?(a+=" mfp-gallery",x(f+n,function(){i.navigateByImgClick&&t.wrap.on("click"+n,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+n,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+n,function(e,i){i.text&&(i.text=U(i.text,t.currItem.index,t.items.length))}),x(p+n,function(e,n,o,r){var a=t.items.length;o.counter=a>1?U(i.tCounter,r.index,a):""}),x("BuildControls"+n,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,o=t.arrowLeft=e(n.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(n.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+n,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+n,function(){o.off(n),t.wrap.off("click"+n),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=Y(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=Y(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,n=Math.min(i[0],t.items.length),o=Math.min(i[1],t.items.length);for(e=1;(t.direction?o:n)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?n:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=Y(i),!t.items[i].preloaded){var n=t.items[i];n.parsed||(n=t.parseEl(i)),T("LazyLoad",n),"image"===n.type&&(n.img=e('<img class="mfp-img" />').on("load.mfploader",function(){n.hasSize=!0}).on("error.mfploader",function(){n.hasSize=!0,n.loadError=!0,T("LazyLoadError",n)}).attr("src",n.src)),n.preloaded=!0}}}});var G="retina";e.magnificPopup.registerModule(G,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;i=isNaN(i)?i():i,i>1&&(x("ImageHasSize."+G,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),x("ElementParse."+G,function(t,n){n.src=e.replaceSrc(n,i)}))}}}}),function(){var t=1e3,i="ontouchstart"in window,n=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(i){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,n())}).on("touchend"+r,function(e){n(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),i&&I.off("touchmove"+r+" touchend"+r)}}()})(window.jQuery||window.Zepto);
|
includes/js/masonry.pkgd.min.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*!
|
| 2 |
+
* Masonry PACKAGED v3.1.2
|
| 3 |
+
* Cascading grid layout library
|
| 4 |
+
* http://masonry.desandro.com
|
| 5 |
+
* MIT License
|
| 6 |
+
* by David DeSandro
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
(function(t){"use strict";function e(t){if(t){if("string"==typeof n[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,o=0,r=i.length;r>o;o++)if(e=i[o]+t,"string"==typeof n[e])return e}}var i="Webkit Moz ms Ms O".split(" "),n=document.documentElement.style;"function"==typeof define&&define.amd?define(function(){return e}):t.getStyleProperty=e})(window),function(t){"use strict";function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var n=s[e];t[n]=0}return t}function n(t){function n(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var n=r(t);if("none"===n.display)return i();var h={};h.width=t.offsetWidth,h.height=t.offsetHeight;for(var p=h.isBorderBox=!(!a||!n[a]||"border-box"!==n[a]),u=0,f=s.length;f>u;u++){var d=s[u],c=n[d],l=parseFloat(c);h[d]=isNaN(l)?0:l}var m=h.paddingLeft+h.paddingRight,y=h.paddingTop+h.paddingBottom,g=h.marginLeft+h.marginRight,v=h.marginTop+h.marginBottom,_=h.borderLeftWidth+h.borderRightWidth,E=h.borderTopWidth+h.borderBottomWidth,b=p&&o,L=e(n.width);L!==!1&&(h.width=L+(b?0:m+_));var T=e(n.height);return T!==!1&&(h.height=T+(b?0:y+E)),h.innerWidth=h.width-(m+_),h.innerHeight=h.height-(y+E),h.outerWidth=h.width+g,h.outerHeight=h.height+v,h}}var o,a=t("boxSizing");return function(){if(a){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[a]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var n=r(t);o=200===e(n.width),i.removeChild(t)}}(),n}var o=document.defaultView,r=o&&o.getComputedStyle?function(t){return o.getComputedStyle(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define(["get-style-property/get-style-property"],n):t.getSize=n(t.getStyleProperty)}(window),function(t){"use strict";var e=document.documentElement,i=function(){};e.addEventListener?i=function(t,e,i){t.addEventListener(e,i,!1)}:e.attachEvent&&(i=function(e,i,n){e[i+n]=n.handleEvent?function(){var e=t.event;e.target=e.target||e.srcElement,n.handleEvent.call(n,e)}:function(){var i=t.event;i.target=i.target||i.srcElement,n.call(e,i)},e.attachEvent("on"+i,e[i+n])});var n=function(){};e.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:e.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(n){t[e+i]=void 0}});var o={bind:i,unbind:n};"function"==typeof define&&define.amd?define(o):t.eventie=o}(this),function(t){"use strict";function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==o.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var n=0,s=r.length;s>n;n++){var a=r[n];a()}}}function n(n){return n.bind(o,"DOMContentLoaded",i),n.bind(o,"readystatechange",i),n.bind(t,"load",i),e}var o=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define(["eventie/eventie"],n)):t.docReady=n(t.eventie)}(this),function(){"use strict";function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var n=t.prototype;n.getListeners=function(t){var e,i,n=this._getEvents();if("object"==typeof t){e={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i])}else e=n[t]||(n[t]=[]);return e},n.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},n.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},n.addListener=function(t,i){var n,o=this.getListenersAsObject(t),r="object"==typeof i;for(n in o)o.hasOwnProperty(n)&&-1===e(o[n],i)&&o[n].push(r?i:{listener:i,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,i){var n,o,r=this.getListenersAsObject(t);for(o in r)r.hasOwnProperty(o)&&(n=e(r[o],i),-1!==n&&r[o].splice(n,1));return this},n.off=i("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},n.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if("object"===i)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},n.emitEvent=function(t,e){var i,n,o,r,s=this.getListenersAsObject(t);for(o in s)if(s.hasOwnProperty(o))for(n=s[o].length;n--;)i=s[o][n],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},n._getEvents=function(){return this._events||(this._events={})},"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){"use strict";function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function o(e,i){t.fn[e]=function(o){if("string"==typeof o){for(var s=n.call(arguments,1),a=0,h=this.length;h>a;a++){var p=this[a],u=t.data(p,e);if(u)if(t.isFunction(u[o])&&"_"!==o.charAt(0)){var f=u[o].apply(u,s);if(void 0!==f)return f}else r("no such method '"+o+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+o+"'")}return this}return this.each(function(){var n=t.data(this,e);n?(n.option(o),n._init()):(n=new i(this,o),t.data(this,e,n))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};t.bridget=function(t,e){i(e),o(t,e)}}}var n=Array.prototype.slice;"function"==typeof define&&define.amd?define(["jquery"],i):i(t.jQuery)}(window),function(t,e){"use strict";function i(t,e){return t[a](e)}function n(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function o(t,e){n(t);for(var i=t.parentNode.querySelectorAll(e),o=0,r=i.length;r>o;o++)if(i[o]===t)return!0;return!1}function r(t,e){return n(t),i(t,e)}var s,a=function(){if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0,n=t.length;n>i;i++){var o=t[i],r=o+"MatchesSelector";if(e[r])return r}}();if(a){var h=document.createElement("div"),p=i(h,"div");s=p?i:r}else s=o;"function"==typeof define&&define.amd?define(function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(t){"use strict";function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i,n){function r(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var s=n("transition"),a=n("transform"),h=s&&a,p=!!n("perspective"),u={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[s],f=["transform","transition","transitionDuration","transitionProperty"],d=function(){for(var t={},e=0,i=f.length;i>e;e++){var o=f[e],r=n(o);r&&r!==o&&(t[o]=r)}return t}();e(r.prototype,t.prototype),r.prototype._create=function(){this.css({position:"absolute"})},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.getSize=function(){this.size=i(this.element)},r.prototype.css=function(t){var e=this.element.style;for(var i in t){var n=d[i]||i;e[n]=t[i]}},r.prototype.getPosition=function(){var t=o(this.element),e=this.layout.options,i=e.isOriginLeft,n=e.isOriginTop,r=parseInt(t[i?"left":"right"],10),s=parseInt(t[n?"top":"bottom"],10);r=isNaN(r)?0:r,s=isNaN(s)?0:s;var a=this.layout.size;r-=i?a.paddingLeft:a.paddingRight,s-=n?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},r.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var c=p?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};r.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),s=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,h=e-n,p={},u=this.layout.options;a=u.isOriginLeft?a:-a,h=u.isOriginTop?h:-h,p.transform=c(a,h),this.transition({to:p,onTransitionEnd:this.layoutPosition,isCleaning:!0})},r.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},r.prototype.moveTo=h?r.prototype._transitionTo:r.prototype.goTo,r.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},r.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd&&t.onTransitionEnd.call(this)},r.prototype._transition=function(t){var e=this.layout.options.transitionDuration;if(!parseFloat(e))return this._nonTransition(t),void 0;var i=t.to,n=[];for(var o in i)n.push(o);var r={};if(r.transitionProperty=n.join(","),r.transitionDuration=e,this.element.addEventListener(u,this,!1),(t.isCleaning||t.onTransitionEnd)&&(this.onTransitionEnd=function(){t.isCleaning&&this._removeStyles(i),t.onTransitionEnd&&t.onTransitionEnd.call(this)}),t.from){this.css(t.from);var s=this.element.offsetHeight;s=null}this.css(r),this.css(i),this.isTransitioning=!0},r.prototype.transition=r.prototype[s?"_transition":"_nonTransition"],r.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},r.prototype.onotransitionend=function(t){this.ontransitionend(t)},r.prototype.ontransitionend=function(t){t.target===this.element&&(this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1,this.onTransitionEnd&&(this.onTransitionEnd.call(this),delete this.onTransitionEnd),this.emitEvent("transitionEnd",[this]))},r.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var l={transitionProperty:"",transitionDuration:""};return r.prototype.removeTransitionStyles=function(){this.css(l)},r.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},r.prototype.remove=function(){if(!s||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},r.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},r.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:function(){this.css({display:"none"})}})},r.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},r}var n=document.defaultView,o=n&&n.getComputedStyle?function(t){return n.getComputedStyle(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],i):(t.Outlayer={},t.Outlayer.Item=i(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){"use strict";function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===u.call(t)}function n(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var n=0,o=t.length;o>n;n++)e.push(t[n]);else e.push(t);return e}function o(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function r(i,r,u,c,l,m){function y(t,i){if("string"==typeof t&&(t=s.querySelector(t)),!t||!f(t))return a&&a.error("Bad "+this.settings.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.options),this.option(i);var n=++v;this.element.outlayerGUID=n,_[n]=this,this._create(),this.options.isInitLayout&&this.layout()}function g(t,i){t.prototype[i]=e({},y.prototype[i])}var v=0,_={};return y.prototype.settings={namespace:"outlayer",item:m},y.prototype.options={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(y.prototype,u.prototype),y.prototype.option=function(t){e(this.options,t)},y.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},y.prototype.reloadItems=function(){this.items=this._getItems(this.element.children)},y.prototype._getItems=function(t){for(var e=this._filterFindItemElements(t),i=this.settings.item,n=[],o=0,r=e.length;r>o;o++){var s=e[o],a=new i(s,this,this.options.itemOptions);n.push(a)}return n},y.prototype._filterFindItemElements=function(t){t=n(t);for(var e=this.options.itemSelector,i=[],o=0,r=t.length;r>o;o++){var s=t[o];if(f(s))if(e){l(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),h=0,p=a.length;p>h;h++)i.push(a[h])}else i.push(s)}return i},y.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},y.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},y.prototype._init=y.prototype.layout,y.prototype._resetLayout=function(){this.getSize()},y.prototype.getSize=function(){this.size=c(this.element)},y.prototype._getMeasurement=function(t,e){var i,n=this.options[t];n?("string"==typeof n?i=this.element.querySelector(n):f(n)&&(i=n),this[t]=i?c(i)[e]:n):this[t]=0},y.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},y.prototype._getItemsForLayout=function(t){for(var e=[],i=0,n=t.length;n>i;i++){var o=t[i];o.isIgnored||e.push(o)}return e},y.prototype._layoutItems=function(t,e){if(!t||!t.length)return this.emitEvent("layoutComplete",[this,t]),void 0;this._itemsOn(t,"layout",function(){this.emitEvent("layoutComplete",[this,t])});for(var i=[],n=0,o=t.length;o>n;n++){var r=t[n],s=this._getItemLayoutPosition(r);s.item=r,s.isInstant=e,i.push(s)}this._processLayoutQueue(i)},y.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},y.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var n=t[e];this._positionItem(n.item,n.x,n.y,n.isInstant)}},y.prototype._positionItem=function(t,e,i,n){n?t.goTo(e,i):t.moveTo(e,i)},y.prototype._postLayout=function(){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))},y.prototype._getContainerSize=p,y.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},y.prototype._itemsOn=function(t,e,i){function n(){return o++,o===r&&i.call(s),!0}for(var o=0,r=t.length,s=this,a=0,h=t.length;h>a;a++){var p=t[a];p.on(e,n)}},y.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},y.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},y.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var n=t[e];this.ignore(n)}}},y.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var n=t[e],o=d(this.stamps,n);-1!==o&&this.stamps.splice(o,1),this.unignore(n)}},y.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n(t)):void 0},y.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},y.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},y.prototype._manageStamp=p,y.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,n=c(t),o={left:e.left-i.left-n.marginLeft,top:e.top-i.top-n.marginTop,right:i.right-e.right-n.marginRight,bottom:i.bottom-e.bottom-n.marginBottom};return o},y.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},y.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},y.prototype.unbindResize=function(){i.unbind(t,"resize",this),this.isResizeBound=!1},y.prototype.onresize=function(){function t(){e.resize()}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},y.prototype.resize=function(){var t=c(this.element),e=this.size&&t;e&&t.innerWidth===this.size.innerWidth||(this.layout(),delete this.resizeTimeout)},y.prototype.addItems=function(t){var e=this._getItems(t);if(e.length)return this.items=this.items.concat(e),e},y.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},y.prototype.prepended=function(t){var e=this._getItems(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},y.prototype.reveal=function(t){if(t&&t.length)for(var e=0,i=t.length;i>e;e++){var n=t[e];n.reveal()}},y.prototype.hide=function(t){if(t&&t.length)for(var e=0,i=t.length;i>e;e++){var n=t[e];n.hide()}},y.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e];if(n.element===t)return n}},y.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,n=t.length;n>i;i++){var o=t[i],r=this.getItem(o);r&&e.push(r)}return e}},y.prototype.remove=function(t){t=n(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,o=e.length;o>i;i++){var r=e[i];r.remove();var s=d(this.items,r);this.items.splice(s,1)}}},y.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e];n.destroy()}this.unbindResize(),delete this.element.outlayerGUID,h&&h.removeData(this.element,this.settings.namespace)},y.data=function(t){var e=t&&t.outlayerGUID;return e&&_[e]},y.create=function(t,i){function n(){y.apply(this,arguments)}return e(n.prototype,y.prototype),g(n,"options"),g(n,"settings"),e(n.prototype.options,i),n.prototype.settings.namespace=t,n.data=y.data,n.Item=function(){m.apply(this,arguments)},n.Item.prototype=new m,n.prototype.settings.item=n.Item,r(function(){for(var e=o(t),i=s.querySelectorAll(".js-"+e),r="data-"+e+"-options",p=0,u=i.length;u>p;p++){var f,d=i[p],c=d.getAttribute(r);try{f=c&&JSON.parse(c)}catch(l){a&&a.error("Error parsing "+r+" on "+d.nodeName.toLowerCase()+(d.id?"#"+d.id:"")+": "+l);continue}var m=new n(d,f);h&&h.data(d,t,m)}}),h&&h.bridget&&h.bridget(t,n),n},y.Item=m,y}var s=t.document,a=t.console,h=t.jQuery,p=function(){},u=Object.prototype.toString,f="object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},d=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],r):t.Outlayer=r(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){"use strict";function e(t,e){var n=t.create("masonry");return n.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},n.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},n.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},n.prototype._getItemLayoutPosition=function(t){t.getSize();var e=Math.ceil(t.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var n=this._getColGroup(e),o=Math.min.apply(Math,n),r=i(n,o),s={x:this.columnWidth*r,y:o},a=o+t.size.outerHeight,h=this.cols+1-n.length,p=0;h>p;p++)this.colYs[r+p]=a;return s},n.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},n.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this.options.isOriginLeft?n.left:n.right,r=o+i.outerWidth,s=Math.floor(o/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a=Math.min(this.cols-1,a);for(var h=(this.options.isOriginTop?n.top:n.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(h,this.colYs[p])},n.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},n.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.prototype.resize=function(){var t=this.containerWidth;this.getContainerWidth(),t!==this.containerWidth&&this.layout()},n}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;n>i;i++){var o=t[i];if(o===e)return i}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):t.Masonry=e(t.Outlayer,t.getSize)}(window);
|
includes/js/woocommerce.product.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* @author Chris Baldelomar
|
| 3 |
+
* @website http://wordpresscanvas.com/
|
| 4 |
+
*/
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
( function( $ ) {
|
| 8 |
+
"use strict";
|
| 9 |
+
|
| 10 |
+
$(document).ready(function(){
|
| 11 |
+
if( jQuery().magnificPopup) {
|
| 12 |
+
$("a[rel^='prettyPhoto']").magnificPopup({
|
| 13 |
+
gallery: {
|
| 14 |
+
enabled: true
|
| 15 |
+
},
|
| 16 |
+
type:'image',
|
| 17 |
+
});
|
| 18 |
+
}
|
| 19 |
+
});
|
| 20 |
+
} )( jQuery );
|
includes/options.php
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$wc_gallery_options = array(
|
| 3 |
+
'misc' => array(
|
| 4 |
+
'title' => 'Misc',
|
| 5 |
+
'sections' => array(
|
| 6 |
+
array(
|
| 7 |
+
'section' => 'wc-gallery-options-misc-section',
|
| 8 |
+
'title' => 'Miscellaneous Options',
|
| 9 |
+
'options' => array(
|
| 10 |
+
array(
|
| 11 |
+
'id' => 'enable_gallery_css',
|
| 12 |
+
'title' => 'Gallery CSS',
|
| 13 |
+
'default' => '1',
|
| 14 |
+
'description' => '',
|
| 15 |
+
'label' => 'Use gallery CSS provided by plugin',
|
| 16 |
+
'type' => 'checkbox',
|
| 17 |
+
),
|
| 18 |
+
),
|
| 19 |
+
),
|
| 20 |
+
),
|
| 21 |
+
),
|
| 22 |
+
);
|
includes/scripts.php
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* This file loads the CSS and JS necessary for your shortcodes display
|
| 4 |
+
* @package wc Shortcodes Plugin
|
| 5 |
+
* @since 1.0
|
| 6 |
+
* @author AJ Clarke : http://wpexplorer.com
|
| 7 |
+
* @copyright Copyright (c) 2012, AJ Clarke
|
| 8 |
+
* @link http://wpexplorer.com
|
| 9 |
+
* @License: GNU General Public License version 2.0
|
| 10 |
+
* @License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
+
*/
|
| 12 |
+
if( !function_exists ('wc_gallery_scripts') ) :
|
| 13 |
+
function wc_gallery_scripts() {
|
| 14 |
+
$ver = WC_GALLERY_VERSION;
|
| 15 |
+
|
| 16 |
+
if ( get_option( WC_GALLERY_PREFIX . 'enable_shortcode_css', true ) ) {
|
| 17 |
+
wp_enqueue_style( 'wc-gallery-style', plugin_dir_url( __FILE__ ) . 'css/style.css', array( ), $ver );
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
// Masonry
|
| 21 |
+
wp_deregister_script( 'jquery-masonry' );
|
| 22 |
+
wp_register_script( 'jquery-masonry', plugin_dir_url( __FILE__ ) . 'js/masonry.pkgd.min.js', array( ), '3.1.2', true );
|
| 23 |
+
wp_enqueue_script( 'jquery-masonry' );
|
| 24 |
+
|
| 25 |
+
// jQuery
|
| 26 |
+
wp_enqueue_script('jquery');
|
| 27 |
+
|
| 28 |
+
// Gallery Shortcode
|
| 29 |
+
wp_enqueue_style( 'wc-gallery-popup-style', plugin_dir_url( __FILE__ ) . 'css/magnific-popup.css', array( ), '2.1.5' );
|
| 30 |
+
wp_enqueue_style( 'wc-gallery-flexslider-style', plugin_dir_url( __FILE__ ) . 'js/flexslider/flexslider.css', array( ), '2.2.0' );
|
| 31 |
+
wp_register_script( 'wc-gallery-popup', plugin_dir_url( __FILE__ ) . 'js/jquery.magnific-popup.min.js', array ( 'jquery' ), '0.9.8', true );
|
| 32 |
+
wp_register_script( 'wc-gallery-flexslider', plugin_dir_url( __FILE__ ) . 'js/flexslider/jquery.flexslider-min.js', array ( 'jquery' ), '2.2.0', true );
|
| 33 |
+
wp_register_script( 'wc-gallery', plugin_dir_url( __FILE__ ) . 'js/gallery.js', array ( 'jquery' ), $ver, true );
|
| 34 |
+
wp_register_script( 'wc-gallery-woocommerce-product', plugin_dir_url( __FILE__ ) . 'js/woocommerce.product.js', array( 'jquery' ), $ver, true );
|
| 35 |
+
|
| 36 |
+
if ( WC_GALLERY_USING_WOOCOMMERCE ) {
|
| 37 |
+
$lightbox_en = get_option( 'woocommerce_enable_lightbox' ) == 'yes' ? true : false;
|
| 38 |
+
if ( ! $lightbox_en && ( is_singular( array( 'product' ) ) || ( ! empty( $post->post_content ) && strstr( $post->post_content, '[product_page' ) ) ) ) {
|
| 39 |
+
wp_enqueue_script( 'wc-gallery-popup' );
|
| 40 |
+
wp_enqueue_script( 'wc-gallery-woocommerce-product' );
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
}
|
| 45 |
+
add_action('wp_enqueue_scripts', 'wc_gallery_scripts');
|
| 46 |
+
endif;
|
| 47 |
+
|
| 48 |
+
function wc_gallery_enqueue_admin_scripts() {
|
| 49 |
+
wp_register_script( 'wc-gallery-admin-js', plugin_dir_url( __FILE__ ) . 'js/admin.js', array ( 'jquery' ), WC_GALLERY_VERSION, true );
|
| 50 |
+
wp_enqueue_script( 'wc-gallery-admin-js' );
|
| 51 |
+
}
|
| 52 |
+
add_action('admin_enqueue_scripts', 'wc_gallery_enqueue_admin_scripts' );
|
includes/settings.php
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
function wc_gallery_options_enqueue_scripts() {
|
| 3 |
+
wp_register_style( 'wc-gallery-options', WC_GALLERY_PLUGIN_URL . 'includes/css/admin.css', array(), WC_GALLERY_VERSION, 'all' );
|
| 4 |
+
wp_enqueue_style( 'wc-gallery-options' );
|
| 5 |
+
|
| 6 |
+
wp_register_script( 'wc-gallery-options-js', WC_GALLERY_PLUGIN_URL . 'includes/js/admin.js', array('jquery'), WC_GALLERY_VERSION, true );
|
| 7 |
+
wp_enqueue_script( 'wc-gallery-options-js' );
|
| 8 |
+
}
|
| 9 |
+
add_action('admin_enqueue_scripts', 'wc_gallery_options_enqueue_scripts' );
|
| 10 |
+
|
| 11 |
+
function wc_gallery_options_init() {
|
| 12 |
+
global $wc_gallery_options;
|
| 13 |
+
|
| 14 |
+
foreach ( $wc_gallery_options as $tab => $o ) {
|
| 15 |
+
foreach ( $o['sections'] as $oo ) {
|
| 16 |
+
add_settings_section( $oo['section'], $oo['title'], '', 'wc-gallery-options' . $tab );
|
| 17 |
+
foreach ( $oo['options'] as $ooo ) {
|
| 18 |
+
$ooo['option_name'] = WC_GALLERY_PREFIX . $ooo['id'];
|
| 19 |
+
$callback = wc_gallery_options_find_sanitize_callback( $ooo['type'] );
|
| 20 |
+
register_setting( 'wc-gallery-options-'.$tab.'group', WC_GALLERY_PREFIX . $ooo['id'], $callback );
|
| 21 |
+
add_settings_field('wc_gallery_'.$ooo['id'].'', '<label for="wc_gallery_'.$ooo['id'].'">'.__($ooo['title'] , 'wc_gallery' ).'</label>' , 'wc_gallery_options_display_setting', 'wc-gallery-options'.$tab, $oo['section'], $ooo );
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
add_action( 'admin_init', 'wc_gallery_options_init' );
|
| 27 |
+
|
| 28 |
+
function wc_gallery_options_admin_menu() {
|
| 29 |
+
global $wc_gallery_options;
|
| 30 |
+
|
| 31 |
+
foreach ( $wc_gallery_options as $tab => $o ) {
|
| 32 |
+
$view_hook_name = add_submenu_page( 'options.php', $o['title'], $o['title'], 'read', 'wc-gallery-options-' . $tab, 'wc_gallery_options_display_page' );
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
// add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );
|
| 36 |
+
$view_hook_name = add_submenu_page( 'themes.php', 'WC Gallery', 'WC Gallery', 'read', 'wc-gallery-options', 'wc_gallery_options_display_page' );
|
| 37 |
+
}
|
| 38 |
+
add_action( 'admin_menu', 'wc_gallery_options_admin_menu' );
|
| 39 |
+
|
| 40 |
+
function wc_gallery_options_display_page() {
|
| 41 |
+
global $wc_gallery_options, $tab;
|
| 42 |
+
wp_reset_vars( array( 'tab' ) );
|
| 43 |
+
|
| 44 |
+
// restore last tab visited
|
| 45 |
+
if ( empty( $tab ) && isset( $_COOKIE[ WC_GALLERY_PREFIX . 'last_tab_visited'] ) ) {
|
| 46 |
+
$last_tab = $_COOKIE[ WC_GALLERY_PREFIX . 'last_tab_visited'];
|
| 47 |
+
if ( isset( $wc_gallery_options[ $last_tab ] ) ) {
|
| 48 |
+
$tab = $last_tab;
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
?>
|
| 53 |
+
<div class="wrap">
|
| 54 |
+
<?php screen_icon(); ?>
|
| 55 |
+
<?php
|
| 56 |
+
$links = array();
|
| 57 |
+
foreach( $wc_gallery_options as $id => $page ) :
|
| 58 |
+
if ( empty( $tab ) || $id == $tab ) {
|
| 59 |
+
$tab = $id;
|
| 60 |
+
$links[] = "<a class='nav-tab nav-tab-active' href='themes.php?page=wc-gallery-options&tab=".$tab."'>".$page['title']."</a>";
|
| 61 |
+
}
|
| 62 |
+
else {
|
| 63 |
+
$links[] = "<a class='nav-tab' href='themes.php?page=wc-gallery-options&tab=".$id."'>".$page['title']."</a>";
|
| 64 |
+
}
|
| 65 |
+
endforeach;
|
| 66 |
+
?>
|
| 67 |
+
<h2 class="nav-tab-wrapper">
|
| 68 |
+
<?php echo implode( '', $links ); ?>
|
| 69 |
+
</h2>
|
| 70 |
+
|
| 71 |
+
<?php if ( isset( $_GET['settings-updated'] ) ) : ?>
|
| 72 |
+
<div id="message" class="updated"><p><strong><?php _e( 'Settings saved.' ) ?></strong></p></div>
|
| 73 |
+
<?php endif; ?>
|
| 74 |
+
|
| 75 |
+
<form id="compile-less-css" method="post" action="options.php">
|
| 76 |
+
<?php
|
| 77 |
+
// settings_fields( $option_group )
|
| 78 |
+
// @option_group A settings group name. This should match the group name used in register_setting()
|
| 79 |
+
settings_fields( 'wc-gallery-options-'.$tab.'group' );
|
| 80 |
+
|
| 81 |
+
// do_settings_sections( $page )
|
| 82 |
+
// The slug name of the page whose settings sections you want to output. This should match the page name used in add_settings_section()
|
| 83 |
+
do_settings_sections( 'wc-gallery-options'.$tab );
|
| 84 |
+
?>
|
| 85 |
+
|
| 86 |
+
<p class="submit">
|
| 87 |
+
<?php submit_button( null, 'primary', 'submit', false ); ?>
|
| 88 |
+
</p>
|
| 89 |
+
</form>
|
| 90 |
+
</div>
|
| 91 |
+
<?php
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
/*
|
| 95 |
+
* Display Options
|
| 96 |
+
*/
|
| 97 |
+
function wc_gallery_options_display_setting( $args ) {
|
| 98 |
+
if ( !isset( $args['type'] ) )
|
| 99 |
+
return;
|
| 100 |
+
|
| 101 |
+
if ( !isset( $args['option_name'] ) )
|
| 102 |
+
return;
|
| 103 |
+
|
| 104 |
+
if ( !isset( $args['default'] ) )
|
| 105 |
+
return;
|
| 106 |
+
|
| 107 |
+
switch ( $args['type'] ) {
|
| 108 |
+
case 'image' :
|
| 109 |
+
wc_gallery_options_display_image_field( $args );
|
| 110 |
+
break;
|
| 111 |
+
case 'checkbox' :
|
| 112 |
+
wc_gallery_options_display_checkbox_field( $args );
|
| 113 |
+
break;
|
| 114 |
+
default :
|
| 115 |
+
wc_gallery_options_input_field( $args );
|
| 116 |
+
break;
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
function wc_gallery_options_input_field( $args ) {
|
| 121 |
+
extract( $args );
|
| 122 |
+
|
| 123 |
+
$val = get_option( $option_name, $default );
|
| 124 |
+
?>
|
| 125 |
+
|
| 126 |
+
<?php if ( isset( $label ) ) : ?>
|
| 127 |
+
<label for="<?php echo esc_attr($option_name); ?>"><?php echo $label; ?></label>
|
| 128 |
+
<?php endif; ?>
|
| 129 |
+
|
| 130 |
+
<input name="<?php echo $option_name; ?>" id="<?php echo $option_name; ?>" type="text" value="<?php echo esc_attr($val); ?>" class="regular-text" />
|
| 131 |
+
<?php if ( isset( $description ) && !empty( $description ) ) : ?>
|
| 132 |
+
<p class="description"><?php echo $description; ?></p>
|
| 133 |
+
<?php endif; ?>
|
| 134 |
+
<?php
|
| 135 |
+
}
|
| 136 |
+
function wc_gallery_options_display_image_field( $args ) {
|
| 137 |
+
extract( $args );
|
| 138 |
+
|
| 139 |
+
$val = get_option( $option_name, $default );
|
| 140 |
+
|
| 141 |
+
// preview image default style
|
| 142 |
+
$style = '';
|
| 143 |
+
if ( empty( $val['image'] ) )
|
| 144 |
+
$style = ' style="display:none"';
|
| 145 |
+
?>
|
| 146 |
+
|
| 147 |
+
<div class="wc-gallery-image-field">
|
| 148 |
+
<input name="<?php echo $option_name; ?>" id="<?php echo $option_name; ?>" class="regular-text ltr upload-input" type="text" value="<?php echo esc_attr($val); ?>" />
|
| 149 |
+
<br />
|
| 150 |
+
<a class="button wc-gallery-image-upload" data-target="#<?php echo $option_name; ?>" data-preview=".wc-gallery-preview-image" data-frame="select" data-state="wordpresscanvas_insert_single" data-fetch="url" data-title="Insert Image" data-button="Insert" data-class="media-frame wc-gallery-custom-uploader" title="Add Media"><span class="wp-media-buttons-icon"></span> Add Media</a>
|
| 151 |
+
<a class="button wc-gallery-restore-image" data-restore="<?php echo $default; ?>" data-target="#<?php echo $option_name; ?>" data-preview=".wc-gallery-preview-image">Default</a>
|
| 152 |
+
<a class="button wc-gallery-delete-image" data-target="#<?php echo $option_name; ?>" data-preview=".wc-gallery-preview-image">Delete</a>
|
| 153 |
+
<p class="wc-gallery-preview-image"<?php echo $style; ?>><img src="<?php echo esc_attr($val); ?>" /></p>
|
| 154 |
+
<?php if ( isset( $description ) && !empty( $description ) ) : ?>
|
| 155 |
+
<p class="description"><?php echo $description; ?></p>
|
| 156 |
+
<?php endif; ?>
|
| 157 |
+
</div>
|
| 158 |
+
<?php
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
function wc_gallery_options_display_checkbox_field( $args ) {
|
| 162 |
+
extract( $args );
|
| 163 |
+
|
| 164 |
+
$val = get_option( $option_name, $default );
|
| 165 |
+
?>
|
| 166 |
+
|
| 167 |
+
<?php if ( isset( $label ) ) : ?>
|
| 168 |
+
<label for="<?php echo esc_attr($option_name); ?>">
|
| 169 |
+
<?php endif; ?>
|
| 170 |
+
|
| 171 |
+
<input name="<?php echo $option_name; ?>" id="<?php echo $option_name; ?>" type="checkbox" value="1" <?php checked( true, $val ); ?> />
|
| 172 |
+
|
| 173 |
+
<?php if ( isset( $label ) ) : ?>
|
| 174 |
+
<?php echo $label; ?></label>
|
| 175 |
+
<?php endif; ?>
|
| 176 |
+
|
| 177 |
+
<?php if ( isset( $description ) && !empty( $description ) ) : ?>
|
| 178 |
+
<p class="description"><?php echo $description; ?></p>
|
| 179 |
+
<?php endif; ?>
|
| 180 |
+
<?php
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
/*
|
| 184 |
+
* Sanitize Options
|
| 185 |
+
*/
|
| 186 |
+
function wc_gallery_options_find_sanitize_callback( $type ) {
|
| 187 |
+
switch ( $type ) {
|
| 188 |
+
case 'color' :
|
| 189 |
+
return 'wc_gallery_options_sanitize_hex_color';
|
| 190 |
+
case 'image' :
|
| 191 |
+
return 'esc_url_raw';
|
| 192 |
+
case 'checkbox' :
|
| 193 |
+
return 'wc_gallery_options_sanitize_checkbox';
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
return '';
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
function wc_gallery_options_sanitize_checkbox( $val ) {
|
| 200 |
+
if ( $val )
|
| 201 |
+
return 1;
|
| 202 |
+
else
|
| 203 |
+
return 0;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
function wc_gallery_options_sanitize_hex_color( $color ) {
|
| 207 |
+
if ( '' === $color )
|
| 208 |
+
return '';
|
| 209 |
+
|
| 210 |
+
if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) )
|
| 211 |
+
return $color;
|
| 212 |
+
|
| 213 |
+
return null;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
/*
|
| 217 |
+
* Misc
|
| 218 |
+
*/
|
| 219 |
+
function wc_gallery_remember_last_options_tab() {
|
| 220 |
+
global $page;
|
| 221 |
+
|
| 222 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wc-gallery-options' ) {
|
| 223 |
+
if ( isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ) {
|
| 224 |
+
setcookie(WC_GALLERY_PREFIX . 'last_tab_visited', $_GET['tab'], time() + ( 2 * DAY_IN_SECONDS ) );
|
| 225 |
+
}
|
| 226 |
+
}
|
| 227 |
+
}
|
| 228 |
+
add_action( 'admin_init', 'wc_gallery_remember_last_options_tab' );
|
| 229 |
+
|
| 230 |
+
/*
|
| 231 |
+
* Activation
|
| 232 |
+
*/
|
| 233 |
+
function wc_gallery_options_activation_hook() {
|
| 234 |
+
global $wc_gallery_options;
|
| 235 |
+
|
| 236 |
+
foreach ( $wc_gallery_options as $o ) {
|
| 237 |
+
foreach ( $o['sections'] as $oo ) {
|
| 238 |
+
foreach ( $oo['options'] as $ooo ) {
|
| 239 |
+
$option_name = WC_GALLERY_PREFIX . $ooo['id'];
|
| 240 |
+
add_option( $option_name, $ooo['default'] );
|
| 241 |
+
}
|
| 242 |
+
}
|
| 243 |
+
}
|
| 244 |
+
}
|
includes/widgets.php
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/******************************************************************
|
| 3 |
+
Author: Chris Baldelomar
|
| 4 |
+
URL: http://webplantmedia.com
|
| 5 |
+
|
| 6 |
+
All widget code should go here.
|
| 7 |
+
******************************************************************/
|
readme.txt
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
=== WordPress Canvas Gallery ===
|
| 2 |
+
|
| 3 |
+
Contributors: cbaldelomar
|
| 4 |
+
Donate link: http://webplantmedia.com/pay-now/
|
| 5 |
+
Tags: masonry gallery, pinterest style gallery, pinterest gallery, gallery slider, slider gallery, carousel gallery, carousel, slider
|
| 6 |
+
Requires at least: 3.7
|
| 7 |
+
Tested up to: 3.7.1
|
| 8 |
+
Stable tag: trunk
|
| 9 |
+
License: GPLv2 or later
|
| 10 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
+
|
| 12 |
+
Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
|
| 13 |
+
|
| 14 |
+
== Description ==
|
| 15 |
+
|
| 16 |
+
See the galleries in action.
|
| 17 |
+
|
| 18 |
+
1. [WordPress Canvas Galleries](http://wordpresscanvas.com/features/gallery/)
|
| 19 |
+
2. [WordPress Canvas Slider & Carousel](http://wordpresscanvas.com/features/gallery/slider-carousel/)
|
| 20 |
+
3. [WordPress Canvas Gallery Columns](http://wordpresscanvas.com/features/gallery/gallery-columns/)
|
| 21 |
+
|
| 22 |
+
### Professional Support
|
| 23 |
+
|
| 24 |
+
If you need professional plugin support from me, the plugin author, you can contact me at [WordPress Canvas](http://wordpresscanvas.com/).
|
| 25 |
+
|
| 26 |
+
### Plugin Development
|
| 27 |
+
|
| 28 |
+
If you're a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it's [GitHub repository](https://github.com/webplantmedia/wc-gallery).
|
| 29 |
+
|
| 30 |
+
### Donations
|
| 31 |
+
|
| 32 |
+
Yes, I do accept donations. If you want to buy me a sandwich or something, you can do so from my [payment page](http://webplantmedia.com/pay-now/). I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are always a nice incentive.
|
| 33 |
+
|
| 34 |
+
== Installation ==
|
| 35 |
+
|
| 36 |
+
1. Uzip the `wc-gallery.zip` folder.
|
| 37 |
+
2. Upload the `wc-gallery` folder to your `/wp-content/plugins` directory.
|
| 38 |
+
3. In your WordPress dashboard, head over to the *Plugins* section.
|
| 39 |
+
4. Activate *WordPress Canvas Gallery*.
|
| 40 |
+
|
| 41 |
+
== Frequently Asked Questions ==
|
| 42 |
+
|
| 43 |
+
### How do I use the shortcodes?
|
| 44 |
+
|
| 45 |
+
Insert a gallery through your dashboard. You will see extra dropdown settings when configuring your gallery
|
| 46 |
+
|
| 47 |
+
== Changelog ==
|
| 48 |
+
|
| 49 |
+
### Version 1.2
|
| 50 |
+
|
| 51 |
+
* Removed fancybox and added another image popup library with a friendly license.
|
| 52 |
+
|
| 53 |
+
### Version 1.1
|
| 54 |
+
|
| 55 |
+
* Plugin released. Everything is new!
|
wc-gallery.php
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/*
|
| 3 |
+
Plugin Name: WordPress Canvas Gallery
|
| 4 |
+
Plugin URI: http://wordpresscanvas.com/features/gallery/
|
| 5 |
+
Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
|
| 6 |
+
Author: Chris Baldelomar
|
| 7 |
+
Author URI: http://webplantmedia.com/
|
| 8 |
+
Version: 1.2
|
| 9 |
+
License: GPLv2 or later
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
function wc_gallery_using_woocommerce() {
|
| 13 |
+
return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
define( 'WC_GALLERY_VERSION', '1.2' );
|
| 17 |
+
define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
|
| 18 |
+
define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
|
| 19 |
+
define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
| 20 |
+
define( 'WC_GALLERY_USING_WOOCOMMERCE', wc_gallery_using_woocommerce() );
|
| 21 |
+
|
| 22 |
+
global $wc_gallery_options;
|
| 23 |
+
|
| 24 |
+
require_once( dirname(__FILE__) . '/includes/functions.php' ); // Adds basic filters and actions
|
| 25 |
+
require_once( dirname(__FILE__) . '/includes/options.php' ); // define options array
|
| 26 |
+
require_once( dirname(__FILE__) . '/includes/settings.php' ); // Adds settings
|
| 27 |
+
require_once( dirname(__FILE__) . '/includes/scripts.php' ); // Adds plugin JS and CSS
|
| 28 |
+
require_once( dirname(__FILE__) . '/includes/widgets.php' ); // include any widgets
|
| 29 |
+
|
| 30 |
+
register_activation_hook( __FILE__, 'wc_gallery_options_activation_hook' );
|
