Version Description
Download this release
Release Info
Developer | bestwebsoft |
Plugin | Gallery by BestWebSoft |
Version | 2011.1.01 |
Comparing to | |
See all releases |
Version 2011.1.01
- css/stylesheet.css +40 -0
- gallery-plugin.php +528 -0
- images/icon_16.png +0 -0
- images/icon_16_c.png +0 -0
- images/icon_36.png +0 -0
- images/px.png +0 -0
- languages/gallery-de_DE.mo +0 -0
- languages/gallery-de_DE.po +87 -0
- languages/gallery-es_ES.mo +0 -0
- languages/gallery-es_ES.po +87 -0
- languages/gallery-fr_FR.mo +0 -0
- languages/gallery-fr_FR.po +87 -0
- languages/gallery-it_IT.mo +0 -0
- languages/gallery-it_IT.po +87 -0
- languages/gallery-nl_NL.mo +0 -0
- languages/gallery-nl_NL.po +96 -0
- languages/gallery-ru_RU.mo +0 -0
- languages/gallery-ru_RU.po +88 -0
- pretty_photo/css/prettyPhoto.css +88 -0
- pretty_photo/css/style.css +93 -0
- pretty_photo/images/layouts/bg.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/arrow_next.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/arrow_previous.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/bl.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/br.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/btnClose.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/btnContract.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/btnExpand.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/btnNext.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/btnPrevious.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/contentPattern.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/loader.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/spacer.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/tl.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/tr.png +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/ttl.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/ttp.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_rounded/ttr.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_square/arrow_next.png +0 -0
- pretty_photo/images/prettyPhoto/dark_square/arrow_previous.png +0 -0
- pretty_photo/images/prettyPhoto/dark_square/btnClose.png +0 -0
- pretty_photo/images/prettyPhoto/dark_square/btnContract.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_square/btnExpand.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_square/btnNext.png +0 -0
- pretty_photo/images/prettyPhoto/dark_square/btnPrevious.png +0 -0
- pretty_photo/images/prettyPhoto/dark_square/contentPattern.png +0 -0
- pretty_photo/images/prettyPhoto/dark_square/loader.gif +0 -0
- pretty_photo/images/prettyPhoto/dark_square/spacer.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/arrow_next.png +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/arrow_previous.png +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/bl.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/br.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/btnClose.png +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/btnContract.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/btnExpand.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/btnNext.png +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/btnPrevious.png +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/loader.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/spacer.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/tl.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/tr.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/ttl.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/ttp.gif +0 -0
- pretty_photo/images/prettyPhoto/light_rounded/ttr.gif +0 -0
- pretty_photo/jquery-1.6.2.min.js +18 -0
- pretty_photo/js/DD_belatedPNG_0.0.7a-min.js +14 -0
- pretty_photo/js/jquery-1.3.1.min.js +19 -0
- pretty_photo/js/jquery.prettyPhoto.js +8 -0
- readme.txt +60 -0
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-3.jpg +0 -0
- themplate/gallery-single-template.php +59 -0
- themplate/gallery-template.php +92 -0
- upload/fileuploader.css +76 -0
- upload/fileuploader.js +1247 -0
- upload/jquery.js +154 -0
- upload/loading.gif +0 -0
- upload/php.php +162 -0
css/stylesheet.css
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
ul.gallery {
|
2 |
+
list-style: none outside none;
|
3 |
+
}
|
4 |
+
|
5 |
+
.gallery li{
|
6 |
+
float: left;
|
7 |
+
padding-right: 10px;
|
8 |
+
}
|
9 |
+
|
10 |
+
#content .gallery_box ul
|
11 |
+
{
|
12 |
+
list-style: none outside none;
|
13 |
+
margin:0;
|
14 |
+
}
|
15 |
+
|
16 |
+
#content .gallery_box li{
|
17 |
+
padding: 10px 10px 0 0;
|
18 |
+
clear: both;
|
19 |
+
}
|
20 |
+
|
21 |
+
#content .gallery_box li img {
|
22 |
+
padding: 0 10px 10px 0;
|
23 |
+
float:left;
|
24 |
+
}
|
25 |
+
|
26 |
+
#content .gallery_box p {
|
27 |
+
margin-bottom:0px;
|
28 |
+
}
|
29 |
+
|
30 |
+
#content .gallery_box .gallery_detail_box p.title {
|
31 |
+
color: #000000;
|
32 |
+
line-height: 1.5em;
|
33 |
+
margin: 0 0 10px;
|
34 |
+
font-weight: bold;
|
35 |
+
}
|
36 |
+
|
37 |
+
.clear {
|
38 |
+
clear:both;
|
39 |
+
height:0;
|
40 |
+
}
|
gallery-plugin.php
ADDED
@@ -0,0 +1,528 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Gallery Plugin
|
4 |
+
Plugin URI: http://bestwebsoft.com/plugin/
|
5 |
+
Description: This plugin allows you to implement gallery page into web site.
|
6 |
+
Author: BestWebSoft
|
7 |
+
Version: 1.01
|
8 |
+
Author URI: http://bestwebsoft.com/
|
9 |
+
License: GPLv2 or later
|
10 |
+
*/
|
11 |
+
|
12 |
+
/* © Copyright 2011 BestWebSoft ( admin@bestwebsoft.com )
|
13 |
+
|
14 |
+
This program is free software; you can redistribute it and/or modify
|
15 |
+
it under the terms of the GNU General Public License, version 2, as
|
16 |
+
published by the Free Software Foundation.
|
17 |
+
|
18 |
+
This program is distributed in the hope that it will be useful,
|
19 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
GNU General Public License for more details.
|
22 |
+
|
23 |
+
You should have received a copy of the GNU General Public License
|
24 |
+
along with this program; if not, write to the Free Software
|
25 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
+
*/
|
27 |
+
$gllr_boxes = array (
|
28 |
+
'Upload-File' => array (
|
29 |
+
array( '_gllr_uploadedFile', '', '', '', '' ),
|
30 |
+
)
|
31 |
+
);
|
32 |
+
|
33 |
+
if( ! function_exists( 'gllr_plugin_install' ) ) {
|
34 |
+
function gllr_plugin_install() {
|
35 |
+
if ( ! copy(WP_PLUGIN_DIR .'/gallery-plugin/themplate/gallery-template.php', TEMPLATEPATH .'/gallery-template.php'))
|
36 |
+
{
|
37 |
+
add_action( 'admin_notices', create_function( '', 'Error copy template file' ) );
|
38 |
+
}
|
39 |
+
if ( ! copy(WP_PLUGIN_DIR .'/gallery-plugin/themplate/gallery-single-template.php', TEMPLATEPATH .'/gallery-single-template.php'))
|
40 |
+
{
|
41 |
+
add_action( 'admin_notices', create_function( '', 'Error copy template file' ) );
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
if( ! function_exists( 'gllr_plugin_uninstall' ) ) {
|
47 |
+
function gllr_plugin_uninstall() {
|
48 |
+
if ( ! unlink(TEMPLATEPATH .'/gallery-template.php'))
|
49 |
+
{
|
50 |
+
add_action( 'admin_notices', create_function( '', 'Error delete template file' ) );
|
51 |
+
}
|
52 |
+
if ( ! unlink(TEMPLATEPATH .'/gallery-single-template.php'))
|
53 |
+
{
|
54 |
+
add_action( 'admin_notices', create_function( '', 'Error delete template file' ) );
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
if( ! function_exists( 'gllr_plugin_header' ) ) {
|
60 |
+
function gllr_plugin_header() {
|
61 |
+
global $post_type;
|
62 |
+
?>
|
63 |
+
<style>
|
64 |
+
#adminmenu #menu-posts-gallery div.wp-menu-image
|
65 |
+
{
|
66 |
+
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/gallery-plugin/images/icon_16.png") no-repeat scroll center center transparent;
|
67 |
+
}
|
68 |
+
#adminmenu #menu-posts-gallery:hover div.wp-menu-image, #adminmenu #menu-posts-gallery.wp-has-current-submenu div.wp-menu-image
|
69 |
+
{
|
70 |
+
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/gallery-plugin/images/icon_16_c.png") no-repeat scroll center center transparent;
|
71 |
+
}
|
72 |
+
.wrap #icon-edit.icon32-posts-gallery
|
73 |
+
{
|
74 |
+
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/gallery-plugin/images/icon_36.png") no-repeat scroll left top transparent;
|
75 |
+
}
|
76 |
+
</style>
|
77 |
+
<?php
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
// Create post type for Gallery
|
82 |
+
if( ! function_exists( 'post_type_images' ) ) {
|
83 |
+
function post_type_images() {
|
84 |
+
register_post_type('gallery', array(
|
85 |
+
'labels' => array(
|
86 |
+
'name' => __( 'Galleries', 'gallery'),
|
87 |
+
'singular_name' => __( 'Gallery', 'gallery'),
|
88 |
+
'add_new' => __( 'Add New', 'gallery'),
|
89 |
+
'add_new_item' => __( 'Add New Gallery', 'gallery'),
|
90 |
+
'edit_item' => __( 'Edit Gallery', 'gallery'),
|
91 |
+
'new_item' => __( 'New Gallery', 'gallery'),
|
92 |
+
'view_item' => __( 'View Gallery', 'gallery'),
|
93 |
+
'search_items' => __( 'Search Galleries', 'gallery'),
|
94 |
+
'not_found' => __( 'No Galleries found', 'gallery'),
|
95 |
+
'parent_item_colon' => '',
|
96 |
+
'menu_name' => __( 'Galleries', 'gallery')
|
97 |
+
),
|
98 |
+
'public' => true,
|
99 |
+
'publicly_queryable' => true,
|
100 |
+
'query_var' => true,
|
101 |
+
'rewrite' => true,
|
102 |
+
'capability_type' => 'post',
|
103 |
+
'has_archive' => false,
|
104 |
+
'hierarchical' => true,
|
105 |
+
'supports' => array('title', 'editor'),
|
106 |
+
'register_meta_box_cb' => 'init_metaboxes_gallery'
|
107 |
+
));
|
108 |
+
|
109 |
+
wp_enqueue_style( 'gllrStylesheet', WP_PLUGIN_URL .'/gallery-plugin/css/stylesheet.css' );
|
110 |
+
wp_enqueue_style( 'gllrPrettyPhotoStylesheet', WP_PLUGIN_URL .'/gallery-plugin/pretty_photo/css/prettyPhoto.css' );
|
111 |
+
wp_enqueue_script( 'gllrPrettyPhotoJq', WP_PLUGIN_URL .'/gallery-plugin/pretty_photo/jquery-1.6.2.min.js', array( 'jquery' ) );
|
112 |
+
wp_enqueue_script( 'gllrPrettyPhotoJs', WP_PLUGIN_URL .'/gallery-plugin/pretty_photo/js/jquery.prettyPhoto.js', array( 'jquery' ) );
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
if( ! function_exists( 'addImageAncestorToMenu' ) ) {
|
117 |
+
function addImageAncestorToMenu( $classes ) {
|
118 |
+
if ( is_singular( 'gallery' ) ) {
|
119 |
+
global $wpdb, $post;
|
120 |
+
|
121 |
+
if ( empty( $post->ancestors ) ) {
|
122 |
+
return $classes;
|
123 |
+
}
|
124 |
+
|
125 |
+
$menuQuery = "SELECT DISTINCT post_id FROM $wpdb->postmeta WHERE meta_key = '_menu_item_object_id' AND meta_value IN (" . implode(',', $post->ancestors) . ")";
|
126 |
+
$menuItems = $wpdb->get_col( $menuQuery );
|
127 |
+
|
128 |
+
if ( is_array( $menuItems ) ) {
|
129 |
+
foreach ( $menuItems as $menuItem ) {
|
130 |
+
if ( in_array( 'menu-item-' . $menuItem, $classes ) ) {
|
131 |
+
$classes[] = 'current-page-ancestor';
|
132 |
+
}
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
return $classes;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
function init_metaboxes_gallery() {
|
142 |
+
add_meta_box( 'Upload-File', __( 'Upload File', 'gallery' ), 'gllr_post_custom_box', 'gallery', 'normal', 'high' );
|
143 |
+
wp_enqueue_script( 'jquery_min', WP_PLUGIN_URL .'/gallery-plugin/upload/jquery.js', array( 'jquery' ) );
|
144 |
+
wp_enqueue_script( 'jquery_upload', WP_PLUGIN_URL .'/gallery-plugin/upload/fileuploader.js', array( 'jquery' ) );
|
145 |
+
wp_enqueue_style( 'jquery_css', WP_PLUGIN_URL .'/gallery-plugin/upload/fileuploader.css' );
|
146 |
+
}
|
147 |
+
|
148 |
+
// Create custom meta box for portfolio post type
|
149 |
+
if ( ! function_exists( 'gllr_post_custom_box' ) ) {
|
150 |
+
function gllr_post_custom_box( $obj = '', $box = '' ) {
|
151 |
+
global $post;
|
152 |
+
|
153 |
+
$post_types = get_post_types( array( '_builtin' => false ) );
|
154 |
+
?>
|
155 |
+
<div style="padding-top:10px;"><label for="uploadscreen"><?php echo __( 'Choose a screenshot to upload:', 'gallery' ); ?></label>
|
156 |
+
<input name="MAX_FILE_SIZE" value="1048576" type="hidden" />
|
157 |
+
<div id="file-uploader-demo1" style="padding-top:10px;">
|
158 |
+
<noscript>
|
159 |
+
<p><?php echo __( 'Please enable JavaScript to use the file uploader.', 'gallery' ); ?></p>
|
160 |
+
</noscript>
|
161 |
+
</div>
|
162 |
+
<ul id="files" ></ul>
|
163 |
+
<div id="hidden"></div>
|
164 |
+
<div style="clear:both;"></div></div>
|
165 |
+
<script type="text/javascript">
|
166 |
+
jQuery(document).ready(function()
|
167 |
+
{
|
168 |
+
var uploader = new qq.FileUploader({
|
169 |
+
element: document.getElementById('file-uploader-demo1'),
|
170 |
+
action: '<?php echo WP_PLUGIN_URL; ?>/gallery-plugin/upload/php.php',
|
171 |
+
debug: false,
|
172 |
+
onComplete: function(id, fileName, result) {
|
173 |
+
if(result.error) {
|
174 |
+
//
|
175 |
+
}
|
176 |
+
else {
|
177 |
+
jQuery('<li></li>').appendTo('#files').html('<img src="<?php echo WP_PLUGIN_URL; ?>/gallery-plugin/upload/files/'+fileName+'" alt="" /><div style="width:200px">'+fileName+'<br />' +result.width+'x'+result.height+'</div>').addClass('success');
|
178 |
+
jQuery('<input type="hidden" name="undefined[]" id="undefined" value="'+fileName+'" />').appendTo('#hidden');
|
179 |
+
}
|
180 |
+
}
|
181 |
+
});
|
182 |
+
jQuery('#images_albumdiv').remove();
|
183 |
+
|
184 |
+
});
|
185 |
+
|
186 |
+
function img_delete(id) {
|
187 |
+
jQuery('#'+id).hide();
|
188 |
+
jQuery('#delete_images').append('<input type="hidden" name="delete_images[]" value="'+id+'" />');
|
189 |
+
}
|
190 |
+
</script>
|
191 |
+
<?php
|
192 |
+
|
193 |
+
$posts = get_posts(array(
|
194 |
+
"showposts" => -1,
|
195 |
+
"what_to_show" => "posts",
|
196 |
+
"post_status" => "inherit",
|
197 |
+
"post_type" => "attachment",
|
198 |
+
"orderby" => "menu_order ASC, ID ASC",
|
199 |
+
"post_mime_type"=> "image/jpeg,image/gif,image/jpg,image/png",
|
200 |
+
"post_parent" => $post->ID));
|
201 |
+
echo '<ul class="gallery clearfix">';
|
202 |
+
foreach ( $posts as $page ):
|
203 |
+
echo '<li id="'.$page->ID.'">';
|
204 |
+
$image_attributes = wp_get_attachment_image_src( $page->ID, 'thumbnail' );
|
205 |
+
echo '<img src="'.$image_attributes[0].'" alt="'.$page->post_title.'" title="'.$page->post_title.'"/>';
|
206 |
+
echo '<div class="delete"><a href="javascript:void(0);" onclick="img_delete('.$page->ID.');">Delete</a><div/>';
|
207 |
+
echo '</li>';
|
208 |
+
endforeach;
|
209 |
+
echo '</ul><div style="clear:both;"></div>';
|
210 |
+
echo '<div id="delete_images"></div>';
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
// Use nonce for verification ...
|
215 |
+
if( ! function_exists ( 'echo_gllr_nonce' ) ) {
|
216 |
+
function echo_gllr_nonce () {
|
217 |
+
echo sprintf(
|
218 |
+
'<input type="hidden" name="%1$s" id="%1$s" value="%2$s" />',
|
219 |
+
'gllr_nonce_name',
|
220 |
+
wp_create_nonce( plugin_basename(__FILE__) )
|
221 |
+
);
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
if ( ! function_exists ( 'gllr_save_postdata' ) ) {
|
226 |
+
function gllr_save_postdata( $post_id, $post ) {
|
227 |
+
global $post;
|
228 |
+
global $wpdb;
|
229 |
+
if( isset( $_REQUEST['undefined'] ) && ! empty( $_REQUEST['undefined'] ) ) {
|
230 |
+
$array_file_name = $_REQUEST['undefined'];
|
231 |
+
$uploadFile = array();
|
232 |
+
$newthumb = array();
|
233 |
+
|
234 |
+
$uploadDir = wp_upload_dir( );
|
235 |
+
|
236 |
+
while( list( $key, $val ) = each( $array_file_name ) ) {
|
237 |
+
$imagename = $val;
|
238 |
+
$uploadFile[] = $uploadDir["path"] ."/" . $imagename;
|
239 |
+
}
|
240 |
+
reset( $array_file_name );
|
241 |
+
require_once( ABSPATH . 'wp-admin/includes/image.php' );
|
242 |
+
$i = 0;
|
243 |
+
while( list( $key, $val ) = each( $array_file_name ) ) {
|
244 |
+
$file_name = $val;
|
245 |
+
if ( copy ( ABSPATH ."wp-content/plugins/gallery-plugin/upload/files/".$file_name, $uploadFile[$i] ) ) {
|
246 |
+
unlink( ABSPATH ."wp-content/plugins/gallery-plugin/upload/files/".$file_name );
|
247 |
+
$overrides = array('test_form' => false );
|
248 |
+
|
249 |
+
$file = str_replace( "\\", "/",$uploadDir["path"] ) ."/" .$file_name;
|
250 |
+
$filename = basename( $file );
|
251 |
+
|
252 |
+
$wp_filetype = wp_check_filetype( $filename, null );
|
253 |
+
$attachment = array(
|
254 |
+
'post_mime_type' => $wp_filetype['type'],
|
255 |
+
'post_title' => $filename,
|
256 |
+
'post_content' => '',
|
257 |
+
'post_status' => 'inherit'
|
258 |
+
);
|
259 |
+
$attach_id = wp_insert_attachment( $attachment, $file );
|
260 |
+
$attach_data = wp_generate_attachment_metadata( $attach_id, $file );
|
261 |
+
wp_update_attachment_metadata( $attach_id, $attach_data );
|
262 |
+
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_parent = %d WHERE ID = %d", $post->ID, $attach_id ) );
|
263 |
+
}
|
264 |
+
$i++;
|
265 |
+
}
|
266 |
+
}
|
267 |
+
if( isset( $_REQUEST['delete_images'] ) ) {
|
268 |
+
foreach( $_REQUEST['delete_images'] as $delete_id ) {
|
269 |
+
wp_delete_attachment( $delete_id );
|
270 |
+
}
|
271 |
+
}
|
272 |
+
}
|
273 |
+
}
|
274 |
+
|
275 |
+
if ( ! function_exists ( 'gllr_admin_head' ) ) {
|
276 |
+
function gllr_admin_head() {
|
277 |
+
echo '<link rel="stylesheet" type="text/css" href="'.plugins_url( 'css/stylesheet.css', __FILE__ ).'">';
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
if ( ! function_exists ( 'gllr_plugin_init' ) ) {
|
282 |
+
function gllr_plugin_init() {
|
283 |
+
// Internationalization, first(!)
|
284 |
+
load_plugin_textdomain( 'gallery', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
285 |
+
|
286 |
+
// Other init stuff, be sure to it after load_plugins_textdomain if it involves translated text(!)
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
if( ! function_exists( 'gllr_custom_permalinks' ) ) {
|
291 |
+
function gllr_custom_permalinks() {
|
292 |
+
global $wp_rewrite;
|
293 |
+
global $wpdb;
|
294 |
+
$parent = $wpdb->get_var("SELECT $wpdb->posts.post_name FROM $wpdb->posts, $wpdb->postmeta WHERE meta_key = '_wp_page_template' AND meta_value = 'gallery-template.php' AND (post_status = 'publish' OR post_status = 'private') AND $wpdb->posts.ID = $wpdb->postmeta.post_id");
|
295 |
+
if( ! empty( $parent ) ) {
|
296 |
+
$wp_rewrite->add_rule( '(.+)/'.$parent.'/([^/]+)/?$', 'index.php?post_type=gallery&title=$matches[2]&posts_per_page=-1', 'top' );
|
297 |
+
$wp_rewrite->add_rule( ''.$parent.'/([^/]+)/?$', 'index.php?post_type=gallery&title=$matches[1]&posts_per_page=-1', 'top' );
|
298 |
+
$wp_rewrite->add_rule( '(.+)/'.$parent.'/page/([^/]+)/?$', 'index.php?pagename='.$parent.'&paged=$matches[2]', 'top' );
|
299 |
+
$wp_rewrite->add_rule( ''.$parent.'/page/([^/]+)/?$', 'index.php?pagename='.$parent.'&paged=$matches[1]', 'top' );
|
300 |
+
}
|
301 |
+
|
302 |
+
$wp_rewrite->flush_rules();
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
if ( ! function_exists( 'gllr_template_redirect' ) ) {
|
307 |
+
function gllr_template_redirect()
|
308 |
+
{
|
309 |
+
global $wp_query, $post, $posts;
|
310 |
+
if( 'gallery' == get_post_type() && "" == $wp_query->query_vars["s"] ) {
|
311 |
+
$category = get_term_by( 'slug', $wp_query->query_vars["taxonomy"], 'images_album');
|
312 |
+
if( 'private' == get_post_meta( $category->term_id, '_gllr_public_status', true ) && ! is_user_logged_in()) {
|
313 |
+
@header( "Location: ".get_bloginfo( 'url' ) );
|
314 |
+
exit();
|
315 |
+
}
|
316 |
+
include( TEMPLATEPATH . '/gallery-single-template.php' );
|
317 |
+
exit();
|
318 |
+
}
|
319 |
+
}
|
320 |
+
}
|
321 |
+
|
322 |
+
|
323 |
+
// Change the columns for the edit CPT screen
|
324 |
+
if ( ! function_exists( 'gllr_change_columns' ) ) {
|
325 |
+
function gllr_change_columns( $cols ) {
|
326 |
+
$cols = array(
|
327 |
+
'cb' => '<input type="checkbox" />',
|
328 |
+
'title' => __('Title', 'gallery'),
|
329 |
+
'autor' => __('Author', 'gallery'),
|
330 |
+
'gallery' => __('Foto\'s', 'gallery'),
|
331 |
+
'status' => __('Public', 'gallery'),
|
332 |
+
'dates' => __('Date', 'gallery')
|
333 |
+
);
|
334 |
+
return $cols;
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
if ( ! function_exists( 'gllr_custom_columns' ) ) {
|
339 |
+
function gllr_custom_columns( $column, $post_id ) {
|
340 |
+
global $wpdb;
|
341 |
+
$post = get_post( $post_id );
|
342 |
+
$row = $wpdb->get_results( "SELECT *
|
343 |
+
FROM $wpdb->posts
|
344 |
+
WHERE $wpdb->posts.post_parent = $post_id
|
345 |
+
AND $wpdb->posts.post_type = 'attachment'
|
346 |
+
AND (
|
347 |
+
$wpdb->posts.post_status = 'inherit'
|
348 |
+
)
|
349 |
+
ORDER BY $wpdb->posts.post_title ASC" );
|
350 |
+
switch ( $column ) {
|
351 |
+
//case "category":
|
352 |
+
case "autor":
|
353 |
+
$author_id=$post->post_author;
|
354 |
+
echo '<a href="edit.php?post_type=post&author='.$author_id.'">'.get_the_author_meta( 'user_nicename' , $author_id ).'</a>';
|
355 |
+
break;
|
356 |
+
case "gallery":
|
357 |
+
echo count($row);
|
358 |
+
break;
|
359 |
+
case "status":
|
360 |
+
if( $post->post_status == 'publish' )
|
361 |
+
echo '<a href="javascript:void(0)">Yes</a>';
|
362 |
+
else
|
363 |
+
echo '<a href="javascript:void(0)">No</a>';
|
364 |
+
break;
|
365 |
+
case "dates":
|
366 |
+
echo strtolower( __( date( "F", strtotime( $post->post_date ) ), 'kerksite' ) )." ".date( "j Y", strtotime( $post->post_date ) );
|
367 |
+
break;
|
368 |
+
}
|
369 |
+
$wp_query = $old_query;
|
370 |
+
}
|
371 |
+
}
|
372 |
+
|
373 |
+
if ( ! function_exists( 'get_ID_by_slug' ) ) {
|
374 |
+
function get_ID_by_slug($page_slug) {
|
375 |
+
$page = get_page_by_path($page_slug);
|
376 |
+
if ($page) {
|
377 |
+
return $page->ID;
|
378 |
+
} else {
|
379 |
+
return null;
|
380 |
+
}
|
381 |
+
}
|
382 |
+
}
|
383 |
+
|
384 |
+
if ( ! function_exists( 'getPostsAvailableToRegisteredUsers' ) ) {
|
385 |
+
function getPostsAvailableToRegisteredUsers()
|
386 |
+
{
|
387 |
+
$theme_location = 'menu_2';
|
388 |
+
$theme_locations = get_nav_menu_locations();
|
389 |
+
if( ! isset( $theme_locations[$theme_location] ) ) return false;
|
390 |
+
|
391 |
+
$menu_obj = get_term( $theme_locations[$theme_location], 'nav_menu' );
|
392 |
+
if( ! $menu_obj )
|
393 |
+
$menu_obj = false;
|
394 |
+
|
395 |
+
global $wpdb;
|
396 |
+
|
397 |
+
// Menu posts
|
398 |
+
$menuPosts = $wpdb->get_col("
|
399 |
+
SELECT
|
400 |
+
pm.meta_value
|
401 |
+
FROM
|
402 |
+
$wpdb->terms t INNER JOIN $wpdb->term_taxonomy tt ON t.term_id = tt.term_id
|
403 |
+
INNER JOIN $wpdb->term_relationships tr ON tt.term_taxonomy_id = tr.term_taxonomy_id
|
404 |
+
INNER JOIN $wpdb->postmeta pm ON tr.object_id = pm.post_id
|
405 |
+
WHERE
|
406 |
+
t.slug = '".$menu_obj->slug."' AND
|
407 |
+
pm.meta_key = '_menu_item_object_id'
|
408 |
+
");
|
409 |
+
|
410 |
+
if (empty($menuPosts))
|
411 |
+
{
|
412 |
+
$menuPosts = array();
|
413 |
+
}
|
414 |
+
|
415 |
+
// All private posts
|
416 |
+
$privatePosts = array();
|
417 |
+
while (count($menuPosts))
|
418 |
+
{
|
419 |
+
$postId = array_shift($menuPosts);
|
420 |
+
array_push($privatePosts, (int) $postId);
|
421 |
+
|
422 |
+
$childPosts = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type IN ('document', 'page', 'image')", $postId));
|
423 |
+
if (is_array($childPosts) && count($childPosts))
|
424 |
+
{
|
425 |
+
$menuPosts = array_merge($menuPosts, $childPosts);
|
426 |
+
}
|
427 |
+
}
|
428 |
+
|
429 |
+
return array_unique($privatePosts);
|
430 |
+
}
|
431 |
+
}
|
432 |
+
|
433 |
+
if ( function_exists( 'add_image_size' ) ) {
|
434 |
+
add_image_size( 'album-thumb', 120, 80, true ); //300 pixels wide (and unlimited height)
|
435 |
+
add_image_size( 'foto-thumb', 160, 120, true ); //300 pixels wide (and unlimited height)
|
436 |
+
}
|
437 |
+
|
438 |
+
if( ! function_exists( 'gllr_plugin_header' ) ) {
|
439 |
+
function gllr_plugin_header() {
|
440 |
+
global $post_type;
|
441 |
+
?>
|
442 |
+
<style>
|
443 |
+
#adminmenu #menu-posts-gallery div.wp-menu-image
|
444 |
+
{
|
445 |
+
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/gallery-plugin/images/icon_16.png") no-repeat scroll center center transparent;
|
446 |
+
}
|
447 |
+
#adminmenu #menu-posts-gallery:hover div.wp-menu-image, #adminmenu #menu-posts-gallery.wp-has-current-submenu div.wp-menu-image
|
448 |
+
{
|
449 |
+
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/gallery-plugin/images/icon_16_c.png") no-repeat scroll center center transparent;
|
450 |
+
}
|
451 |
+
<?php if ( $post_type == 'gallery' ) { ?>
|
452 |
+
.wrap #icon-edit
|
453 |
+
{
|
454 |
+
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/gallery-plugin/images/icon_36.png") no-repeat scroll left top transparent;
|
455 |
+
}
|
456 |
+
<?php } ?>
|
457 |
+
</style>
|
458 |
+
<?php
|
459 |
+
}
|
460 |
+
}
|
461 |
+
|
462 |
+
if( ! function_exists( 'the_excerpt_max_charlength' ) ) {
|
463 |
+
function the_excerpt_max_charlength($charlength) {
|
464 |
+
$excerpt = get_the_excerpt();
|
465 |
+
$charlength++;
|
466 |
+
if( strlen( $excerpt ) > $charlength ) {
|
467 |
+
$subex = substr( $excerpt, 0, $charlength-5 );
|
468 |
+
$exwords = explode( " ", $subex );
|
469 |
+
$excut = - ( strlen ( $exwords [ count( $exwords ) - 1 ] ) );
|
470 |
+
if( $excut < 0 ) {
|
471 |
+
echo substr( $subex, 0, $excut );
|
472 |
+
}
|
473 |
+
else {
|
474 |
+
echo $subex;
|
475 |
+
}
|
476 |
+
echo "...";
|
477 |
+
}
|
478 |
+
else {
|
479 |
+
echo $excerpt;
|
480 |
+
}
|
481 |
+
}
|
482 |
+
}
|
483 |
+
|
484 |
+
if( ! function_exists( 'gllr_page_css_class' ) ) {
|
485 |
+
function gllr_page_css_class( $classes, $item ) {
|
486 |
+
$post_type = get_query_var( 'post_type' );
|
487 |
+
global $wpdb;
|
488 |
+
$parent_id = 0;
|
489 |
+
if( $post_type == "gallery" ) {
|
490 |
+
$parent_id = $wpdb->get_var("SELECT $wpdb->posts.ID FROM $wpdb->posts, $wpdb->postmeta WHERE meta_key = '_wp_page_template' AND meta_value = 'gallery-template.php' AND post_status = 'publish' AND $wpdb->posts.ID = $wpdb->postmeta.post_id");
|
491 |
+
while ($parent_id) {
|
492 |
+
$page = get_page($parent_id);
|
493 |
+
if($page->post_parent > 0 )
|
494 |
+
$parent_id = $page->post_parent;
|
495 |
+
else
|
496 |
+
break;
|
497 |
+
}
|
498 |
+
wp_reset_query();
|
499 |
+
}
|
500 |
+
if ($item->ID == $parent_id) {
|
501 |
+
array_push($classes, 'current_page_item');
|
502 |
+
}
|
503 |
+
return $classes;
|
504 |
+
}
|
505 |
+
}
|
506 |
+
|
507 |
+
register_activation_hook( __FILE__, 'gllr_plugin_install'); // activate plugin
|
508 |
+
register_deactivation_hook( __FILE__, 'gllr_plugin_uninstall'); // deactivate plugin
|
509 |
+
|
510 |
+
add_action( 'admin_head', 'gllr_plugin_header' );
|
511 |
+
|
512 |
+
add_action( 'init', 'gllr_plugin_init' );
|
513 |
+
|
514 |
+
add_action( 'init', 'post_type_images' ); // register post type
|
515 |
+
add_action( 'init', 'gllr_custom_permalinks' ); // add custom permalink for gallery
|
516 |
+
|
517 |
+
add_action( 'template_redirect', 'gllr_template_redirect' ); // add themplate for single gallery page
|
518 |
+
|
519 |
+
add_action( 'admin_head', 'gllr_admin_head' );
|
520 |
+
add_action( 'save_post', 'gllr_save_postdata', 1, 2 ); // save custom data from admin
|
521 |
+
|
522 |
+
add_filter( 'nav_menu_css_class', 'addImageAncestorToMenu' );
|
523 |
+
add_filter( 'page_css_class', 'gllr_page_css_class', 10, 2 );
|
524 |
+
|
525 |
+
add_filter( 'manage_gallery_posts_columns', 'gllr_change_columns' );
|
526 |
+
add_action( 'manage_gallery_posts_custom_column', 'gllr_custom_columns', 10, 2 );
|
527 |
+
|
528 |
+
?>
|
images/icon_16.png
ADDED
Binary file
|
images/icon_16_c.png
ADDED
Binary file
|
images/icon_36.png
ADDED
Binary file
|
images/px.png
ADDED
Binary file
|
languages/gallery-de_DE.mo
ADDED
Binary file
|
languages/gallery-de_DE.po
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: gallery\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-09-23 11:10+0200\n"
|
6 |
+
"PO-Revision-Date: 2011-09-23 11:10+0200\n"
|
7 |
+
"Last-Translator: BWS <zos@bestwebsoft.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x;esc_html__\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-Language: Dutch\n"
|
15 |
+
"X-Poedit-Country: GERMANY\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: gallery.php:64
|
20 |
+
#: gallery.php:74
|
21 |
+
msgid "Galleries"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: gallery.php:65
|
25 |
+
msgid "Gallery"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: gallery.php:66
|
29 |
+
msgid "Add New"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: gallery.php:67
|
33 |
+
msgid "Add New Gallery"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: gallery.php:68
|
37 |
+
msgid "Edit Gallery"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: gallery.php:69
|
41 |
+
msgid "New Gallery"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: gallery.php:70
|
45 |
+
msgid "View Gallery"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: gallery.php:71
|
49 |
+
msgid "Search Galleries"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: gallery.php:72
|
53 |
+
msgid "No Galleries found"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: gallery.php:120
|
57 |
+
msgid "Upload File"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: gallery.php:133
|
61 |
+
msgid "Choose a screenshot to upload:"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: gallery.php:137
|
65 |
+
msgid "Please enable JavaScript to use the file uploader."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: gallery.php:304
|
69 |
+
msgid "Title"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: gallery.php:305
|
73 |
+
msgid "Author"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: gallery.php:306
|
77 |
+
msgid "Foto's"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: gallery.php:307
|
81 |
+
msgid "Public"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: gallery.php:308
|
85 |
+
msgid "Date"
|
86 |
+
msgstr ""
|
87 |
+
|
languages/gallery-es_ES.mo
ADDED
Binary file
|
languages/gallery-es_ES.po
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: gallery\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-09-23 11:10+0200\n"
|
6 |
+
"PO-Revision-Date: 2011-09-23 11:10+0200\n"
|
7 |
+
"Last-Translator: BWS <zos@bestwebsoft.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x;esc_html__\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-Language: Spanish\n"
|
15 |
+
"X-Poedit-Country: SPAIN\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: gallery.php:64
|
20 |
+
#: gallery.php:74
|
21 |
+
msgid "Galleries"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: gallery.php:65
|
25 |
+
msgid "Gallery"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: gallery.php:66
|
29 |
+
msgid "Add New"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: gallery.php:67
|
33 |
+
msgid "Add New Gallery"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: gallery.php:68
|
37 |
+
msgid "Edit Gallery"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: gallery.php:69
|
41 |
+
msgid "New Gallery"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: gallery.php:70
|
45 |
+
msgid "View Gallery"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: gallery.php:71
|
49 |
+
msgid "Search Galleries"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: gallery.php:72
|
53 |
+
msgid "No Galleries found"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: gallery.php:120
|
57 |
+
msgid "Upload File"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: gallery.php:133
|
61 |
+
msgid "Choose a screenshot to upload:"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: gallery.php:137
|
65 |
+
msgid "Please enable JavaScript to use the file uploader."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: gallery.php:304
|
69 |
+
msgid "Title"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: gallery.php:305
|
73 |
+
msgid "Author"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: gallery.php:306
|
77 |
+
msgid "Foto's"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: gallery.php:307
|
81 |
+
msgid "Public"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: gallery.php:308
|
85 |
+
msgid "Date"
|
86 |
+
msgstr ""
|
87 |
+
|
languages/gallery-fr_FR.mo
ADDED
Binary file
|
languages/gallery-fr_FR.po
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: gallery\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-09-23 11:10+0200\n"
|
6 |
+
"PO-Revision-Date: 2011-09-23 11:10+0200\n"
|
7 |
+
"Last-Translator: BWS <zos@bestwebsoft.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x;esc_html__\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-Language: French\n"
|
15 |
+
"X-Poedit-Country: FRANCE\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: gallery.php:64
|
20 |
+
#: gallery.php:74
|
21 |
+
msgid "Galleries"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: gallery.php:65
|
25 |
+
msgid "Gallery"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: gallery.php:66
|
29 |
+
msgid "Add New"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: gallery.php:67
|
33 |
+
msgid "Add New Gallery"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: gallery.php:68
|
37 |
+
msgid "Edit Gallery"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: gallery.php:69
|
41 |
+
msgid "New Gallery"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: gallery.php:70
|
45 |
+
msgid "View Gallery"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: gallery.php:71
|
49 |
+
msgid "Search Galleries"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: gallery.php:72
|
53 |
+
msgid "No Galleries found"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: gallery.php:120
|
57 |
+
msgid "Upload File"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: gallery.php:133
|
61 |
+
msgid "Choose a screenshot to upload:"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: gallery.php:137
|
65 |
+
msgid "Please enable JavaScript to use the file uploader."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: gallery.php:304
|
69 |
+
msgid "Title"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: gallery.php:305
|
73 |
+
msgid "Author"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: gallery.php:306
|
77 |
+
msgid "Foto's"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: gallery.php:307
|
81 |
+
msgid "Public"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: gallery.php:308
|
85 |
+
msgid "Date"
|
86 |
+
msgstr ""
|
87 |
+
|
languages/gallery-it_IT.mo
ADDED
Binary file
|
languages/gallery-it_IT.po
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: gallery\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-09-23 11:10+0200\n"
|
6 |
+
"PO-Revision-Date: 2011-09-23 11:10+0200\n"
|
7 |
+
"Last-Translator: BWS <zos@bestwebsoft.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x;esc_html__\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-Language: Italian\n"
|
15 |
+
"X-Poedit-Country: ITALY\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: gallery.php:64
|
20 |
+
#: gallery.php:74
|
21 |
+
msgid "Galleries"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: gallery.php:65
|
25 |
+
msgid "Gallery"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: gallery.php:66
|
29 |
+
msgid "Add New"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: gallery.php:67
|
33 |
+
msgid "Add New Gallery"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: gallery.php:68
|
37 |
+
msgid "Edit Gallery"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: gallery.php:69
|
41 |
+
msgid "New Gallery"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: gallery.php:70
|
45 |
+
msgid "View Gallery"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: gallery.php:71
|
49 |
+
msgid "Search Galleries"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: gallery.php:72
|
53 |
+
msgid "No Galleries found"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: gallery.php:120
|
57 |
+
msgid "Upload File"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: gallery.php:133
|
61 |
+
msgid "Choose a screenshot to upload:"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: gallery.php:137
|
65 |
+
msgid "Please enable JavaScript to use the file uploader."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: gallery.php:304
|
69 |
+
msgid "Title"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: gallery.php:305
|
73 |
+
msgid "Author"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: gallery.php:306
|
77 |
+
msgid "Foto's"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: gallery.php:307
|
81 |
+
msgid "Public"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: gallery.php:308
|
85 |
+
msgid "Date"
|
86 |
+
msgstr ""
|
87 |
+
|
languages/gallery-nl_NL.mo
ADDED
Binary file
|
languages/gallery-nl_NL.po
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: gallery\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-09-23 11:10+0200\n"
|
6 |
+
"PO-Revision-Date: 2011-09-23 11:10+0200\n"
|
7 |
+
"Last-Translator: BWS <zos@bestwebsoft.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x;esc_html__\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-Language: Dutch\n"
|
15 |
+
"X-Poedit-Country: NETHERLANDS\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: gallery.php:64
|
20 |
+
#: gallery.php:74
|
21 |
+
msgid "Galleries"
|
22 |
+
msgstr "Fotoalbum's"
|
23 |
+
|
24 |
+
#: gallery.php:65
|
25 |
+
msgid "Gallery"
|
26 |
+
msgstr "Fotoalbum"
|
27 |
+
|
28 |
+
#: gallery.php:66
|
29 |
+
msgid "Add New"
|
30 |
+
msgstr "Nieuw fotoalbum"
|
31 |
+
|
32 |
+
#: gallery.php:67
|
33 |
+
#, fuzzy
|
34 |
+
msgid "Add New Gallery"
|
35 |
+
msgstr "Nieuw fotoalbum"
|
36 |
+
|
37 |
+
#: gallery.php:68
|
38 |
+
#, fuzzy
|
39 |
+
msgid "Edit Gallery"
|
40 |
+
msgstr "Fotoalbum bewerken"
|
41 |
+
|
42 |
+
#: gallery.php:69
|
43 |
+
#, fuzzy
|
44 |
+
msgid "New Gallery"
|
45 |
+
msgstr "Nieuwe foto"
|
46 |
+
|
47 |
+
#: gallery.php:70
|
48 |
+
#, fuzzy
|
49 |
+
msgid "View Gallery"
|
50 |
+
msgstr "Foto bekijken"
|
51 |
+
|
52 |
+
#: gallery.php:71
|
53 |
+
#, fuzzy
|
54 |
+
msgid "Search Galleries"
|
55 |
+
msgstr "Zoeken"
|
56 |
+
|
57 |
+
#: gallery.php:72
|
58 |
+
#, fuzzy
|
59 |
+
msgid "No Galleries found"
|
60 |
+
msgstr "Niets gevonden"
|
61 |
+
|
62 |
+
#: gallery.php:120
|
63 |
+
msgid "Upload File"
|
64 |
+
msgstr "Foto's uploaden"
|
65 |
+
|
66 |
+
#: gallery.php:133
|
67 |
+
msgid "Choose a screenshot to upload:"
|
68 |
+
msgstr "Foto's uploaden: "
|
69 |
+
|
70 |
+
#: gallery.php:137
|
71 |
+
#, fuzzy
|
72 |
+
msgid "Please enable JavaScript to use the file uploader."
|
73 |
+
msgstr "Activeer JavaScript om foto's te kunnen uploaden."
|
74 |
+
|
75 |
+
#: gallery.php:304
|
76 |
+
msgid "Title"
|
77 |
+
msgstr "Titel"
|
78 |
+
|
79 |
+
#: gallery.php:305
|
80 |
+
#, fuzzy
|
81 |
+
msgid "Author"
|
82 |
+
msgstr "Auteur"
|
83 |
+
|
84 |
+
#: gallery.php:306
|
85 |
+
msgid "Foto's"
|
86 |
+
msgstr "Foto's"
|
87 |
+
|
88 |
+
#: gallery.php:307
|
89 |
+
msgid "Public"
|
90 |
+
msgstr "Gepubliceerd"
|
91 |
+
|
92 |
+
#: gallery.php:308
|
93 |
+
#, fuzzy
|
94 |
+
msgid "Date"
|
95 |
+
msgstr "Datum"
|
96 |
+
|
languages/gallery-ru_RU.mo
ADDED
Binary file
|
languages/gallery-ru_RU.po
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: gallery\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-09-23 11:10+0200\n"
|
6 |
+
"PO-Revision-Date: 2011-09-23 11:10+0200\n"
|
7 |
+
"Last-Translator: BWS <zos@bestwebsoft.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x;esc_html__\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-Language: Russian\n"
|
15 |
+
"X-Poedit-Country: RUSSIAN FEDERATION\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: gallery.php:64
|
20 |
+
#: gallery.php:74
|
21 |
+
msgid "Galleries"
|
22 |
+
msgstr "Галереи"
|
23 |
+
|
24 |
+
#: gallery.php:65
|
25 |
+
msgid "Gallery"
|
26 |
+
msgstr "Галерея"
|
27 |
+
|
28 |
+
#: gallery.php:66
|
29 |
+
msgid "Add New"
|
30 |
+
msgstr "Добавить галерею"
|
31 |
+
|
32 |
+
#: gallery.php:67
|
33 |
+
msgid "Add New Gallery"
|
34 |
+
msgstr "добавить новую галерею"
|
35 |
+
|
36 |
+
#: gallery.php:68
|
37 |
+
msgid "Edit Gallery"
|
38 |
+
msgstr "Редактировать галерею"
|
39 |
+
|
40 |
+
#: gallery.php:69
|
41 |
+
msgid "New Gallery"
|
42 |
+
msgstr "Новая галерея"
|
43 |
+
|
44 |
+
#: gallery.php:70
|
45 |
+
msgid "View Gallery"
|
46 |
+
msgstr "Просмотреть галерею"
|
47 |
+
|
48 |
+
#: gallery.php:71
|
49 |
+
msgid "Search Galleries"
|
50 |
+
msgstr "Поиск галереи"
|
51 |
+
|
52 |
+
#: gallery.php:72
|
53 |
+
msgid "No Galleries found"
|
54 |
+
msgstr "Ни одной галереи не найдено"
|
55 |
+
|
56 |
+
#: gallery.php:120
|
57 |
+
msgid "Upload File"
|
58 |
+
msgstr "Загрузить файлы"
|
59 |
+
|
60 |
+
#: gallery.php:133
|
61 |
+
msgid "Choose a screenshot to upload:"
|
62 |
+
msgstr "Выбрать файлы для загрузки: "
|
63 |
+
|
64 |
+
#: gallery.php:137
|
65 |
+
#, fuzzy
|
66 |
+
msgid "Please enable JavaScript to use the file uploader."
|
67 |
+
msgstr "Пожалуйста, включите javascript для использования загрузчика файлов."
|
68 |
+
|
69 |
+
#: gallery.php:304
|
70 |
+
msgid "Title"
|
71 |
+
msgstr "Название"
|
72 |
+
|
73 |
+
#: gallery.php:305
|
74 |
+
msgid "Author"
|
75 |
+
msgstr "Автор"
|
76 |
+
|
77 |
+
#: gallery.php:306
|
78 |
+
msgid "Foto's"
|
79 |
+
msgstr "Фото"
|
80 |
+
|
81 |
+
#: gallery.php:307
|
82 |
+
msgid "Public"
|
83 |
+
msgstr "Опубликование"
|
84 |
+
|
85 |
+
#: gallery.php:308
|
86 |
+
msgid "Date"
|
87 |
+
msgstr "Дата"
|
88 |
+
|
pretty_photo/css/prettyPhoto.css
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ------------------------------------------------------------------------
|
2 |
+
This you can edit.
|
3 |
+
------------------------------------------------------------------------- */
|
4 |
+
|
5 |
+
div.pp_pic_holder .pp_top .pp_left { background: url(../images/prettyPhoto/light_rounded/tl.gif) top left no-repeat; } /* Top left corner */
|
6 |
+
div.pp_pic_holder .pp_top .pp_middle { background: #fff; } /* Top pattern/color */
|
7 |
+
div.pp_pic_holder .pp_top .pp_right { background: url(../images/prettyPhoto/light_rounded/tr.gif) top left no-repeat; } /* Top right corner */
|
8 |
+
|
9 |
+
div.pp_pic_holder .pp_content { background-color: #fff; } /* Content background */
|
10 |
+
div.pp_pic_holder .pp_content a.pp_next:hover { background: url(../images/prettyPhoto/light_rounded/btnNext.png) center right no-repeat; cursor: pointer; } /* Next button */
|
11 |
+
div.pp_pic_holder .pp_content a.pp_previous:hover { background: url(../images/prettyPhoto/light_rounded/btnPrevious.png) center left no-repeat; cursor: pointer; } /* Previous button */
|
12 |
+
div.pp_pic_holder .pp_content a.pp_expand { background: url(../images/prettyPhoto/light_rounded/btnExpand.gif) top left no-repeat; cursor: pointer; } /* Expand button */
|
13 |
+
div.pp_pic_holder .pp_content a.pp_expand:hover { background: url(../images/prettyPhoto/light_rounded/btnExpand.gif) bottom left no-repeat; cursor: pointer; } /* Expand button hover */
|
14 |
+
div.pp_pic_holder .pp_content a.pp_contract { background: url(../images/prettyPhoto/light_rounded/btnContract.gif) top left no-repeat; cursor: pointer; } /* Contract button */
|
15 |
+
div.pp_pic_holder .pp_content a.pp_contract:hover { background: url(../images/prettyPhoto/light_rounded/btnContract.gif) bottom left no-repeat; cursor: pointer; } /* Contract button hover */
|
16 |
+
div.pp_pic_holder .pp_content a.pp_close { width: 75px; height: 22px; background: url(../images/prettyPhoto/light_rounded/btnClose.png) center left no-repeat; cursor: pointer; } /* Close button */
|
17 |
+
|
18 |
+
div.pp_pic_holder .pp_content .pp_details .pp_nav a.pp_arrow_previous { background: url(../images/prettyPhoto/light_rounded/arrow_previous.png) top left no-repeat; } /* The previous arrow in the bottom nav */
|
19 |
+
div.pp_pic_holder .pp_content .pp_details .pp_nav a.pp_arrow_next { background: url(../images/prettyPhoto/light_rounded/arrow_next.png) top left no-repeat; } /* The next arrow in the bottom nav */
|
20 |
+
|
21 |
+
div.pp_pic_holder .pp_bottom .pp_left { background: url(../images/prettyPhoto/light_rounded/bl.gif) top left no-repeat; } /* Bottom left corner */
|
22 |
+
div.pp_pic_holder .pp_bottom .pp_middle { background: #fff; } /* Bottom pattern/color */
|
23 |
+
div.pp_pic_holder .pp_bottom .pp_right { background: url(../images/prettyPhoto/light_rounded/br.gif) top left no-repeat; } /* Bottom right corner */
|
24 |
+
|
25 |
+
div.pp_pic_holder .pp_loaderIcon { background: url(../images/prettyPhoto/light_rounded/loader.gif) center center no-repeat; } /* Loader icon */
|
26 |
+
|
27 |
+
div.ppt div.ppt_left { background: url(../images/prettyPhoto/light_rounded/ttl.gif) top left no-repeat; }
|
28 |
+
div.ppt div.ppt_right { background: url(../images/prettyPhoto/light_rounded/ttr.gif) top left no-repeat; }
|
29 |
+
div.ppt div.ppt_content { background: url(../images/prettyPhoto/light_rounded/ttp.gif) top left repeat-x; }
|
30 |
+
|
31 |
+
/* ----------------------------------
|
32 |
+
Dark Rounded Theme
|
33 |
+
----------------------------------- */
|
34 |
+
|
35 |
+
div.dark_rounded .pp_top .pp_left { background: url(../images/prettyPhoto/dark_rounded/tl.png) top left no-repeat; } /* Top left corner */
|
36 |
+
div.dark_rounded .pp_top .pp_middle { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat; } /* Top pattern/color */
|
37 |
+
div.dark_rounded .pp_top .pp_right { background: url(../images/prettyPhoto/dark_rounded/tr.png) top left no-repeat; } /* Top right corner */
|
38 |
+
div.dark_rounded .pp_bottom .pp_left { background: url(../images/prettyPhoto/dark_rounded/bl.png) top left no-repeat; } /* Bottom left corner */
|
39 |
+
div.dark_rounded .pp_bottom .pp_middle { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat; } /* Bottom pattern/color */
|
40 |
+
div.dark_rounded .pp_bottom .pp_right { background: url(../images/prettyPhoto/dark_rounded/br.png) top left no-repeat; } /* Bottom right corner */
|
41 |
+
div.dark_rounded .pp_content { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat; } /* Content background */
|
42 |
+
div.dark_rounded .currentTextHolder { color: #c4c4c4; }
|
43 |
+
div.dark_rounded div.ppt_left { background: url(../images/prettyPhoto/dark_rounded/tl.png) top left no-repeat; }
|
44 |
+
div.dark_rounded div.ppt_right { background: url(../images/prettyPhoto/dark_rounded/tr.png) top right no-repeat; }
|
45 |
+
div.dark_rounded div.ppt_content { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat; }
|
46 |
+
div.dark_rounded .pp_loaderIcon { background: url(../images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat; } /* Loader icon */
|
47 |
+
|
48 |
+
|
49 |
+
/* ----------------------------------
|
50 |
+
Dark Square Theme
|
51 |
+
----------------------------------- */
|
52 |
+
|
53 |
+
div.dark_square .pp_top .pp_left ,
|
54 |
+
div.dark_square .pp_top .pp_middle,
|
55 |
+
div.dark_square .pp_top .pp_right,
|
56 |
+
div.dark_square .pp_bottom .pp_left,
|
57 |
+
div.dark_square .pp_bottom .pp_middle,
|
58 |
+
div.dark_square .pp_bottom .pp_right,
|
59 |
+
div.dark_square .pp_content,
|
60 |
+
div.dark_square div.ppt_left,
|
61 |
+
div.dark_square div.ppt_right,
|
62 |
+
div.dark_square div.ppt_content { background: url(../images/prettyPhoto/dark_square/contentPattern.png) top left repeat; }
|
63 |
+
div.dark_square .currentTextHolder { color: #c4c4c4; }
|
64 |
+
div.dark_square .pp_loaderIcon { background: url(../images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat; } /* Loader icon */
|
65 |
+
|
66 |
+
|
67 |
+
/* ----------------------------------
|
68 |
+
Light Square Theme
|
69 |
+
----------------------------------- */
|
70 |
+
|
71 |
+
div.light_square .pp_top .pp_left ,
|
72 |
+
div.light_square .pp_top .pp_middle,
|
73 |
+
div.light_square .pp_top .pp_right,
|
74 |
+
div.light_square .pp_bottom .pp_left,
|
75 |
+
div.light_square .pp_bottom .pp_middle,
|
76 |
+
div.light_square .pp_bottom .pp_right,
|
77 |
+
div.light_square .pp_content,
|
78 |
+
div.light_square div.ppt_left,
|
79 |
+
div.light_square div.ppt_right,
|
80 |
+
div.light_square div.ppt_content { background: #fff; }
|
81 |
+
div.light_square div.ppt_content { color: #666666; }
|
82 |
+
|
83 |
+
|
84 |
+
/* ------------------------------------------------------------------------
|
85 |
+
DO NOT CHANGE
|
86 |
+
------------------------------------------------------------------------- */
|
87 |
+
|
88 |
+
div.pp_pic_holder a:focus{outline:none}div.pp_overlay{background:#000;position:absolute;top:0;left:0;z-index:9500;width:100%}div.pp_pic_holder{position:absolute;z-index:10000;width:100px}div.pp_pic_holder .pp_top{position:relative;height:20px}* html div.pp_pic_holder .pp_top{padding:0 20px}div.pp_pic_holder .pp_top .pp_left{position:absolute;left:0;width:20px;height:20px}div.pp_pic_holder .pp_top .pp_middle{position:absolute;left:20px;right:20px;height:20px}* html div.pp_pic_holder .pp_top .pp_middle{position:static;left:0}div.pp_pic_holder .pp_top .pp_right{position:absolute;top:0;left:auto;right:0;width:20px;height:20px}div.pp_pic_holder .pp_content{position:relative;text-align:left;width:100%;height:40px}div.pp_pic_holder .pp_content .pp_details{display:none;margin:10px 15px 2px 20px}div.pp_pic_holder .pp_content .pp_details p.pp_description{display:none;float:left;margin:0}div.pp_pic_holder .pp_content .pp_details .pp_nav{float:left;margin:3px 0 0 0}div.pp_pic_holder .pp_content .pp_details .pp_nav p{float:left;margin:0 4px}div.pp_pic_holder .pp_content .pp_details .pp_nav a.pp_arrow_previous,div.pp_pic_holder .pp_content .pp_details .pp_nav a.pp_arrow_next{float:left;display:block;width:14px;height:15px;overflow:hidden;text-indent:-10000px;margin-top:3px}div.pp_pic_holder .pp_content .pp_details .pp_nav a.disabled{background-position:0 -16px;cursor:default}div.pp_pic_holder .pp_content div.hoverContainer{position:absolute;z-index:2000;top:0;left:0;width:100%}div.pp_pic_holder .pp_content a.pp_next{display:block;float:right;text-indent:-10000px;width:49%;height:100%;background:url(../images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat}div.pp_pic_holder .pp_content a.pp_previous{display:block;float:left;text-indent:-10000px;width:49%;height:100%;background:url(../images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat}div.pp_pic_holder .pp_content a.pp_expand,div.pp_pic_holder .pp_content a.pp_contract{position:absolute;z-index:20000;top:10px;right:30px;cursor:pointer;display:none;text-indent:-10000px;width:20px;height:20px}div.pp_pic_holder .pp_content a.pp_close{float:right;display:block;text-indent:-10000px}div.pp_pic_holder .pp_bottom{position:relative;height:20px}* html div.pp_pic_holder .pp_bottom{padding:0 20px}div.pp_pic_holder .pp_bottom .pp_left{position:absolute;left:0;width:20px;height:20px}div.pp_pic_holder .pp_bottom .pp_middle{position:absolute;left:20px;right:20px;height:20px}* html div.pp_pic_holder .pp_bottom .pp_middle{position:static;left:0}div.pp_pic_holder .pp_bottom .pp_right{position:absolute;top:0;left:auto;right:0;width:20px;height:20px}div.pp_pic_holder .pp_loaderIcon{display:none;position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px;width:24px;height:24px}div.pp_pic_holder #full_res{width:100%;text-align:center}div.pp_pic_holder #full_res{display:block;margin:0 auto}div.ppt{display:none;position:absolute;top:0;left:0;z-index:9999;color:#fff;font-size:13px}div.ppt div.ppt_left,div.ppt div.ppt_right{float:left;width:19px;height:23px;overflow:hidden}div.ppt div.ppt_content{float:left;line-height:23px}.clearfix:after{ content:"."; display:block; height:0; clear:both; visibility:hidden}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block}
|
pretty_photo/css/style.css
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*-----------------------------------------------------------------------------------------------*/
|
2 |
+
/* CSS RESET THANKS TO ERIC MEYER */
|
3 |
+
/* http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */
|
4 |
+
/*-----------------------------------------------------------------------------------------------*/
|
5 |
+
html, body, div, span, applet, object, iframe,
|
6 |
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
7 |
+
a, abbr, acronym, address, big, cite, code,
|
8 |
+
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
9 |
+
small, strike, strong, sub, sup, tt, var,
|
10 |
+
dl, dt, dd, ol, ul, li,
|
11 |
+
fieldset, form, label, legend,
|
12 |
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
13 |
+
margin: 0;
|
14 |
+
padding: 0;
|
15 |
+
border: 0;
|
16 |
+
outline: 0;
|
17 |
+
font-weight: inherit;
|
18 |
+
font-style: inherit;
|
19 |
+
font-size: 100%;
|
20 |
+
font-family: inherit;
|
21 |
+
vertical-align: baseline;
|
22 |
+
}
|
23 |
+
/* remember to define focus styles! */
|
24 |
+
:focus {outline: 0;}
|
25 |
+
body {line-height: 1;color: black;background: white;}
|
26 |
+
ol, ul {list-style: none;}
|
27 |
+
/* tables still need 'cellspacing="0"' in the markup */
|
28 |
+
table {border-collapse: separate;border-spacing: 0;}
|
29 |
+
caption, th, td {text-align: left;font-weight: normal;}
|
30 |
+
blockquote:before, blockquote:after,
|
31 |
+
q:before, q:after {content: '"';}
|
32 |
+
blockquote, q {quotes: '"' '"';}
|
33 |
+
|
34 |
+
/*-----------------------------------------------------------------------------------------------*/
|
35 |
+
/* GENERAL STYLES */
|
36 |
+
/*-----------------------------------------------------------------------------------------------*/
|
37 |
+
|
38 |
+
body {
|
39 |
+
font-family: Arial, Helvetica, sans-serif;
|
40 |
+
font-size: 14px;
|
41 |
+
line-height: 1.6em;
|
42 |
+
color: #000;}
|
43 |
+
|
44 |
+
|
45 |
+
h3 {font-size: 12px; font-weight: bold;}
|
46 |
+
|
47 |
+
|
48 |
+
/*-----------------------------------------------------------------------------------------------*/
|
49 |
+
/* GENERAL LAYOUT */
|
50 |
+
/*-----------------------------------------------------------------------------------------------*/
|
51 |
+
|
52 |
+
body {background: #45403A; }
|
53 |
+
|
54 |
+
.wrapper {width: 660px; margin: 0 auto; margin-top: 100px; background: #E5DAC0; overflow: hidden; padding: 1px;}
|
55 |
+
|
56 |
+
.content {
|
57 |
+
|
58 |
+
border:1px solid #AB9E90;
|
59 |
+
padding: 15px 25px;
|
60 |
+
|
61 |
+
background: #D4C9B1;
|
62 |
+
min-height: 575px;
|
63 |
+
height: auto !important;
|
64 |
+
height: 575px;
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
ul.gallery,
|
70 |
+
ul.gallery li{
|
71 |
+
padding:0; margin: 0;
|
72 |
+
}
|
73 |
+
ul.gallery{
|
74 |
+
padding: 5px 0 30px 0;
|
75 |
+
}
|
76 |
+
ul.gallery li{
|
77 |
+
display: block;
|
78 |
+
float: left;
|
79 |
+
margin: 0 5px 0 0;
|
80 |
+
}
|
81 |
+
ul.gallery li a {
|
82 |
+
padding: 2px;
|
83 |
+
display: block;
|
84 |
+
border: 2px #AB9E90 solid;
|
85 |
+
-moz-border-radius: 5px;
|
86 |
+
-webkit-border-radius: 5px;
|
87 |
+
line-height: 0;
|
88 |
+
}
|
89 |
+
|
90 |
+
ul.gallery li a:hover { border: 2px #82796D solid; }
|
91 |
+
|
92 |
+
|
93 |
+
|
pretty_photo/images/layouts/bg.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/arrow_next.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/arrow_previous.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/bl.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/br.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/btnClose.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/btnContract.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/btnExpand.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/btnNext.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/btnPrevious.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/contentPattern.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/loader.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/spacer.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/tl.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/tr.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/ttl.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/ttp.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_rounded/ttr.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/arrow_next.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/arrow_previous.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/btnClose.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/btnContract.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/btnExpand.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/btnNext.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/btnPrevious.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/contentPattern.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/loader.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/dark_square/spacer.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/arrow_next.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/arrow_previous.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/bl.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/br.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/btnClose.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/btnContract.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/btnExpand.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/btnNext.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/btnPrevious.png
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/loader.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/spacer.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/tl.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/tr.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/ttl.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/ttp.gif
ADDED
Binary file
|
pretty_photo/images/prettyPhoto/light_rounded/ttr.gif
ADDED
Binary file
|
pretty_photo/jquery-1.6.2.min.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery JavaScript Library v1.6.2
|
3 |
+
* http://jquery.com/
|
4 |
+
*
|
5 |
+
* Copyright 2011, John Resig
|
6 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7 |
+
* http://jquery.org/license
|
8 |
+
*
|
9 |
+
* Includes Sizzle.js
|
10 |
+
* http://sizzlejs.com/
|
11 |
+
* Copyright 2011, The Dojo Foundation
|
12 |
+
* Released under the MIT, BSD, and GPL Licenses.
|
13 |
+
*
|
14 |
+
* Date: Thu Jun 30 14:16:56 2011 -0400
|
15 |
+
*/
|
16 |
+
(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(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;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bR,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){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=bx(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 bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(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 bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\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])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};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.6.2",length:0,size:function(){return this.length},toArray:function(){return F.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)?E.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(),A.done(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(F.apply(this,arguments),"slice",F.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:E,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(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},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},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},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(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},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(w,x)},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(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",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,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",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.firstChild),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},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});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="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",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),o.innerHTML="",n.removeChild(o);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;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([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&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.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=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),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},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.
|
17 |
+
shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.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]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),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]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.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!!k(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 b<c[3]-0},gt:function(a,b,c){return b>c[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=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||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=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":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=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=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(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.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:[]}},l.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&&(l.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 href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[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}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.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 k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?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,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-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||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());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 X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div<div>","</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",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(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j
|
18 |
+
)}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)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(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(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!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&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.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<r;i++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.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;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,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=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$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&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,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.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.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("<div>").append(c.replace(bL,"")).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||bM.test(this.nodeName)||bG.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(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\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?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[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","*":"*/*"},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}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),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?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),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._Deferred(),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=bF.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.done,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(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.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]!=="*"?", */*; 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=bX(bS,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){status<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)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),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&&(ca.test(b.url)||e&&ca.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(ca,l),b.url===j&&(e&&(k=k.replace(ca,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 cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,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,cb&&delete cd[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=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cs(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cr("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cv(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-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=cu.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&&!cu.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=cv(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=cv(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")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):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];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["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 h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
|
pretty_photo/js/DD_belatedPNG_0.0.7a-min.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
|
3 |
+
* Author: Drew Diller
|
4 |
+
* Email: drew.diller@gmail.com
|
5 |
+
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
|
6 |
+
* Version: 0.0.7a
|
7 |
+
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
|
8 |
+
*
|
9 |
+
* Example usage:
|
10 |
+
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
|
11 |
+
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
|
12 |
+
**/
|
13 |
+
|
14 |
+
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 E={J:\'E\',Z:{},1E:7(){4(x.1l&&!x.1l[6.J]){x.1l.23(6.J,\'24:25-26-27:3\')}4(1F.11){1F.11(\'28\',7(){E=29})}},1G:7(){2 a=x.1m(\'8\');x.1H.1b.1n(a,x.1H.1b.1b);2 b=a.1o;b.1c(6.J+\'\\\\:*\',\'{12:2a(#1I#2b)}\');b.1c(6.J+\'\\\\:9\',\'Q:1p;\');b.1c(\'1J.\'+6.J+\'1K\',\'12:y; 1q:y; Q:1p; z-2c:-1; 1d:-1r; 1L:1M;\');6.1o=b},1N:7(){2 a=13.2d;4(13.1e.K(\'2e\')!=-1||13.1e.K(\'1q\')!=-1){E.1f(a)}4(13.1e==\'8.1s\'){2 b=(a.F.1s==\'y\')?\'y\':\'2f\';G(2 v M a.3){a.3[v].9.8.1s=b}}4(13.1e.K(\'14\')!=-1){E.1t(a)}},1t:7(a){4(a.F.14.K(\'2g\')!=-1){2 b=a.F.14;b=1u(b.2h(b.1v(\'=\')+1,b.1v(\')\')),10)/2i;a.3.N.9.8.14=a.F.14;a.3.C.I.2j=b}},15:7(a){2k(7(){E.1f(a)},1)},2l:7(a){2 b=a.1O(\',\');G(2 i=0;i<b.2m;i++){6.1o.1c(b[i],\'12:2n(E.1P(6))\')}},1f:7(a){a.S.1Q=\'\';6.1R(a);6.16(a);6.1t(a);4(a.O){6.1S(a)}},1T:7(b){2 c=6;2 d={2o:\'16\',2p:\'16\'};4(b.17==\'A\'){2 e={2q:\'15\',2r:\'15\',2s:\'15\',2t:\'15\'};G(2 a M e){d[a]=e[a]}}G(2 h M d){b.11(\'1w\'+h,7(){c[d[h]](b)})}b.11(\'2u\',6.1N)},1x:7(a){a.8.2v=1;4(a.F.Q==\'2w\'){a.8.Q=\'2x\'}},1S:7(a){2 b={\'2y\':P,\'2z\':P,\'2A\':P};G(2 s M b){a.3.N.9.8[s]=a.F[s]}},1R:7(a){4(!a.F){1g}U{2 b=a.F}G(2 v M a.3){a.3[v].9.8.1U=b.1U}a.S.18=\'\';a.S.19=\'\';2 c=(b.18==\'1V\');2 d=P;4(b.19!=\'y\'||a.O){4(!a.O){a.D=b.19;a.D=a.D.2B(5,a.D.1v(\'")\')-5)}U{a.D=a.1h}2 e=6;4(!e.Z[a.D]){2 f=x.1m(\'1J\');e.Z[a.D]=f;f.2C=e.J+\'1K\';f.S.1Q=\'12:y; Q:1p; 1y:-1r; 1d:-1r; 1q:y;\';f.11(\'2D\',7(){6.1i=6.2E;6.1j=6.2F;e.16(a)});f.1h=a.D;f.1W(\'1i\');f.1W(\'1j\');x.1X.1n(f,x.1X.1b)}a.3.C.I.1h=a.D;d=V}a.3.C.I.1w=!d;a.3.C.I.N=\'y\';a.3.N.9.8.18=b.18;a.S.19=\'y\';a.S.18=\'1V\'},16:7(e){2 f=e.F;2 g={\'W\':e.2G+1,\'H\':e.2H+1,\'w\':6.Z[e.D].1i,\'h\':6.Z[e.D].1j,\'L\':e.2I,\'T\':e.2J,\'1k\':e.2K,\'1z\':e.2L};2 i=(g.L+g.1k==1)?1:0;2 j=7(a,l,t,w,h,o){a.2M=w+\',\'+h;a.2N=o+\',\'+o;a.2O=\'2P,1Y\'+w+\',1Y\'+w+\',\'+h+\'2Q,\'+h+\' 2R\';a.8.1i=w+\'u\';a.8.1j=h+\'u\';a.8.1y=l+\'u\';a.8.1d=t+\'u\'};j(e.3.N.9,(g.L+(e.O?0:g.1k)),(g.T+(e.O?0:g.1z)),(g.W-1),(g.H-1),0);j(e.3.C.9,(g.L+g.1k),(g.T+g.1z),(g.W),(g.H),1);2 k={\'X\':0,\'Y\':0};2 m=7(a,b){2 c=P;2S(b){1a\'1y\':1a\'1d\':k[a]=0;1A;1a\'2T\':k[a]=.5;1A;1a\'2U\':1a\'2V\':k[a]=1;1A;1I:4(b.K(\'%\')!=-1){k[a]=1u(b)*.2W}U{c=V}}2 d=(a==\'X\');k[a]=2X.2Y(c?((g[d?\'W\':\'H\']*k[a])-(g[d?\'w\':\'h\']*k[a])):1u(b));4(k[a]==0){k[a]++}};G(2 b M k){m(b,f[\'2Z\'+b])}e.3.C.I.Q=(k.X/g.W)+\',\'+(k.Y/g.H);2 n=f.30;2 p={\'T\':1,\'R\':g.W+i,\'B\':g.H,\'L\':1+i};2 q={\'X\':{\'1B\':\'L\',\'1C\':\'R\',\'d\':\'W\'},\'Y\':{\'1B\':\'T\',\'1C\':\'B\',\'d\':\'H\'}};4(n!=\'1D\'){2 c={\'T\':(k.Y),\'R\':(k.X+g.w),\'B\':(k.Y+g.h),\'L\':(k.X)};4(n.K(\'1D-\')!=-1){2 v=n.1O(\'1D-\')[1].31();c[q[v].1B]=1;c[q[v].1C]=g[q[v].d]}4(c.B>g.H){c.B=g.H}e.3.C.9.8.1Z=\'20(\'+c.T+\'u \'+(c.R+i)+\'u \'+c.B+\'u \'+(c.L+i)+\'u)\'}U{e.3.C.9.8.1Z=\'20(\'+p.T+\'u \'+p.R+\'u \'+p.B+\'u \'+p.L+\'u)\'}},1P:7(a){a.8.12=\'y\';4(a.17==\'32\'||a.17==\'33\'||a.17==\'34\'){1g}a.O=V;4(a.17==\'35\'){4(a.1h.21().K(/\\.22$/)!=-1){a.O=P;a.8.1L=\'1M\'}U{1g}}U 4(a.F.19.21().K(\'.22\')==-1){1g}2 b=E;a.3={N:{},C:{}};2 c={9:{},I:{}};G(2 r M a.3){G(2 e M c){2 d=b.J+\':\'+e;a.3[r][e]=x.1m(d)}a.3[r].9.36=V;a.3[r].9.37(a.3[r].I);a.38.1n(a.3[r].9,a)}a.3.C.9.39=\'y\';a.3.C.I.3a=\'3b\';a.3.N.I.1w=V;b.1T(a);b.1x(a);b.1x(a.3c);b.1f(a)}};3d{x.3e("3f",V,P)}3g(r){}E.1E();E.1G();',62,203,'||var|vml|if||this|function|style|shape|||||||||||||||||||||px|||document|none||||image|vmlBg|DD_belatedPNG|currentStyle|for||fill|ns|search||in|color|isImg|true|position||runtimeStyle||else|false||||imgSize||attachEvent|behavior|event|filter|handlePseudoHover|vmlOffsets|nodeName|backgroundColor|backgroundImage|case|firstChild|addRule|top|propertyName|applyVML|return|src|width|height|bLW|namespaces|createElement|insertBefore|styleSheet|absolute|border|10000px|display|vmlOpacity|parseInt|lastIndexOf|on|giveLayout|left|bTW|break|b1|b2|repeat|createVmlNameSpace|window|createVmlStyleSheet|documentElement|default|img|_sizeFinder|visibility|hidden|readPropertyChange|split|fixPng|cssText|vmlFill|copyImageBorders|attachHandlers|zIndex|transparent|removeAttribute|body|0l|clip|rect|toLowerCase|png|add|urn|schemas|microsoft|com|onbeforeunload|null|url|VML|index|srcElement|background|block|lpha|substring|100|opacity|setTimeout|fix|length|expression|resize|move|mouseleave|mouseenter|focus|blur|onpropertychange|zoom|static|relative|borderStyle|borderWidth|borderColor|substr|className|onload|offsetWidth|offsetHeight|clientWidth|clientHeight|offsetLeft|offsetTop|clientLeft|clientTop|coordsize|coordorigin|path|m0|l0|xe|switch|center|right|bottom|01|Math|ceil|backgroundPosition|backgroundRepeat|toUpperCase|BODY|TD|TR|IMG|stroked|appendChild|parentNode|fillcolor|type|tile|offsetParent|try|execCommand|BackgroundImageCache|catch'.split('|'),0,{}))
|
pretty_photo/js/jquery-1.3.1.min.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery JavaScript Library v1.3.1
|
3 |
+
* http://jquery.com/
|
4 |
+
*
|
5 |
+
* Copyright (c) 2009 John Resig
|
6 |
+
* Dual licensed under the MIT and GPL licenses.
|
7 |
+
* http://docs.jquery.com/License
|
8 |
+
*
|
9 |
+
* Date: 2009-01-21 20:42:16 -0500 (Wed, 21 Jan 2009)
|
10 |
+
* Revision: 6158
|
11 |
+
*/
|
12 |
+
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.makeArray(E))},selector:"",jquery:"1.3.1",size:function(){return this.length},get:function(E){return E===g?o.makeArray(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,find:function(E){if(this.length===1&&!/,/.test(E)){var G=this.pushStack([],"find",E);G.length=0;o.find(E,this[0],G);return G}else{var F=o.map(this,function(H){return o.find(E,H)});return this.pushStack(/[^+>] [^+>]/.test(E)?o.unique(F):F,"find",E)}},clone:function(F){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.cloneNode(true),H=document.createElement("div");H.appendChild(I);return o.clean([H.innerHTML])[0]}else{return this.cloneNode(true)}});var G=E.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(F===true){this.find("*").andSelf().each(function(I){if(this.nodeType==3){return}var H=o.data(this,"events");for(var K in H){for(var J in H[K]){o.event.add(G[I],K,H[K][J],H[K][J].data)}}})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var F=o.expr.match.POS.test(E)?o(E):null;return this.map(function(){var G=this;while(G&&G.ownerDocument){if(F?F.index(G)>-1:o(G).is(E)){return G}G=G.parentNode}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML:null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(K,N,M){if(this[0]){var J=(this[0].ownerDocument||this[0]).createDocumentFragment(),G=o.clean(K,(this[0].ownerDocument||this[0]),J),I=J.firstChild,E=this.length>1?J.cloneNode(true):J;if(I){for(var H=0,F=this.length;H<F;H++){M.call(L(this[H],I),H>0?E.cloneNode(true):J)}}if(G){o.each(G,z)}}return this;function L(O,P){return N&&o.nodeName(O,"table")&&o.nodeName(P,"tr")?(O.getElementsByTagName("tbody")[0]||O.appendChild(O.ownerDocument.createElement("tbody"))):O}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){G=o.trim(G);if(G){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(G,E,I){if(E=="width"||E=="height"){var K,F={position:"absolute",visibility:"hidden",display:"block"},J=E=="width"?["Left","Right"]:["Top","Bottom"];function H(){K=E=="width"?G.offsetWidth:G.offsetHeight;var M=0,L=0;o.each(J,function(){M+=parseFloat(o.curCSS(G,"padding"+this,true))||0;L+=parseFloat(o.curCSS(G,"border"+this+"Width",true))||0});K-=Math.round(M+L)}if(o(G).is(":visible")){H()}else{o.swap(G,F,H)}return Math.max(0,K)}return o.curCSS(G,E,I)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,R){if(typeof R==="number"){R+=""}if(!R){return}if(typeof R==="string"){R=R.replace(/(<(\w+)[^>]*?)\/>/g,function(T,U,S){return S.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?T:U+"></"+S+">"});var O=o.trim(R).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+R+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var N=!O.indexOf("<table")&&O.indexOf("<tbody")<0?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&O.indexOf("<tbody")<0?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(R)){L.insertBefore(K.createTextNode(R.match(/^\s*/)[0]),L.firstChild)}R=o.makeArray(L.childNodes)}if(R.nodeType){G.push(R)}else{G=o.merge(G,R)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(){var G=arguments;return this.each(function(){for(var H=0,I=G.length;H<I;H++){o(G[H])[F](this)}})}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
|
13 |
+
/*
|
14 |
+
* Sizzle CSS Selector Engine - v0.9.3
|
15 |
+
* Copyright 2009, The Dojo Foundation
|
16 |
+
* Released under the MIT, BSD, and GPL Licenses.
|
17 |
+
* More information: http://sizzlejs.com/
|
18 |
+
*/
|
19 |
+
(function(){var Q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,K=0,G=Object.prototype.toString;var F=function(X,T,aa,ab){aa=aa||[];T=T||document;if(T.nodeType!==1&&T.nodeType!==9){return[]}if(!X||typeof X!=="string"){return aa}var Y=[],V,ae,ah,S,ac,U,W=true;Q.lastIndex=0;while((V=Q.exec(X))!==null){Y.push(V[1]);if(V[2]){U=RegExp.rightContext;break}}if(Y.length>1&&L.exec(X)){if(Y.length===2&&H.relative[Y[0]]){ae=I(Y[0]+Y[1],T)}else{ae=H.relative[Y[0]]?[T]:F(Y.shift(),T);while(Y.length){X=Y.shift();if(H.relative[X]){X+=Y.shift()}ae=I(X,ae)}}}else{var ad=ab?{expr:Y.pop(),set:E(ab)}:F.find(Y.pop(),Y.length===1&&T.parentNode?T.parentNode:T,P(T));ae=F.filter(ad.expr,ad.set);if(Y.length>0){ah=E(ae)}else{W=false}while(Y.length){var ag=Y.pop(),af=ag;if(!H.relative[ag]){ag=""}else{af=Y.pop()}if(af==null){af=T}H.relative[ag](ah,af,P(T))}}if(!ah){ah=ae}if(!ah){throw"Syntax error, unrecognized expression: "+(ag||X)}if(G.call(ah)==="[object Array]"){if(!W){aa.push.apply(aa,ah)}else{if(T.nodeType===1){for(var Z=0;ah[Z]!=null;Z++){if(ah[Z]&&(ah[Z]===true||ah[Z].nodeType===1&&J(T,ah[Z]))){aa.push(ae[Z])}}}else{for(var Z=0;ah[Z]!=null;Z++){if(ah[Z]&&ah[Z].nodeType===1){aa.push(ae[Z])}}}}}else{E(ah,aa)}if(U){F(U,T,aa,ab)}return aa};F.matches=function(S,T){return F(S,null,null,T)};F.find=function(Z,S,aa){var Y,W;if(!Z){return[]}for(var V=0,U=H.order.length;V<U;V++){var X=H.order[V],W;if((W=H.match[X].exec(Z))){var T=RegExp.leftContext;if(T.substr(T.length-1)!=="\\"){W[1]=(W[1]||"").replace(/\\/g,"");Y=H.find[X](W,S,aa);if(Y!=null){Z=Z.replace(H.match[X],"");break}}}}if(!Y){Y=S.getElementsByTagName("*")}return{set:Y,expr:Z}};F.filter=function(ab,aa,ae,V){var U=ab,ag=[],Y=aa,X,S;while(ab&&aa.length){for(var Z in H.filter){if((X=H.match[Z].exec(ab))!=null){var T=H.filter[Z],af,ad;S=false;if(Y==ag){ag=[]}if(H.preFilter[Z]){X=H.preFilter[Z](X,Y,ae,ag,V);if(!X){S=af=true}else{if(X===true){continue}}}if(X){for(var W=0;(ad=Y[W])!=null;W++){if(ad){af=T(ad,X,W,Y);var ac=V^!!af;if(ae&&af!=null){if(ac){S=true}else{Y[W]=false}}else{if(ac){ag.push(ad);S=true}}}}}if(af!==g){if(!ae){Y=ag}ab=ab.replace(H.match[Z],"");if(!S){return[]}break}}}ab=ab.replace(/\s*,\s*/,"");if(ab==U){if(S==null){throw"Syntax error, unrecognized expression: "+ab}else{break}}U=ab}return Y};var H=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(S){return S.getAttribute("href")}},relative:{"+":function(W,T){for(var U=0,S=W.length;U<S;U++){var V=W[U];if(V){var X=V.previousSibling;while(X&&X.nodeType!==1){X=X.previousSibling}W[U]=typeof T==="string"?X||false:X===T}}if(typeof T==="string"){F.filter(T,W,true)}},">":function(X,T,Y){if(typeof T==="string"&&!/\W/.test(T)){T=Y?T:T.toUpperCase();for(var U=0,S=X.length;U<S;U++){var W=X[U];if(W){var V=W.parentNode;X[U]=V.nodeName===T?V:false}}}else{for(var U=0,S=X.length;U<S;U++){var W=X[U];if(W){X[U]=typeof T==="string"?W.parentNode:W.parentNode===T}}if(typeof T==="string"){F.filter(T,X,true)}}},"":function(V,T,X){var U="done"+(K++),S=R;if(!T.match(/\W/)){var W=T=X?T:T.toUpperCase();S=O}S("parentNode",T,U,V,W,X)},"~":function(V,T,X){var U="done"+(K++),S=R;if(typeof T==="string"&&!T.match(/\W/)){var W=T=X?T:T.toUpperCase();S=O}S("previousSibling",T,U,V,W,X)}},find:{ID:function(T,U,V){if(typeof U.getElementById!=="undefined"&&!V){var S=U.getElementById(T[1]);return S?[S]:[]}},NAME:function(S,T,U){if(typeof T.getElementsByName!=="undefined"&&!U){return T.getElementsByName(S[1])}},TAG:function(S,T){return T.getElementsByTagName(S[1])}},preFilter:{CLASS:function(V,T,U,S,Y){V=" "+V[1].replace(/\\/g,"")+" ";var X;for(var W=0;(X=T[W])!=null;W++){if(X){if(Y^(" "+X.className+" ").indexOf(V)>=0){if(!U){S.push(X)}}else{if(U){T[W]=false}}}}return false},ID:function(S){return S[1].replace(/\\/g,"")},TAG:function(T,S){for(var U=0;S[U]===false;U++){}return S[U]&&P(S[U])?T[1]:T[1].toUpperCase()},CHILD:function(S){if(S[1]=="nth"){var T=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(S[2]=="even"&&"2n"||S[2]=="odd"&&"2n+1"||!/\D/.test(S[2])&&"0n+"+S[2]||S[2]);S[2]=(T[1]+(T[2]||1))-0;S[3]=T[3]-0}S[0]="done"+(K++);return S},ATTR:function(T){var S=T[1].replace(/\\/g,"");if(H.attrMap[S]){T[1]=H.attrMap[S]}if(T[2]==="~="){T[4]=" "+T[4]+" "}return T},PSEUDO:function(W,T,U,S,X){if(W[1]==="not"){if(W[3].match(Q).length>1){W[3]=F(W[3],null,null,T)}else{var V=F.filter(W[3],T,U,true^X);if(!U){S.push.apply(S,V)}return false}}else{if(H.match.POS.test(W[0])){return true}}return W},POS:function(S){S.unshift(true);return S}},filters:{enabled:function(S){return S.disabled===false&&S.type!=="hidden"},disabled:function(S){return S.disabled===true},checked:function(S){return S.checked===true},selected:function(S){S.parentNode.selectedIndex;return S.selected===true},parent:function(S){return !!S.firstChild},empty:function(S){return !S.firstChild},has:function(U,T,S){return !!F(S[3],U).length},header:function(S){return/h\d/i.test(S.nodeName)},text:function(S){return"text"===S.type},radio:function(S){return"radio"===S.type},checkbox:function(S){return"checkbox"===S.type},file:function(S){return"file"===S.type},password:function(S){return"password"===S.type},submit:function(S){return"submit"===S.type},image:function(S){return"image"===S.type},reset:function(S){return"reset"===S.type},button:function(S){return"button"===S.type||S.nodeName.toUpperCase()==="BUTTON"},input:function(S){return/input|select|textarea|button/i.test(S.nodeName)}},setFilters:{first:function(T,S){return S===0},last:function(U,T,S,V){return T===V.length-1},even:function(T,S){return S%2===0},odd:function(T,S){return S%2===1},lt:function(U,T,S){return T<S[3]-0},gt:function(U,T,S){return T>S[3]-0},nth:function(U,T,S){return S[3]-0==T},eq:function(U,T,S){return S[3]-0==T}},filter:{CHILD:function(S,V){var Y=V[1],Z=S.parentNode;var X=V[0];if(Z&&(!Z[X]||!S.nodeIndex)){var W=1;for(var T=Z.firstChild;T;T=T.nextSibling){if(T.nodeType==1){T.nodeIndex=W++}}Z[X]=W-1}if(Y=="first"){return S.nodeIndex==1}else{if(Y=="last"){return S.nodeIndex==Z[X]}else{if(Y=="only"){return Z[X]==1}else{if(Y=="nth"){var ab=false,U=V[2],aa=V[3];if(U==1&&aa==0){return true}if(U==0){if(S.nodeIndex==aa){ab=true}}else{if((S.nodeIndex-aa)%U==0&&(S.nodeIndex-aa)/U>=0){ab=true}}return ab}}}}},PSEUDO:function(Y,U,V,Z){var T=U[1],W=H.filters[T];if(W){return W(Y,V,U,Z)}else{if(T==="contains"){return(Y.textContent||Y.innerText||"").indexOf(U[3])>=0}else{if(T==="not"){var X=U[3];for(var V=0,S=X.length;V<S;V++){if(X[V]===Y){return false}}return true}}}},ID:function(T,S){return T.nodeType===1&&T.getAttribute("id")===S},TAG:function(T,S){return(S==="*"&&T.nodeType===1)||T.nodeName===S},CLASS:function(T,S){return S.test(T.className)},ATTR:function(W,U){var S=H.attrHandle[U[1]]?H.attrHandle[U[1]](W):W[U[1]]||W.getAttribute(U[1]),X=S+"",V=U[2],T=U[4];return S==null?V==="!=":V==="="?X===T:V==="*="?X.indexOf(T)>=0:V==="~="?(" "+X+" ").indexOf(T)>=0:!U[4]?S:V==="!="?X!=T:V==="^="?X.indexOf(T)===0:V==="$="?X.substr(X.length-T.length)===T:V==="|="?X===T||X.substr(0,T.length+1)===T+"-":false},POS:function(W,T,U,X){var S=T[2],V=H.setFilters[S];if(V){return V(W,U,T,X)}}}};var L=H.match.POS;for(var N in H.match){H.match[N]=RegExp(H.match[N].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(T,S){T=Array.prototype.slice.call(T);if(S){S.push.apply(S,T);return S}return T};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(M){E=function(W,V){var T=V||[];if(G.call(W)==="[object Array]"){Array.prototype.push.apply(T,W)}else{if(typeof W.length==="number"){for(var U=0,S=W.length;U<S;U++){T.push(W[U])}}else{for(var U=0;W[U];U++){T.push(W[U])}}}return T}}(function(){var T=document.createElement("form"),U="script"+(new Date).getTime();T.innerHTML="<input name='"+U+"'/>";var S=document.documentElement;S.insertBefore(T,S.firstChild);if(!!document.getElementById(U)){H.find.ID=function(W,X,Y){if(typeof X.getElementById!=="undefined"&&!Y){var V=X.getElementById(W[1]);return V?V.id===W[1]||typeof V.getAttributeNode!=="undefined"&&V.getAttributeNode("id").nodeValue===W[1]?[V]:g:[]}};H.filter.ID=function(X,V){var W=typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id");return X.nodeType===1&&W&&W.nodeValue===V}}S.removeChild(T)})();(function(){var S=document.createElement("div");S.appendChild(document.createComment(""));if(S.getElementsByTagName("*").length>0){H.find.TAG=function(T,X){var W=X.getElementsByTagName(T[1]);if(T[1]==="*"){var V=[];for(var U=0;W[U];U++){if(W[U].nodeType===1){V.push(W[U])}}W=V}return W}}S.innerHTML="<a href='#'></a>";if(S.firstChild&&S.firstChild.getAttribute("href")!=="#"){H.attrHandle.href=function(T){return T.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var S=F,T=document.createElement("div");T.innerHTML="<p class='TEST'></p>";if(T.querySelectorAll&&T.querySelectorAll(".TEST").length===0){return}F=function(X,W,U,V){W=W||document;if(!V&&W.nodeType===9&&!P(W)){try{return E(W.querySelectorAll(X),U)}catch(Y){}}return S(X,W,U,V)};F.find=S.find;F.filter=S.filter;F.selectors=S.selectors;F.matches=S.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){H.order.splice(1,0,"CLASS");H.find.CLASS=function(S,T){return T.getElementsByClassName(S[1])}}function O(T,Z,Y,ac,aa,ab){for(var W=0,U=ac.length;W<U;W++){var S=ac[W];if(S){S=S[T];var X=false;while(S&&S.nodeType){var V=S[Y];if(V){X=ac[V];break}if(S.nodeType===1&&!ab){S[Y]=W}if(S.nodeName===Z){X=S;break}S=S[T]}ac[W]=X}}}function R(T,Y,X,ab,Z,aa){for(var V=0,U=ab.length;V<U;V++){var S=ab[V];if(S){S=S[T];var W=false;while(S&&S.nodeType){if(S[X]){W=ab[S[X]];break}if(S.nodeType===1){if(!aa){S[X]=V}if(typeof Y!=="string"){if(S===Y){W=true;break}}else{if(F.filter(Y,[S]).length>0){W=S;break}}}S=S[T]}ab[V]=W}}}var J=document.compareDocumentPosition?function(T,S){return T.compareDocumentPosition(S)&16}:function(T,S){return T!==S&&(T.contains?T.contains(S):true)};var P=function(S){return S.nodeType===9&&S.documentElement.nodeName!=="HTML"||!!S.ownerDocument&&P(S.ownerDocument)};var I=function(S,Z){var V=[],W="",X,U=Z.nodeType?[Z]:Z;while((X=H.match.PSEUDO.exec(S))){W+=X[0];S=S.replace(H.match.PSEUDO,"")}S=H.relative[S]?S+"*":S;for(var Y=0,T=U.length;Y<T;Y++){F(S,U[Y],V)}return F.filter(W,V)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(S){return"hidden"===S.type||o.css(S,"display")==="none"||o.css(S,"visibility")==="hidden"};F.selectors.filters.visible=function(S){return"hidden"!==S.type&&o.css(S,"display")!=="none"&&o.css(S,"visibility")!=="hidden"};F.selectors.filters.animated=function(S){return o.grep(o.timers,function(T){return S===T.elem}).length};o.multiFilter=function(U,S,T){if(T){U=":not("+U+")"}return F.matches(U,S)};o.dir=function(U,T){var S=[],V=U[T];while(V&&V!=document){if(V.nodeType==1){S.push(V)}V=V[T]}return S};o.nth=function(W,S,U,V){S=S||1;var T=0;for(;W;W=W[U]){if(W.nodeType==1&&++T==S){break}}return W};o.sibling=function(U,T){var S=[];for(;U;U=U.nextSibling){if(U.nodeType==1&&U!=T){S.push(U)}}return S};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){G=false}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&typeof l.frameElement==="undefined"){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width="1px";L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L)})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}this[H].style.display=o.data(this[H],"olddisplay",K)}}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)==1){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n)}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(H,F){var E=H?"Left":"Top",G=H?"Right":"Bottom";o.fn["inner"+F]=function(){return this[F.toLowerCase()]()+j(this,"padding"+E)+j(this,"padding"+G)};o.fn["outer"+F]=function(J){return this["inner"+F]()+j(this,"border"+E+"Width")+j(this,"border"+G+"Width")+(J?j(this,"margin"+E)+j(this,"margin"+G):0)};var I=F.toLowerCase();o.fn[I]=function(J){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+F]||document.body["client"+F]:this[0]==document?Math.max(document.documentElement["client"+F],document.body["scroll"+F],document.documentElement["scroll"+F],document.body["offset"+F],document.documentElement["offset"+F]):J===g?(this.length?o.css(this[0],I):null):this.css(I,typeof J==="string"?J:J+"px")}})})();
|
pretty_photo/js/jquery.prettyPhoto.js
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ------------------------------------------------------------------------
|
2 |
+
Class: prettyPhoto
|
3 |
+
Use: Lightbox clone for jQuery
|
4 |
+
Author: Stephane Caron (http://www.no-margin-for-errors.com)
|
5 |
+
Version: 2.2.6
|
6 |
+
------------------------------------------------------------------------- */
|
7 |
+
|
8 |
+
(function(A){A.fn.prettyPhoto=function(P){var M=0;var D=true;var K=[];var C=0;A(window).scroll(function(){B();});A(window).resize(function(){B();N();});A(document).keyup(function(T){switch(T.keyCode){case 37:if(C==1){return ;}J("previous");break;case 39:if(C==setCount){return ;}J("next");break;case 27:I();break;}});P=jQuery.extend({animationSpeed:"normal",padding:40,opacity:0.35,showTitle:true,allowresize:true,counter_separator_label:"/",theme:"light_rounded"},P);A(this).each(function(){var V=false;var U=false;var W=0;var T=0;K[K.length]=this;A(this).bind("click",function(){G(this);return false;});});function G(T){M=A(T);theRel=A(M).attr("rel");galleryRegExp=/\[(?:.*)\]/;theGallery=galleryRegExp.exec(theRel);isSet=false;setCount=0;for(i=0;i<K.length;i++){if(A(K[i]).attr("rel").indexOf(theGallery)!=-1){setCount++;if(setCount>1){isSet=true;}if(A(K[i]).attr("href")==A(T).attr("href")){C=setCount;arrayPosition=i;}}}Q(isSet);A("div.pp_pic_holder p.currentTextHolder").text(C+P.counter_separator_label+setCount);B();A("div.pp_pic_holder #full_res").hide();A(".pp_loaderIcon").show();R();}showimage=function(W,T,Z,Y,X,U,V){A(".pp_loaderIcon").hide();var a=F();if(A.browser.opera){windowHeight=window.innerHeight;windowWidth=window.innerWidth;}else{windowHeight=A(window).height();windowWidth=A(window).width();}A("div.pp_pic_holder .pp_content").animate({height:X,width:Z},P.animationSpeed);projectedTop=a.scrollTop+((windowHeight/2)-(Y/2));if(projectedTop<0){projectedTop=0+A("div.ppt").height();}A("div.pp_pic_holder").animate({top:projectedTop,left:((windowWidth/2)-(Z/2)),width:Z},P.animationSpeed,function(){A("#fullResImage").attr({width:W,height:T});A("div.pp_pic_holder").width(Z);A("div.pp_pic_holder .hoverContainer").height(T).width(W);A("div.pp_pic_holder #full_res").fadeIn(P.animationSpeed);E();if(V){A("a.pp_expand,a.pp_contract").fadeIn(P.animationSpeed);}});};function J(T){if(T=="previous"){arrayPosition--;C--;}else{arrayPosition++;C++;}if(!D){D=true;}A("div.pp_pic_holder .hoverContainer,div.pp_pic_holder .pp_details").fadeOut(P.animationSpeed);A("div.pp_pic_holder #full_res").fadeOut(P.animationSpeed,function(){A(".pp_loaderIcon").show();R();});S();A("a.pp_expand,a.pp_contract").fadeOut(P.animationSpeed,function(){A(this).removeClass("pp_contract").addClass("pp_expand");});}function I(){A("div.pp_pic_holder,div.ppt").fadeOut(P.animationSpeed,function(){A("div.pp_overlay").fadeOut(P.animationSpeed,function(){A("div.pp_overlay,div.pp_pic_holder,div.ppt").remove();if(A.browser.msie&&A.browser.version==6){A("select").css("visibility","visible");}});});D=true;}function H(){if(C==setCount){A("div.pp_pic_holder a.pp_next").css("visibility","hidden");A("div.pp_pic_holder a.pp_arrow_next").addClass("disabled").unbind("click");}else{A("div.pp_pic_holder a.pp_next").css("visibility","visible");A("div.pp_pic_holder a.pp_arrow_next.disabled").removeClass("disabled").bind("click",function(){J("next");return false;});}if(C==1){A("div.pp_pic_holder a.pp_previous").css("visibility","hidden");A("div.pp_pic_holder a.pp_arrow_previous").addClass("disabled").unbind("click");}else{A("div.pp_pic_holder a.pp_previous").css("visibility","visible");A("div.pp_pic_holder a.pp_arrow_previous.disabled").removeClass("disabled").bind("click",function(){J("previous");return false;});}A("div.pp_pic_holder p.currentTextHolder").text(C+P.counter_separator_label+setCount);var T=(isSet)?A(K[arrayPosition]):A(M);if(T.attr("title")){A("div.pp_pic_holder .pp_description").show().html(unescape(T.attr("title")));}else{A("div.pp_pic_holder .pp_description").hide().text("");}if(T.find("img").attr("alt")&&P.showTitle){hasTitle=true;A("div.ppt .ppt_content").html(unescape(T.find("img").attr("alt")));}else{hasTitle=false;}}function L(U,T){hasBeenResized=false;A("div.pp_pic_holder .pp_details").width(U);A("div.pp_pic_holder .pp_details p.pp_description").width(U-parseFloat(A("div.pp_pic_holder a.pp_close").css("width")));contentHeight=T+parseFloat(A("div.pp_pic_holder .pp_details").height())+parseFloat(A("div.pp_pic_holder .pp_details").css("margin-top"))+parseFloat(A("div.pp_pic_holder .pp_details").css("margin-bottom"));contentWidth=U;containerHeight=T+parseFloat(A("div.ppt").height())+parseFloat(A("div.pp_pic_holder .pp_top").height())+parseFloat(A("div.pp_pic_holder .pp_bottom").height());containerWidth=U+P.padding;imageWidth=U;imageHeight=T;windowHeight=A(window).height();windowWidth=A(window).width();if(((containerWidth>windowWidth)||(containerHeight>windowHeight))&&D&&P.allowresize){hasBeenResized=true;notFitting=true;while(notFitting){if((containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(T/U)*imageWidth;}else{if((containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(U/T)*imageHeight;}else{notFitting=false;}}containerHeight=imageHeight;containerWidth=imageWidth;}contentHeight=imageHeight+parseFloat(A("div.pp_pic_holder .pp_details").height())+parseFloat(A("div.pp_pic_holder .pp_details").css("margin-top"))+parseFloat(A("div.pp_pic_holder .pp_details").css("margin-bottom"));contentWidth=imageWidth;containerHeight=imageHeight+parseFloat(A("div.ppt").height())+parseFloat(A("div.pp_pic_holder .pp_top").height())+parseFloat(A("div.pp_pic_holder .pp_bottom").height());containerWidth=imageWidth+P.padding;A("div.pp_pic_holder .pp_details").width(contentWidth);A("div.pp_pic_holder .pp_details p.pp_description").width(contentWidth-parseFloat(A("div.pp_pic_holder a.pp_close").css("width")));}return{width:imageWidth,height:imageHeight,containerHeight:containerHeight,containerWidth:containerWidth,contentHeight:contentHeight,contentWidth:contentWidth,resized:hasBeenResized};}function B(){if(A("div.pp_pic_holder").size()>0){var T=F();if(A.browser.opera){windowHeight=window.innerHeight;windowWidth=window.innerWidth;}else{windowHeight=A(window).height();windowWidth=A(window).width();}if(D){projectedTop=(windowHeight/2)+T.scrollTop-(A("div.pp_pic_holder").height()/2);if(projectedTop<0){projectedTop=0+A("div.ppt").height();}A("div.pp_pic_holder").css({top:projectedTop,left:(windowWidth/2)+T.scrollLeft-(A("div.pp_pic_holder").width()/2)});A("div.ppt").css({top:A("div.pp_pic_holder").offset().top-A("div.ppt").height(),left:A("div.pp_pic_holder").offset().left+(P.padding/2)});}}}function E(){if(isSet){A("div.pp_pic_holder .hoverContainer").fadeIn(P.animationSpeed);}A("div.pp_pic_holder .pp_details").fadeIn(P.animationSpeed);O();}function O(){if(P.showTitle&&hasTitle){A("div.ppt").css({top:A("div.pp_pic_holder").offset().top-22,left:A("div.pp_pic_holder").offset().left+(P.padding/2),display:"none"});A("div.ppt div.ppt_content").css("width","auto");if(A("div.ppt").width()>A("div.pp_pic_holder").width()){A("div.ppt div.ppt_content").css("width",A("div.pp_pic_holder").width()-(P.padding*2));}else{A("div.ppt div.ppt_content").css("width","");}A("div.ppt").fadeIn(P.animationSpeed);}}function S(){A("div.ppt").fadeOut(P.animationSpeed);}function R(){H();imgPreloader=new Image();nextImage=new Image();if(isSet&&C>setCount){nextImage.src=A(K[arrayPosition+1]).attr("href");}prevImage=new Image();if(isSet&&K[arrayPosition-1]){prevImage.src=A(K[arrayPosition-1]).attr("href");}A("div.pp_pic_holder .pp_content").css("overflow","hidden");if(isSet){A("div.pp_pic_holder #fullResImage").attr("src",A(K[arrayPosition]).attr("href"));}else{A("div.pp_pic_holder #fullResImage").attr("src",A(M).attr("href"));}imgPreloader.onload=function(){var T=L(imgPreloader.width,imgPreloader.height);imgPreloader.width=T.width;imgPreloader.height=T.height;setTimeout("showimage(imgPreloader.width,imgPreloader.height,"+T.containerWidth+","+T.containerHeight+","+T.contentHeight+","+T.contentWidth+","+T.resized+")",500);};(isSet)?imgPreloader.src=A(K[arrayPosition]).attr("href"):imgPreloader.src=A(M).attr("href");}function F(){scrollTop=window.pageYOffset||document.documentElement.scrollTop||0;scrollLeft=window.pageXOffset||document.documentElement.scrollLeft||0;return{scrollTop:scrollTop,scrollLeft:scrollLeft};}function N(){A("div.pp_overlay").css({height:A(document).height(),width:A(window).width()});}function Q(){backgroundDiv="<div class='pp_overlay'></div>";A("body").append(backgroundDiv);A("div.pp_overlay").css("height",A(document).height()).bind("click",function(){I();});pictureHolder='<div class="pp_pic_holder"><div class="pp_top"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div><div class="pp_content"><a href="#" class="pp_expand" title="Expand the image">Expand</a><div class="pp_loaderIcon"></div><div class="hoverContainer"><a class="pp_next" href="#">next</a><a class="pp_previous" href="#">previous</a></div><div id="full_res"><img id="fullResImage" src="" /></div><div class="pp_details clearfix"><a class="pp_close" href="#">Close</a><p class="pp_description"></p><div class="pp_nav"><a href="#" class="pp_arrow_previous">Previous</a><p class="currentTextHolder">0'+P.counter_separator_label+'0</p><a href="#" class="pp_arrow_next">Next</a></div></div></div><div class="pp_bottom"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div></div>';titleHolder='<div class="ppt"><div class="ppt_left"></div><div class="ppt_content"></div><div class="ppt_right"></div></div>';A("body").append(pictureHolder).append(titleHolder);A(".pp_pic_holder,.titleHolder").css({opacity:0});A(".pp_pic_holder,.ppt").addClass(P.theme);A("a.pp_close").bind("click",function(){I();return false;});A("a.pp_expand").bind("click",function(){if(A(this).hasClass("pp_expand")){A(this).removeClass("pp_expand").addClass("pp_contract");D=false;}else{A(this).removeClass("pp_contract").addClass("pp_expand");D=true;}S();A("div.pp_pic_holder .hoverContainer,div.pp_pic_holder #full_res").fadeOut(P.animationSpeed);A("div.pp_pic_holder .pp_details").fadeOut(P.animationSpeed,function(){R();});return false;});A(".pp_pic_holder .pp_previous,.pp_pic_holder .pp_arrow_previous").bind("click",function(){J("previous");return false;});A(".pp_pic_holder .pp_next,.pp_pic_holder .pp_arrow_next").bind("click",function(){J("next");return false;});A(".hoverContainer").css({"margin-left":P.padding/2});if(!isSet){A(".hoverContainer,.pp_nav").hide();}if(A.browser.msie&&A.browser.version==6){A("body").addClass("ie6");A("select").css("visibility","hidden");}A("div.pp_overlay").css("opacity",0).fadeTo(P.animationSpeed,P.opacity,function(){A("div.pp_pic_holder").css("opacity",0).fadeIn(P.animationSpeed,function(){A("div.pp_pic_holder").attr("style","left:"+A("div.pp_pic_holder").css("left")+";top:"+A("div.pp_pic_holder").css("top")+";");});});}};})(jQuery);
|
readme.txt
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Gallery ===
|
2 |
+
Contributors: bestwebsoft
|
3 |
+
Donate link: http://bestwebsoft.com/
|
4 |
+
Tags: gallery, image, gallery image, album, foto, fotoalbum
|
5 |
+
Requires at least: 3.0
|
6 |
+
Tested up to: 3.2.1
|
7 |
+
Stable tag: 2011.1.01
|
8 |
+
|
9 |
+
This plugin allows you to implement gallery page into web site.
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
This plugin makes it possible to implement as many galleries as you want into your website. You can add multiple pictures and description to each gallery, show them all at one page, view each one separately. Moreover, it's possible to upload HQ pictures.
|
14 |
+
|
15 |
+
== Installation ==
|
16 |
+
|
17 |
+
1. Upload the folder `Gallery` to the directory `/wp-content/plugins/`.
|
18 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
19 |
+
3. Please check if you have the `gallery-template.php` template file and the `gallery-single-template.php` template file in your templates directory. If you are not able to find this file, then just copy it from `/wp-content/plugins/gallery/template/` directory to your templates directory.
|
20 |
+
|
21 |
+
== Frequently Asked Questions ==
|
22 |
+
|
23 |
+
= I cannot view my Gallery page =
|
24 |
+
|
25 |
+
1. First of all, you need to create your first Gallery page and choose 'Gallery' from the list of available templates (which will be used for displaying our gallery).
|
26 |
+
2. If you cannot find 'Gallery' from a list of available templates, then just copy it from `/wp-content/plugins/gallery/template/` directory to your templates directory.
|
27 |
+
|
28 |
+
= How to use plugin? =
|
29 |
+
|
30 |
+
1. Choose 'Add New' from the 'Galleries' menu and fill out your page.
|
31 |
+
2. Upload pictures by using the uploader in the bottom of the page.
|
32 |
+
3. Save the page.
|
33 |
+
|
34 |
+
= How to add an image? =
|
35 |
+
|
36 |
+
- Choose the necessary gallery from the list on the Galleries page in the admin section (or create a new gallery - choose 'Add New' from the 'Galleries' menu).
|
37 |
+
- Use the option 'Upload a file' available in the uploader, choose the necessary pictures and click 'Open'
|
38 |
+
- The files uploading process performs.
|
39 |
+
- Once all pictures are uploaded, please save the page.
|
40 |
+
- If you see the message 'Please enable JavaScript to use the file uploader.', you should enable JavaScript in your browser.
|
41 |
+
|
42 |
+
= How to add many image? =
|
43 |
+
|
44 |
+
The multiple files upload is supported by all modern browsers except Internet Explorer.
|
45 |
+
|
46 |
+
== Screenshots ==
|
47 |
+
|
48 |
+
1. Gallery Admin page.
|
49 |
+
2. Galleries page on frontend.
|
50 |
+
3. Single gallery page.
|
51 |
+
|
52 |
+
== Changelog ==
|
53 |
+
|
54 |
+
= 1.01 =
|
55 |
+
*The file uploader is added to the Galleries page in the admin section.
|
56 |
+
|
57 |
+
== Upgrade Notice ==
|
58 |
+
|
59 |
+
= 1.01 =
|
60 |
+
The file uploader is added to the Galleries page in the admin section.
|
screenshot-1.jpg
ADDED
Binary file
|
screenshot-2.jpg
ADDED
Binary file
|
screenshot-3.jpg
ADDED
Binary file
|
themplate/gallery-single-template.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php get_header(); ?>
|
2 |
+
<?php
|
3 |
+
global $post;
|
4 |
+
global $wpdb;
|
5 |
+
?>
|
6 |
+
<div id="container">
|
7 |
+
<div role="main" id="content">
|
8 |
+
<?php
|
9 |
+
global $post;
|
10 |
+
$args = array(
|
11 |
+
'post_type' => 'gallery',
|
12 |
+
'post_status' => 'publish',
|
13 |
+
'name' => substr(basename( $_SERVER['REQUEST_URI'] ), strpos( basename( $_SERVER['REQUEST_URI'] ), "=")),
|
14 |
+
'posts_per_page' => 1
|
15 |
+
);
|
16 |
+
$second_query = new WP_Query( $args );
|
17 |
+
if ($second_query->have_posts()) : while ($second_query->have_posts()) : $second_query->the_post(); ?>
|
18 |
+
<h1 class="home_page_title"><?php the_title(); ?></h1>
|
19 |
+
<div class="gallery_box_single">
|
20 |
+
<?php the_content(); ?>
|
21 |
+
<?php endwhile; else: ?>
|
22 |
+
<div class="gallery_box_single">
|
23 |
+
<p class="not_found">Sorry - nothing to found.</p>
|
24 |
+
<?php endif; ?>
|
25 |
+
<?php
|
26 |
+
$posts = get_posts(array(
|
27 |
+
"showposts" => -1,
|
28 |
+
"what_to_show" => "posts",
|
29 |
+
"post_status" => "inherit",
|
30 |
+
"post_type" => "attachment",
|
31 |
+
"orderby" => "menu_order ASC, ID ASC",
|
32 |
+
"post_mime_type"=> "image/jpeg,image/gif,image/jpg,image/png",
|
33 |
+
"post_parent" => $post->ID
|
34 |
+
));
|
35 |
+
if( count($posts) > 0 ) {
|
36 |
+
?>
|
37 |
+
<ul class="gallery clearfix">
|
38 |
+
<?php foreach($posts as $attachment) {
|
39 |
+
$image_attributes = wp_get_attachment_image_src( $attachment->ID, 'foto-thumb' );
|
40 |
+
$image_attributes_large = wp_get_attachment_image_src( $attachment->ID, 'large' );
|
41 |
+
?>
|
42 |
+
<li>
|
43 |
+
<a rel="prettyPhoto[gallery]" href="<?php echo $image_attributes_large[0]; ?>">
|
44 |
+
<img style="width:157px;height:116px;" alt="" title="" src="<?php echo $image_attributes[0]; ?>" />
|
45 |
+
</a>
|
46 |
+
</li>
|
47 |
+
<?php } } ?>
|
48 |
+
</ul>
|
49 |
+
<div class="clear"></div>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<?php get_sidebar(); ?>
|
54 |
+
<script type="text/javascript">
|
55 |
+
$(document).ready(function(){
|
56 |
+
$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'dark_square'});
|
57 |
+
});
|
58 |
+
</script>
|
59 |
+
<?php get_footer(); ?>
|
themplate/gallery-template.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Template Name: Gallery Template
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
|
7 |
+
<?php get_header(); ?>
|
8 |
+
<div id="container">
|
9 |
+
<div role="main" id="content">
|
10 |
+
<h1 class="home_page_title"><?php the_title(); ?></h1>
|
11 |
+
<div class="gallery_box">
|
12 |
+
<ul>
|
13 |
+
<?php
|
14 |
+
global $post;
|
15 |
+
global $wpdb;
|
16 |
+
global $wp_query;
|
17 |
+
$paged = $wp_query->query_vars["paged"];
|
18 |
+
$permalink = get_permalink();
|
19 |
+
if( substr( $permalink, strlen( $permalink ) -1 ) != "/" )
|
20 |
+
{
|
21 |
+
if( strpos( $permalink, "?" ) !== false ) {
|
22 |
+
$permalink = substr( $permalink, 0, strpos( $permalink, "?" ) -1 )."/";
|
23 |
+
}
|
24 |
+
else {
|
25 |
+
$permalink .= "/";
|
26 |
+
}
|
27 |
+
}
|
28 |
+
$count = 0;
|
29 |
+
$args = array(
|
30 |
+
'post_type' => 'gallery',
|
31 |
+
'post_status' => 'publish',
|
32 |
+
'orderby' => 'post_date',
|
33 |
+
'posts_per_page' => -1
|
34 |
+
);
|
35 |
+
$second_query = new WP_Query( $args );
|
36 |
+
$count_all_albums = count($second_query->posts);
|
37 |
+
$per_page = 5;
|
38 |
+
if( $paged != 0 )
|
39 |
+
$start = $per_page * ($paged - 1);
|
40 |
+
else
|
41 |
+
$start = $per_page * $paged;
|
42 |
+
if ($second_query->have_posts()) : while ($second_query->have_posts()) : $second_query->the_post();
|
43 |
+
if( $count < $start ) {
|
44 |
+
$count++;
|
45 |
+
continue;
|
46 |
+
}
|
47 |
+
if( ( $count - $start ) > $per_page - 1 )
|
48 |
+
break;
|
49 |
+
|
50 |
+
$attachments = get_children( 'post_parent='.$post->ID.'&post_type=attachment&post_mime_type=image&numberposts=1' );
|
51 |
+
$id = key($attachments);
|
52 |
+
$image_attributes = wp_get_attachment_image_src( $id, 'album-thumb' );
|
53 |
+
$count++;
|
54 |
+
?>
|
55 |
+
<li>
|
56 |
+
<img style="width:120px;" alt="<?php echo $post->post_name; ?>" title="<?php echo $post->post_name; ?>" src="<?php echo $image_attributes[0]; ?>" />
|
57 |
+
<div class="gallery_detail_box">
|
58 |
+
<div><?php echo $post->post_title; ?></div>
|
59 |
+
<div><?php echo the_excerpt_max_charlength(100); ?></div>
|
60 |
+
<a href="<?php echo $permalink; echo basename( get_permalink( $post->ID ) ); ?>">See foto's »</a>
|
61 |
+
</div>
|
62 |
+
<div class="clear"></div>
|
63 |
+
</li>
|
64 |
+
<?php endwhile; endif; wp_reset_query(); ?>
|
65 |
+
</ul>
|
66 |
+
<?php
|
67 |
+
if( $paged == 0 )
|
68 |
+
$paged = 1;
|
69 |
+
$pages = intval ( $count_all_albums/$per_page );
|
70 |
+
if( $count_all_albums % $per_page > 0 )
|
71 |
+
$pages +=1;
|
72 |
+
$showitems = 5;
|
73 |
+
$range = 100;
|
74 |
+
if( ! $pages ) {
|
75 |
+
$pages = 1;
|
76 |
+
}
|
77 |
+
if( 1 != $pages ) {
|
78 |
+
echo "</div><div class='clear'></div><div class='pagination'>";
|
79 |
+
for ( $i = 1; $i <= $pages; $i++ ) {
|
80 |
+
if ( 1 != $pages && ( !( $i >= $paged + $range + 1 || $i <= $paged - $range - 1 ) || $pages <= $showitems ) ) {
|
81 |
+
echo ( $paged == $i ) ? "<span class='current'>". $i ."</span>":"<a href='". get_pagenum_link($i) ."' class='inactive' >". $i ."</a>";
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
echo "<div class='clear'></div></div>\n";
|
86 |
+
} else {?>
|
87 |
+
</div>
|
88 |
+
<?php } ?>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
<?php get_sidebar(); ?>
|
92 |
+
<?php get_footer(); ?>
|
upload/fileuploader.css
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.qq-uploader { position:relative; width: 100%;}
|
2 |
+
|
3 |
+
.qq-upload-button {
|
4 |
+
display:block; /* or inline-block */
|
5 |
+
width: 105px; padding: 7px 0; text-align:center;
|
6 |
+
background:#880000; border-bottom:1px solid #ddd;color:#fff;
|
7 |
+
}
|
8 |
+
.qq-upload-button-hover {background:#cc0000;}
|
9 |
+
.qq-upload-button-focus {outline:1px dotted black;}
|
10 |
+
|
11 |
+
.qq-upload-drop-area {
|
12 |
+
position:absolute; top:0; left:0; width:100%; height:100%; min-height: 70px; z-index:2;
|
13 |
+
background:#FF9797; text-align:center;
|
14 |
+
}
|
15 |
+
.qq-upload-drop-area span {
|
16 |
+
display:block; position:absolute; top: 50%; width:100%; margin-top:-8px; font-size:16px;
|
17 |
+
}
|
18 |
+
.qq-upload-drop-area-active {background:#FF7171;}
|
19 |
+
|
20 |
+
.qq-upload-list {margin:15px 35px; padding:0; list-style:disc;}
|
21 |
+
.qq-upload-list li { margin:0; padding:0; line-height:15px; font-size:12px;}
|
22 |
+
.qq-upload-file, .qq-upload-spinner, .qq-upload-size, .qq-upload-cancel, .qq-upload-failed-text {
|
23 |
+
margin-right: 7px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.qq-upload-file {}
|
27 |
+
.qq-upload-spinner {display:inline-block; background: url("loading.gif"); width:15px; height:15px; vertical-align:text-bottom;}
|
28 |
+
.qq-upload-size,.qq-upload-cancel {font-size:11px;}
|
29 |
+
|
30 |
+
.qq-upload-failed-text {display:none;}
|
31 |
+
.qq-upload-fail .qq-upload-failed-text {display:inline;}
|
32 |
+
|
33 |
+
ul#files {
|
34 |
+
list-style: none outside none;
|
35 |
+
margin: 0;
|
36 |
+
padding: 0;
|
37 |
+
}
|
38 |
+
ul#files li {
|
39 |
+
float: left;
|
40 |
+
margin-bottom: 2px;
|
41 |
+
margin-right: 10px;
|
42 |
+
padding: 10px;
|
43 |
+
width: 200px;
|
44 |
+
}
|
45 |
+
ul#files li img {
|
46 |
+
max-height: 150px;
|
47 |
+
max-width: 180px;
|
48 |
+
}
|
49 |
+
.success {
|
50 |
+
background: none repeat scroll 0 0 #99F099;
|
51 |
+
border: 1px solid #339933;
|
52 |
+
}
|
53 |
+
|
54 |
+
.gallery li {
|
55 |
+
border: 1px solid #BDBDBD;
|
56 |
+
float: left;
|
57 |
+
height: 117px;
|
58 |
+
margin-bottom: 6px;
|
59 |
+
margin-right: 6px;
|
60 |
+
padding: 5px;
|
61 |
+
width: 157px;
|
62 |
+
}
|
63 |
+
|
64 |
+
.gallery li {
|
65 |
+
border: 1px solid #BDBDBD;
|
66 |
+
float: left;
|
67 |
+
height: 150px;
|
68 |
+
padding: 5px;
|
69 |
+
margin:15px 6px 15px 0;
|
70 |
+
width: 150px;
|
71 |
+
}
|
72 |
+
|
73 |
+
.gallery .delete {
|
74 |
+
padding-top:2px;
|
75 |
+
text-align:center;
|
76 |
+
}
|
upload/fileuploader.js
ADDED
@@ -0,0 +1,1247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* http://github.com/valums/file-uploader
|
3 |
+
*
|
4 |
+
* Multiple file upload component with progress-bar, drag-and-drop.
|
5 |
+
* © 2010 Andrew Valums ( andrew(at)valums.com )
|
6 |
+
*
|
7 |
+
* Licensed under GNU GPL 2 or later, see license.txt.
|
8 |
+
*/
|
9 |
+
|
10 |
+
//
|
11 |
+
// Helper functions
|
12 |
+
//
|
13 |
+
|
14 |
+
var qq = qq || {};
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Adds all missing properties from second obj to first obj
|
18 |
+
*/
|
19 |
+
qq.extend = function(first, second){
|
20 |
+
for (var prop in second){
|
21 |
+
first[prop] = second[prop];
|
22 |
+
}
|
23 |
+
};
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Searches for a given element in the array, returns -1 if it is not present.
|
27 |
+
* @param {Number} [from] The index at which to begin the search
|
28 |
+
*/
|
29 |
+
qq.indexOf = function(arr, elt, from){
|
30 |
+
if (arr.indexOf) return arr.indexOf(elt, from);
|
31 |
+
|
32 |
+
from = from || 0;
|
33 |
+
var len = arr.length;
|
34 |
+
|
35 |
+
if (from < 0) from += len;
|
36 |
+
|
37 |
+
for (; from < len; from++){
|
38 |
+
if (from in arr && arr[from] === elt){
|
39 |
+
return from;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
return -1;
|
43 |
+
};
|
44 |
+
|
45 |
+
qq.getUniqueId = (function(){
|
46 |
+
var id = 0;
|
47 |
+
return function(){ return id++; };
|
48 |
+
})();
|
49 |
+
|
50 |
+
//
|
51 |
+
// Events
|
52 |
+
|
53 |
+
qq.attach = function(element, type, fn){
|
54 |
+
if (element.addEventListener){
|
55 |
+
element.addEventListener(type, fn, false);
|
56 |
+
} else if (element.attachEvent){
|
57 |
+
element.attachEvent('on' + type, fn);
|
58 |
+
}
|
59 |
+
};
|
60 |
+
qq.detach = function(element, type, fn){
|
61 |
+
if (element.removeEventListener){
|
62 |
+
element.removeEventListener(type, fn, false);
|
63 |
+
} else if (element.attachEvent){
|
64 |
+
element.detachEvent('on' + type, fn);
|
65 |
+
}
|
66 |
+
};
|
67 |
+
|
68 |
+
qq.preventDefault = function(e){
|
69 |
+
if (e.preventDefault){
|
70 |
+
e.preventDefault();
|
71 |
+
} else{
|
72 |
+
e.returnValue = false;
|
73 |
+
}
|
74 |
+
};
|
75 |
+
|
76 |
+
//
|
77 |
+
// Node manipulations
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Insert node a before node b.
|
81 |
+
*/
|
82 |
+
qq.insertBefore = function(a, b){
|
83 |
+
b.parentNode.insertBefore(a, b);
|
84 |
+
};
|
85 |
+
qq.remove = function(element){
|
86 |
+
element.parentNode.removeChild(element);
|
87 |
+
};
|
88 |
+
|
89 |
+
qq.contains = function(parent, descendant){
|
90 |
+
// compareposition returns false in this case
|
91 |
+
if (parent == descendant) return true;
|
92 |
+
|
93 |
+
if (parent.contains){
|
94 |
+
return parent.contains(descendant);
|
95 |
+
} else {
|
96 |
+
return !!(descendant.compareDocumentPosition(parent) & 8);
|
97 |
+
}
|
98 |
+
};
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Creates and returns element from html string
|
102 |
+
* Uses innerHTML to create an element
|
103 |
+
*/
|
104 |
+
qq.toElement = (function(){
|
105 |
+
var div = document.createElement('div');
|
106 |
+
return function(html){
|
107 |
+
div.innerHTML = html;
|
108 |
+
var element = div.firstChild;
|
109 |
+
div.removeChild(element);
|
110 |
+
return element;
|
111 |
+
};
|
112 |
+
})();
|
113 |
+
|
114 |
+
//
|
115 |
+
// Node properties and attributes
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Sets styles for an element.
|
119 |
+
* Fixes opacity in IE6-8.
|
120 |
+
*/
|
121 |
+
qq.css = function(element, styles){
|
122 |
+
if (styles.opacity != null){
|
123 |
+
if (typeof element.style.opacity != 'string' && typeof(element.filters) != 'undefined'){
|
124 |
+
styles.filter = 'alpha(opacity=' + Math.round(100 * styles.opacity) + ')';
|
125 |
+
}
|
126 |
+
}
|
127 |
+
qq.extend(element.style, styles);
|
128 |
+
};
|
129 |
+
qq.hasClass = function(element, name){
|
130 |
+
var re = new RegExp('(^| )' + name + '( |$)');
|
131 |
+
return re.test(element.className);
|
132 |
+
};
|
133 |
+
qq.addClass = function(element, name){
|
134 |
+
if (!qq.hasClass(element, name)){
|
135 |
+
element.className += ' ' + name;
|
136 |
+
}
|
137 |
+
};
|
138 |
+
qq.removeClass = function(element, name){
|
139 |
+
var re = new RegExp('(^| )' + name + '( |$)');
|
140 |
+
element.className = element.className.replace(re, ' ').replace(/^\s+|\s+$/g, "");
|
141 |
+
};
|
142 |
+
qq.setText = function(element, text){
|
143 |
+
element.innerText = text;
|
144 |
+
element.textContent = text;
|
145 |
+
};
|
146 |
+
|
147 |
+
//
|
148 |
+
// Selecting elements
|
149 |
+
|
150 |
+
qq.children = function(element){
|
151 |
+
var children = [],
|
152 |
+
child = element.firstChild;
|
153 |
+
|
154 |
+
while (child){
|
155 |
+
if (child.nodeType == 1){
|
156 |
+
children.push(child);
|
157 |
+
}
|
158 |
+
child = child.nextSibling;
|
159 |
+
}
|
160 |
+
|
161 |
+
return children;
|
162 |
+
};
|
163 |
+
|
164 |
+
qq.getByClass = function(element, className){
|
165 |
+
if (element.querySelectorAll){
|
166 |
+
return element.querySelectorAll('.' + className);
|
167 |
+
}
|
168 |
+
|
169 |
+
var result = [];
|
170 |
+
var candidates = element.getElementsByTagName("*");
|
171 |
+
var len = candidates.length;
|
172 |
+
|
173 |
+
for (var i = 0; i < len; i++){
|
174 |
+
if (qq.hasClass(candidates[i], className)){
|
175 |
+
result.push(candidates[i]);
|
176 |
+
}
|
177 |
+
}
|
178 |
+
return result;
|
179 |
+
};
|
180 |
+
|
181 |
+
/**
|
182 |
+
* obj2url() takes a json-object as argument and generates
|
183 |
+
* a querystring. pretty much like jQuery.param()
|
184 |
+
*
|
185 |
+
* how to use:
|
186 |
+
*
|
187 |
+
* `qq.obj2url({a:'b',c:'d'},'http://any.url/upload?otherParam=value');`
|
188 |
+
*
|
189 |
+
* will result in:
|
190 |
+
*
|
191 |
+
* `http://any.url/upload?otherParam=value&a=b&c=d`
|
192 |
+
*
|
193 |
+
* @param Object JSON-Object
|
194 |
+
* @param String current querystring-part
|
195 |
+
* @return String encoded querystring
|
196 |
+
*/
|
197 |
+
qq.obj2url = function(obj, temp, prefixDone){
|
198 |
+
var uristrings = [],
|
199 |
+
prefix = '&',
|
200 |
+
add = function(nextObj, i){
|
201 |
+
var nextTemp = temp
|
202 |
+
? (/\[\]$/.test(temp)) // prevent double-encoding
|
203 |
+
? temp
|
204 |
+
: temp+'['+i+']'
|
205 |
+
: i;
|
206 |
+
if ((nextTemp != 'undefined') && (i != 'undefined')) {
|
207 |
+
uristrings.push(
|
208 |
+
(typeof nextObj === 'object')
|
209 |
+
? qq.obj2url(nextObj, nextTemp, true)
|
210 |
+
: (Object.prototype.toString.call(nextObj) === '[object Function]')
|
211 |
+
? encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj())
|
212 |
+
: encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj)
|
213 |
+
);
|
214 |
+
}
|
215 |
+
};
|
216 |
+
|
217 |
+
if (!prefixDone && temp) {
|
218 |
+
prefix = (/\?/.test(temp)) ? (/\?$/.test(temp)) ? '' : '&' : '?';
|
219 |
+
uristrings.push(temp);
|
220 |
+
uristrings.push(qq.obj2url(obj));
|
221 |
+
} else if ((Object.prototype.toString.call(obj) === '[object Array]') && (typeof obj != 'undefined') ) {
|
222 |
+
// we wont use a for-in-loop on an array (performance)
|
223 |
+
for (var i = 0, len = obj.length; i < len; ++i){
|
224 |
+
add(obj[i], i);
|
225 |
+
}
|
226 |
+
} else if ((typeof obj != 'undefined') && (obj !== null) && (typeof obj === "object")){
|
227 |
+
// for anything else but a scalar, we will use for-in-loop
|
228 |
+
for (var i in obj){
|
229 |
+
add(obj[i], i);
|
230 |
+
}
|
231 |
+
} else {
|
232 |
+
uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj));
|
233 |
+
}
|
234 |
+
|
235 |
+
return uristrings.join(prefix)
|
236 |
+
.replace(/^&/, '')
|
237 |
+
.replace(/%20/g, '+');
|
238 |
+
};
|
239 |
+
|
240 |
+
//
|
241 |
+
//
|
242 |
+
// Uploader Classes
|
243 |
+
//
|
244 |
+
//
|
245 |
+
|
246 |
+
var qq = qq || {};
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Creates upload button, validates upload, but doesn't create file list or dd.
|
250 |
+
*/
|
251 |
+
qq.FileUploaderBasic = function(o){
|
252 |
+
this._options = {
|
253 |
+
// set to true to see the server response
|
254 |
+
debug: false,
|
255 |
+
action: '/server/upload',
|
256 |
+
params: {},
|
257 |
+
button: null,
|
258 |
+
multiple: true,
|
259 |
+
maxConnections: 3,
|
260 |
+
// validation
|
261 |
+
allowedExtensions: [],
|
262 |
+
sizeLimit: 0,
|
263 |
+
minSizeLimit: 0,
|
264 |
+
// events
|
265 |
+
// return false to cancel submit
|
266 |
+
onSubmit: function(id, fileName){},
|
267 |
+
onProgress: function(id, fileName, loaded, total){},
|
268 |
+
onComplete: function(id, fileName, responseJSON){},
|
269 |
+
onCancel: function(id, fileName){},
|
270 |
+
// messages
|
271 |
+
messages: {
|
272 |
+
typeError: "{file} has invalid extension. Only {extensions} are allowed.",
|
273 |
+
sizeError: "{file} is too large, maximum file size is {sizeLimit}.",
|
274 |
+
minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.",
|
275 |
+
emptyError: "{file} is empty, please select files again without it.",
|
276 |
+
onLeave: "The files are being uploaded, if you leave now the upload will be cancelled."
|
277 |
+
},
|
278 |
+
showMessage: function(message){
|
279 |
+
alert(message);
|
280 |
+
}
|
281 |
+
};
|
282 |
+
qq.extend(this._options, o);
|
283 |
+
|
284 |
+
// number of files being uploaded
|
285 |
+
this._filesInProgress = 0;
|
286 |
+
this._handler = this._createUploadHandler();
|
287 |
+
|
288 |
+
if (this._options.button){
|
289 |
+
this._button = this._createUploadButton(this._options.button);
|
290 |
+
}
|
291 |
+
|
292 |
+
this._preventLeaveInProgress();
|
293 |
+
};
|
294 |
+
|
295 |
+
qq.FileUploaderBasic.prototype = {
|
296 |
+
setParams: function(params){
|
297 |
+
this._options.params = params;
|
298 |
+
},
|
299 |
+
getInProgress: function(){
|
300 |
+
return this._filesInProgress;
|
301 |
+
},
|
302 |
+
_createUploadButton: function(element){
|
303 |
+
var self = this;
|
304 |
+
|
305 |
+
return new qq.UploadButton({
|
306 |
+
element: element,
|
307 |
+
multiple: this._options.multiple && qq.UploadHandlerXhr.isSupported(),
|
308 |
+
onChange: function(input){
|
309 |
+
self._onInputChange(input);
|
310 |
+
}
|
311 |
+
});
|
312 |
+
},
|
313 |
+
_createUploadHandler: function(){
|
314 |
+
var self = this,
|
315 |
+
handlerClass;
|
316 |
+
|
317 |
+
if(qq.UploadHandlerXhr.isSupported()){
|
318 |
+
handlerClass = 'UploadHandlerXhr';
|
319 |
+
} else {
|
320 |
+
handlerClass = 'UploadHandlerForm';
|
321 |
+
}
|
322 |
+
|
323 |
+
var handler = new qq[handlerClass]({
|
324 |
+
debug: this._options.debug,
|
325 |
+
action: this._options.action,
|
326 |
+
maxConnections: this._options.maxConnections,
|
327 |
+
onProgress: function(id, fileName, loaded, total){
|
328 |
+
self._onProgress(id, fileName, loaded, total);
|
329 |
+
self._options.onProgress(id, fileName, loaded, total);
|
330 |
+
},
|
331 |
+
onComplete: function(id, fileName, result){
|
332 |
+
self._onComplete(id, fileName, result);
|
333 |
+
self._options.onComplete(id, fileName, result);
|
334 |
+
},
|
335 |
+
onCancel: function(id, fileName){
|
336 |
+
self._onCancel(id, fileName);
|
337 |
+
self._options.onCancel(id, fileName);
|
338 |
+
}
|
339 |
+
});
|
340 |
+
|
341 |
+
return handler;
|
342 |
+
},
|
343 |
+
_preventLeaveInProgress: function(){
|
344 |
+
var self = this;
|
345 |
+
|
346 |
+
qq.attach(window, 'beforeunload', function(e){
|
347 |
+
if (!self._filesInProgress){return;}
|
348 |
+
|
349 |
+
var e = e || window.event;
|
350 |
+
// for ie, ff
|
351 |
+
e.returnValue = self._options.messages.onLeave;
|
352 |
+
// for webkit
|
353 |
+
return self._options.messages.onLeave;
|
354 |
+
});
|
355 |
+
},
|
356 |
+
_onSubmit: function(id, fileName){
|
357 |
+
this._filesInProgress++;
|
358 |
+
},
|
359 |
+
_onProgress: function(id, fileName, loaded, total){
|
360 |
+
},
|
361 |
+
_onComplete: function(id, fileName, result){
|
362 |
+
this._filesInProgress--;
|
363 |
+
if (result.error){
|
364 |
+
this._options.showMessage(result.error);
|
365 |
+
}
|
366 |
+
},
|
367 |
+
_onCancel: function(id, fileName){
|
368 |
+
this._filesInProgress--;
|
369 |
+
},
|
370 |
+
_onInputChange: function(input){
|
371 |
+
if (this._handler instanceof qq.UploadHandlerXhr){
|
372 |
+
this._uploadFileList(input.files);
|
373 |
+
} else {
|
374 |
+
if (this._validateFile(input)){
|
375 |
+
this._uploadFile(input);
|
376 |
+
}
|
377 |
+
}
|
378 |
+
this._button.reset();
|
379 |
+
},
|
380 |
+
_uploadFileList: function(files){
|
381 |
+
for (var i=0; i<files.length; i++){
|
382 |
+
if ( !this._validateFile(files[i])){
|
383 |
+
return;
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
for (var i=0; i<files.length; i++){
|
388 |
+
this._uploadFile(files[i]);
|
389 |
+
}
|
390 |
+
},
|
391 |
+
_uploadFile: function(fileContainer){
|
392 |
+
var id = this._handler.add(fileContainer);
|
393 |
+
var fileName = this._handler.getName(id);
|
394 |
+
|
395 |
+
if (this._options.onSubmit(id, fileName) !== false){
|
396 |
+
this._onSubmit(id, fileName);
|
397 |
+
this._handler.upload(id, this._options.params);
|
398 |
+
}
|
399 |
+
},
|
400 |
+
_validateFile: function(file){
|
401 |
+
var name, size;
|
402 |
+
|
403 |
+
if (file.value){
|
404 |
+
// it is a file input
|
405 |
+
// get input value and remove path to normalize
|
406 |
+
name = file.value.replace(/.*(\/|\\)/, "");
|
407 |
+
} else {
|
408 |
+
// fix missing properties in Safari
|
409 |
+
name = file.fileName != null ? file.fileName : file.name;
|
410 |
+
size = file.fileSize != null ? file.fileSize : file.size;
|
411 |
+
}
|
412 |
+
|
413 |
+
if (! this._isAllowedExtension(name)){
|
414 |
+
this._error('typeError', name);
|
415 |
+
return false;
|
416 |
+
|
417 |
+
} else if (size === 0){
|
418 |
+
this._error('emptyError', name);
|
419 |
+
return false;
|
420 |
+
|
421 |
+
} else if (size && this._options.sizeLimit && size > this._options.sizeLimit){
|
422 |
+
this._error('sizeError', name);
|
423 |
+
return false;
|
424 |
+
|
425 |
+
} else if (size && size < this._options.minSizeLimit){
|
426 |
+
this._error('minSizeError', name);
|
427 |
+
return false;
|
428 |
+
}
|
429 |
+
|
430 |
+
return true;
|
431 |
+
},
|
432 |
+
_error: function(code, fileName){
|
433 |
+
var message = this._options.messages[code];
|
434 |
+
function r(name, replacement){ message = message.replace(name, replacement); }
|
435 |
+
|
436 |
+
r('{file}', this._formatFileName(fileName));
|
437 |
+
r('{extensions}', this._options.allowedExtensions.join(', '));
|
438 |
+
r('{sizeLimit}', this._formatSize(this._options.sizeLimit));
|
439 |
+
r('{minSizeLimit}', this._formatSize(this._options.minSizeLimit));
|
440 |
+
|
441 |
+
this._options.showMessage(message);
|
442 |
+
},
|
443 |
+
_formatFileName: function(name){
|
444 |
+
if (name.length > 33){
|
445 |
+
name = name.slice(0, 19) + '...' + name.slice(-13);
|
446 |
+
}
|
447 |
+
return name;
|
448 |
+
},
|
449 |
+
_isAllowedExtension: function(fileName){
|
450 |
+
var ext = (-1 !== fileName.indexOf('.')) ? fileName.replace(/.*[.]/, '').toLowerCase() : '';
|
451 |
+
var allowed = this._options.allowedExtensions;
|
452 |
+
|
453 |
+
if (!allowed.length){return true;}
|
454 |
+
|
455 |
+
for (var i=0; i<allowed.length; i++){
|
456 |
+
if (allowed[i].toLowerCase() == ext){ return true;}
|
457 |
+
}
|
458 |
+
|
459 |
+
return false;
|
460 |
+
},
|
461 |
+
_formatSize: function(bytes){
|
462 |
+
var i = -1;
|
463 |
+
do {
|
464 |
+
bytes = bytes / 1024;
|
465 |
+
i++;
|
466 |
+
} while (bytes > 99);
|
467 |
+
|
468 |
+
return Math.max(bytes, 0.1).toFixed(1) + ['kB', 'MB', 'GB', 'TB', 'PB', 'EB'][i];
|
469 |
+
}
|
470 |
+
};
|
471 |
+
|
472 |
+
|
473 |
+
/**
|
474 |
+
* Class that creates upload widget with drag-and-drop and file list
|
475 |
+
* @inherits qq.FileUploaderBasic
|
476 |
+
*/
|
477 |
+
qq.FileUploader = function(o){
|
478 |
+
// call parent constructor
|
479 |
+
qq.FileUploaderBasic.apply(this, arguments);
|
480 |
+
|
481 |
+
// additional options
|
482 |
+
qq.extend(this._options, {
|
483 |
+
element: null,
|
484 |
+
// if set, will be used instead of qq-upload-list in template
|
485 |
+
listElement: null,
|
486 |
+
|
487 |
+
template: '<div class="qq-uploader">' +
|
488 |
+
'<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>' +
|
489 |
+
'<div class="qq-upload-button">Upload a file</div>' +
|
490 |
+
'<ul class="qq-upload-list"></ul>' +
|
491 |
+
'</div>',
|
492 |
+
|
493 |
+
// template for one item in file list
|
494 |
+
fileTemplate: '<li>' +
|
495 |
+
'<span class="qq-upload-file"></span>' +
|
496 |
+
'<span class="qq-upload-spinner"></span>' +
|
497 |
+
'<span class="qq-upload-size"></span>' +
|
498 |
+
'<a class="qq-upload-cancel" href="#">Cancel</a>' +
|
499 |
+
'<span class="qq-upload-failed-text">Failed</span>' +
|
500 |
+
'</li>',
|
501 |
+
|
502 |
+
classes: {
|
503 |
+
// used to get elements from templates
|
504 |
+
button: 'qq-upload-button',
|
505 |
+
drop: 'qq-upload-drop-area',
|
506 |
+
dropActive: 'qq-upload-drop-area-active',
|
507 |
+
list: 'qq-upload-list',
|
508 |
+
|
509 |
+
file: 'qq-upload-file',
|
510 |
+
spinner: 'qq-upload-spinner',
|
511 |
+
size: 'qq-upload-size',
|
512 |
+
cancel: 'qq-upload-cancel',
|
513 |
+
|
514 |
+
// added to list item when upload completes
|
515 |
+
// used in css to hide progress spinner
|
516 |
+
success: 'qq-upload-success',
|
517 |
+
fail: 'qq-upload-fail'
|
518 |
+
}
|
519 |
+
});
|
520 |
+
// overwrite options with user supplied
|
521 |
+
qq.extend(this._options, o);
|
522 |
+
|
523 |
+
this._element = this._options.element;
|
524 |
+
this._element.innerHTML = this._options.template;
|
525 |
+
this._listElement = this._options.listElement || this._find(this._element, 'list');
|
526 |
+
|
527 |
+
this._classes = this._options.classes;
|
528 |
+
|
529 |
+
this._button = this._createUploadButton(this._find(this._element, 'button'));
|
530 |
+
|
531 |
+
this._bindCancelEvent();
|
532 |
+
this._setupDragDrop();
|
533 |
+
};
|
534 |
+
|
535 |
+
// inherit from Basic Uploader
|
536 |
+
qq.extend(qq.FileUploader.prototype, qq.FileUploaderBasic.prototype);
|
537 |
+
|
538 |
+
qq.extend(qq.FileUploader.prototype, {
|
539 |
+
/**
|
540 |
+
* Gets one of the elements listed in this._options.classes
|
541 |
+
**/
|
542 |
+
_find: function(parent, type){
|
543 |
+
var element = qq.getByClass(parent, this._options.classes[type])[0];
|
544 |
+
if (!element){
|
545 |
+
throw new Error('element not found ' + type);
|
546 |
+
}
|
547 |
+
|
548 |
+
return element;
|
549 |
+
},
|
550 |
+
_setupDragDrop: function(){
|
551 |
+
var self = this,
|
552 |
+
dropArea = this._find(this._element, 'drop');
|
553 |
+
|
554 |
+
var dz = new qq.UploadDropZone({
|
555 |
+
element: dropArea,
|
556 |
+
onEnter: function(e){
|
557 |
+
qq.addClass(dropArea, self._classes.dropActive);
|
558 |
+
e.stopPropagation();
|
559 |
+
},
|
560 |
+
onLeave: function(e){
|
561 |
+
e.stopPropagation();
|
562 |
+
},
|
563 |
+
onLeaveNotDescendants: function(e){
|
564 |
+
qq.removeClass(dropArea, self._classes.dropActive);
|
565 |
+
},
|
566 |
+
onDrop: function(e){
|
567 |
+
dropArea.style.display = 'none';
|
568 |
+
qq.removeClass(dropArea, self._classes.dropActive);
|
569 |
+
self._uploadFileList(e.dataTransfer.files);
|
570 |
+
}
|
571 |
+
});
|
572 |
+
|
573 |
+
dropArea.style.display = 'none';
|
574 |
+
|
575 |
+
qq.attach(document, 'dragenter', function(e){
|
576 |
+
if (!dz._isValidFileDrag(e)) return;
|
577 |
+
|
578 |
+
dropArea.style.display = 'block';
|
579 |
+
});
|
580 |
+
qq.attach(document, 'dragleave', function(e){
|
581 |
+
if (!dz._isValidFileDrag(e)) return;
|
582 |
+
|
583 |
+
var relatedTarget = document.elementFromPoint(e.clientX, e.clientY);
|
584 |
+
// only fire when leaving document out
|
585 |
+
if ( ! relatedTarget || relatedTarget.nodeName == "HTML"){
|
586 |
+
dropArea.style.display = 'none';
|
587 |
+
}
|
588 |
+
});
|
589 |
+
},
|
590 |
+
_onSubmit: function(id, fileName){
|
591 |
+
qq.FileUploaderBasic.prototype._onSubmit.apply(this, arguments);
|
592 |
+
this._addToList(id, fileName);
|
593 |
+
},
|
594 |
+
_onProgress: function(id, fileName, loaded, total){
|
595 |
+
qq.FileUploaderBasic.prototype._onProgress.apply(this, arguments);
|
596 |
+
|
597 |
+
var item = this._getItemByFileId(id);
|
598 |
+
var size = this._find(item, 'size');
|
599 |
+
size.style.display = 'inline';
|
600 |
+
|
601 |
+
var text;
|
602 |
+
if (loaded != total){
|
603 |
+
text = Math.round(loaded / total * 100) + '% from ' + this._formatSize(total);
|
604 |
+
} else {
|
605 |
+
text = this._formatSize(total);
|
606 |
+
}
|
607 |
+
|
608 |
+
qq.setText(size, text);
|
609 |
+
},
|
610 |
+
_onComplete: function(id, fileName, result){
|
611 |
+
qq.FileUploaderBasic.prototype._onComplete.apply(this, arguments);
|
612 |
+
|
613 |
+
// mark completed
|
614 |
+
var item = this._getItemByFileId(id);
|
615 |
+
qq.remove(this._find(item, 'cancel'));
|
616 |
+
qq.remove(this._find(item, 'spinner'));
|
617 |
+
|
618 |
+
if (result.success){
|
619 |
+
qq.addClass(item, this._classes.success);
|
620 |
+
} else {
|
621 |
+
qq.addClass(item, this._classes.fail);
|
622 |
+
}
|
623 |
+
},
|
624 |
+
_addToList: function(id, fileName){
|
625 |
+
var item = qq.toElement(this._options.fileTemplate);
|
626 |
+
item.qqFileId = id;
|
627 |
+
|
628 |
+
var fileElement = this._find(item, 'file');
|
629 |
+
qq.setText(fileElement, this._formatFileName(fileName));
|
630 |
+
this._find(item, 'size').style.display = 'none';
|
631 |
+
|
632 |
+
this._listElement.appendChild(item);
|
633 |
+
},
|
634 |
+
_getItemByFileId: function(id){
|
635 |
+
var item = this._listElement.firstChild;
|
636 |
+
|
637 |
+
// there can't be txt nodes in dynamically created list
|
638 |
+
// and we can use nextSibling
|
639 |
+
while (item){
|
640 |
+
if (item.qqFileId == id) return item;
|
641 |
+
item = item.nextSibling;
|
642 |
+
}
|
643 |
+
},
|
644 |
+
/**
|
645 |
+
* delegate click event for cancel link
|
646 |
+
**/
|
647 |
+
_bindCancelEvent: function(){
|
648 |
+
var self = this,
|
649 |
+
list = this._listElement;
|
650 |
+
|
651 |
+
qq.attach(list, 'click', function(e){
|
652 |
+
e = e || window.event;
|
653 |
+
var target = e.target || e.srcElement;
|
654 |
+
|
655 |
+
if (qq.hasClass(target, self._classes.cancel)){
|
656 |
+
qq.preventDefault(e);
|
657 |
+
|
658 |
+
var item = target.parentNode;
|
659 |
+
self._handler.cancel(item.qqFileId);
|
660 |
+
qq.remove(item);
|
661 |
+
}
|
662 |
+
});
|
663 |
+
}
|
664 |
+
});
|
665 |
+
|
666 |
+
qq.UploadDropZone = function(o){
|
667 |
+
this._options = {
|
668 |
+
element: null,
|
669 |
+
onEnter: function(e){},
|
670 |
+
onLeave: function(e){},
|
671 |
+
// is not fired when leaving element by hovering descendants
|
672 |
+
onLeaveNotDescendants: function(e){},
|
673 |
+
onDrop: function(e){}
|
674 |
+
};
|
675 |
+
qq.extend(this._options, o);
|
676 |
+
|
677 |
+
this._element = this._options.element;
|
678 |
+
|
679 |
+
this._disableDropOutside();
|
680 |
+
this._attachEvents();
|
681 |
+
};
|
682 |
+
|
683 |
+
qq.UploadDropZone.prototype = {
|
684 |
+
_disableDropOutside: function(e){
|
685 |
+
// run only once for all instances
|
686 |
+
if (!qq.UploadDropZone.dropOutsideDisabled ){
|
687 |
+
|
688 |
+
qq.attach(document, 'dragover', function(e){
|
689 |
+
if (e.dataTransfer){
|
690 |
+
e.dataTransfer.dropEffect = 'none';
|
691 |
+
e.preventDefault();
|
692 |
+
}
|
693 |
+
});
|
694 |
+
|
695 |
+
qq.UploadDropZone.dropOutsideDisabled = true;
|
696 |
+
}
|
697 |
+
},
|
698 |
+
_attachEvents: function(){
|
699 |
+
var self = this;
|
700 |
+
|
701 |
+
qq.attach(self._element, 'dragover', function(e){
|
702 |
+
if (!self._isValidFileDrag(e)) return;
|
703 |
+
|
704 |
+
var effect = e.dataTransfer.effectAllowed;
|
705 |
+
if (effect == 'move' || effect == 'linkMove'){
|
706 |
+
e.dataTransfer.dropEffect = 'move'; // for FF (only move allowed)
|
707 |
+
} else {
|
708 |
+
e.dataTransfer.dropEffect = 'copy'; // for Chrome
|
709 |
+
}
|
710 |
+
|
711 |
+
e.stopPropagation();
|
712 |
+
e.preventDefault();
|
713 |
+
});
|
714 |
+
|
715 |
+
qq.attach(self._element, 'dragenter', function(e){
|
716 |
+
if (!self._isValidFileDrag(e)) return;
|
717 |
+
|
718 |
+
self._options.onEnter(e);
|
719 |
+
});
|
720 |
+
|
721 |
+
qq.attach(self._element, 'dragleave', function(e){
|
722 |
+
if (!self._isValidFileDrag(e)) return;
|
723 |
+
|
724 |
+
self._options.onLeave(e);
|
725 |
+
|
726 |
+
var relatedTarget = document.elementFromPoint(e.clientX, e.clientY);
|
727 |
+
// do not fire when moving a mouse over a descendant
|
728 |
+
if (qq.contains(this, relatedTarget)) return;
|
729 |
+
|
730 |
+
self._options.onLeaveNotDescendants(e);
|
731 |
+
});
|
732 |
+
|
733 |
+
qq.attach(self._element, 'drop', function(e){
|
734 |
+
if (!self._isValidFileDrag(e)) return;
|
735 |
+
|
736 |
+
e.preventDefault();
|
737 |
+
self._options.onDrop(e);
|
738 |
+
});
|
739 |
+
},
|
740 |
+
_isValidFileDrag: function(e){
|
741 |
+
var dt = e.dataTransfer,
|
742 |
+
// do not check dt.types.contains in webkit, because it crashes safari 4
|
743 |
+
isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1;
|
744 |
+
|
745 |
+
// dt.effectAllowed is none in Safari 5
|
746 |
+
// dt.types.contains check is for firefox
|
747 |
+
return dt && dt.effectAllowed != 'none' &&
|
748 |
+
(dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files')));
|
749 |
+
|
750 |
+
}
|
751 |
+
};
|
752 |
+
|
753 |
+
qq.UploadButton = function(o){
|
754 |
+
this._options = {
|
755 |
+
element: null,
|
756 |
+
// if set to true adds multiple attribute to file input
|
757 |
+
multiple: false,
|
758 |
+
// name attribute of file input
|
759 |
+
name: 'file',
|
760 |
+
onChange: function(input){},
|
761 |
+
hoverClass: 'qq-upload-button-hover',
|
762 |
+
focusClass: 'qq-upload-button-focus'
|
763 |
+
};
|
764 |
+
|
765 |
+
qq.extend(this._options, o);
|
766 |
+
|
767 |
+
this._element = this._options.element;
|
768 |
+
|
769 |
+
// make button suitable container for input
|
770 |
+
qq.css(this._element, {
|
771 |
+
position: 'relative',
|
772 |
+
overflow: 'hidden',
|
773 |
+
// Make sure browse button is in the right side
|
774 |
+
// in Internet Explorer
|
775 |
+
direction: 'ltr'
|
776 |
+
});
|
777 |
+
|
778 |
+
this._input = this._createInput();
|
779 |
+
};
|
780 |
+
|
781 |
+
qq.UploadButton.prototype = {
|
782 |
+
/* returns file input element */
|
783 |
+
getInput: function(){
|
784 |
+
return this._input;
|
785 |
+
},
|
786 |
+
/* cleans/recreates the file input */
|
787 |
+
reset: function(){
|
788 |
+
if (this._input.parentNode){
|
789 |
+
qq.remove(this._input);
|
790 |
+
}
|
791 |
+
|
792 |
+
qq.removeClass(this._element, this._options.focusClass);
|
793 |
+
this._input = this._createInput();
|
794 |
+
},
|
795 |
+
_createInput: function(){
|
796 |
+
var input = document.createElement("input");
|
797 |
+
|
798 |
+
if (this._options.multiple){
|
799 |
+
input.setAttribute("multiple", "multiple");
|
800 |
+
}
|
801 |
+
|
802 |
+
input.setAttribute("type", "file");
|
803 |
+
input.setAttribute("name", this._options.name);
|
804 |
+
|
805 |
+
qq.css(input, {
|
806 |
+
position: 'absolute',
|
807 |
+
// in Opera only 'browse' button
|
808 |
+
// is clickable and it is located at
|
809 |
+
// the right side of the input
|
810 |
+
right: 0,
|
811 |
+
top: 0,
|
812 |
+
fontFamily: 'Arial',
|
813 |
+
// 4 persons reported this, the max values that worked for them were 243, 236, 236, 118
|
814 |
+
fontSize: '118px',
|
815 |
+
margin: 0,
|
816 |
+
padding: 0,
|
817 |
+
cursor: 'pointer',
|
818 |
+
opacity: 0
|
819 |
+
});
|
820 |
+
|
821 |
+
this._element.appendChild(input);
|
822 |
+
|
823 |
+
var self = this;
|
824 |
+
qq.attach(input, 'change', function(){
|
825 |
+
self._options.onChange(input);
|
826 |
+
});
|
827 |
+
|
828 |
+
qq.attach(input, 'mouseover', function(){
|
829 |
+
qq.addClass(self._element, self._options.hoverClass);
|
830 |
+
});
|
831 |
+
qq.attach(input, 'mouseout', function(){
|
832 |
+
qq.removeClass(self._element, self._options.hoverClass);
|
833 |
+
});
|
834 |
+
qq.attach(input, 'focus', function(){
|
835 |
+
qq.addClass(self._element, self._options.focusClass);
|
836 |
+
});
|
837 |
+
qq.attach(input, 'blur', function(){
|
838 |
+
qq.removeClass(self._element, self._options.focusClass);
|
839 |
+
});
|
840 |
+
|
841 |
+
// IE and Opera, unfortunately have 2 tab stops on file input
|
842 |
+
// which is unacceptable in our case, disable keyboard access
|
843 |
+
if (window.attachEvent){
|
844 |
+
// it is IE or Opera
|
845 |
+
input.setAttribute('tabIndex', "-1");
|
846 |
+
}
|
847 |
+
|
848 |
+
return input;
|
849 |
+
}
|
850 |
+
};
|
851 |
+
|
852 |
+
/**
|
853 |
+
* Class for uploading files, uploading itself is handled by child classes
|
854 |
+
*/
|
855 |
+
qq.UploadHandlerAbstract = function(o){
|
856 |
+
this._options = {
|
857 |
+
debug: false,
|
858 |
+
action: '/upload.php',
|
859 |
+
// maximum number of concurrent uploads
|
860 |
+
maxConnections: 999,
|
861 |
+
onProgress: function(id, fileName, loaded, total){},
|
862 |
+
onComplete: function(id, fileName, response){},
|
863 |
+
onCancel: function(id, fileName){}
|
864 |
+
};
|
865 |
+
qq.extend(this._options, o);
|
866 |
+
|
867 |
+
this._queue = [];
|
868 |
+
// params for files in queue
|
869 |
+
this._params = [];
|
870 |
+
};
|
871 |
+
qq.UploadHandlerAbstract.prototype = {
|
872 |
+
log: function(str){
|
873 |
+
if (this._options.debug && window.console) console.log('[uploader] ' + str);
|
874 |
+
},
|
875 |
+
/**
|
876 |
+
* Adds file or file input to the queue
|
877 |
+
* @returns id
|
878 |
+
**/
|
879 |
+
add: function(file){},
|
880 |
+
/**
|
881 |
+
* Sends the file identified by id and additional query params to the server
|
882 |
+
*/
|
883 |
+
upload: function(id, params){
|
884 |
+
var len = this._queue.push(id);
|
885 |
+
|
886 |
+
var copy = {};
|
887 |
+
qq.extend(copy, params);
|
888 |
+
this._params[id] = copy;
|
889 |
+
|
890 |
+
// if too many active uploads, wait...
|
891 |
+
if (len <= this._options.maxConnections){
|
892 |
+
this._upload(id, this._params[id]);
|
893 |
+
}
|
894 |
+
},
|
895 |
+
/**
|
896 |
+
* Cancels file upload by id
|
897 |
+
*/
|
898 |
+
cancel: function(id){
|
899 |
+
this._cancel(id);
|
900 |
+
this._dequeue(id);
|
901 |
+
},
|
902 |
+
/**
|
903 |
+
* Cancells all uploads
|
904 |
+
*/
|
905 |
+
cancelAll: function(){
|
906 |
+
for (var i=0; i<this._queue.length; i++){
|
907 |
+
this._cancel(this._queue[i]);
|
908 |
+
}
|
909 |
+
this._queue = [];
|
910 |
+
},
|
911 |
+
/**
|
912 |
+
* Returns name of the file identified by id
|
913 |
+
*/
|
914 |
+
getName: function(id){},
|
915 |
+
/**
|
916 |
+
* Returns size of the file identified by id
|
917 |
+
*/
|
918 |
+
getSize: function(id){},
|
919 |
+
/**
|
920 |
+
* Returns id of files being uploaded or
|
921 |
+
* waiting for their turn
|
922 |
+
*/
|
923 |
+
getQueue: function(){
|
924 |
+
return this._queue;
|
925 |
+
},
|
926 |
+
/**
|
927 |
+
* Actual upload method
|
928 |
+
*/
|
929 |
+
_upload: function(id){},
|
930 |
+
/**
|
931 |
+
* Actual cancel method
|
932 |
+
*/
|
933 |
+
_cancel: function(id){},
|
934 |
+
/**
|
935 |
+
* Removes element from queue, starts upload of next
|
936 |
+
*/
|
937 |
+
_dequeue: function(id){
|
938 |
+
var i = qq.indexOf(this._queue, id);
|
939 |
+
this._queue.splice(i, 1);
|
940 |
+
|
941 |
+
var max = this._options.maxConnections;
|
942 |
+
|
943 |
+
if (this._queue.length >= max && i < max){
|
944 |
+
var nextId = this._queue[max-1];
|
945 |
+
this._upload(nextId, this._params[nextId]);
|
946 |
+
}
|
947 |
+
}
|
948 |
+
};
|
949 |
+
|
950 |
+
/**
|
951 |
+
* Class for uploading files using form and iframe
|
952 |
+
* @inherits qq.UploadHandlerAbstract
|
953 |
+
*/
|
954 |
+
qq.UploadHandlerForm = function(o){
|
955 |
+
qq.UploadHandlerAbstract.apply(this, arguments);
|
956 |
+
|
957 |
+
this._inputs = {};
|
958 |
+
};
|
959 |
+
// @inherits qq.UploadHandlerAbstract
|
960 |
+
qq.extend(qq.UploadHandlerForm.prototype, qq.UploadHandlerAbstract.prototype);
|
961 |
+
|
962 |
+
qq.extend(qq.UploadHandlerForm.prototype, {
|
963 |
+
add: function(fileInput){
|
964 |
+
fileInput.setAttribute('name', 'qqfile');
|
965 |
+
var id = 'qq-upload-handler-iframe' + qq.getUniqueId();
|
966 |
+
|
967 |
+
this._inputs[id] = fileInput;
|
968 |
+
|
969 |
+
// remove file input from DOM
|
970 |
+
if (fileInput.parentNode){
|
971 |
+
qq.remove(fileInput);
|
972 |
+
}
|
973 |
+
|
974 |
+
return id;
|
975 |
+
},
|
976 |
+
getName: function(id){
|
977 |
+
// get input value and remove path to normalize
|
978 |
+
return this._inputs[id].value.replace(/.*(\/|\\)/, "");
|
979 |
+
},
|
980 |
+
_cancel: function(id){
|
981 |
+
this._options.onCancel(id, this.getName(id));
|
982 |
+
|
983 |
+
delete this._inputs[id];
|
984 |
+
|
985 |
+
var iframe = document.getElementById(id);
|
986 |
+
if (iframe){
|
987 |
+
// to cancel request set src to something else
|
988 |
+
// we use src="javascript:false;" because it doesn't
|
989 |
+
// trigger ie6 prompt on https
|
990 |
+
iframe.setAttribute('src', 'javascript:false;');
|
991 |
+
|
992 |
+
qq.remove(iframe);
|
993 |
+
}
|
994 |
+
},
|
995 |
+
_upload: function(id, params){
|
996 |
+
var input = this._inputs[id];
|
997 |
+
|
998 |
+
if (!input){
|
999 |
+
throw new Error('file with passed id was not added, or already uploaded or cancelled');
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
var fileName = this.getName(id);
|
1003 |
+
|
1004 |
+
var iframe = this._createIframe(id);
|
1005 |
+
var form = this._createForm(iframe, params);
|
1006 |
+
form.appendChild(input);
|
1007 |
+
|
1008 |
+
var self = this;
|
1009 |
+
this._attachLoadEvent(iframe, function(){
|
1010 |
+
self.log('iframe loaded');
|
1011 |
+
|
1012 |
+
var response = self._getIframeContentJSON(iframe);
|
1013 |
+
|
1014 |
+
self._options.onComplete(id, fileName, response);
|
1015 |
+
self._dequeue(id);
|
1016 |
+
|
1017 |
+
delete self._inputs[id];
|
1018 |
+
// timeout added to fix busy state in FF3.6
|
1019 |
+
setTimeout(function(){
|
1020 |
+
qq.remove(iframe);
|
1021 |
+
}, 1);
|
1022 |
+
});
|
1023 |
+
|
1024 |
+
form.submit();
|
1025 |
+
qq.remove(form);
|
1026 |
+
|
1027 |
+
return id;
|
1028 |
+
},
|
1029 |
+
_attachLoadEvent: function(iframe, callback){
|
1030 |
+
qq.attach(iframe, 'load', function(){
|
1031 |
+
// when we remove iframe from dom
|
1032 |
+
// the request stops, but in IE load
|
1033 |
+
// event fires
|
1034 |
+
if (!iframe.parentNode){
|
1035 |
+
return;
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
// fixing Opera 10.53
|
1039 |
+
if (iframe.contentDocument &&
|
1040 |
+
iframe.contentDocument.body &&
|
1041 |
+
iframe.contentDocument.body.innerHTML == "false"){
|
1042 |
+
// In Opera event is fired second time
|
1043 |
+
// when body.innerHTML changed from false
|
1044 |
+
// to server response approx. after 1 sec
|
1045 |
+
// when we upload file with iframe
|
1046 |
+
return;
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
callback();
|
1050 |
+
});
|
1051 |
+
},
|
1052 |
+
/**
|
1053 |
+
* Returns json object received by iframe from server.
|
1054 |
+
*/
|
1055 |
+
_getIframeContentJSON: function(iframe){
|
1056 |
+
// iframe.contentWindow.document - for IE<7
|
1057 |
+
var doc = iframe.contentDocument ? iframe.contentDocument: iframe.contentWindow.document,
|
1058 |
+
response;
|
1059 |
+
|
1060 |
+
this.log("converting iframe's innerHTML to JSON");
|
1061 |
+
this.log("innerHTML = " + doc.body.innerHTML);
|
1062 |
+
|
1063 |
+
try {
|
1064 |
+
response = eval("(" + doc.body.innerHTML + ")");
|
1065 |
+
} catch(err){
|
1066 |
+
response = {};
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
return response;
|
1070 |
+
},
|
1071 |
+
/**
|
1072 |
+
* Creates iframe with unique name
|
1073 |
+
*/
|
1074 |
+
_createIframe: function(id){
|
1075 |
+
// We can't use following code as the name attribute
|
1076 |
+
// won't be properly registered in IE6, and new window
|
1077 |
+
// on form submit will open
|
1078 |
+
// var iframe = document.createElement('iframe');
|
1079 |
+
// iframe.setAttribute('name', id);
|
1080 |
+
|
1081 |
+
var iframe = qq.toElement('<iframe src="javascript:false;" name="' + id + '" />');
|
1082 |
+
// src="javascript:false;" removes ie6 prompt on https
|
1083 |
+
|
1084 |
+
iframe.setAttribute('id', id);
|
1085 |
+
|
1086 |
+
iframe.style.display = 'none';
|
1087 |
+
document.body.appendChild(iframe);
|
1088 |
+
|
1089 |
+
return iframe;
|
1090 |
+
},
|
1091 |
+
/**
|
1092 |
+
* Creates form, that will be submitted to iframe
|
1093 |
+
*/
|
1094 |
+
_createForm: function(iframe, params){
|
1095 |
+
// We can't use the following code in IE6
|
1096 |
+
// var form = document.createElement('form');
|
1097 |
+
// form.setAttribute('method', 'post');
|
1098 |
+
// form.setAttribute('enctype', 'multipart/form-data');
|
1099 |
+
// Because in this case file won't be attached to request
|
1100 |
+
var form = qq.toElement('<form method="post" enctype="multipart/form-data"></form>');
|
1101 |
+
|
1102 |
+
var queryString = qq.obj2url(params, this._options.action);
|
1103 |
+
|
1104 |
+
form.setAttribute('action', queryString);
|
1105 |
+
form.setAttribute('target', iframe.name);
|
1106 |
+
form.style.display = 'none';
|
1107 |
+
document.body.appendChild(form);
|
1108 |
+
|
1109 |
+
return form;
|
1110 |
+
}
|
1111 |
+
});
|
1112 |
+
|
1113 |
+
/**
|
1114 |
+
* Class for uploading files using xhr
|
1115 |
+
* @inherits qq.UploadHandlerAbstract
|
1116 |
+
*/
|
1117 |
+
qq.UploadHandlerXhr = function(o){
|
1118 |
+
qq.UploadHandlerAbstract.apply(this, arguments);
|
1119 |
+
|
1120 |
+
this._files = [];
|
1121 |
+
this._xhrs = [];
|
1122 |
+
|
1123 |
+
// current loaded size in bytes for each file
|
1124 |
+
this._loaded = [];
|
1125 |
+
};
|
1126 |
+
|
1127 |
+
// static method
|
1128 |
+
qq.UploadHandlerXhr.isSupported = function(){
|
1129 |
+
var input = document.createElement('input');
|
1130 |
+
input.type = 'file';
|
1131 |
+
|
1132 |
+
return (
|
1133 |
+
'multiple' in input &&
|
1134 |
+
typeof File != "undefined" &&
|
1135 |
+
typeof (new XMLHttpRequest()).upload != "undefined" );
|
1136 |
+
};
|
1137 |
+
|
1138 |
+
// @inherits qq.UploadHandlerAbstract
|
1139 |
+
qq.extend(qq.UploadHandlerXhr.prototype, qq.UploadHandlerAbstract.prototype)
|
1140 |
+
|
1141 |
+
qq.extend(qq.UploadHandlerXhr.prototype, {
|
1142 |
+
/**
|
1143 |
+
* Adds file to the queue
|
1144 |
+
* Returns id to use with upload, cancel
|
1145 |
+
**/
|
1146 |
+
add: function(file){
|
1147 |
+
if (!(file instanceof File)){
|
1148 |
+
throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
return this._files.push(file) - 1;
|
1152 |
+
},
|
1153 |
+
getName: function(id){
|
1154 |
+
var file = this._files[id];
|
1155 |
+
// fix missing name in Safari 4
|
1156 |
+
return file.fileName != null ? file.fileName : file.name;
|
1157 |
+
},
|
1158 |
+
getSize: function(id){
|
1159 |
+
var file = this._files[id];
|
1160 |
+
return file.fileSize != null ? file.fileSize : file.size;
|
1161 |
+
},
|
1162 |
+
/**
|
1163 |
+
* Returns uploaded bytes for file identified by id
|
1164 |
+
*/
|
1165 |
+
getLoaded: function(id){
|
1166 |
+
return this._loaded[id] || 0;
|
1167 |
+
},
|
1168 |
+
/**
|
1169 |
+
* Sends the file identified by id and additional query params to the server
|
1170 |
+
* @param {Object} params name-value string pairs
|
1171 |
+
*/
|
1172 |
+
_upload: function(id, params){
|
1173 |
+
var file = this._files[id],
|
1174 |
+
name = this.getName(id),
|
1175 |
+
size = this.getSize(id);
|
1176 |
+
|
1177 |
+
this._loaded[id] = 0;
|
1178 |
+
|
1179 |
+
var xhr = this._xhrs[id] = new XMLHttpRequest();
|
1180 |
+
var self = this;
|
1181 |
+
|
1182 |
+
xhr.upload.onprogress = function(e){
|
1183 |
+
if (e.lengthComputable){
|
1184 |
+
self._loaded[id] = e.loaded;
|
1185 |
+
self._options.onProgress(id, name, e.loaded, e.total);
|
1186 |
+
}
|
1187 |
+
};
|
1188 |
+
|
1189 |
+
xhr.onreadystatechange = function(){
|
1190 |
+
if (xhr.readyState == 4){
|
1191 |
+
self._onComplete(id, xhr);
|
1192 |
+
}
|
1193 |
+
};
|
1194 |
+
|
1195 |
+
// build query string
|
1196 |
+
params = params || {};
|
1197 |
+
params['qqfile'] = name;
|
1198 |
+
var queryString = qq.obj2url(params, this._options.action);
|
1199 |
+
|
1200 |
+
xhr.open("POST", queryString, true);
|
1201 |
+
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
1202 |
+
xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
|
1203 |
+
xhr.setRequestHeader("Content-Type", "application/octet-stream");
|
1204 |
+
xhr.send(file);
|
1205 |
+
},
|
1206 |
+
_onComplete: function(id, xhr){
|
1207 |
+
// the request was aborted/cancelled
|
1208 |
+
if (!this._files[id]) return;
|
1209 |
+
|
1210 |
+
var name = this.getName(id);
|
1211 |
+
var size = this.getSize(id);
|
1212 |
+
|
1213 |
+
this._options.onProgress(id, name, size, size);
|
1214 |
+
|
1215 |
+
if (xhr.status == 200){
|
1216 |
+
this.log("xhr - server response received");
|
1217 |
+
this.log("responseText = " + xhr.responseText);
|
1218 |
+
|
1219 |
+
var response;
|
1220 |
+
|
1221 |
+
try {
|
1222 |
+
response = eval("(" + xhr.responseText + ")");
|
1223 |
+
} catch(err){
|
1224 |
+
response = {};
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
this._options.onComplete(id, name, response);
|
1228 |
+
|
1229 |
+
} else {
|
1230 |
+
this._options.onComplete(id, name, {});
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
this._files[id] = null;
|
1234 |
+
this._xhrs[id] = null;
|
1235 |
+
this._dequeue(id);
|
1236 |
+
},
|
1237 |
+
_cancel: function(id){
|
1238 |
+
this._options.onCancel(id, this.getName(id));
|
1239 |
+
|
1240 |
+
this._files[id] = null;
|
1241 |
+
|
1242 |
+
if (this._xhrs[id]){
|
1243 |
+
this._xhrs[id].abort();
|
1244 |
+
this._xhrs[id] = null;
|
1245 |
+
}
|
1246 |
+
}
|
1247 |
+
});
|
upload/jquery.js
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery JavaScript Library v1.4.2
|
3 |
+
* http://jquery.com/
|
4 |
+
*
|
5 |
+
* Copyright 2010, John Resig
|
6 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7 |
+
* http://jquery.org/license
|
8 |
+
*
|
9 |
+
* Includes Sizzle.js
|
10 |
+
* http://sizzlejs.com/
|
11 |
+
* Copyright 2010, The Dojo Foundation
|
12 |
+
* Released under the MIT, BSD, and GPL Licenses.
|
13 |
+
*
|
14 |
+
* Date: Sat Feb 13 22:33:48 2010 -0500
|
15 |
+
*/
|
16 |
+
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
|
17 |
+
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
|
18 |
+
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
|
19 |
+
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
|
20 |
+
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
|
21 |
+
Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
|
22 |
+
(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
|
23 |
+
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
|
24 |
+
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(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(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
|
25 |
+
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
|
26 |
+
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
|
27 |
+
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
|
28 |
+
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
|
29 |
+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
|
30 |
+
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
|
31 |
+
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
|
32 |
+
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
|
33 |
+
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
|
34 |
+
var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
|
35 |
+
parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
|
36 |
+
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
|
37 |
+
s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
|
38 |
+
applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
|
39 |
+
else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
|
40 |
+
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
|
41 |
+
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
|
42 |
+
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
|
43 |
+
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
|
44 |
+
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
|
45 |
+
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
|
46 |
+
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
|
47 |
+
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
|
48 |
+
a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
|
49 |
+
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
|
50 |
+
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
|
51 |
+
C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
|
52 |
+
null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
|
53 |
+
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
|
54 |
+
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
|
55 |
+
if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
|
56 |
+
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
|
57 |
+
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
|
58 |
+
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
|
59 |
+
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
|
60 |
+
isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
|
61 |
+
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
|
62 |
+
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
|
63 |
+
e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
|
64 |
+
"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
|
65 |
+
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
|
66 |
+
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
|
67 |
+
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
|
68 |
+
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
|
69 |
+
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
|
70 |
+
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
|
71 |
+
e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
|
72 |
+
t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
|
73 |
+
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
|
74 |
+
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
|
75 |
+
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
|
76 |
+
CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
|
77 |
+
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
|
78 |
+
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
|
79 |
+
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
|
80 |
+
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
|
81 |
+
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
|
82 |
+
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
|
83 |
+
setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
|
84 |
+
h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
|
85 |
+
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
|
86 |
+
"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
|
87 |
+
h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
|
88 |
+
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
|
89 |
+
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
|
90 |
+
q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
|
91 |
+
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
|
92 |
+
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
|
93 |
+
function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
|
94 |
+
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
|
95 |
+
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
|
96 |
+
{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
|
97 |
+
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
|
98 |
+
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
|
99 |
+
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
|
100 |
+
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
|
101 |
+
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
|
102 |
+
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
|
103 |
+
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
|
104 |
+
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(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,false,function(b){this.parentNode.insertBefore(b,
|
105 |
+
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
|
106 |
+
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
|
107 |
+
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
|
108 |
+
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
|
109 |
+
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
|
110 |
+
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
|
111 |
+
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
|
112 |
+
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
|
113 |
+
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
|
114 |
+
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
|
115 |
+
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
|
116 |
+
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
|
117 |
+
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
|
118 |
+
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
|
119 |
+
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
|
120 |
+
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
|
121 |
+
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
|
122 |
+
function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
|
123 |
+
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
|
124 |
+
e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
|
125 |
+
"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
|
126 |
+
false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
|
127 |
+
false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
|
128 |
+
c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
|
129 |
+
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
|
130 |
+
g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
|
131 |
+
1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
|
132 |
+
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
|
133 |
+
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
|
134 |
+
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
|
135 |
+
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
|
136 |
+
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
|
137 |
+
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
|
138 |
+
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
|
139 |
+
"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
|
140 |
+
c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
|
141 |
+
this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
|
142 |
+
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
|
143 |
+
e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
|
144 |
+
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
|
145 |
+
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
|
146 |
+
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
|
147 |
+
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
|
148 |
+
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
|
149 |
+
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
|
150 |
+
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
|
151 |
+
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
|
152 |
+
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
|
153 |
+
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
|
154 |
+
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
|
upload/loading.gif
ADDED
Binary file
|
upload/php.php
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Handle file uploads via XMLHttpRequest
|
5 |
+
*/
|
6 |
+
class qqUploadedFileXhr {
|
7 |
+
/**
|
8 |
+
* Save the file to the specified path
|
9 |
+
* @return boolean TRUE on success
|
10 |
+
*/
|
11 |
+
function save($path) {
|
12 |
+
$input = fopen("php://input", "r");
|
13 |
+
$temp = tmpfile();
|
14 |
+
$realSize = stream_copy_to_stream($input, $temp);
|
15 |
+
fclose($input);
|
16 |
+
|
17 |
+
if ($realSize != $this->getSize()){
|
18 |
+
return false;
|
19 |
+
}
|
20 |
+
|
21 |
+
$target = fopen($path, "w");
|
22 |
+
fseek($temp, 0, SEEK_SET);
|
23 |
+
stream_copy_to_stream($temp, $target);
|
24 |
+
fclose($target);
|
25 |
+
|
26 |
+
return true;
|
27 |
+
}
|
28 |
+
function getName() {
|
29 |
+
return $_GET['qqfile'];
|
30 |
+
}
|
31 |
+
function getSize() {
|
32 |
+
if (isset($_SERVER["CONTENT_LENGTH"])){
|
33 |
+
return (int)$_SERVER["CONTENT_LENGTH"];
|
34 |
+
} else {
|
35 |
+
throw new Exception('Getting content length is not supported.');
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Handle file uploads via regular form post (uses the $_FILES array)
|
42 |
+
*/
|
43 |
+
class qqUploadedFileForm {
|
44 |
+
/**
|
45 |
+
* Save the file to the specified path
|
46 |
+
* @return boolean TRUE on success
|
47 |
+
*/
|
48 |
+
function save($path) {
|
49 |
+
if(!move_uploaded_file($_FILES['qqfile']['tmp_name'], $path)){
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
return true;
|
53 |
+
}
|
54 |
+
function getName() {
|
55 |
+
return $_FILES['qqfile']['name'];
|
56 |
+
}
|
57 |
+
function getSize() {
|
58 |
+
return $_FILES['qqfile']['size'];
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
class qqFileUploader {
|
63 |
+
private $allowedExtensions = array();
|
64 |
+
private $sizeLimit = 10485760;
|
65 |
+
private $file;
|
66 |
+
|
67 |
+
function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760){
|
68 |
+
$allowedExtensions = array_map("strtolower", $allowedExtensions);
|
69 |
+
|
70 |
+
$this->allowedExtensions = $allowedExtensions;
|
71 |
+
$this->sizeLimit = $sizeLimit;
|
72 |
+
|
73 |
+
//$this->checkServerSettings();
|
74 |
+
|
75 |
+
if (isset($_GET['qqfile'])) {
|
76 |
+
$this->file = new qqUploadedFileXhr();
|
77 |
+
} elseif (isset($_FILES['qqfile'])) {
|
78 |
+
$this->file = new qqUploadedFileForm();
|
79 |
+
} else {
|
80 |
+
$this->file = false;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
private function checkServerSettings(){
|
85 |
+
$postSize = $this->toBytes(ini_get('post_max_size'));
|
86 |
+
$uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
|
87 |
+
|
88 |
+
if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){
|
89 |
+
$size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
|
90 |
+
die("{error:'increase post_max_size and upload_max_filesize to $size'}");
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
private function toBytes($str){
|
95 |
+
$val = trim($str);
|
96 |
+
$last = strtolower($str[strlen($str)-1]);
|
97 |
+
switch($last) {
|
98 |
+
case 'g': $val *= 1024;
|
99 |
+
case 'm': $val *= 1024;
|
100 |
+
case 'k': $val *= 1024;
|
101 |
+
}
|
102 |
+
return $val;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Returns array('success'=>true) or array('error'=>'error message')
|
107 |
+
*/
|
108 |
+
function handleUpload($uploadDirectory, $replaceOldFile = FALSE){
|
109 |
+
if (!is_writable($uploadDirectory)){
|
110 |
+
return "{error:'Server error. Upload directory isn't writable.'}";
|
111 |
+
}
|
112 |
+
|
113 |
+
if (!$this->file){
|
114 |
+
return "{error:'No files were uploaded.'}";
|
115 |
+
}
|
116 |
+
|
117 |
+
$size = $this->file->getSize();
|
118 |
+
|
119 |
+
if ($size == 0) {
|
120 |
+
return "{error:'File is empty'}";
|
121 |
+
}
|
122 |
+
|
123 |
+
if ($size > $this->sizeLimit) {
|
124 |
+
return "{error:'File is too large'}";
|
125 |
+
}
|
126 |
+
|
127 |
+
$pathinfo = pathinfo($this->file->getName());
|
128 |
+
$ext = $pathinfo['extension'];
|
129 |
+
$filename = str_replace(".".$ext, "", $pathinfo['basename']);
|
130 |
+
//$filename = md5(uniqid());
|
131 |
+
|
132 |
+
if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){
|
133 |
+
$these = implode(', ', $this->allowedExtensions);
|
134 |
+
return "{error:'File has an invalid extension, it should be one of $these .'}";
|
135 |
+
}
|
136 |
+
|
137 |
+
if(!$replaceOldFile){
|
138 |
+
/// don't overwrite previous files that were uploaded
|
139 |
+
while (file_exists($uploadDirectory . $filename . '.' . $ext)) {
|
140 |
+
$filename .= rand(10, 99);
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
if ($this->file->save($uploadDirectory . $filename . '.' . $ext)){
|
145 |
+
list($width, $height, $type, $attr) = getimagesize($uploadDirectory . $filename . '.' . $ext);
|
146 |
+
return "{success:true,width:".$width.",height:".$height."}";
|
147 |
+
} else {
|
148 |
+
return "{error:'Could not save uploaded file. The upload was cancelled, or server error encountered'}";
|
149 |
+
}
|
150 |
+
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
// list of valid extensions, ex. array("jpeg", "xml", "bmp")
|
155 |
+
$allowedExtensions = array("jpeg", "jpg", "gif", "png");
|
156 |
+
// max file size in bytes
|
157 |
+
$sizeLimit = 10 * 1024 * 1024;
|
158 |
+
|
159 |
+
$uploader = new qqFileUploader($allowedExtensions, $sizeLimit);
|
160 |
+
$result = $uploader->handleUpload('files/');
|
161 |
+
// to pass data through iframe you will need to encode all html tags
|
162 |
+
echo $result;
|