├── CHANGELOG.txt ├── GPL-LICENSE.txt ├── MIT-LICENSE.txt ├── README.txt ├── css └── feature-carousel.css ├── featurecarousel.jquery.json ├── images ├── arrow-left.png ├── arrow-right.png ├── sample1.jpg ├── sample2.jpg ├── sample3.jpg ├── sample4.jpg └── sample5.jpg ├── index.html └── js ├── jquery-1.7.min.js ├── jquery.featureCarousel.js └── jquery.featureCarousel.min.js /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | ================================= 2 | Version 1.3 - November 2011 3 | ================================= 4 | - Changed structure to support public functions 5 | - Added four public functions to control carousel 6 | - Bug fixes 7 | - Fixed image preloader to work in IE versions 8 | 9 | ================================= 10 | Version 1.2 - March 2011 11 | ================================= 12 | - Added (pretty hackish) support for IE9 13 | - Overhauled the 'blip' system. Summation & numeric counters now supported 14 | - Added the ability to pause/stop the autorotation on interaction 15 | - New options added to support new feature count system & pause effects 16 | 17 | ================================= 18 | Version 1.1 - February 2011 19 | ================================= 20 | - changed css & js to rely on ID tags instead of elements 21 | - added better support for left and right control buttons 22 | - changed out images to be JPEGs instead of PNGs 23 | - added more options, and changed existing options 24 | - allow ability to display caption below images istead of on top 25 | - three callback functions added 26 | 27 | ================================= 28 | Version 1.0 - Februrary 2009 29 | ================================= 30 | Original release -------------------------------------------------------------------------------- /GPL-LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . -------------------------------------------------------------------------------- /MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Brian Osborne 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | This plug-in was intended to be used to display feature stories on a home page of a website, but can be used for any reason and is highly customizable. It will always display three images at the same time, with all the rest hidden behind the center image. 2 | 3 | Modified to handle movingToCenter callback (start of moving a feature to center) 4 | 5 | Dual-licensed under the GPL or MIT licenses. 6 | 7 | CONTACT INFORMATION: 8 | 9 | BRIAN OSBORNE 10 | brian@bkosborne.com 11 | http://www.bkosborne.com/jquery-feature-carousel 12 | -------------------------------------------------------------------------------- /css/feature-carousel.css: -------------------------------------------------------------------------------- 1 | /******************** 2 | * FEATURE CAROUSEL * 3 | ********************/ 4 | .carousel-container { 5 | position:relative; 6 | width:960px; 7 | } 8 | #carousel { 9 | height:280px; 10 | width:960px; 11 | background-color:#CCC; 12 | position:relative; 13 | margin-bottom:0.5em; 14 | font-size:12px; 15 | font-family: Arial; 16 | } 17 | .carousel-image { 18 | border:0; 19 | display:block; 20 | } 21 | .carousel-feature { 22 | position:absolute; 23 | top:-1000px; 24 | left:-1000px; 25 | border:2px solid #5d5d5d; 26 | cursor:pointer; 27 | } 28 | .carousel-feature .carousel-caption { 29 | position:absolute; 30 | bottom:0; 31 | width:100%; 32 | background-color:#000; 33 | } 34 | .carousel-feature .carousel-caption p { 35 | margin:0; 36 | padding:5px; 37 | font-weight:bold; 38 | font-size:12px; 39 | color:white; 40 | } 41 | .tracker-summation-container { 42 | position:absolute; 43 | color:white; 44 | right:48px; 45 | top:230px; 46 | padding:3px; 47 | margin:3px; 48 | background-color:#000; 49 | } 50 | .tracker-individual-container { 51 | position:absolute; 52 | color:white; 53 | right:48px; 54 | top:210px; 55 | padding:0; 56 | margin:0; 57 | } 58 | .tracker-individual-container li { 59 | list-style:none; 60 | } 61 | .tracker-individual-container .tracker-individual-blip { 62 | margin:0 3px; 63 | padding:0 3px; 64 | color:white; 65 | text-align:center; 66 | background-color:#DDD; 67 | } 68 | .tracker-individual-container .tracker-individual-blip-selected { 69 | color:white; 70 | font-weight:bold; 71 | background-color:#000; 72 | } 73 | #carousel-left { 74 | position:absolute; 75 | bottom:33px; 76 | left:220px; 77 | cursor:pointer; 78 | } 79 | #carousel-right { 80 | position:absolute; 81 | bottom:33px; 82 | right:220px; 83 | cursor:pointer; 84 | } -------------------------------------------------------------------------------- /featurecarousel.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "featurecarousel", 3 | "version": "1.3.3", 4 | "title": "jQuery Feature Carousel", 5 | "author": { 6 | "name": "Brian Osborne", 7 | "url": "http://www.bkosborne.com" 8 | }, 9 | "licenses": [ 10 | { 11 | "type": "GPLv3", 12 | "url": "https://github.com/bkosborne/jQuery-Feature-Carousel/blob/1.3.3/GPL-LICENSE.txt" 13 | }, 14 | { 15 | "type": "MIT", 16 | "url": "https://github.com/bkosborne/jQuery-Feature-Carousel/blob/1.3.3/MTL-LICENSE.txt" 17 | } 18 | ], 19 | "description": "A carousel plugin typically used to rotate 'feature stories' on a website. Very customizable and elegant. Text/caption overlays are supported on each feature.", 20 | "keywords": ["carousel", "feature-carousel", "image-carousel", "rotator", "image-rotator", "3-d", "3d"], 21 | "homepage": "http://www.bkosborne.com/jQuery-Feature-Carousel", 22 | "demo": "http://www.bkosborne.com/jQuery-Feature-Carousel", 23 | "maintainers": [ 24 | { 25 | "name": "Brian Osborne", 26 | "url": "http://www.bkosborne.com" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /images/arrow-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bkosborne/jQuery-Feature-Carousel/349ce1a4180ad9f09da9281b2321a178522ebaf5/images/arrow-left.png -------------------------------------------------------------------------------- /images/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bkosborne/jQuery-Feature-Carousel/349ce1a4180ad9f09da9281b2321a178522ebaf5/images/arrow-right.png -------------------------------------------------------------------------------- /images/sample1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bkosborne/jQuery-Feature-Carousel/349ce1a4180ad9f09da9281b2321a178522ebaf5/images/sample1.jpg -------------------------------------------------------------------------------- /images/sample2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bkosborne/jQuery-Feature-Carousel/349ce1a4180ad9f09da9281b2321a178522ebaf5/images/sample2.jpg -------------------------------------------------------------------------------- /images/sample3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bkosborne/jQuery-Feature-Carousel/349ce1a4180ad9f09da9281b2321a178522ebaf5/images/sample3.jpg -------------------------------------------------------------------------------- /images/sample4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bkosborne/jQuery-Feature-Carousel/349ce1a4180ad9f09da9281b2321a178522ebaf5/images/sample4.jpg -------------------------------------------------------------------------------- /images/sample5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bkosborne/jQuery-Feature-Carousel/349ce1a4180ad9f09da9281b2321a178522ebaf5/images/sample5.jpg -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | Feature Carousel Demonstration Test 7 | 8 | 9 | 10 | 33 | 34 | 35 | 36 | PREV | PAUSE | START | NEXT 37 | 38 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /js/jquery-1.7.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.7 jquery.com | jquery.org/license */ 2 | (function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"":"")+""),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="
"+""+"
";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&& 3 | (b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after" 4 | ,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); -------------------------------------------------------------------------------- /js/jquery.featureCarousel.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Feature Carousel, Version 1.3 3 | * http://www.bkosolutions.com 4 | * 5 | * Copyright 2011 Brian Osborne 6 | * Licensed under GPL version 3 7 | * brian@bkosborne.com 8 | * 9 | * http://www.gnu.org/licenses/gpl.txt 10 | */ 11 | (function($) { 12 | 13 | $.fn.featureCarousel = function (options) { 14 | 15 | // Adds support for multiple carousels on one page 16 | if (this.length > 1) { 17 | this.each(function() { 18 | $(this).featureCarousel(options); 19 | }); 20 | return this; 21 | } 22 | 23 | // override the default options with user defined options 24 | options = $.extend({}, $.fn.featureCarousel.defaults, options || {}); 25 | 26 | /* These are universal values that are used throughout the plugin. Do not modify them 27 | * unless you know what you're doing. Most of them feed off the options 28 | * so most customization can be achieved by modifying the options values */ 29 | var pluginData = { 30 | currentCenterNum: options.startingFeature, 31 | containerWidth: 0, 32 | containerHeight: 0, 33 | largeFeatureWidth: 0, 34 | largeFeatureHeight: 0, 35 | smallFeatureWidth: 0, 36 | smallFeatureHeight: 0, 37 | totalFeatureCount: $(this).children("div").length, 38 | currentlyMoving: false, 39 | featuresContainer: $(this), 40 | featuresArray: [], 41 | containerIDTag: "#"+$(this).attr("id"), 42 | timeoutVar: null, 43 | rotationsRemaining: 0, 44 | itemsToAnimate: 0, 45 | borderWidth: 0 46 | }; 47 | 48 | /** 49 | * Function to preload the images in the carousel if desired. 50 | * This is not recommended if there are a lot of images in the carousel because 51 | * it may take a while. Functionality does not depend on preloading the images 52 | */ 53 | var preload = function(callback) { 54 | // user may not want to preload images 55 | if (options.preload == true) { 56 | var $imageElements = pluginData.featuresContainer.find("img"); 57 | var loadedImages = 0; 58 | var totalImages = $imageElements.length; 59 | 60 | $imageElements.each(function (index, element) { 61 | // Attempt to load the images 62 | var img = new Image(); 63 | $(img).bind('load error', function () { 64 | // Add to number of images loaded and see if they are all done yet 65 | loadedImages++; 66 | if (loadedImages == totalImages) { 67 | // All done, perform callback 68 | callback(); 69 | } 70 | }); 71 | 72 | img.src = element.src; 73 | }); 74 | } else { 75 | // if user doesn't want preloader, then just go right to callback 76 | callback(); 77 | } 78 | } 79 | 80 | // Gets the feature container based on the number 81 | var getContainer = function(featureNum) { 82 | return pluginData.featuresArray[featureNum-1]; 83 | } 84 | 85 | // get a feature given it's set position (the position that doesn't change) 86 | var getBySetPos = function(position) { 87 | $.each(pluginData.featuresArray, function () { 88 | if ($(this).data().setPosition == position) 89 | return $(this); 90 | }); 91 | } 92 | 93 | // get previous feature number 94 | var getPreviousNum = function(num) { 95 | if ((num - 1) == 0) { 96 | return pluginData.totalFeatureCount; 97 | } else { 98 | return num - 1; 99 | } 100 | } 101 | 102 | // get next feature number 103 | var getNextNum = function(num) { 104 | if ((num + 1) > pluginData.totalFeatureCount) { 105 | return 1; 106 | } else { 107 | return num + 1; 108 | } 109 | } 110 | 111 | /** 112 | * Because there are several options the user can set for the width and height 113 | * of the feature images, this function is used to determine which options were set 114 | * and to set the appropriate dimensions used for a small and large feature 115 | */ 116 | var setupFeatureDimensions = function() { 117 | // Set the height and width of the entire carousel container 118 | pluginData.containerWidth = pluginData.featuresContainer.width(); 119 | pluginData.containerHeight = pluginData.featuresContainer.height(); 120 | 121 | // Grab the first image for reference 122 | var $firstFeatureImage = $(pluginData.containerIDTag).find(".carousel-image:first"); 123 | 124 | // Large Feature Width 125 | if (options.largeFeatureWidth > 1) 126 | pluginData.largeFeatureWidth = options.largeFeatureWidth; 127 | else if (options.largeFeatureWidth > 0 && options.largeFeatureWidth < 1) 128 | pluginData.largeFeatureWidth = $firstFeatureImage.width() * options.largeFeatureWidth; 129 | else 130 | pluginData.largeFeatureWidth = $firstFeatureImage.outerWidth(); 131 | // Large Feature Height 132 | if (options.largeFeatureHeight > 1) 133 | pluginData.largeFeatureHeight = options.largeFeatureHeight; 134 | else if (options.largeFeatureHeight > 0 && options.largeFeatureHeight < 1) 135 | pluginData.largeFeatureHeight = $firstFeatureImage.height() * options.largeFeatureHeight; 136 | else 137 | pluginData.largeFeatureHeight = $firstFeatureImage.outerHeight(); 138 | // Small Feature Width 139 | if (options.smallFeatureWidth > 1) 140 | pluginData.smallFeatureWidth = options.smallFeatureWidth; 141 | else if (options.smallFeatureWidth > 0 && options.smallFeatureWidth < 1) 142 | pluginData.smallFeatureWidth = $firstFeatureImage.width() * options.smallFeatureWidth; 143 | else 144 | pluginData.smallFeatureWidth = $firstFeatureImage.outerWidth() / 2; 145 | // Small Feature Height 146 | if (options.smallFeatureHeight > 1) 147 | pluginData.smallFeatureHeight = options.smallFeatureHeight; 148 | else if (options.smallFeatureHeight > 0 && options.smallFeatureHeight < 1) 149 | pluginData.smallFeatureHeight = $firstFeatureImage.height() * options.smallFeatureHeight; 150 | else 151 | pluginData.smallFeatureHeight = $firstFeatureImage.outerHeight() / 2; 152 | } 153 | 154 | /** 155 | * Function to take care of setting up various aspects of the carousel, 156 | * most importantly the default positions for the features 157 | */ 158 | var setupCarousel = function() { 159 | // Set the total feature count to the amount the user wanted to cutoff 160 | if (options.displayCutoff > 0 && options.displayCutoff < pluginData.totalFeatureCount) { 161 | pluginData.totalFeatureCount = options.displayCutoff; 162 | } 163 | 164 | // fill in the features array 165 | pluginData.featuresContainer.find(".carousel-feature").each(function (index) { 166 | if (index < pluginData.totalFeatureCount) { 167 | pluginData.featuresArray[index] = $(this); 168 | } 169 | }); 170 | 171 | // Determine the total border width around the feature if there is one 172 | if (pluginData.featuresContainer.find(".carousel-feature").first().css("borderLeftWidth") != "medium") { 173 | pluginData.borderWidth = parseInt(pluginData.featuresContainer.find(".carousel-feature").first().css("borderLeftWidth"))*2; 174 | } 175 | 176 | // Place all the features in a center hidden position to start off 177 | pluginData.featuresContainer 178 | // Have to make the container relative positioning 179 | .find(".carousel-feature").each(function () { 180 | // Center all the features in the middle and hide them 181 | $(this).css({ 182 | 'left': (pluginData.containerWidth / 2) - (pluginData.smallFeatureWidth / 2) - (pluginData.borderWidth / 2), 183 | 'width': pluginData.smallFeatureWidth, 184 | 'height': pluginData.smallFeatureHeight, 185 | 'top': options.smallFeatureOffset + options.topPadding, 186 | 'opacity': 0 187 | }); 188 | }) 189 | // Set all the images to small feature size 190 | .find(".carousel-image").css({ 191 | 'width': pluginData.smallFeatureWidth 192 | }); 193 | 194 | // set position to relative of captions if displaying below image 195 | if (options.captionBelow) { 196 | pluginData.featuresContainer.find('.carousel-caption').css('position','relative'); 197 | } 198 | 199 | // figure out number of items that will rotate each time 200 | if (pluginData.totalFeatureCount < 4) { 201 | pluginData.itemsToAnimate = pluginData.totalFeatureCount; 202 | } else { 203 | pluginData.itemsToAnimate = 4; 204 | } 205 | 206 | // Hide story info and set the proper positioning 207 | pluginData.featuresContainer.find(".carousel-caption") 208 | .hide(); 209 | } 210 | 211 | /** 212 | * Here all the position data is set for the features. 213 | * This is an important part of the carousel to keep track of where 214 | * each feature within the carousel is 215 | */ 216 | var setupFeaturePositions = function() { 217 | // give all features a set number that won't change so they remember their 218 | // original order 219 | $.each(pluginData.featuresArray, function (i) { 220 | $(this).data('setPosition',i+1); 221 | }); 222 | 223 | // Go back one - This is done because we call the move function right away, which 224 | // shifts everything to the right. So we set the current center back one, so that 225 | // it displays in the center when that happens 226 | var oneBeforeStarting = getPreviousNum(options.startingFeature); 227 | pluginData.currentCenterNum = oneBeforeStarting; 228 | 229 | // Center feature will be position 1 230 | var $centerFeature = getContainer(oneBeforeStarting); 231 | $centerFeature.data('position',1); 232 | 233 | // Everything before that center feature... 234 | var $prevFeatures = $centerFeature.prevAll(); 235 | $prevFeatures.each(function (i) { 236 | $(this).data('position',(pluginData.totalFeatureCount - i)); 237 | }); 238 | 239 | // And everything after that center feature... 240 | var $nextFeatures = $centerFeature.nextAll(); 241 | $nextFeatures.each(function (i) { 242 | if ($(this).data('setPosition') != undefined) { 243 | $(this).data('position',(i + 2)); 244 | } 245 | }); 246 | 247 | // if the counter style is for including number tags in description... 248 | if (options.counterStyle == 'caption') { 249 | $.each(pluginData.featuresArray, function () { 250 | var pos = getPreviousNum($(this).data('position')); 251 | var $numberTag = $(""); 252 | $numberTag.addClass("numberTag"); 253 | $numberTag.html("("+ pos + " of " + pluginData.totalFeatureCount + ") "); 254 | $(this).find('.carousel-caption p').prepend($numberTag); 255 | }); 256 | } 257 | } 258 | 259 | /** 260 | * This function will set up the two different types of trackers used 261 | */ 262 | var setupTrackers = function() 263 | { 264 | if (options.trackerIndividual) { 265 | // construct the tracker list 266 | var $list = $("
    "); 267 | $list.addClass("tracker-individual-container"); 268 | for (var i = 0; i < pluginData.totalFeatureCount; i++) { 269 | // item position one plus the index 270 | var counter = i+1; 271 | 272 | // Build the DOM for the tracker list 273 | var $trackerBlip = $("
    "+counter+"
    "); 274 | $trackerBlip.addClass("tracker-individual-blip"); 275 | $trackerBlip.css("cursor","pointer"); 276 | $trackerBlip.attr("id","tracker-"+(i+1)); 277 | var $listEntry = $("
  • "); 278 | $listEntry.append($trackerBlip); 279 | $listEntry.css("float","left"); 280 | $listEntry.css("list-style-type","none"); 281 | $list.append($listEntry); 282 | } 283 | // add the blip list and then make sure it's visible 284 | $(pluginData.containerIDTag).append($list); 285 | $list.hide().show(); 286 | } 287 | 288 | if (options.trackerSummation) { 289 | // Build the tracker div that will hold the tracking data 290 | var $tracker = $('
    '); 291 | $tracker.addClass('tracker-summation-container'); 292 | // Collect info in spans 293 | var $current = $('').addClass('tracker-summation-current').text(options.startingFeature); 294 | var $total = $('').addClass('tracker-summation-total').text(pluginData.totalFeatureCount); 295 | var $middle = $('').addClass('tracker-summation-middle').text(' of '); 296 | // Add it all together 297 | $tracker.append($current).append($middle).append($total); 298 | // Insert into DOM 299 | $(pluginData.containerIDTag).append($tracker); 300 | } 301 | } 302 | 303 | // Update the tracker information with the new centered feature 304 | var updateTracker = function(oldCenter, newCenter) { 305 | if (options.trackerIndividual) { 306 | // get selectors for the two trackers 307 | var $trackerContainer = pluginData.featuresContainer.find(".tracker-individual-container"); 308 | var $oldCenter = $trackerContainer.find("#tracker-"+oldCenter); 309 | var $newCenter = $trackerContainer.find("#tracker-"+newCenter); 310 | 311 | // change classes 312 | $oldCenter.removeClass("tracker-individual-blip-selected"); 313 | $newCenter.addClass("tracker-individual-blip-selected"); 314 | } 315 | 316 | if (options.trackerSummation) { 317 | var $trackerContainer = pluginData.featuresContainer.find('.tracker-summation-container'); 318 | $trackerContainer.find('.tracker-summation-current').text(newCenter); 319 | } 320 | } 321 | 322 | /** 323 | * This function will set the autoplay for the carousel to 324 | * automatically rotate it given the time in the options 325 | * pass in TRUE to just clear the timer 326 | */ 327 | var setTimer = function(stop) { 328 | // clear the timeout var if it exists 329 | clearTimeout(pluginData.timeoutVar); 330 | 331 | // set interval for moving if autoplay is set 332 | if (!stop && options.autoPlay != 0) { 333 | var autoTime = (Math.abs(options.autoPlay) < options.carouselSpeed) ? options.carouselSpeed : Math.abs(options.autoPlay); 334 | pluginData.timeoutVar = setTimeout(function () { 335 | (options.autoPlay > 0) ? initiateMove(true,1) : initiateMove(false,1); 336 | }, autoTime); 337 | } 338 | } 339 | 340 | 341 | // This is a helper function for the animateFeature function that 342 | // will update the positions of all the features based on the direction 343 | var rotatePositions = function(direction) { 344 | $.each(pluginData.featuresArray, function () { 345 | var newPos; 346 | if (direction == false) { 347 | newPos = getNextNum($(this).data().position); 348 | } else { 349 | newPos = getPreviousNum($(this).data().position); 350 | } 351 | $(this).data('position',newPos); 352 | }); 353 | } 354 | 355 | /** 356 | * This function is used to animate the given feature to the given 357 | * location. Valid locations are "left", "right", "center", "hidden" 358 | */ 359 | var animateFeature = function($feature, direction) 360 | { 361 | var new_width, new_height, new_top, new_left, new_zindex, new_padding, new_fade; 362 | 363 | // Determine the old and new positions of the feature 364 | var oldPosition = $feature.data('position'); 365 | var newPosition; 366 | if (direction == true) 367 | newPosition = getPreviousNum(oldPosition); 368 | else 369 | newPosition = getNextNum(oldPosition); 370 | 371 | // callback for moving out of center pos 372 | if (oldPosition == 1) { 373 | options.leavingCenter($feature); 374 | } 375 | 376 | // Caculate new new css values depending on where the feature will be located 377 | if (newPosition == 1) { 378 | new_width = pluginData.largeFeatureWidth; 379 | new_height = pluginData.largeFeatureHeight; 380 | new_top = options.topPadding; 381 | new_zindex = $feature.css("z-index"); 382 | new_left = (pluginData.containerWidth / 2) - (pluginData.largeFeatureWidth / 2) - (pluginData.borderWidth / 2); 383 | new_fade = 1.0; 384 | } else { 385 | new_width = pluginData.smallFeatureWidth; 386 | new_height = pluginData.smallFeatureHeight; 387 | new_top = options.smallFeatureOffset + options.topPadding; 388 | new_zindex = 1; 389 | new_fade = 0.4; 390 | // some info is different for the left, right, and hidden positions 391 | // left 392 | if (newPosition == pluginData.totalFeatureCount) { 393 | new_left = options.sidePadding; 394 | // right 395 | } else if (newPosition == 2) { 396 | new_left = pluginData.containerWidth - pluginData.smallFeatureWidth - options.sidePadding - pluginData.borderWidth; 397 | // hidden 398 | } else { 399 | new_left = (pluginData.containerWidth / 2) - (pluginData.smallFeatureWidth / 2) - (pluginData.borderWidth / 2); 400 | new_fade = 0; 401 | } 402 | } 403 | // This code block takes care of hiding the feature information if the feature is leaving the center 404 | if (oldPosition == 1) { 405 | // Slide up the story information 406 | $feature.find(".carousel-caption") 407 | .hide(); 408 | } 409 | 410 | // Animate the feature div to its new location 411 | $feature 412 | .animate( 413 | { 414 | width: new_width, 415 | height: new_height, 416 | top: new_top, 417 | left: new_left, 418 | opacity: new_fade 419 | }, 420 | options.carouselSpeed, 421 | options.animationEasing, 422 | function () { 423 | // Take feature info out of hiding if new position is center 424 | if (newPosition == 1) { 425 | // need to set the height to auto to accomodate caption if displayed below image 426 | if (options.captionBelow) 427 | $feature.css('height','auto'); 428 | // fade in the feature information 429 | $feature.find(".carousel-caption") 430 | .fadeTo("fast",0.85); 431 | // callback for moved to center 432 | options.movedToCenter($feature); 433 | } 434 | // decrement the animation queue 435 | pluginData.rotationsRemaining = pluginData.rotationsRemaining - 1; 436 | // have to change the z-index after the animation is done 437 | $feature.css("z-index", new_zindex); 438 | // change trackers if using them 439 | if (options.trackerIndividual || options.trackerSummation) { 440 | // just update the tracker once; once the new center feature has arrived in center 441 | if (newPosition == 1) { 442 | // figure out what item was just in the center, and what item is now in the center 443 | var newCenterItemNum = pluginData.featuresContainer.find(".carousel-feature").index($feature) + 1; 444 | var oldCenterItemNum; 445 | if (direction == false) 446 | oldCenterItemNum = getNextNum(newCenterItemNum); 447 | else 448 | oldCenterItemNum = getPreviousNum(newCenterItemNum); 449 | // now update the trackers 450 | updateTracker(oldCenterItemNum, newCenterItemNum); 451 | } 452 | } 453 | 454 | // did all the the animations finish yet? 455 | var divide = pluginData.rotationsRemaining / pluginData.itemsToAnimate; 456 | if (divide % 1 == 0) { 457 | // if so, set moving to false... 458 | pluginData.currentlyMoving = false; 459 | // change positions for all items... 460 | rotatePositions(direction); 461 | 462 | // and move carousel again if queue is not empty 463 | if (pluginData.rotationsRemaining > 0) 464 | move(direction); 465 | } 466 | 467 | // reset timer and auto rotate again 468 | setTimer(false); 469 | } 470 | ) 471 | // select the image within the feature 472 | .find('.carousel-image') 473 | // animate its size down 474 | .animate({ 475 | width: new_width, 476 | height: new_height 477 | }, 478 | options.carouselSpeed, 479 | options.animationEasing) 480 | .end(); 481 | } 482 | 483 | /** 484 | * move the carousel to the left or to the right. The features that 485 | * will move into the four positions are calculated and then animated 486 | * rotate to the RIGHT when direction is TRUE and 487 | * rotate to the LEFT when direction is FALSE 488 | */ 489 | var move = function(direction) 490 | { 491 | // Set the carousel to currently moving 492 | pluginData.currentlyMoving = true; 493 | 494 | // Obtain the new feature positions based on the direction that the carousel is moving 495 | var $newCenter, $newLeft, $newRight, $newHidden; 496 | if (direction == true) { 497 | // Shift features to the left 498 | $newCenter = getContainer(getNextNum(pluginData.currentCenterNum)); 499 | $newLeft = getContainer(pluginData.currentCenterNum); 500 | $newRight = getContainer(getNextNum(getNextNum(pluginData.currentCenterNum))); 501 | $newHidden = getContainer(getPreviousNum(pluginData.currentCenterNum)); 502 | pluginData.currentCenterNum = getNextNum(pluginData.currentCenterNum); 503 | } else { 504 | $newCenter = getContainer(getPreviousNum(pluginData.currentCenterNum)); 505 | $newLeft = getContainer(getPreviousNum(getPreviousNum(pluginData.currentCenterNum))); 506 | $newRight = getContainer(pluginData.currentCenterNum); 507 | $newHidden = getContainer(getNextNum(pluginData.currentCenterNum)); 508 | pluginData.currentCenterNum = getPreviousNum(pluginData.currentCenterNum); 509 | } 510 | 511 | // The z-index must be set before animations take place for certain movements 512 | // this makes the animations look nicer 513 | if (direction) { 514 | $newLeft.css("z-index", 3); 515 | } else { 516 | $newRight.css("z-index", 3); 517 | } 518 | $newCenter.css("z-index", 4); 519 | 520 | // Fire moving to center event 521 | options.movingToCenter($newCenter); 522 | 523 | // Animate the features into their new positions 524 | animateFeature($newLeft, direction); 525 | animateFeature($newCenter, direction); 526 | animateFeature($newRight, direction); 527 | // Only want to animate the "hidden" feature if there are more than three 528 | if (pluginData.totalFeatureCount > 3) { 529 | animateFeature($newHidden, direction); 530 | } 531 | } 532 | 533 | // This is used to relegate carousel movement throughout the plugin 534 | // It will only initiate a move if the carousel isn't currently moving 535 | // It will set the animation queue to the number of rotations given 536 | var initiateMove = function(direction, rotations) { 537 | if (pluginData.currentlyMoving == false) { 538 | var queue = rotations * pluginData.itemsToAnimate; 539 | pluginData.rotationsRemaining = queue; 540 | move(direction); 541 | } 542 | } 543 | 544 | /** 545 | * This will find the shortest distance to travel the carousel from 546 | * one position to another position. It will return the shortest distance 547 | * in number form, and will be positive to go to the right and negative for left 548 | */ 549 | var findShortestDistance = function(from, to) { 550 | var goingToLeft = 1, goingToRight = 1, tracker; 551 | tracker = from; 552 | // see how long it takes to go to the left 553 | while ((tracker = getPreviousNum(tracker)) != to) { 554 | goingToLeft++; 555 | } 556 | 557 | tracker = from; 558 | // see how long it takes to to to the right 559 | while ((tracker = getNextNum(tracker)) != to) { 560 | goingToRight++; 561 | } 562 | 563 | // whichever is shorter 564 | return (goingToLeft < goingToRight) ? goingToLeft*-1 : goingToRight; 565 | } 566 | 567 | // Move to the left if left button clicked 568 | $(options.leftButtonTag).on('click',function () { 569 | initiateMove(false,1); 570 | }); 571 | 572 | // Move to right if right button clicked 573 | $(options.rightButtonTag).on('click',function () { 574 | initiateMove(true,1); 575 | }); 576 | 577 | // These are the click and hover events for the features 578 | pluginData.featuresContainer.find(".carousel-feature") 579 | .click(function () { 580 | var position = $(this).data('position'); 581 | if (position == 2) { 582 | initiateMove(true,1); 583 | } else if (position == pluginData.totalFeatureCount) { 584 | initiateMove(false,1); 585 | } 586 | }) 587 | .mouseover(function () { 588 | if (pluginData.currentlyMoving == false) { 589 | var position = $(this).data('position'); 590 | if (position == 2 || position == pluginData.totalFeatureCount) { 591 | $(this).css("opacity",0.8); 592 | } 593 | } 594 | // pause the rotation? 595 | if (options.pauseOnHover) setTimer(true); 596 | // stop the rotation? 597 | if (options.stopOnHover) options.autoPlay = 0; 598 | }) 599 | .mouseout(function () { 600 | if (pluginData.currentlyMoving == false) { 601 | var position = $(this).data('position'); 602 | if (position == 2 || position == pluginData.totalFeatureCount) { 603 | $(this).css("opacity",0.4); 604 | } 605 | } 606 | // resume the rotation 607 | if (options.pauseOnHover) { 608 | setTimer(false); 609 | } 610 | }); 611 | 612 | // Add event listener to all clicks within the features container 613 | // This is done to disable any links that aren't within the center feature 614 | $("a", pluginData.containerIDTag).on("click", function (event) { 615 | // travel up to the container 616 | var $parents = $(this).parentsUntil(pluginData.containerIDTag); 617 | // now check each of the feature divs within it 618 | $parents.each(function () { 619 | var position = $(this).data('position'); 620 | // if there are more than just feature divs within the container, they will 621 | // not have a position and it may come back as undefined. Throw these out 622 | if (position != undefined) { 623 | // if any of the links on a feature OTHER THAN the center feature were clicked, 624 | // initiate a carousel move but then throw the link action away 625 | if (position != 1) { 626 | if (position == pluginData.totalFeatureCount) { 627 | initiateMove(false,1); 628 | } else if (position == 2) { 629 | initiateMove(true,1); 630 | } 631 | event.preventDefault(); 632 | return false; 633 | // if the position WAS the center (i.e. 1), fire callback 634 | } else { 635 | options.clickedCenter($(this)); 636 | } 637 | } 638 | }); 639 | }); 640 | 641 | // Did someone click one of the individual trackers? 642 | $(".tracker-individual-blip", pluginData.containerIDTag).on("click",function () { 643 | // grab the position # that was clicked 644 | var goTo = $(this).attr("id").substring(8); 645 | // find out where that feature # actually is in the carousel right now 646 | var whereIsIt = pluginData.featuresContainer.find(".carousel-feature").eq(goTo-1).data('position'); 647 | // which feature # is currently in the center 648 | var currentlyAt = pluginData.currentCenterNum; 649 | // if the tracker was clicked for the current center feature, do nothing 650 | if (goTo != currentlyAt) { 651 | // find the shortest distance to move the carousel 652 | var shortest = findShortestDistance(1, whereIsIt); 653 | // initiate a move in that direction with given number of rotations 654 | if (shortest < 0) { 655 | initiateMove(false,(shortest*-1)); 656 | } else { 657 | initiateMove(true,shortest); 658 | } 659 | } 660 | 661 | }); 662 | 663 | /**************** 664 | PUBLIC FUNCTIONS 665 | ****************/ 666 | this.initialize = function () { 667 | // Call the preloader and pass in our callback, which is just a slew of function calls 668 | // that should only be executed after the images have been loaded 669 | preload(function () { 670 | setupFeatureDimensions(); 671 | setupCarousel(); 672 | setupFeaturePositions(); 673 | setupTrackers(); 674 | initiateMove(true,1); 675 | }); 676 | 677 | return this; 678 | }; 679 | 680 | this.next = function() { 681 | initiateMove(true, 1); 682 | } 683 | this.prev = function () { 684 | initiateMove(false, 1); 685 | } 686 | this.pause = function () { 687 | setTimer(true); 688 | } 689 | this.start = function () { 690 | setTimer(false); 691 | } 692 | 693 | // Initialize the plugin 694 | return this.initialize(); 695 | }; 696 | 697 | $.fn.featureCarousel.defaults = { 698 | // If zero, take original width and height of image 699 | // If between 0 and 1, multiply by original width and height (acts as a percentage) 700 | // If greater than one, use as a forced width/height for all of the images 701 | largeFeatureWidth : 0, 702 | largeFeatureHeight: 0, 703 | smallFeatureWidth: .5, 704 | smallFeatureHeight: .5, 705 | // how much to pad the top of the carousel 706 | topPadding: 20, 707 | // spacing between the sides of the container 708 | sidePadding: 50, 709 | // the additional offset to pad the side features from the top of the carousel 710 | smallFeatureOffset: 50, 711 | // indicates which feature to start the carousel at 712 | startingFeature: 1, 713 | // speed in milliseconds it takes to rotate the carousel 714 | carouselSpeed: 1000, 715 | // time in milliseconds to set interval to autorotate the carousel 716 | // set to zero to disable it, negative to go left 717 | autoPlay: 4000, 718 | // with autoplay enabled, set this option to true to have the carousel pause rotating 719 | // when a user hovers over any feature 720 | pauseOnHover: true, 721 | // with autoplay enabled, set this option to completely stop the autorotate functionality 722 | // when a user hovers over any feature 723 | stopOnHover: false, 724 | // numbered blips can appear and be used to track the currently centered feature, as well as 725 | // allow the user to click a number to move to that feature. Set to false to not process these at all 726 | // and true to process and display them 727 | trackerIndividual: true, 728 | // a summation of the features can also be used to display an "x Of y" style of tracking 729 | // this can be combined with the above option as well 730 | trackerSummation: true, 731 | // true to preload all images in the carousel before displaying anything. If this is set to false, 732 | // you will probably need to set a fixed width/height to prevent strangeness 733 | preload: true, 734 | // Will only display this many features in the carousel 735 | // set to zero to disable 736 | displayCutoff: 0, 737 | // an easing can be specified for the animation of the carousel 738 | animationEasing: 'swing', 739 | // selector for the left arrow of the carousel 740 | leftButtonTag: '#carousel-left', 741 | // selector for the right arrow of the carousel 742 | rightButtonTag: '#carousel-right', 743 | // display captions below the image instead of on top 744 | captionBelow: false, 745 | // callback function for when a feature has animated to the center 746 | movedToCenter: $.noop, 747 | // callback function for when feature left center 748 | leavingCenter: $.noop, 749 | // callback function for when center feature was clicked 750 | clickedCenter: $.noop, 751 | // callback function for when a feature has start moving to center 752 | movingToCenter: $.noop 753 | }; 754 | 755 | })(jQuery); 756 | -------------------------------------------------------------------------------- /js/jquery.featureCarousel.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Feature Carousel, Version 1.3 3 | * http://www.bkosolutions.com 4 | * 5 | * Copyright 2011 Brian Osborne 6 | * Licensed under GPL version 3 7 | * brian@bkosborne.com 8 | * 9 | * http://www.gnu.org/licenses/gpl.txt 10 | */ 11 | (function(a){a.fn.featureCarousel=function(f){if(this.length>1){this.each(function(){a(this).featureCarousel(f)});return this}f=a.extend({},a.fn.featureCarousel.defaults,f||{});var q={currentCenterNum:f.startingFeature,containerWidth:0,containerHeight:0,largeFeatureWidth:0,largeFeatureHeight:0,smallFeatureWidth:0,smallFeatureHeight:0,totalFeatureCount:a(this).children("div").length,currentlyMoving:false,featuresContainer:a(this),featuresArray:[],containerIDTag:"#"+a(this).attr("id"),timeoutVar:null,rotationsRemaining:0,itemsToAnimate:0,borderWidth:0};var j=function(w){if(f.preload==true){var u=q.featuresContainer.find("img");var t=0;var v=u.length;u.each(function(y,z){var x=new Image();a(x).bind("load error",function(){t++;if(t==v){w()}});x.src=z.src})}else{w()}};var m=function(t){return q.featuresArray[t-1]};var n=function(t){a.each(q.featuresArray,function(){if(a(this).data().setPosition==t){return a(this)}})};var c=function(t){if((t-1)==0){return q.totalFeatureCount}else{return t-1}};var i=function(t){if((t+1)>q.totalFeatureCount){return 1}else{return t+1}};var e=function(){q.containerWidth=q.featuresContainer.width();q.containerHeight=q.featuresContainer.height();var t=a(q.containerIDTag).find(".carousel-image:first");if(f.largeFeatureWidth>1){q.largeFeatureWidth=f.largeFeatureWidth}else{if(f.largeFeatureWidth>0&&f.largeFeatureWidth<1){q.largeFeatureWidth=t.width()*f.largeFeatureWidth}else{q.largeFeatureWidth=t.outerWidth()}}if(f.largeFeatureHeight>1){q.largeFeatureHeight=f.largeFeatureHeight}else{if(f.largeFeatureHeight>0&&f.largeFeatureHeight<1){q.largeFeatureHeight=t.height()*f.largeFeatureHeight}else{q.largeFeatureHeight=t.outerHeight()}}if(f.smallFeatureWidth>1){q.smallFeatureWidth=f.smallFeatureWidth}else{if(f.smallFeatureWidth>0&&f.smallFeatureWidth<1){q.smallFeatureWidth=t.width()*f.smallFeatureWidth}else{q.smallFeatureWidth=t.outerWidth()/2}}if(f.smallFeatureHeight>1){q.smallFeatureHeight=f.smallFeatureHeight}else{if(f.smallFeatureHeight>0&&f.smallFeatureHeight<1){q.smallFeatureHeight=t.height()*f.smallFeatureHeight}else{q.smallFeatureHeight=t.outerHeight()/2}}};var b=function(){if(f.displayCutoff>0&&f.displayCutoff");x.addClass("numberTag");x.html("("+y+" of "+q.totalFeatureCount+") ");a(this).find(".carousel-caption p").prepend(x)})}};var h=function(){if(f.trackerIndividual){var z=a("
      ");z.addClass("tracker-individual-container");for(var y=0;y"+t+"
      ");x.addClass("tracker-individual-blip");x.css("cursor","pointer");x.attr("id","tracker-"+(y+1));var w=a("
    • ");w.append(x);w.css("float","left");w.css("list-style-type","none");z.append(w)}a(q.containerIDTag).append(z);z.hide().show()}if(f.trackerSummation){var v=a("
      ");v.addClass("tracker-summation-container");var u=a("").addClass("tracker-summation-current").text(f.startingFeature);var B=a("").addClass("tracker-summation-total").text(q.totalFeatureCount);var A=a("").addClass("tracker-summation-middle").text(" of ");v.append(u).append(A).append(B);a(q.containerIDTag).append(v)}};var s=function(x,t){if(f.trackerIndividual){var u=q.featuresContainer.find(".tracker-individual-container");var v=u.find("#tracker-"+x);var w=u.find("#tracker-"+t);v.removeClass("tracker-individual-blip-selected");w.addClass("tracker-individual-blip-selected")}if(f.trackerSummation){var u=q.featuresContainer.find(".tracker-summation-container");u.find(".tracker-summation-current").text(t)}};var p=function(u){clearTimeout(q.timeoutVar);if(!u&&f.autoPlay!=0){var t=(Math.abs(f.autoPlay)0)?k(true,1):k(false,1)},t)}};var d=function(t){a.each(q.featuresArray,function(){var u;if(t==false){u=i(a(this).data().position)}else{u=c(a(this).data().position)}a(this).data("position",u)})};var o=function(y,C){var w,t,v,z,u,D,A;var B=y.data("position");var x;if(C==true){x=c(B)}else{x=i(B)}if(B==1){f.leavingCenter(y)}if(x==1){w=q.largeFeatureWidth;t=q.largeFeatureHeight;v=f.topPadding;u=y.css("z-index");z=(q.containerWidth/2)-(q.largeFeatureWidth/2)-(q.borderWidth/2);A=1}else{w=q.smallFeatureWidth;t=q.smallFeatureHeight;v=f.smallFeatureOffset+f.topPadding;u=1;A=0.4;if(x==q.totalFeatureCount){z=f.sidePadding}else{if(x==2){z=q.containerWidth-q.smallFeatureWidth-f.sidePadding-q.borderWidth}else{z=(q.containerWidth/2)-(q.smallFeatureWidth/2)-(q.borderWidth/2);A=0}}}if(B==1){y.find(".carousel-caption").hide()}y.animate({width:w,height:t,top:v,left:z,opacity:A},f.carouselSpeed,f.animationEasing,function(){if(x==1){if(f.captionBelow){y.css("height","auto")}y.find(".carousel-caption").fadeTo("fast",0.85);f.movedToCenter(y)}q.rotationsRemaining=q.rotationsRemaining-1;y.css("z-index",u);if(f.trackerIndividual||f.trackerSummation){if(x==1){var E=q.featuresContainer.find(".carousel-feature").index(y)+1;var F;if(C==false){F=i(E)}else{F=c(E)}s(F,E)}}var G=q.rotationsRemaining/q.itemsToAnimate;if(G%1==0){q.currentlyMoving=false;d(C);if(q.rotationsRemaining>0){l(C)}}p(false)}).find(".carousel-image").animate({width:w,height:t},f.carouselSpeed,f.animationEasing).end()};var l=function(w){q.currentlyMoving=true;var x,v,t,u;if(w==true){x=m(i(q.currentCenterNum));v=m(q.currentCenterNum);t=m(i(i(q.currentCenterNum)));u=m(c(q.currentCenterNum));q.currentCenterNum=i(q.currentCenterNum)}else{x=m(c(q.currentCenterNum));v=m(c(c(q.currentCenterNum)));t=m(q.currentCenterNum);u=m(i(q.currentCenterNum));q.currentCenterNum=c(q.currentCenterNum)}if(w){v.css("z-index",3)}else{t.css("z-index",3)}x.css("z-index",4);o(v,w);o(x,w);o(t,w);if(q.totalFeatureCount>3){o(u,w)}};var k=function(v,u){if(q.currentlyMoving==false){var t=u*q.itemsToAnimate;q.rotationsRemaining=t;l(v)}};var g=function(x,w){var u=1,t=1,v;v=x;while((v=c(v))!=w){u++}v=x;while((v=i(v))!=w){t++}return(u