/trunk/index.php |
---|
New file |
0,0 → 1,75 |
<?php |
// declare(encoding='UTF-8'); |
/** Inclusion du fichier principal de l'application*/ |
require_once 'cel_consultation.php'; |
?> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> |
<head> |
<meta http-equiv="Content-style-type" content="text/css" /> |
<meta http-equiv="Content-script-type" content="text/javascript" /> |
<meta http-equiv="Content-language" content="fr" /> |
<title><?php echo AppControleur::getMetaTitre(); ?></title> |
<meta name="description" content="<?php echo AppControleur::getMetaDescription();?>" /> |
<meta name="keywords" content="<?php echo AppControleur::getMetaTags();?>" /> |
<meta name="revisit-after" content="15 days" /> |
<meta name="robots" content="index,follow" /> |
<meta name="author" content="Tela Botanica" /> |
<link rel="shortcut icon" type="image/x-icon" href="http://resources.tela-botanica.org/tb/img/16x16/favicon.ico" /> |
<link rel="icon" type="image/png" href="http://resources.tela-botanica.org/tb/img/16x16/favicon.png" /> |
<?= aControleur::renvoyerInclusionStyle(); ?> |
<?= aControleur::renvoyerInclusionScript(); ?> |
</head> |
<body> |
<div id="reducteur"> |
<div id="logo_tela"> |
<a href="/" title="Retour à l'accueil du site"> |
<img src="http://resources.tela-botanica.org/tb/img/167x111/logo_sans_mots.png" alt="le logo de Tela Botanica"/> |
</a> |
</div> |
<div id="bandeau"> |
<div id="bandeau_contenu"> |
<div id="titre_monde"> |
<h1>Carnet en ligne - consultation</h1> |
</div> |
</div> |
</div> |
<div id="droite"> |
<div id="onglets"> |
<?php echo AppControleur::getContenuNavigation(); ?> |
</div> |
<div id="contenu"> |
<div id="entete"> |
<?php echo AppControleur::getContenuTete(); ?> |
</div> |
<div id="texte"> |
<?php echo AppControleur::getContenuCorps(); ?> |
</div> |
<div id="pied_texte"> |
<?php echo AppControleur::getContenuPied(); ?> |
</div> |
</div> |
<div> |
<?php echo AppControleur::getChrono(); ?> |
<?php echo AppControleur::getExceptions(); ?> |
</div> |
<div id="pied"> |
<p> ©<a href="http://www.tela-botanica.org/" accesskey="1">Tela Botanica</a> / 2000-<?=date('Y')?> - Le réseau des Botanistes Francophones</p> |
</div> |
</div> |
<div id="nav_gauche"> |
</div> |
</div> |
</body> |
</html> |
/trunk/squelettes/pied.tpl.html |
---|
New file |
0,0 → 1,22 |
<!-- SAISIE - DEBUT PIED DE PAGE --> |
<div id="saisie_pied"> |
<script type="text/javascript"> |
$(document).ready(function() { |
$('span.courriel').courriel(); |
}); |
</script> |
<p> |
Pour plus d'informations ou nous faire part d'une erreur dans les informations affichées, veuillez nous contacter à l'adresse <br /> |
<span class="courriel">contact [arrobase] obs-saisons [point] fr</span>. |
</p> |
<p> |
Merci de signaler |
<a href="http://www.tela-botanica.net/suivi/index.php?do=newtask&project=32" class="lien_ext"> |
les bogues et améliorations pour l'application <?php echo I18n::get('test.truc'); ?> |
<span class="saisie-appli-info"> |
Application de saisie D'ODS |
</span> |
</a>. |
</p> |
</div> |
<!-- SAISIE - FIN PIED DE PAGE --> |
/trunk/squelettes/tete.tpl.html |
---|
New file |
0,0 → 1,5 |
<!-- SAISIE - DEBUT TETE DE PAGE --> |
<div id="saisie_tete"> |
</div> |
<!-- SAISIE - FIN TETE DE PAGE --> |
/trunk/squelettes/inclusion/script.tpl.html |
---|
New file |
0,0 → 1,4 |
<script type="text/javascript" src="<?= aControleur::getUrlScript(); ?>jquery-1.4.2.min.js"></script> |
<script type="text/javascript" src="<?= aControleur::getUrlScript(); ?>jquery.lazyload.js"></script> |
<script type="text/javascript" src="<?= aControleur::getUrlScript(); ?>fancybox/jquery.fancybox-1.3.4.js"></script> |
<script type="text/javascript" src="<?= aControleur::getUrlScript(); ?>consultation.js"></script> |
/trunk/squelettes/inclusion/style.tpl.html |
---|
New file |
0,0 → 1,2 |
<link href="<?= aControleur::getUrlStyle(); ?>cel_consultation.css" media="screen" type="text/css" rel="stylesheet" /> |
<link rel="stylesheet" type="text/css" href="<?= aControleur::getUrlStyle(); ?>fancybox/jquery.fancybox-1.3.4.css" media="screen" /> |
/trunk/squelettes/listes/image_liste.tpl.html |
---|
New file |
0,0 → 1,64 |
<!-- CEL_CONSULTATION - DEBUT RESULTAT IMAGES --> |
<div id="abonnement_rss"> |
<a href="<?= aControleur::construireUrlFluxRssResultatsRecherche($criteres) ?>" title="Flux de cette recherche"> |
S'abonner au flux rss des <?= aControleur::construireIntituleResultatRecherche($criteres); ?> |
</a> |
</div> |
<br /><br /> |
<?= $pagination ?> |
<div id="consultation_liste_images"> |
<?php if (isset($images)) : ?> |
<ul class="images_liste"> |
<?php foreach ($images as $image) : ?> |
<!-- BEGIN TB_IMG --> |
<li class="conteneur_image_deplie"> |
<a class="lien_voir_image" rel="galerie_image_cel" href="<?= $image['url_image_format_zoom']; ?>" title=" |
Id : <?= $image['id_image'] ?>, |
Taxon : <?= aControleur::convertirChaineTaxonPourAffichageSimple($image['nom_ret']) ?>, |
Localisation : <?= $image['zone_geo'].' ('.$image['ce_zone_geo'].')'; ?>, |
Auteur : <?= aControleur::couperCourriel($image['courriel_utilisateur']); ?> |
Observé le : <?= date('d/m/Y', strtotime($image['date_observation'])); ?>"> |
<img height="<?= $image['taille']['hauteur']; ?>" width="<?= $image['taille']['largeur']; ?>" src="<?= $image['url_image_format_galerie']; ?>" alt="Taxon : <?= aControleur::convertirChaineTaxonPourAffichage($image['nom_ret']) ?>, |
Localisation : <?= $image['zone_geo'].' ('.$image['ce_zone_geo'].')'; ?>, |
Observé le : <?= date('d/m/Y', strtotime($image['date_observation'])); ?>" /> |
</a> |
<div class="pliage"> |
<h4 class="lien_pliage_invisible" title="voir les informations associées"> + </h4> |
<dl class="image_information"> |
<dt>Id </dt> |
<dd><?= $image['id_image'] ?></dd> |
<dt>Taxon</dt> |
<dd> |
<a href="?module=Image&action=rechercherImage&image_recherche=<?= aControleur::convertirChaineTaxonPourRequeteUrl($image['nom_ret']); ?>" title="voir toutes les images de ce taxon" ><?= aControleur::convertirChaineTaxonPourAffichage($image['nom_ret']) ?></a> |
<a title="voir la fiche du taxon sur eflore" class="acceder-outil lien_fiche_eflore" href="<?= $image['url_fiche_eflore'] ?>"></a><br /> |
</dd> |
<dt>Localisation</dt> |
<dd><a href="?module=Image&action=rechercherImage&image_recherche=<?= aControleur::convertirChainelocaliteDepartementPourRequeteUrl($image['zone_geo'],$image['ce_zone_geo']); ?>" title="voir toutes les images de cette commune" ><?= aControleur::formaterChaineLocaliteDepartement($image['zone_geo'],$image['ce_zone_geo']); ?> </a></dd> |
<dt> Auteur </dt> |
<dd><?= aControleur::couperCourriel($image['courriel_utilisateur']); ?></dd> |
<dt> Observé le </dt> |
<dd><?= date('d/m/Y', strtotime($image['date_observation'])); ?></dd> |
</dl> |
</div> |
</li> |
<!-- END TB_IMG --> |
<?php endforeach; ?> |
</ul> |
<?php endif; ?> |
<?php if (empty($images)) : ?> |
<h2> Aucune image ne correspond à ces critères de recherche </h2> |
<?php endif; ?> |
</div> |
<hr style="clear:both;visibility:hidden;" /> |
<?php if(count($images) > 50) { ?> |
<?= $pagination ?> |
<?php } ?> |
<hr class="nettoyage" /> |
<!-- CEL_CONSULTATION - FIN RESULTAT IMAGES --> |
/trunk/squelettes/listes/image_brutes.tpl.html |
---|
New file |
0,0 → 1,29 |
<!-- CEL_CONSULTATION - DEBUT RESULTAT IMAGES --> |
<div id="consultation_liste_images"> |
<?php if (isset($images)) : ?> |
<ul class="images_liste"> |
<?php foreach ($images as $image) : ?> |
<!-- BEGIN TB_IMG --> |
<li> |
<a href="<?= $image['url_image_l']; ?>"> |
<img height="300px" src="<?= $image['url_image_m']; ?>" /> |
</a> |
<dl class="image_information"> |
<dt>Taxon</dt> |
<dd><?= $image['nom_ret'] ?></dd> |
<dt>Localisation</dt> |
<dd><?= $image['location'].' ('.$image['id_location'].')'; ?></dd> |
<dt>Transmis le </dt> |
<dd><?= $image['date_transmission'] ?></dd> |
</dl> |
</li> |
<!-- END TB_IMG --> |
<?php endforeach; ?> |
</ul> |
<?php endif; ?> |
</div> |
<hr class="nettoyage" /> |
<!-- CEL_CONSULTATION - FIN RESULTAT IMAGES --> |
/trunk/squelettes/listes/observation_liste.tpl.html |
---|
New file |
0,0 → 1,47 |
<!-- ODS_SAISIE - DEBUT LISTE EVENEMENTS --> |
<?php $stades = 0; ?> |
<div > |
<table id="saisie_liste_evenements"> |
<tr> |
<th></th> |
<?php $classe_evenement = 1 ; ?> |
<?php foreach($evenements as $evenement) : ?> |
<th class="stade<?=$classe_evenement ?>" colspan="<?=count($evenement['stades']) ?>"> |
<div class="evenement"><?= $evenement['nom'] ?></div> |
</th> |
<?php $classe_evenement++ ; ?> |
<?php endforeach; ?> |
<th></th> |
</tr> |
<tr> |
<th> stades </th> |
<?php foreach($evenements as $evenement) : ?> |
<?php foreach($evenement['stades'] as $stade) : ?> |
<th class="stade_evenement"> |
<?= $stade ?> |
</th> |
<?php $stades++; ?> |
<?php endforeach; ?> |
<?php endforeach; ?> |
</tr> |
<?php foreach ($individus as $individu) : ?> |
<tr class="observations_individu" id="observations_individu_<?= $individu['id'] ?>"> |
<td> |
<a href="<?= aControleur::getUrlConsultationFicheIndividu($id_station, $individu['id']); ?>"><?= $individu['nom'] ?></a> |
</td> |
<?php for( $i = 0; $i < $stades; $i++) : ?> |
<td> |
<?= array_shift($individu['observations']); ?> |
</td> |
<?php endfor; ?> |
<td><a class="lien_modifier" href="<?= aControleur::getUrlFormulaireModificationObservation($individu['id']); ?>"><img alt="modifier" src="http://162.38.234.9/ODS_redesign/applications/saisie/squelettes/images/modification.png" /></a></td> |
</tr> |
<?php endforeach; ?> |
</table> |
<a href="<?= aControleur::getUrlFormulaireAjoutIndividu($id_station,$id_espece); ?>"> Nouvel individu </a> |
</div> |
<!-- ODS_SAISIE - FIN LISTE EVENEMENTS --> |
/trunk/squelettes/images/voir_details_liste.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/voir_details_liste.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/images/modification.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/modification.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/images/afficher.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/afficher.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/images/voir_fiche_eflore.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/voir_fiche_eflore.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/images/suppression.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/suppression.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/images/voir_champs.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/voir_champs.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/images/voir_fiche.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/voir_fiche.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/images/cadenas.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/cadenas.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/images/voir_plus.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/images/voir_plus.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/corps.tpl.html |
---|
New file |
0,0 → 1,5 |
<!-- SAISIE - DEBUT CORPS DE PAGE --> |
<div id="saisie_corps"> |
<?= $corps ?> |
</div> |
<!-- SAISIE - FIN CORPS DE PAGE --> |
/trunk/squelettes/rss/image_rss_rss1.tpl.html |
---|
--- squelettes/rss/image_rss_rss2.tpl.html (revision 0) |
+++ squelettes/rss/image_rss_rss2.tpl.html (revision 22) |
@@ -0,0 +1,24 @@ |
+<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"> |
+ <channel> |
+ <title><?=$titre?></title> |
+ <link> http://162.38.234.9/cel_consultation/?<?= $criteres ?></link> |
+ <description><?=$description?></description> |
+ |
+ <?php if (isset($images)) : ?> |
+ <?php foreach ($images as $image) : ?> |
+ <item> |
+ <guid> <?=$image['ci_id_image']?> </guid> |
+ <title><?= $image['nom_ret'] ?></title> |
+ <link><?= $image['url_image_l']; ?></link> |
+ <description><![CDATA[ |
+ <img src="<?= $image['url_image_m'] ?>" /> |
+ ]]> |
+ </description> |
+ <category>Image</category> |
+ <pubDate><?= $image['date_transmission'] ?></pubDate> |
+ </item> |
+ <?php endforeach; ?> |
+ <?php endif; ?> |
+ |
+ </channel> |
+</rss> |
\ No newline at end of file |
/trunk/squelettes/rss/image_rss_atom.tpl.html |
---|
--- squelettes/css/cel_consultation_papyrus.css (revision 0) |
+++ squelettes/css/cel_consultation_papyrus.css (revision 22) |
@@ -0,0 +1,43 @@ |
+.image_information { |
+ |
+ background: white; |
+ padding: 10px; |
+ margin-left:5px; |
+ margin-top: -5px; |
+ border: 1px solid #AAAAAA; |
+ z-index: 20; |
+ width: 250px; |
+} |
+ |
+.images_liste { |
+ margin-left: 0px; |
+} |
+ |
+.conteneur_image { |
+ height: 120px; |
+ padding-right: 30px; |
+} |
+ |
+h4.lien_pliage_invisible { |
+ display:none; |
+} |
+ |
+.conteneur_image_deplie { |
+ margin-bottom: 120px |
+} |
+ |
+h4.lien_pliage { |
+ background-color:white; |
+ border:1px solid; |
+ margin-left:5px; |
+ margin-top:-25px; |
+ padding:0 2px; |
+ position:absolute; |
+ text-decoration: none; |
+} |
+ |
+h4.lien_pliage_deplie { |
+ border-bottom:none; |
+ padding-bottom:2px; |
+ z-index:50; |
+} |
\ No newline at end of file |
/trunk/squelettes/css/jquery.lightbox-0.5.css |
---|
New file |
0,0 → 1,101 |
/** |
* jQuery lightBox plugin |
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/) |
* and adapted to me for use like a plugin from jQuery. |
* @name jquery-lightbox-0.5.css |
* @author Leandro Vieira Pinho - http://leandrovieira.com |
* @version 0.5 |
* @date April 11, 2008 |
* @category jQuery plugin |
* @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com) |
* @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US |
* @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin |
*/ |
#jquery-overlay { |
position: absolute; |
top: 0; |
left: 0; |
z-index: 90; |
width: 100%; |
height: 500px; |
} |
#jquery-lightbox { |
position: absolute; |
top: 0; |
left: 0; |
width: 100%; |
z-index: 100; |
text-align: center; |
line-height: 0; |
} |
#jquery-lightbox a img { border: none; } |
#lightbox-container-image-box { |
position: relative; |
background-color: #fff; |
width: 250px; |
height: 250px; |
margin: 0 auto; |
} |
#lightbox-container-image { padding: 10px; } |
#lightbox-loading { |
position: absolute; |
top: 40%; |
left: 0%; |
height: 25%; |
width: 100%; |
text-align: center; |
line-height: 0; |
} |
#lightbox-nav { |
position: absolute; |
top: 0; |
left: 0; |
height: 100%; |
width: 100%; |
z-index: 10; |
} |
#lightbox-container-image-box > #lightbox-nav { left: 0; } |
#lightbox-nav a { outline: none;} |
#lightbox-nav-btnPrev, #lightbox-nav-btnNext { |
width: 49%; |
height: 100%; |
zoom: 1; |
display: block; |
} |
#lightbox-nav-btnPrev { |
left: 0; |
float: left; |
} |
#lightbox-nav-btnNext { |
right: 0; |
float: right; |
} |
#lightbox-container-image-data-box { |
font: 10px Verdana, Helvetica, sans-serif; |
background-color: #fff; |
margin: 0 auto; |
line-height: 1.4em; |
overflow: auto; |
width: 100%; |
padding: 0 10px 0; |
} |
#lightbox-container-image-data { |
padding: 0 10px; |
color: #666; |
} |
#lightbox-container-image-data #lightbox-image-details { |
width: 70%; |
float: left; |
text-align: left; |
} |
#lightbox-image-details-caption { font-weight: bold; } |
#lightbox-image-details-currentNumber { |
display: block; |
clear: left; |
padding-bottom: 1.0em; |
} |
#lightbox-secNav-btnClose { |
width: 66px; |
float: right; |
padding-bottom: 0.7em; |
} |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_close.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_close.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/index.html |
---|
New file |
0,0 → 1,165 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
<head> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
<meta http-equiv="imagetoolbar" content="no" /> |
<title>FancyBox 1.3.4 | Demonstration</title> |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> |
<script> |
!window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>'); |
</script> |
<script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script> |
<script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script> |
<link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" /> |
<link rel="stylesheet" href="style.css" /> |
<script type="text/javascript"> |
$(document).ready(function() { |
/* |
* Examples - images |
*/ |
$("a#example1").fancybox(); |
$("a#example2").fancybox({ |
'overlayShow' : false, |
'transitionIn' : 'elastic', |
'transitionOut' : 'elastic' |
}); |
$("a#example3").fancybox({ |
'transitionIn' : 'none', |
'transitionOut' : 'none' |
}); |
$("a#example4").fancybox({ |
'opacity' : true, |
'overlayShow' : false, |
'transitionIn' : 'elastic', |
'transitionOut' : 'none' |
}); |
$("a#example5").fancybox(); |
$("a#example6").fancybox({ |
'titlePosition' : 'outside', |
'overlayColor' : '#000', |
'overlayOpacity' : 0.9 |
}); |
$("a#example7").fancybox({ |
'titlePosition' : 'inside' |
}); |
$("a#example8").fancybox({ |
'titlePosition' : 'over' |
}); |
$("a[rel=example_group]").fancybox({ |
'transitionIn' : 'none', |
'transitionOut' : 'none', |
'titlePosition' : 'over', |
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { |
return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; |
} |
}); |
/* |
* Examples - various |
*/ |
$("#various1").fancybox({ |
'titlePosition' : 'inside', |
'transitionIn' : 'none', |
'transitionOut' : 'none' |
}); |
$("#various2").fancybox(); |
$("#various3").fancybox({ |
'width' : '75%', |
'height' : '75%', |
'autoScale' : false, |
'transitionIn' : 'none', |
'transitionOut' : 'none', |
'type' : 'iframe' |
}); |
$("#various4").fancybox({ |
'padding' : 0, |
'autoScale' : false, |
'transitionIn' : 'none', |
'transitionOut' : 'none' |
}); |
}); |
</script> |
</head> |
<body> |
<div id="content"> |
<h1>fancybox <span>v1.3.4</span></h1> |
<p>This is a demonstration. <a href="http://fancybox.net">Home page</a></p> |
<hr /> |
<p> |
Different animations<br /> |
<a id="example1" href="./example/1_b.jpg"><img alt="example1" src="./example/1_s.jpg" /></a> |
<a id="example2" href="./example/2_b.jpg"><img alt="example2" src="./example/2_s.jpg" /></a> |
<a id="example3" href="./example/3_b.jpg"><img alt="example3" src="./example/3_s.jpg" /></a> |
<a id="example4" href="./example/4_b.jpg"><img class="last" alt="example4" src="./example/4_s.jpg" /></a> |
</p> |
<p> |
Different title positions<br /> |
<a id="example5" href="./example/5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit."><img alt="example4" src="./example/5_s.jpg" /></a> |
<a id="example6" href="./example/6_b.jpg" title="Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Vivamus fringilla congue laoreet."><img alt="example5" src="./example/6_s.jpg" /></a> |
<a id="example7" href="./example/7_b.jpg" title="Cras neque mi, semper at interdum id, dapibus in leo. Suspendisse nunc leo, eleifend sit amet iaculis et, cursus sed turpis."><img alt="example6" src="./example/7_s.jpg" /></a> |
<a id="example8" href="./example/8_b.jpg" title="Sed vel sapien vel sem tempus placerat eu ut tortor. Nulla facilisi. Sed adipiscing, turpis ut cursus molestie, sem eros viverra mauris, quis sollicitudin sapien enim nec est. ras pulvinar placerat diam eu consectetur."><img class="last" alt="example7" src="./example/8_s.jpg" /></a> |
</p> |
<p> |
Image gallery (ps, try using mouse scroll wheel)<br /> |
<a rel="example_group" href="./example/9_b.jpg" title="Lorem ipsum dolor sit amet"><img alt="" src="./example/9_s.jpg" /></a> |
<a rel="example_group" href="./example/10_b.jpg" title=""><img alt="" src="./example/10_s.jpg" /></a> |
<a rel="example_group" href="./example/11_b.jpg" title=""><img alt="" src="./example/11_s.jpg" /></a> |
<a rel="example_group" href="./example/12_b.jpg" title=""><img class="last" alt="" src="./example/12_s.jpg" /></a> |
</p> |
<p> |
Various examples |
</p> |
<ul> |
<li><a id="various1" href="#inline1" title="Lorem ipsum dolor sit amet">Inline</a></li> |
<li><a id="various2" href="ajax.txt">Ajax</a></li> |
<li><a id="various3" href="http://google.ca">Iframe</a></li> |
<li><a id="various4" href="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">Swf</a></li> |
</ul> |
<div style="display: none;"> |
<div id="inline1" style="width:400px;height:100px;overflow:auto;"> |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Nulla et lorem eu nibh adipiscing ultricies nec at lacus. Cras laoreet ultricies sem, at blandit mi eleifend aliquam. Nunc enim ipsum, vehicula non pretium varius, cursus ac tortor. Vivamus fringilla congue laoreet. Quisque ultrices sodales orci, quis rhoncus justo auctor in. Phasellus dui eros, bibendum eu feugiat ornare, faucibus eu mi. Nunc aliquet tempus sem, id aliquam diam varius ac. Maecenas nisl nunc, molestie vitae eleifend vel, iaculis sed magna. Aenean tempus lacus vitae orci posuere porttitor eget non felis. Donec lectus elit, aliquam nec eleifend sit amet, vestibulum sed nunc. |
</div> |
</div> |
<p> |
Ajax example will not run from your local computer and requires a server to run. |
</p> |
<p> |
Photo Credit: <a href="http://www.flickr.com/people/kharied/">Katie Harris</a> |
</p> |
</div> |
</body> |
</html> |
/trunk/squelettes/css/fancybox/fancy_shadow_ne.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_shadow_ne.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_shadow_s.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_shadow_s.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/jquery.easing-1.3.pack.js |
---|
New file |
0,0 → 1,72 |
/* |
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ |
* |
* Uses the built in easing capabilities added In jQuery 1.1 |
* to offer multiple easing options |
* |
* TERMS OF USE - jQuery Easing |
* |
* Open source under the BSD License. |
* |
* Copyright © 2008 George McGinley Smith |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without modification, |
* are permitted provided that the following conditions are met: |
* |
* Redistributions of source code must retain the above copyright notice, this list of |
* conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list |
* of conditions and the following disclaimer in the documentation and/or other materials |
* provided with the distribution. |
* |
* Neither the name of the author nor the names of contributors may be used to endorse |
* or promote products derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY |
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
* OF THE POSSIBILITY OF SUCH DAMAGE. |
* |
*/ |
// t: current time, b: begInnIng value, c: change In value, d: duration |
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}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{})) |
/* |
* |
* TERMS OF USE - EASING EQUATIONS |
* |
* Open source under the BSD License. |
* |
* Copyright © 2001 Robert Penner |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without modification, |
* are permitted provided that the following conditions are met: |
* |
* Redistributions of source code must retain the above copyright notice, this list of |
* conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list |
* of conditions and the following disclaimer in the documentation and/or other materials |
* provided with the distribution. |
* |
* Neither the name of the author nor the names of contributors may be used to endorse |
* or promote products derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY |
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
* OF THE POSSIBILITY OF SUCH DAMAGE. |
* |
*/ |
/trunk/squelettes/css/fancybox/jquery-1.4.3.min.js |
---|
New file |
0,0 → 1,166 |
/*! |
* jQuery JavaScript Library v1.4.3 |
* http://jquery.com/ |
* |
* Copyright 2010, John Resig |
* Dual licensed under the MIT or GPL Version 2 licenses. |
* http://jquery.org/license |
* |
* Includes Sizzle.js |
* http://sizzlejs.com/ |
* Copyright 2010, The Dojo Foundation |
* Released under the MIT, BSD, and GPL Licenses. |
* |
* Date: Thu Oct 14 23:10:06 2010 -0400 |
*/ |
(function(E,A){function U(){return false}function ba(){return true}function ja(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ga(a){var b,d,e=[],f=[],h,k,l,n,s,v,B,D;k=c.data(this,this.nodeType?"events":"__events__");if(typeof k==="function")k=k.events;if(!(a.liveFired===this||!k||!k.live||a.button&&a.type==="click")){if(a.namespace)D=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var H=k.live.slice(0);for(n=0;n<H.length;n++){k=H[n];k.origType.replace(X, |
"")===a.type?f.push(k.selector):H.splice(n--,1)}f=c(a.target).closest(f,a.currentTarget);s=0;for(v=f.length;s<v;s++){B=f[s];for(n=0;n<H.length;n++){k=H[n];if(B.selector===k.selector&&(!D||D.test(k.namespace))){l=B.elem;h=null;if(k.preType==="mouseenter"||k.preType==="mouseleave"){a.type=k.preType;h=c(a.relatedTarget).closest(k.selector)[0]}if(!h||h!==l)e.push({elem:l,handleObj:k,level:B.level})}}}s=0;for(v=e.length;s<v;s++){f=e[s];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data; |
a.handleObj=f.handleObj;D=f.handleObj.origHandler.apply(f.elem,arguments);if(D===false||a.isPropagationStopped()){d=f.level;if(D===false)b=false}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ha,"`").replace(Ia,"&")}function ka(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Ja.test(b))return c.filter(b, |
e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function la(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var k in e[h])c.event.add(this,h,e[h][k],e[h][k].data)}}})}function Ka(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 ma(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?La:Ma,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function ca(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Na.test(a)?e(a,h):ca(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)? |
e(a,""):c.each(b,function(f,h){ca(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(na.concat.apply([],na.slice(0,b)),function(){d[this]=a});return d}function oa(a){if(!da[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";da[a]=d}return da[a]}function ea(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var u=E.document,c=function(){function a(){if(!b.isReady){try{u.documentElement.doScroll("left")}catch(i){setTimeout(a, |
1);return}b.ready()}}var b=function(i,r){return new b.fn.init(i,r)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,k=/\S/,l=/^\s+/,n=/\s+$/,s=/\W/,v=/\d/,B=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,D=/^[\],:{}\s]*$/,H=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,G=/(?:^|:|,)(?:\s*\[)+/g,M=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,j=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false, |
q=[],t,x=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=Array.prototype.push,N=Array.prototype.slice,R=String.prototype.trim,Q=Array.prototype.indexOf,L={};b.fn=b.prototype={init:function(i,r){var y,z,F;if(!i)return this;if(i.nodeType){this.context=this[0]=i;this.length=1;return this}if(i==="body"&&!r&&u.body){this.context=u;this[0]=u.body;this.selector="body";this.length=1;return this}if(typeof i==="string")if((y=h.exec(i))&&(y[1]||!r))if(y[1]){F=r?r.ownerDocument||r:u;if(z=B.exec(i))if(b.isPlainObject(r)){i= |
[u.createElement(z[1])];b.fn.attr.call(i,r,true)}else i=[F.createElement(z[1])];else{z=b.buildFragment([y[1]],[F]);i=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,i)}else{if((z=u.getElementById(y[2]))&&z.parentNode){if(z.id!==y[2])return f.find(i);this.length=1;this[0]=z}this.context=u;this.selector=i;return this}else if(!r&&!s.test(i)){this.selector=i;this.context=u;i=u.getElementsByTagName(i);return b.merge(this,i)}else return!r||r.jquery?(r||f).find(i):b(r).find(i); |
else if(b.isFunction(i))return f.ready(i);if(i.selector!==A){this.selector=i.selector;this.context=i.context}return b.makeArray(i,this)},selector:"",jquery:"1.4.3",length:0,size:function(){return this.length},toArray:function(){return N.call(this,0)},get:function(i){return i==null?this.toArray():i<0?this.slice(i)[0]:this[i]},pushStack:function(i,r,y){var z=b();b.isArray(i)?P.apply(z,i):b.merge(z,i);z.prevObject=this;z.context=this.context;if(r==="find")z.selector=this.selector+(this.selector?" ": |
"")+y;else if(r)z.selector=this.selector+"."+r+"("+y+")";return z},each:function(i,r){return b.each(this,i,r)},ready:function(i){b.bindReady();if(b.isReady)i.call(u,b);else q&&q.push(i);return this},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(i){return this.pushStack(b.map(this,function(r,y){return i.call(r, |
y,r)}))},end:function(){return this.prevObject||b(null)},push:P,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var i=arguments[0]||{},r=1,y=arguments.length,z=false,F,I,K,J,fa;if(typeof i==="boolean"){z=i;i=arguments[1]||{};r=2}if(typeof i!=="object"&&!b.isFunction(i))i={};if(y===r){i=this;--r}for(;r<y;r++)if((F=arguments[r])!=null)for(I in F){K=i[I];J=F[I];if(i!==J)if(z&&J&&(b.isPlainObject(J)||(fa=b.isArray(J)))){if(fa){fa=false;clone=K&&b.isArray(K)?K:[]}else clone= |
K&&b.isPlainObject(K)?K:{};i[I]=b.extend(z,clone,J)}else if(J!==A)i[I]=J}return i};b.extend({noConflict:function(i){E.$=e;if(i)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(i){i===true&&b.readyWait--;if(!b.readyWait||i!==true&&!b.isReady){if(!u.body)return setTimeout(b.ready,1);b.isReady=true;if(!(i!==true&&--b.readyWait>0)){if(q){for(var r=0;i=q[r++];)i.call(u,b);q=null}b.fn.triggerHandler&&b(u).triggerHandler("ready")}}},bindReady:function(){if(!p){p=true;if(u.readyState==="complete")return setTimeout(b.ready, |
1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i== |
null||!v.test(i)||isNaN(i)},type:function(i){return i==null?String(i):L[x.call(i)]||"object"},isPlainObject:function(i){if(!i||b.type(i)!=="object"||i.nodeType||b.isWindow(i))return false;if(i.constructor&&!C.call(i,"constructor")&&!C.call(i.constructor.prototype,"isPrototypeOf"))return false;for(var r in i);return r===A||C.call(i,r)},isEmptyObject:function(i){for(var r in i)return false;return true},error:function(i){throw i;},parseJSON:function(i){if(typeof i!=="string"||!i)return null;i=b.trim(i); |
if(D.test(i.replace(H,"@").replace(w,"]").replace(G,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(i):(new Function("return "+i))();else b.error("Invalid JSON: "+i)},noop:function(){},globalEval:function(i){if(i&&k.test(i)){var r=u.getElementsByTagName("head")[0]||u.documentElement,y=u.createElement("script");y.type="text/javascript";if(b.support.scriptEval)y.appendChild(u.createTextNode(i));else y.text=i;r.insertBefore(y,r.firstChild);r.removeChild(y)}},nodeName:function(i,r){return i.nodeName&&i.nodeName.toUpperCase()=== |
r.toUpperCase()},each:function(i,r,y){var z,F=0,I=i.length,K=I===A||b.isFunction(i);if(y)if(K)for(z in i){if(r.apply(i[z],y)===false)break}else for(;F<I;){if(r.apply(i[F++],y)===false)break}else if(K)for(z in i){if(r.call(i[z],z,i[z])===false)break}else for(y=i[0];F<I&&r.call(y,F,y)!==false;y=i[++F]);return i},trim:R?function(i){return i==null?"":R.call(i)}:function(i){return i==null?"":i.toString().replace(l,"").replace(n,"")},makeArray:function(i,r){var y=r||[];if(i!=null){var z=b.type(i);i.length== |
null||z==="string"||z==="function"||z==="regexp"||b.isWindow(i)?P.call(y,i):b.merge(y,i)}return y},inArray:function(i,r){if(r.indexOf)return r.indexOf(i);for(var y=0,z=r.length;y<z;y++)if(r[y]===i)return y;return-1},merge:function(i,r){var y=i.length,z=0;if(typeof r.length==="number")for(var F=r.length;z<F;z++)i[y++]=r[z];else for(;r[z]!==A;)i[y++]=r[z++];i.length=y;return i},grep:function(i,r,y){var z=[],F;y=!!y;for(var I=0,K=i.length;I<K;I++){F=!!r(i[I],I);y!==F&&z.push(i[I])}return z},map:function(i, |
r,y){for(var z=[],F,I=0,K=i.length;I<K;I++){F=r(i[I],I,y);if(F!=null)z[z.length]=F}return z.concat.apply([],z)},guid:1,proxy:function(i,r,y){if(arguments.length===2)if(typeof r==="string"){y=i;i=y[r];r=A}else if(r&&!b.isFunction(r)){y=r;r=A}if(!r&&i)r=function(){return i.apply(y||this,arguments)};if(i)r.guid=i.guid=i.guid||r.guid||b.guid++;return r},access:function(i,r,y,z,F,I){var K=i.length;if(typeof r==="object"){for(var J in r)b.access(i,J,r[J],z,F,y);return i}if(y!==A){z=!I&&z&&b.isFunction(y); |
for(J=0;J<K;J++)F(i[J],r,z?y.call(i[J],J,F(i[J],r)):y,I);return i}return K?F(i[0],r):A},now:function(){return(new Date).getTime()},uaMatch:function(i){i=i.toLowerCase();i=M.exec(i)||g.exec(i)||j.exec(i)||i.indexOf("compatible")<0&&o.exec(i)||[];return{browser:i[1]||"",version:i[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,r){L["[object "+r+"]"]=r.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version= |
m.version}if(b.browser.webkit)b.browser.safari=true;if(Q)b.inArray=function(i,r){return Q.call(r,i)};if(!/\s/.test("\u00a0")){l=/^[\s\xA0]+/;n=/[\s\xA0]+$/}f=b(u);if(u.addEventListener)t=function(){u.removeEventListener("DOMContentLoaded",t,false);b.ready()};else if(u.attachEvent)t=function(){if(u.readyState==="complete"){u.detachEvent("onreadystatechange",t);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=u.documentElement,b=u.createElement("script"),d=u.createElement("div"), |
e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],k=u.createElement("select"),l=k.appendChild(u.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")), |
hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:l.selected,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};k.disabled=true;c.support.optDisabled=!l.disabled;b.type="text/javascript";try{b.appendChild(u.createTextNode("window."+e+"=1;"))}catch(n){}a.insertBefore(b, |
a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function s(){c.support.noCloneEvent=false;d.detachEvent("onclick",s)});d.cloneNode(true).fireEvent("onclick")}d=u.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=u.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var s=u.createElement("div"); |
s.style.width=s.style.paddingLeft="1px";u.body.appendChild(s);c.boxModel=c.support.boxModel=s.offsetWidth===2;if("zoom"in s.style){s.style.display="inline";s.style.zoom=1;c.support.inlineBlockNeedsLayout=s.offsetWidth===2;s.style.display="";s.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=s.offsetWidth!==2}s.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var v=s.getElementsByTagName("td");c.support.reliableHiddenOffsets=v[0].offsetHeight=== |
0;v[0].style.display="";v[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&v[0].offsetHeight===0;s.innerHTML="";u.body.removeChild(s).style.display="none"});a=function(s){var v=u.createElement("div");s="on"+s;var B=s in v;if(!B){v.setAttribute(s,"return;");B=typeof v[s]==="function"}return B};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength", |
cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var pa={},Oa=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?pa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===A)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]= |
c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==A)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?pa:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else if(d)delete f[e];else for(var k in a)delete a[k]}},acceptData:function(a){if(a.nodeName){var b= |
c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){if(typeof a==="undefined")return this.length?c.data(this[0]):null;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===A){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(e===A&&this.length){e=c.data(this[0],a);if(e===A&&this[0].nodeType===1){e=this[0].getAttribute("data-"+a);if(typeof e=== |
"string")try{e=e==="true"?true:e==="false"?false:e==="null"?null:!c.isNaN(e)?parseFloat(e):Oa.test(e)?c.parseJSON(e):e}catch(f){}else e=A}}return e===A&&d[1]?this.data(d[0]):e}else return this.each(function(){var h=c(this),k=[d[0],b];h.triggerHandler("setData"+d[1]+"!",k);c.data(this,a,b);h.triggerHandler("changeData"+d[1]+"!",k)})},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 e=c.data(a,b);if(!d)return e|| |
[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===A)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 qa=/[\n\t]/g,ga=/\s+/,Pa=/\r/g,Qa=/^(?:href|src|style)$/,Ra=/^(?:button|input)$/i,Sa=/^(?:button|input|object|select|textarea)$/i,Ta=/^a(?:rea)?$/i,ra=/^(?:radio|checkbox)$/i;c.fn.extend({attr:function(a,b){return c.access(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(s){var v=c(this);v.addClass(a.call(this,s,v.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ga),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1)if(f.className){for(var h=" "+f.className+" ",k=f.className,l=0,n=b.length;l<n;l++)if(h.indexOf(" "+b[l]+" ")<0)k+=" "+b[l];f.className=c.trim(k)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(n){var s= |
c(this);s.removeClass(a.call(this,n,s.attr("class")))});if(a&&typeof a==="string"||a===A)for(var b=(a||"").split(ga),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(qa," "),k=0,l=b.length;k<l;k++)h=h.replace(" "+b[k]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this, |
f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,k=c(this),l=b,n=a.split(ga);f=n[h++];){l=e?l:!k.hasClass(f);k[l?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=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(qa," ").indexOf(a)>-1)return true;return false}, |
val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&& |
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected= |
c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); |
if(d===null)a.nodeType===1&&a.removeAttribute(b);else 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:Sa.test(a.nodeName)||Ta.test(a.nodeName)&&a.href?0:A;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return A;a=!c.support.hrefNormalized&&e&& |
h?a.getAttribute(b,2):a.getAttribute(b);return a===null?A:a}}});var X=/\.(.*)$/,ha=/^(?:textarea|input|select)$/i,Ha=/\./g,Ia=/ /g,Ua=/[^\w\s.|`]/g,Va=function(a){return a.replace(Ua,"\\$&")},sa={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var k=a.nodeType?"events":"__events__",l=h[k],n=h.handle;if(typeof l=== |
"function"){n=l.handle;l=l.events}else if(!l){a.nodeType||(h[k]=h=function(){});h.events=l={}}if(!n)h.handle=n=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(n.elem,arguments):A};n.elem=a;b=b.split(" ");for(var s=0,v;k=b[s++];){h=f?c.extend({},f):{handler:d,data:e};if(k.indexOf(".")>-1){v=k.split(".");k=v.shift();h.namespace=v.slice(0).sort().join(".")}else{v=[];h.namespace=""}h.type=k;if(!h.guid)h.guid=d.guid;var B=l[k],D=c.event.special[k]||{};if(!B){B=l[k]=[]; |
if(!D.setup||D.setup.call(a,e,v,n)===false)if(a.addEventListener)a.addEventListener(k,n,false);else a.attachEvent&&a.attachEvent("on"+k,n)}if(D.add){D.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}B.push(h);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,k=0,l,n,s,v,B,D,H=a.nodeType?"events":"__events__",w=c.data(a),G=w&&w[H];if(w&&G){if(typeof G==="function"){w=G;G=G.events}if(b&&b.type){d=b.handler;b=b.type}if(!b|| |
typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in G)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[k++];){v=f;l=f.indexOf(".")<0;n=[];if(!l){n=f.split(".");f=n.shift();s=RegExp("(^|\\.)"+c.map(n.slice(0).sort(),Va).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(B=G[f])if(d){v=c.event.special[f]||{};for(h=e||0;h<B.length;h++){D=B[h];if(d.guid===D.guid){if(l||s.test(D.namespace)){e==null&&B.splice(h--,1);v.remove&&v.remove.call(a,D)}if(e!=null)break}}if(B.length===0||e!=null&&B.length===1){if(!v.teardown|| |
v.teardown.call(a,n)===false)c.removeEvent(a,f,w.handle);delete G[f]}}else for(h=0;h<B.length;h++){D=B[h];if(l||s.test(D.namespace)){c.event.remove(a,v,D.handler,h);B.splice(h--,1)}}}if(c.isEmptyObject(G)){if(b=w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,H);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type= |
f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return A;a.result=A;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)=== |
false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){e=a.target;var k,l=f.replace(X,""),n=c.nodeName(e,"a")&&l==="click",s=c.event.special[l]||{};if((!s._default||s._default.call(d,a)===false)&&!n&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[l]){if(k=e["on"+l])e["on"+l]=null;c.event.triggered=true;e[l]()}}catch(v){}if(k)e["on"+l]=k;c.event.triggered=false}}},handle:function(a){var b,d,e; |
d=[];var f,h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var k=d.length;f<k;f++){var l=d[f];if(b||e.test(l.namespace)){a.handler=l.handler;a.data= |
l.data;a.handleObj=l;l=l.handler.apply(this,h);if(l!==A){a.result=l;if(l===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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), |
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||u;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=u.documentElement;d=u.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|| |
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==A)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,Y(a.origType,a.selector),c.extend({},a,{handler:Ga,guid:a.handler.guid}))},remove:function(a){c.event.remove(this, |
Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=u.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp= |
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U}; |
var ta=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){}},ua=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?ua:ta,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?ua:ta)}}});if(!c.support.submitBubbles)c.event.special.submit={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){a.liveFired=A;return ja("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){a.liveFired=A;return ja("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V, |
va=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(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired= |
A;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.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 Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",va(a))}},setup:function(){if(this.type=== |
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ha.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ha.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}u.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){sa[b]++===0&&u.addEventListener(a,d,true)},teardown:function(){--sa[b]=== |
0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, |
a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,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]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= |
1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var wa={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var k,l=0,n,s,v=h||this.selector;h=h?this:c(this.context);if(typeof d=== |
"object"&&!d.preventDefault){for(k in d)h[b](k,e,d[k],v);return this}if(c.isFunction(e)){f=e;e=A}for(d=(d||"").split(" ");(k=d[l++])!=null;){n=X.exec(k);s="";if(n){s=n[0];k=k.replace(X,"")}if(k==="hover")d.push("mouseenter"+s,"mouseleave"+s);else{n=k;if(k==="focus"||k==="blur"){d.push(wa[k]+s);k+=s}else k=(wa[k]||k)+s;if(b==="live"){s=0;for(var B=h.length;s<B;s++)c.event.add(h[s],"live."+Y(k,v),{data:e,selector:v,handler:f,origType:k,origHandler:f,preType:n})}else h.unbind("live."+Y(k,v),f)}}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(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",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,j,o,m,p,q){p=0;for(var t=m.length;p<t;p++){var x=m[p];if(x){x=x[g];for(var C=false;x;){if(x.sizcache===o){C=m[x.sizset];break}if(x.nodeType===1&&!q){x.sizcache=o;x.sizset=p}if(x.nodeName.toLowerCase()===j){C=x;break}x=x[g]}m[p]=C}}}function b(g,j,o,m,p,q){p=0;for(var t=m.length;p<t;p++){var x=m[p];if(x){x=x[g];for(var C=false;x;){if(x.sizcache===o){C=m[x.sizset];break}if(x.nodeType===1){if(!q){x.sizcache=o;x.sizset=p}if(typeof j!=="string"){if(x===j){C=true;break}}else if(l.filter(j, |
[x]).length>0){C=x;break}}x=x[g]}m[p]=C}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,k=true;[0,0].sort(function(){k=false;return 0});var l=function(g,j,o,m){o=o||[];var p=j=j||u;if(j.nodeType!==1&&j.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var q=[],t,x,C,P,N=true,R=l.isXML(j),Q=g,L;do{d.exec("");if(t=d.exec(Q)){Q=t[3];q.push(t[1]);if(t[2]){P=t[3]; |
break}}}while(t);if(q.length>1&&s.exec(g))if(q.length===2&&n.relative[q[0]])x=M(q[0]+q[1],j);else for(x=n.relative[q[0]]?[j]:l(q.shift(),j);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();x=M(g,x)}else{if(!m&&q.length>1&&j.nodeType===9&&!R&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){t=l.find(q.shift(),j,R);j=t.expr?l.filter(t.expr,t.set)[0]:t.set[0]}if(j){t=m?{expr:q.pop(),set:D(m)}:l.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&j.parentNode?j.parentNode:j,R);x=t.expr?l.filter(t.expr, |
t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h= |
k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*")); |
return{set:m,expr:g}};l.filter=function(g,j,o,m){for(var p=g,q=[],t=j,x,C,P=j&&j[0]&&l.isXML(j[0]);g&&j.length;){for(var N in n.filter)if((x=n.leftMatch[N].exec(g))!=null&&x[2]){var R=n.filter[N],Q,L;L=x[1];C=false;x.splice(1,1);if(L.substr(L.length-1)!=="\\"){if(t===q)q=[];if(n.preFilter[N])if(x=n.preFilter[N](x,t,o,q,m,P)){if(x===true)continue}else C=Q=true;if(x)for(var i=0;(L=t[i])!=null;i++)if(L){Q=R(L,x,i,t);var r=m^!!Q;if(o&&Q!=null)if(r)C=true;else t[i]=false;else if(r){q.push(L);C=true}}if(Q!== |
A){o||(t=q);g=g.replace(n.match[N],"");if(!C)return[];break}}}if(g===p)if(C==null)l.error(g);else break;p=g}return t};l.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=l.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,j){var o=typeof j==="string",m=o&&!/\W/.test(j);o=o&&!m;if(m)j=j.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=o||q&&q.nodeName.toLowerCase()=== |
j?q||false:q===j}o&&l.filter(j,g,true)},">":function(g,j){var o=typeof j==="string",m,p=0,q=g.length;if(o&&!/\W/.test(j))for(j=j.toLowerCase();p<q;p++){if(m=g[p]){o=m.parentNode;g[p]=o.nodeName.toLowerCase()===j?o:false}}else{for(;p<q;p++)if(m=g[p])g[p]=o?m.parentNode:m.parentNode===j;o&&l.filter(j,g,true)}},"":function(g,j,o){var m=e++,p=b,q;if(typeof j==="string"&&!/\W/.test(j)){q=j=j.toLowerCase();p=a}p("parentNode",j,m,g,q,o)},"~":function(g,j,o){var m=e++,p=b,q;if(typeof j==="string"&&!/\W/.test(j)){q= |
j=j.toLowerCase();p=a}p("previousSibling",j,m,g,q,o)}},find:{ID:function(g,j,o){if(typeof j.getElementById!=="undefined"&&!o)return(g=j.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,j){if(typeof j.getElementsByName!=="undefined"){for(var o=[],m=j.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&o.push(m[p]);return o.length===0?null:o}},TAG:function(g,j){return j.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,j,o,m,p,q){g=" "+g[1].replace(/\\/g, |
"")+" ";if(q)return g;q=0;for(var t;(t=j[q])!=null;q++)if(t)if(p^(t.className&&(" "+t.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))o||m.push(t);else if(o)j[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var j=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=j[1]+(j[2]||1)-0;g[3]=j[3]-0}g[0]=e++;return g},ATTR:function(g,j,o, |
m,p,q){j=g[1].replace(/\\/g,"");if(!q&&n.attrMap[j])g[1]=n.attrMap[j];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,j,o,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,j);else{g=l.filter(g[3],j,o,true^p);o||m.push.apply(m,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,j,o){return!!l(o[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},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)}},setFilters:{first:function(g,j){return j===0},last:function(g,j,o,m){return j===m.length-1},even:function(g,j){return j%2===0},odd:function(g,j){return j%2===1},lt:function(g,j,o){return j<o[3]-0},gt:function(g,j,o){return j>o[3]-0},nth:function(g,j,o){return o[3]- |
0===j},eq:function(g,j,o){return o[3]-0===j}},filter:{PSEUDO:function(g,j,o,m){var p=j[1],q=n.filters[p];if(q)return q(g,o,j,m);else if(p==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(j[3])>=0;else if(p==="not"){j=j[3];o=0;for(m=j.length;o<m;o++)if(j[o]===g)return false;return true}else l.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,j){var o=j[1],m=g;switch(o){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(o=== |
"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":o=j[2];var p=j[3];if(o===1&&p===0)return true;var q=j[0],t=g.parentNode;if(t&&(t.sizcache!==q||!g.nodeIndex)){var x=0;for(m=t.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++x;t.sizcache=q}m=g.nodeIndex-p;return o===0?m===0:m%o===0&&m/o>=0}},ID:function(g,j){return g.nodeType===1&&g.getAttribute("id")===j},TAG:function(g,j){return j==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== |
j},CLASS:function(g,j){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(j)>-1},ATTR:function(g,j){var o=j[1];o=n.attrHandle[o]?n.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);var m=o+"",p=j[2],q=j[4];return o==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&o!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,j,o,m){var p=n.setFilters[j[2]]; |
if(p)return p(g,o,j,m)}}},s=n.match.POS,v=function(g,j){return"\\"+(j-0+1)},B;for(B in n.match){n.match[B]=RegExp(n.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[B]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[B].source.replace(/\\(\d+)/g,v))}var D=function(g,j){g=Array.prototype.slice.call(g,0);if(j){j.push.apply(j,g);return j}return g};try{Array.prototype.slice.call(u.documentElement.childNodes,0)}catch(H){D=function(g,j){var o=j||[],m=0;if(f.call(g)==="[object Array]")Array.prototype.push.apply(o, |
g);else if(typeof g.length==="number")for(var p=g.length;m<p;m++)o.push(g[m]);else for(;g[m];m++)o.push(g[m]);return o}}var w,G;if(u.documentElement.compareDocumentPosition)w=function(g,j){if(g===j){h=true;return 0}if(!g.compareDocumentPosition||!j.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(j)&4?-1:1};else{w=function(g,j){var o=[],m=[],p=g.parentNode,q=j.parentNode,t=p;if(g===j){h=true;return 0}else if(p===q)return G(g,j);else if(p){if(!q)return 1}else return-1; |
for(;t;){o.unshift(t);t=t.parentNode}for(t=q;t;){m.unshift(t);t=t.parentNode}p=o.length;q=m.length;for(t=0;t<p&&t<q;t++)if(o[t]!==m[t])return G(o[t],m[t]);return t===p?G(g,m[t],-1):G(o[t],j,1)};G=function(g,j,o){if(g===j)return o;for(g=g.nextSibling;g;){if(g===j)return-1;g=g.nextSibling}return 1}}l.getText=function(g){for(var j="",o,m=0;g[m];m++){o=g[m];if(o.nodeType===3||o.nodeType===4)j+=o.nodeValue;else if(o.nodeType!==8)j+=l.getText(o.childNodes)}return j};(function(){var g=u.createElement("div"), |
j="script"+(new Date).getTime();g.innerHTML="<a name='"+j+"'/>";var o=u.documentElement;o.insertBefore(g,o.firstChild);if(u.getElementById(j)){n.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:A:[]};n.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}o.removeChild(g); |
o=g=null})();(function(){var g=u.createElement("div");g.appendChild(u.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(j,o){var m=o.getElementsByTagName(j[1]);if(j[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(j){return j.getAttribute("href",2)};g=null})();u.querySelectorAll&& |
function(){var g=l,j=u.createElement("div");j.innerHTML="<p class='TEST'></p>";if(!(j.querySelectorAll&&j.querySelectorAll(".TEST").length===0)){l=function(m,p,q,t){p=p||u;if(!t&&!l.isXML(p))if(p.nodeType===9)try{return D(p.querySelectorAll(m),q)}catch(x){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var C=p.id,P=p.id="__sizzle__";try{return D(p.querySelectorAll("#"+P+" "+m),q)}catch(N){}finally{if(C)p.id=C;else p.removeAttribute("id")}}return g(m,p,q,t)};for(var o in g)l[o]=g[o]; |
j=null}}();(function(){var g=u.documentElement,j=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{j.call(u.documentElement,":sizzle")}catch(m){o=true}if(j)l.matchesSelector=function(p,q){try{if(o||!n.match.PSEUDO.test(q))return j.call(p,q)}catch(t){}return l(q,null,null,[p]).length>0}})();(function(){var g=u.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(j,o,m){if(typeof o.getElementsByClassName!=="undefined"&&!m)return o.getElementsByClassName(j[1])};g=null}}})();l.contains=u.documentElement.contains?function(g,j){return g!==j&&(g.contains?g.contains(j):true)}:function(g,j){return!!(g.compareDocumentPosition(j)&16)};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var M=function(g, |
j){for(var o=[],m="",p,q=j.nodeType?[j]:j;p=n.match.PSEUDO.exec(g);){m+=p[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;p=0;for(var t=q.length;p<t;p++)l(g,q[p],o);return l.filter(m,o)};c.find=l;c.expr=l.selectors;c.expr[":"]=c.expr.filters;c.unique=l.uniqueSort;c.text=l.getText;c.isXMLDoc=l.isXML;c.contains=l.contains})();var Wa=/Until$/,Xa=/^(?:parents|prevUntil|prevAll)/,Ya=/,/,Ja=/^.[^:#\[\.,]*$/,Za=Array.prototype.slice,$a=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("", |
"find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var k=0;k<d;k++)if(b[k]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(ka(this,a,false),"not",a)},filter:function(a){return this.pushStack(ka(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a, |
b){var d=[],e,f,h=this[0];if(c.isArray(a)){var k={},l,n=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:n})}h=h.parentNode;n++}}return d}k=$a.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(k?k.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h|| |
!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="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){var d=typeof a==="string"?c(a,b||this.context):c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},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",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")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Wa.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||Ya.test(e))&&Xa.test(a))f=f.reverse();return this.pushStack(f,a,Za.call(arguments).join(","))}}); |
c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===A||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===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 xa=/ jQuery\d+="(?:\d+|null)"/g, |
$=/^\s+/,ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,za=/<([\w:]+)/,ab=/<tbody/i,bb=/<|&#?\w+;/,Aa=/<(?:script|object|embed|option|style)/i,Ba=/checked\s*(?:[^=]|=\s*.checked.)/i,cb=/\=([^="'>\s]+\/)>/g,O={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,"",""]};O.optgroup=O.option;O.tbody=O.tfoot=O.colgroup=O.caption=O.thead;O.th=O.td;if(!c.support.htmlSerialize)O._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==A)return this.empty().append((this[0]&&this[0].ownerDocument||u).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},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)})},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,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,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*")); |
c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}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);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(xa,"").replace(cb,'="$1">').replace($, |
"")],e)[0]}else return this.cloneNode(true)});if(a===true){la(this,b);la(this.find("*"),b.find("*"))}return b},html:function(a){if(a===A)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(xa,""):null;else if(typeof a==="string"&&!Aa.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!O[(za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ya,"<$1></$2>");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(e){this.empty().append(a)}}else c.isFunction(a)? |
this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),e=d.html();d.replaceWith(a.call(this,b,e))});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){var e,f,h=a[0],k=[],l;if(!c.support.checkClone&&arguments.length===3&&typeof h==="string"&&Ba.test(h))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(h))return this.each(function(s){var v=c(this);a[0]=h.call(this,s,b?v.html():A);v.domManip(a,b,d)});if(this[0]){e=h&&h.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);l=e.fragment;if(f=l.childNodes.length===1?l=l.firstChild: |
l.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var n=this.length;f<n;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):this[f]:this[f],f>0||e.cacheable||this.length>1?l.cloneNode(true):l)}k.length&&c.each(k,Ka)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:u;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===u&&!Aa.test(a[0])&&(c.support.checkClone|| |
!Ba.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h= |
d.length;f<h;f++){var k=(f>0?this.clone(true):this).get();c(d[f])[b](k);e=e.concat(k)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||u;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||u;for(var f=[],h=0,k;(k=a[h])!=null;h++){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!bb.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(ya,"<$1></$2>");var l=(za.exec(k)||["",""])[1].toLowerCase(),n=O[l]||O._default, |
s=n[0],v=b.createElement("div");for(v.innerHTML=n[1]+k+n[2];s--;)v=v.lastChild;if(!c.support.tbody){s=ab.test(k);l=l==="table"&&!s?v.firstChild&&v.firstChild.childNodes:n[1]==="<table>"&&!s?v.childNodes:[];for(n=l.length-1;n>=0;--n)c.nodeName(l[n],"tbody")&&!l[n].childNodes.length&&l[n].parentNode.removeChild(l[n])}!c.support.leadingWhitespace&&$.test(k)&&v.insertBefore(b.createTextNode($.exec(k)[0]),v.firstChild);k=v.childNodes}if(k.nodeType)f.push(k);else f=c.merge(f,k)}}if(d)for(h=0;f[h];h++)if(e&& |
c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,k=0,l;(l=a[k])!=null;k++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=e[d])&&b.events)for(var n in b.events)f[n]? |
c.event.remove(l,n):c.removeEvent(l,n,b.handle);if(h)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete e[d]}}});var Ca=/alpha\([^)]*\)/i,db=/opacity=([^)]*)/,eb=/-([a-z])/ig,fb=/([A-Z])/g,Da=/^-?\d+(?:px)?$/i,gb=/^-?\d/,hb={position:"absolute",visibility:"hidden",display:"block"},La=["Left","Right"],Ma=["Top","Bottom"],W,ib=u.defaultView&&u.defaultView.getComputedStyle,jb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===A)return this; |
return c.access(this,a,b,true,function(d,e,f){return f!==A?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),k=a.style,l=c.cssHooks[h];b=c.cssProps[h]|| |
h;if(d!==A){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==A)try{k[b]=d}catch(n){}}}else{if(l&&"get"in l&&(f=l.get(a,false,e))!==A)return f;return k[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==A)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]= |
e[f]},camelCase:function(a){return a.replace(eb,jb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=ma(d,b,f);else c.swap(d,hb,function(){h=ma(d,b,f)});return h+"px"}},set:function(d,e){if(Da.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return db.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"": |
b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=d.filter||"";d.filter=Ca.test(f)?f.replace(Ca,e):d.filter+" "+e}};if(ib)W=function(a,b,d){var e;d=d.replace(fb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return A;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};else if(u.documentElement.currentStyle)W=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b], |
h=a.style;if(!Da.test(f)&&gb.test(f)){d=h.left;e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f};if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var kb=c.now(),lb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, |
mb=/^(?:select|textarea)/i,nb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ob=/^(?:GET|HEAD|DELETE)$/,Na=/\[\]$/,T=/\=\?(&|$)/,ia=/\?/,pb=/([?&])_=[^&]*/,qb=/^(\w+:)?\/\/([^\/?#]+)/,rb=/%20/g,sb=/#.*$/,Ea=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ea)return Ea.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d= |
b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(k,l){if(l==="success"||l==="notmodified")h.html(f?c("<div>").append(k.responseText.replace(lb,"")).find(f):k.responseText);d&&h.each(d,[k.responseText,l,k])}});return this},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||mb.test(this.nodeName)||nb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, |
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,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", |
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),k=ob.test(h);b.url=b.url.replace(sb,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ia.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| |
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+kb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var l=E[d];E[d]=function(m){f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);if(c.isFunction(l))l(m);else{E[d]=A;try{delete E[d]}catch(p){}}v&&v.removeChild(B)}}if(b.dataType==="script"&&b.cache===null)b.cache= |
false;if(b.cache===false&&h==="GET"){var n=c.now(),s=b.url.replace(pb,"$1_="+n);b.url=s+(s===b.url?(ia.test(b.url)?"&":"?")+"_="+n:"")}if(b.data&&h==="GET")b.url+=(ia.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");n=(n=qb.exec(b.url))&&(n[1]&&n[1]!==location.protocol||n[2]!==location.host);if(b.dataType==="script"&&h==="GET"&&n){var v=u.getElementsByTagName("head")[0]||u.documentElement,B=u.createElement("script");if(b.scriptCharset)B.charset=b.scriptCharset;B.src= |
b.url;if(!d){var D=false;B.onload=B.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);B.onload=B.onreadystatechange=null;v&&B.parentNode&&v.removeChild(B)}}}v.insertBefore(B,v.firstChild);return A}var H=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!k||a&&a.contentType)w.setRequestHeader("Content-Type", |
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}n||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(G){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& |
c.triggerGlobal(b,"ajaxSend",[w,b]);var M=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){H||c.handleComplete(b,w,e,f);H=true;if(w)w.onreadystatechange=c.noop}else if(!H&&w&&(w.readyState===4||m==="timeout")){H=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| |
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&g.call&&g.call(w);M("abort")}}catch(j){}b.async&&b.timeout>0&&setTimeout(function(){w&&!H&&M("timeout")},b.timeout);try{w.send(k||b.data==null?null:b.data)}catch(o){c.handleError(b,w,null,o);c.handleComplete(b,w,e,f)}b.async||M();return w}},param:function(a,b){var d=[],e=function(h,k){k=c.isFunction(k)?k():k;d[d.length]=encodeURIComponent(h)+ |
"="+encodeURIComponent(k)};if(b===A)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)ca(f,a[f],b,e);return d.join("&").replace(rb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",[b,a])},handleComplete:function(a, |
b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),e=a.getResponseHeader("Etag"); |
if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});if(E.ActiveXObject)c.ajaxSettings.xhr= |
function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var da={},tb=/^(?:toggle|show|hide)$/,ub=/^([+\-]=)?([\d+.\-]+)(.*)$/,aa,na=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",3),a,b,d);else{a= |
0;for(b=this.length;a<b;a++){if(!c.data(this[a],"olddisplay")&&this[a].style.display==="none")this[a].style.display="";this[a].style.display===""&&c.css(this[a],"display")==="none"&&c.data(this[a],"olddisplay",oa(this[a].nodeName))}for(a=0;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",d)}for(a= |
0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,d,e);if(c.isEmptyObject(a))return this.each(f.complete); |
return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),k,l=this.nodeType===1,n=l&&c(this).is(":hidden"),s=this;for(k in a){var v=c.camelCase(k);if(k!==v){a[v]=a[k];delete a[k];k=v}if(a[k]==="hide"&&n||a[k]==="show"&&!n)return h.complete.call(this);if(l&&(k==="height"||k==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(oa(this.nodeName)=== |
"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[k])){(h.specialEasing=h.specialEasing||{})[k]=a[k][1];a[k]=a[k][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(B,D){var H=new c.fx(s,h,B);if(tb.test(D))H[D==="toggle"?n?"show":"hide":D](a);else{var w=ub.exec(D),G=H.cur(true)||0;if(w){var M=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(s,B,(M||1)+g); |
G=(M||1)/H.cur(true)*G;c.style(s,B,G+g)}if(w[1])M=(w[1]==="-="?-1:1)*M+G;H.custom(G,M,g)}else H.custom(G,D,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, |
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* |
Math.PI)/2+0.5)*e+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]||c.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=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(h){return f.step(h)} |
this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var f=this;a=c.fx;e.elem=this.elem;if(e()&&c.timers.push(e)&&!aa)aa=setInterval(a.tick,a.interval)},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=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(l,n){f.style["overflow"+n]=h.overflow[l]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| |
this.options.show)for(var k in this.options.curAnim)c.style(this.elem,k,this.options.orig[k]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,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||c.fx.stop()},interval:13,stop:function(){clearInterval(aa);aa=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};var vb=/^t(?:able|d|h)$/i,Fa=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in u.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(k){c.offset.setOffset(this,a,k)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=ea(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&& |
h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,e=b.ownerDocument,f,h=e.documentElement,k=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle; |
for(var l=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==k&&b!==h;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;f=e?e.getComputedStyle(b,null):b.currentStyle;l-=b.scrollTop;n-=b.scrollLeft;if(b===d){l+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&vb.test(b.nodeName))){l+=parseFloat(f.borderTopWidth)||0;n+=parseFloat(f.borderLeftWidth)||0}d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&f.overflow!=="visible"){l+= |
parseFloat(f.borderTopWidth)||0;n+=parseFloat(f.borderLeftWidth)||0}f=f}if(f.position==="relative"||f.position==="static"){l+=k.offsetTop;n+=k.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){l+=Math.max(h.scrollTop,k.scrollTop);n+=Math.max(h.scrollLeft,k.scrollLeft)}return{top:l,left:n}};c.offset={initialize:function(){var a=u.body,b=u.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||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>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells= |
f.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!==h;a.removeChild(b);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.css(a, |
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a, |
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.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(e){var f=this[0],h;if(!f)return null;if(e!==A)return this.each(function(){if(h=ea(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=ea(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); |
c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(h){var k=c(this);k[d](e.call(this,h,k[d]()))});return c.isWindow(f)?f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b]:f.nodeType===9?Math.max(f.documentElement["client"+ |
b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]):e===A?parseFloat(c.css(f,d)):this.css(d,typeof e==="string"?e:e+"px")}})})(window); |
/trunk/squelettes/css/fancybox/fancy_shadow_w.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_shadow_w.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_shadow_se.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_shadow_se.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_title_over.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_title_over.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/jquery.fancybox-1.3.4.css |
---|
New file |
0,0 → 1,359 |
/* |
* FancyBox - jQuery Plugin |
* Simple and fancy lightbox alternative |
* |
* Examples and documentation at: http://fancybox.net |
* |
* Copyright (c) 2008 - 2010 Janis Skarnelis |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. |
* |
* Version: 1.3.4 (11/11/2010) |
* Requires: jQuery v1.3+ |
* |
* Dual licensed under the MIT and GPL licenses: |
* http://www.opensource.org/licenses/mit-license.php |
* http://www.gnu.org/licenses/gpl.html |
*/ |
#fancybox-loading { |
position: fixed; |
top: 50%; |
left: 50%; |
width: 40px; |
height: 40px; |
margin-top: -20px; |
margin-left: -20px; |
cursor: pointer; |
overflow: hidden; |
z-index: 1104; |
display: none; |
} |
#fancybox-loading div { |
position: absolute; |
top: 0; |
left: 0; |
width: 40px; |
height: 480px; |
background-image: url('fancybox.png'); |
} |
#fancybox-overlay { |
position: absolute; |
top: 0; |
left: 0; |
width: 100%; |
z-index: 1100; |
display: none; |
} |
#fancybox-tmp { |
padding: 0; |
margin: 0; |
border: 0; |
overflow: auto; |
display: none; |
} |
#fancybox-wrap { |
position: absolute; |
top: 0; |
left: 0; |
padding: 20px; |
z-index: 1101; |
outline: none; |
display: none; |
} |
#fancybox-outer { |
position: relative; |
width: 100%; |
height: 100%; |
background: #fff; |
} |
#fancybox-content { |
width: 0; |
height: 0; |
padding: 0; |
outline: none; |
position: relative; |
overflow: hidden; |
z-index: 1102; |
border: 0px solid #fff; |
} |
#fancybox-hide-sel-frame { |
position: absolute; |
top: 0; |
left: 0; |
width: 100%; |
height: 100%; |
background: transparent; |
z-index: 1101; |
} |
#fancybox-close { |
position: absolute; |
top: -15px; |
right: -15px; |
width: 30px; |
height: 30px; |
background: transparent url('fancybox.png') -40px 0px; |
cursor: pointer; |
z-index: 1103; |
display: none; |
} |
#fancybox-error { |
color: #444; |
font: normal 12px/20px Arial; |
padding: 14px; |
margin: 0; |
} |
#fancybox-img { |
width: 100%; |
height: 100%; |
padding: 0; |
margin: 0; |
border: none; |
outline: none; |
line-height: 0; |
vertical-align: top; |
} |
#fancybox-frame { |
width: 100%; |
height: 100%; |
border: none; |
display: block; |
} |
#fancybox-left, #fancybox-right { |
position: absolute; |
bottom: 0px; |
height: 100%; |
width: 35%; |
cursor: pointer; |
outline: none; |
background: transparent url('blank.gif'); |
z-index: 1102; |
display: none; |
} |
#fancybox-left { |
left: 0px; |
} |
#fancybox-right { |
right: 0px; |
} |
#fancybox-left-ico, #fancybox-right-ico { |
position: absolute; |
top: 50%; |
left: -9999px; |
width: 30px; |
height: 30px; |
margin-top: -15px; |
cursor: pointer; |
z-index: 1102; |
display: block; |
} |
#fancybox-left-ico { |
background-image: url('fancybox.png'); |
background-position: -40px -30px; |
} |
#fancybox-right-ico { |
background-image: url('fancybox.png'); |
background-position: -40px -60px; |
} |
#fancybox-left:hover, #fancybox-right:hover { |
visibility: visible; /* IE6 */ |
} |
#fancybox-left:hover span { |
left: 20px; |
} |
#fancybox-right:hover span { |
left: auto; |
right: 20px; |
} |
.fancybox-bg { |
position: absolute; |
padding: 0; |
margin: 0; |
border: 0; |
width: 20px; |
height: 20px; |
z-index: 1001; |
} |
#fancybox-bg-n { |
top: -20px; |
left: 0; |
width: 100%; |
background-image: url('fancybox-x.png'); |
} |
#fancybox-bg-ne { |
top: -20px; |
right: -20px; |
background-image: url('fancybox.png'); |
background-position: -40px -162px; |
} |
#fancybox-bg-e { |
top: 0; |
right: -20px; |
height: 100%; |
background-image: url('fancybox-y.png'); |
background-position: -20px 0px; |
} |
#fancybox-bg-se { |
bottom: -20px; |
right: -20px; |
background-image: url('fancybox.png'); |
background-position: -40px -182px; |
} |
#fancybox-bg-s { |
bottom: -20px; |
left: 0; |
width: 100%; |
background-image: url('fancybox-x.png'); |
background-position: 0px -20px; |
} |
#fancybox-bg-sw { |
bottom: -20px; |
left: -20px; |
background-image: url('fancybox.png'); |
background-position: -40px -142px; |
} |
#fancybox-bg-w { |
top: 0; |
left: -20px; |
height: 100%; |
background-image: url('fancybox-y.png'); |
} |
#fancybox-bg-nw { |
top: -20px; |
left: -20px; |
background-image: url('fancybox.png'); |
background-position: -40px -122px; |
} |
#fancybox-title { |
font-family: Helvetica; |
font-size: 12px; |
z-index: 1102; |
} |
.fancybox-title-inside { |
padding-bottom: 10px; |
text-align: center; |
color: #333; |
background: #fff; |
position: relative; |
} |
.fancybox-title-outside { |
padding-top: 10px; |
color: #fff; |
} |
.fancybox-title-over { |
position: absolute; |
bottom: 0; |
left: 0; |
color: #FFF; |
text-align: left; |
} |
#fancybox-title-over { |
padding: 10px; |
background-image: url('fancy_title_over.png'); |
display: block; |
} |
.fancybox-title-float { |
position: absolute; |
left: 0; |
bottom: -20px; |
height: 32px; |
} |
#fancybox-title-float-wrap { |
border: none; |
border-collapse: collapse; |
width: auto; |
} |
#fancybox-title-float-wrap td { |
border: none; |
white-space: nowrap; |
} |
#fancybox-title-float-left { |
padding: 0 0 0 15px; |
background: url('fancybox.png') -40px -90px no-repeat; |
} |
#fancybox-title-float-main { |
color: #FFF; |
line-height: 29px; |
font-weight: bold; |
padding: 0 0 3px 0; |
background: url('fancybox-x.png') 0px -40px; |
} |
#fancybox-title-float-right { |
padding: 0 0 0 15px; |
background: url('fancybox.png') -55px -90px no-repeat; |
} |
/* IE6 */ |
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } |
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { |
height: expression(this.parentNode.clientHeight + "px"); |
} |
#fancybox-loading.fancybox-ie6 { |
position: absolute; margin-top: 0; |
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); |
} |
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); } |
/* IE6, IE7, IE8 */ |
.fancybox-ie .fancybox-bg { background: transparent !important; } |
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } |
/trunk/squelettes/css/fancybox/fancy_loading.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_loading.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/jquery.fancybox-1.3.4.pack.js |
---|
New file |
0,0 → 1,46 |
/* |
* FancyBox - jQuery Plugin |
* Simple and fancy lightbox alternative |
* |
* Examples and documentation at: http://fancybox.net |
* |
* Copyright (c) 2008 - 2010 Janis Skarnelis |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. |
* |
* Version: 1.3.4 (11/11/2010) |
* Requires: jQuery v1.3+ |
* |
* Dual licensed under the MIT and GPL licenses: |
* http://www.opensource.org/licenses/mit-license.php |
* http://www.gnu.org/licenses/gpl.html |
*/ |
;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'); |
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)|| |
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick= |
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel", |
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+ |
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win== |
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+ |
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor, |
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length? |
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding}); |
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height== |
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents()); |
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode== |
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto"); |
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j); |
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c); |
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type== |
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"), |
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)}; |
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k= |
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+ |
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h= |
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1; |
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5- |
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f); |
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()}); |
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}}; |
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing", |
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery); |
/trunk/squelettes/css/fancybox/fancy_title_right.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_title_right.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/jquery.mousewheel-3.0.4.pack.js |
---|
New file |
0,0 → 1,14 |
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) |
* Licensed under the MIT License (LICENSE.txt). |
* |
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. |
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. |
* Thanks to: Seamus Leahy for adding deltaX and deltaY |
* |
* Version: 3.0.4 |
* |
* Requires: 1.2.2+ |
*/ |
(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a= |
f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); |
/trunk/squelettes/css/fancybox/fancy_nav_right.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_nav_right.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/style.css |
---|
New file |
0,0 → 1,65 |
html, body, div, ul { |
margin: 0; |
padding: 0; |
} |
body { |
color: #262626; |
background: #f4f4f4; |
font: normal 12px/18px Verdana, sans-serif; |
} |
#content { |
width: 400px; |
margin: 40px auto 0 auto; |
padding: 0 60px 30px 60px; |
border: solid 1px #cbcbcb; |
background: #fafafa; |
-moz-box-shadow: 0px 0px 10px #cbcbcb; |
-webkit-box-shadow: 0px 0px 10px #cbcbcb; |
} |
h1 { |
margin: 30px 0 15px 0; |
font-size: 30px; |
font-weight: bold; |
font-family: Arial; |
} |
h1 span { |
font-size: 50%; |
letter-spacing: -0.05em; |
} |
hr { |
border: none; |
height: 1px; line-height: 1px; |
background: #E5E5E5; |
margin-bottom: 20px; |
padding: 0; |
} |
p { |
margin: 0; |
padding: 7px 0; |
} |
a { |
outline: none; |
} |
a img { |
border: 1px solid #BBB; |
padding: 2px; |
margin: 10px 20px 10px 0; |
vertical-align: top; |
} |
a img.last { |
margin-right: 0; |
} |
ul { |
margin-bottom: 24px; |
padding-left: 30px; |
} |
/trunk/squelettes/css/fancybox/fancy_title_main.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_title_main.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/blank.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/squelettes/css/fancybox/blank.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_shadow_nw.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_shadow_nw.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_shadow_e.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_shadow_e.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancybox.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancybox.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_title_left.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_title_left.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancybox-x.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancybox-x.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/ajax.txt |
---|
New file |
0,0 → 1,6 |
<div style="width:400px;"> |
<h2>This comes from ajax request</h2> |
<p> |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean non velit. Donec pharetra, felis ut tristique adipiscing, diam magna rhoncus neque, sit amet convallis nibh nibh vel libero. Nulla facilisi. In eleifend nisl quis lorem. Duis semper fringilla justo. Proin imperdiet sapien sed lectus. Integer quis nisl et est elementum tempor. Morbi quis tellus nec turpis suscipit molestie. Praesent sed pede. Pellentesque ac orci. Sed sit amet urna eget tellus hendrerit aliquet. Nulla consectetur, pede aliquam ornare placerat, nunc augue commodo leo, sit amet elementum dolor est eleifend magna. |
</p> |
</div> |
Property changes: |
Added: svn:eol-style |
+native |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_nav_left.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_nav_left.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancy_shadow_sw.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_shadow_sw.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/fancybox-y.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancybox-y.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/fancybox/jquery.fancybox-1.3.4.js |
---|
New file |
0,0 → 1,1156 |
/* |
* FancyBox - jQuery Plugin |
* Simple and fancy lightbox alternative |
* |
* Examples and documentation at: http://fancybox.net |
* |
* Copyright (c) 2008 - 2010 Janis Skarnelis |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. |
* |
* Version: 1.3.4 (11/11/2010) |
* Requires: jQuery v1.3+ |
* |
* Dual licensed under the MIT and GPL licenses: |
* http://www.opensource.org/licenses/mit-license.php |
* http://www.gnu.org/licenses/gpl.html |
*/ |
;(function($) { |
var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right, |
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [], |
ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i, |
loadingTimer, loadingFrame = 1, |
titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }), |
isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest, |
/* |
* Private methods |
*/ |
_abort = function() { |
loading.hide(); |
imgPreloader.onerror = imgPreloader.onload = null; |
if (ajaxLoader) { |
ajaxLoader.abort(); |
} |
tmp.empty(); |
}, |
_error = function() { |
if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) { |
loading.hide(); |
busy = false; |
return; |
} |
selectedOpts.titleShow = false; |
selectedOpts.width = 'auto'; |
selectedOpts.height = 'auto'; |
tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' ); |
_process_inline(); |
}, |
_start = function() { |
var obj = selectedArray[ selectedIndex ], |
href, |
type, |
title, |
str, |
emb, |
ret; |
_abort(); |
selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox'))); |
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts); |
if (ret === false) { |
busy = false; |
return; |
} else if (typeof ret == 'object') { |
selectedOpts = $.extend(selectedOpts, ret); |
} |
title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || ''; |
if (obj.nodeName && !selectedOpts.orig) { |
selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj); |
} |
if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) { |
title = selectedOpts.orig.attr('alt'); |
} |
href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null; |
if ((/^(?:javascript)/i).test(href) || href == '#') { |
href = null; |
} |
if (selectedOpts.type) { |
type = selectedOpts.type; |
if (!href) { |
href = selectedOpts.content; |
} |
} else if (selectedOpts.content) { |
type = 'html'; |
} else if (href) { |
if (href.match(imgRegExp)) { |
type = 'image'; |
} else if (href.match(swfRegExp)) { |
type = 'swf'; |
} else if ($(obj).hasClass("iframe")) { |
type = 'iframe'; |
} else if (href.indexOf("#") === 0) { |
type = 'inline'; |
} else { |
type = 'ajax'; |
} |
} |
if (!type) { |
_error(); |
return; |
} |
if (type == 'inline') { |
obj = href.substr(href.indexOf("#")); |
type = $(obj).length > 0 ? 'inline' : 'ajax'; |
} |
selectedOpts.type = type; |
selectedOpts.href = href; |
selectedOpts.title = title; |
if (selectedOpts.autoDimensions) { |
if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') { |
selectedOpts.width = 'auto'; |
selectedOpts.height = 'auto'; |
} else { |
selectedOpts.autoDimensions = false; |
} |
} |
if (selectedOpts.modal) { |
selectedOpts.overlayShow = true; |
selectedOpts.hideOnOverlayClick = false; |
selectedOpts.hideOnContentClick = false; |
selectedOpts.enableEscapeButton = false; |
selectedOpts.showCloseButton = false; |
} |
selectedOpts.padding = parseInt(selectedOpts.padding, 10); |
selectedOpts.margin = parseInt(selectedOpts.margin, 10); |
tmp.css('padding', (selectedOpts.padding + selectedOpts.margin)); |
$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() { |
$(this).replaceWith(content.children()); |
}); |
switch (type) { |
case 'html' : |
tmp.html( selectedOpts.content ); |
_process_inline(); |
break; |
case 'inline' : |
if ( $(obj).parent().is('#fancybox-content') === true) { |
busy = false; |
return; |
} |
$('<div class="fancybox-inline-tmp" />') |
.hide() |
.insertBefore( $(obj) ) |
.bind('fancybox-cleanup', function() { |
$(this).replaceWith(content.children()); |
}).bind('fancybox-cancel', function() { |
$(this).replaceWith(tmp.children()); |
}); |
$(obj).appendTo(tmp); |
_process_inline(); |
break; |
case 'image': |
busy = false; |
$.fancybox.showActivity(); |
imgPreloader = new Image(); |
imgPreloader.onerror = function() { |
_error(); |
}; |
imgPreloader.onload = function() { |
busy = true; |
imgPreloader.onerror = imgPreloader.onload = null; |
_process_image(); |
}; |
imgPreloader.src = href; |
break; |
case 'swf': |
selectedOpts.scrolling = 'no'; |
str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>'; |
emb = ''; |
$.each(selectedOpts.swf, function(name, val) { |
str += '<param name="' + name + '" value="' + val + '"></param>'; |
emb += ' ' + name + '="' + val + '"'; |
}); |
str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>'; |
tmp.html(str); |
_process_inline(); |
break; |
case 'ajax': |
busy = false; |
$.fancybox.showActivity(); |
selectedOpts.ajax.win = selectedOpts.ajax.success; |
ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { |
url : href, |
data : selectedOpts.ajax.data || {}, |
error : function(XMLHttpRequest, textStatus, errorThrown) { |
if ( XMLHttpRequest.status > 0 ) { |
_error(); |
} |
}, |
success : function(data, textStatus, XMLHttpRequest) { |
var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader; |
if (o.status == 200) { |
if ( typeof selectedOpts.ajax.win == 'function' ) { |
ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); |
if (ret === false) { |
loading.hide(); |
return; |
} else if (typeof ret == 'string' || typeof ret == 'object') { |
data = ret; |
} |
} |
tmp.html( data ); |
_process_inline(); |
} |
} |
})); |
break; |
case 'iframe': |
_show(); |
break; |
} |
}, |
_process_inline = function() { |
var |
w = selectedOpts.width, |
h = selectedOpts.height; |
if (w.toString().indexOf('%') > -1) { |
w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px'; |
} else { |
w = w == 'auto' ? 'auto' : w + 'px'; |
} |
if (h.toString().indexOf('%') > -1) { |
h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px'; |
} else { |
h = h == 'auto' ? 'auto' : h + 'px'; |
} |
tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>'); |
selectedOpts.width = tmp.width(); |
selectedOpts.height = tmp.height(); |
_show(); |
}, |
_process_image = function() { |
selectedOpts.width = imgPreloader.width; |
selectedOpts.height = imgPreloader.height; |
$("<img />").attr({ |
'id' : 'fancybox-img', |
'src' : imgPreloader.src, |
'alt' : selectedOpts.title |
}).appendTo( tmp ); |
_show(); |
}, |
_show = function() { |
var pos, equal; |
loading.hide(); |
if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { |
$.event.trigger('fancybox-cancel'); |
busy = false; |
return; |
} |
busy = true; |
$(content.add( overlay )).unbind(); |
$(window).unbind("resize.fb scroll.fb"); |
$(document).unbind('keydown.fb'); |
if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') { |
wrap.css('height', wrap.height()); |
} |
currentArray = selectedArray; |
currentIndex = selectedIndex; |
currentOpts = selectedOpts; |
if (currentOpts.overlayShow) { |
overlay.css({ |
'background-color' : currentOpts.overlayColor, |
'opacity' : currentOpts.overlayOpacity, |
'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto', |
'height' : $(document).height() |
}); |
if (!overlay.is(':visible')) { |
if (isIE6) { |
$('select:not(#fancybox-tmp select)').filter(function() { |
return this.style.visibility !== 'hidden'; |
}).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() { |
this.style.visibility = 'inherit'; |
}); |
} |
overlay.show(); |
} |
} else { |
overlay.hide(); |
} |
final_pos = _get_zoom_to(); |
_process_title(); |
if (wrap.is(":visible")) { |
$( close.add( nav_left ).add( nav_right ) ).hide(); |
pos = wrap.position(), |
start_pos = { |
top : pos.top, |
left : pos.left, |
width : wrap.width(), |
height : wrap.height() |
}; |
equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height); |
content.fadeTo(currentOpts.changeFade, 0.3, function() { |
var finish_resizing = function() { |
content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish); |
}; |
$.event.trigger('fancybox-change'); |
content |
.empty() |
.removeAttr('filter') |
.css({ |
'border-width' : currentOpts.padding, |
'width' : final_pos.width - currentOpts.padding * 2, |
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 |
}); |
if (equal) { |
finish_resizing(); |
} else { |
fx.prop = 0; |
$(fx).animate({prop: 1}, { |
duration : currentOpts.changeSpeed, |
easing : currentOpts.easingChange, |
step : _draw, |
complete : finish_resizing |
}); |
} |
}); |
return; |
} |
wrap.removeAttr("style"); |
content.css('border-width', currentOpts.padding); |
if (currentOpts.transitionIn == 'elastic') { |
start_pos = _get_zoom_from(); |
content.html( tmp.contents() ); |
wrap.show(); |
if (currentOpts.opacity) { |
final_pos.opacity = 0; |
} |
fx.prop = 0; |
$(fx).animate({prop: 1}, { |
duration : currentOpts.speedIn, |
easing : currentOpts.easingIn, |
step : _draw, |
complete : _finish |
}); |
return; |
} |
if (currentOpts.titlePosition == 'inside' && titleHeight > 0) { |
title.show(); |
} |
content |
.css({ |
'width' : final_pos.width - currentOpts.padding * 2, |
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 |
}) |
.html( tmp.contents() ); |
wrap |
.css(final_pos) |
.fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish ); |
}, |
_format_title = function(title) { |
if (title && title.length) { |
if (currentOpts.titlePosition == 'float') { |
return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>'; |
} |
return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>'; |
} |
return false; |
}, |
_process_title = function() { |
titleStr = currentOpts.title || ''; |
titleHeight = 0; |
title |
.empty() |
.removeAttr('style') |
.removeClass(); |
if (currentOpts.titleShow === false) { |
title.hide(); |
return; |
} |
titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr); |
if (!titleStr || titleStr === '') { |
title.hide(); |
return; |
} |
title |
.addClass('fancybox-title-' + currentOpts.titlePosition) |
.html( titleStr ) |
.appendTo( 'body' ) |
.show(); |
switch (currentOpts.titlePosition) { |
case 'inside': |
title |
.css({ |
'width' : final_pos.width - (currentOpts.padding * 2), |
'marginLeft' : currentOpts.padding, |
'marginRight' : currentOpts.padding |
}); |
titleHeight = title.outerHeight(true); |
title.appendTo( outer ); |
final_pos.height += titleHeight; |
break; |
case 'over': |
title |
.css({ |
'marginLeft' : currentOpts.padding, |
'width' : final_pos.width - (currentOpts.padding * 2), |
'bottom' : currentOpts.padding |
}) |
.appendTo( outer ); |
break; |
case 'float': |
title |
.css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1) |
.appendTo( wrap ); |
break; |
default: |
title |
.css({ |
'width' : final_pos.width - (currentOpts.padding * 2), |
'paddingLeft' : currentOpts.padding, |
'paddingRight' : currentOpts.padding |
}) |
.appendTo( wrap ); |
break; |
} |
title.hide(); |
}, |
_set_navigation = function() { |
if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) { |
$(document).bind('keydown.fb', function(e) { |
if (e.keyCode == 27 && currentOpts.enableEscapeButton) { |
e.preventDefault(); |
$.fancybox.close(); |
} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') { |
e.preventDefault(); |
$.fancybox[ e.keyCode == 37 ? 'prev' : 'next'](); |
} |
}); |
} |
if (!currentOpts.showNavArrows) { |
nav_left.hide(); |
nav_right.hide(); |
return; |
} |
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) { |
nav_left.show(); |
} |
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) { |
nav_right.show(); |
} |
}, |
_finish = function () { |
if (!$.support.opacity) { |
content.get(0).style.removeAttribute('filter'); |
wrap.get(0).style.removeAttribute('filter'); |
} |
if (selectedOpts.autoDimensions) { |
content.css('height', 'auto'); |
} |
wrap.css('height', 'auto'); |
if (titleStr && titleStr.length) { |
title.show(); |
} |
if (currentOpts.showCloseButton) { |
close.show(); |
} |
_set_navigation(); |
if (currentOpts.hideOnContentClick) { |
content.bind('click', $.fancybox.close); |
} |
if (currentOpts.hideOnOverlayClick) { |
overlay.bind('click', $.fancybox.close); |
} |
$(window).bind("resize.fb", $.fancybox.resize); |
if (currentOpts.centerOnScroll) { |
$(window).bind("scroll.fb", $.fancybox.center); |
} |
if (currentOpts.type == 'iframe') { |
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content); |
} |
wrap.show(); |
busy = false; |
$.fancybox.center(); |
currentOpts.onComplete(currentArray, currentIndex, currentOpts); |
_preload_images(); |
}, |
_preload_images = function() { |
var href, |
objNext; |
if ((currentArray.length -1) > currentIndex) { |
href = currentArray[ currentIndex + 1 ].href; |
if (typeof href !== 'undefined' && href.match(imgRegExp)) { |
objNext = new Image(); |
objNext.src = href; |
} |
} |
if (currentIndex > 0) { |
href = currentArray[ currentIndex - 1 ].href; |
if (typeof href !== 'undefined' && href.match(imgRegExp)) { |
objNext = new Image(); |
objNext.src = href; |
} |
} |
}, |
_draw = function(pos) { |
var dim = { |
width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10), |
height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10), |
top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10), |
left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10) |
}; |
if (typeof final_pos.opacity !== 'undefined') { |
dim.opacity = pos < 0.5 ? 0.5 : pos; |
} |
wrap.css(dim); |
content.css({ |
'width' : dim.width - currentOpts.padding * 2, |
'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2 |
}); |
}, |
_get_viewport = function() { |
return [ |
$(window).width() - (currentOpts.margin * 2), |
$(window).height() - (currentOpts.margin * 2), |
$(document).scrollLeft() + currentOpts.margin, |
$(document).scrollTop() + currentOpts.margin |
]; |
}, |
_get_zoom_to = function () { |
var view = _get_viewport(), |
to = {}, |
resize = currentOpts.autoScale, |
double_padding = currentOpts.padding * 2, |
ratio; |
if (currentOpts.width.toString().indexOf('%') > -1) { |
to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10); |
} else { |
to.width = currentOpts.width + double_padding; |
} |
if (currentOpts.height.toString().indexOf('%') > -1) { |
to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10); |
} else { |
to.height = currentOpts.height + double_padding; |
} |
if (resize && (to.width > view[0] || to.height > view[1])) { |
if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') { |
ratio = (currentOpts.width ) / (currentOpts.height ); |
if ((to.width ) > view[0]) { |
to.width = view[0]; |
to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10); |
} |
if ((to.height) > view[1]) { |
to.height = view[1]; |
to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10); |
} |
} else { |
to.width = Math.min(to.width, view[0]); |
to.height = Math.min(to.height, view[1]); |
} |
} |
to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10); |
to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10); |
return to; |
}, |
_get_obj_pos = function(obj) { |
var pos = obj.offset(); |
pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0; |
pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0; |
pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0; |
pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0; |
pos.width = obj.width(); |
pos.height = obj.height(); |
return pos; |
}, |
_get_zoom_from = function() { |
var orig = selectedOpts.orig ? $(selectedOpts.orig) : false, |
from = {}, |
pos, |
view; |
if (orig && orig.length) { |
pos = _get_obj_pos(orig); |
from = { |
width : pos.width + (currentOpts.padding * 2), |
height : pos.height + (currentOpts.padding * 2), |
top : pos.top - currentOpts.padding - 20, |
left : pos.left - currentOpts.padding - 20 |
}; |
} else { |
view = _get_viewport(); |
from = { |
width : currentOpts.padding * 2, |
height : currentOpts.padding * 2, |
top : parseInt(view[3] + view[1] * 0.5, 10), |
left : parseInt(view[2] + view[0] * 0.5, 10) |
}; |
} |
return from; |
}, |
_animate_loading = function() { |
if (!loading.is(':visible')){ |
clearInterval(loadingTimer); |
return; |
} |
$('div', loading).css('top', (loadingFrame * -40) + 'px'); |
loadingFrame = (loadingFrame + 1) % 12; |
}; |
/* |
* Public methods |
*/ |
$.fn.fancybox = function(options) { |
if (!$(this).length) { |
return this; |
} |
$(this) |
.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {}))) |
.unbind('click.fb') |
.bind('click.fb', function(e) { |
e.preventDefault(); |
if (busy) { |
return; |
} |
busy = true; |
$(this).blur(); |
selectedArray = []; |
selectedIndex = 0; |
var rel = $(this).attr('rel') || ''; |
if (!rel || rel == '' || rel === 'nofollow') { |
selectedArray.push(this); |
} else { |
selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]"); |
selectedIndex = selectedArray.index( this ); |
} |
_start(); |
return; |
}); |
return this; |
}; |
$.fancybox = function(obj) { |
var opts; |
if (busy) { |
return; |
} |
busy = true; |
opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {}; |
selectedArray = []; |
selectedIndex = parseInt(opts.index, 10) || 0; |
if ($.isArray(obj)) { |
for (var i = 0, j = obj.length; i < j; i++) { |
if (typeof obj[i] == 'object') { |
$(obj[i]).data('fancybox', $.extend({}, opts, obj[i])); |
} else { |
obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts)); |
} |
} |
selectedArray = jQuery.merge(selectedArray, obj); |
} else { |
if (typeof obj == 'object') { |
$(obj).data('fancybox', $.extend({}, opts, obj)); |
} else { |
obj = $({}).data('fancybox', $.extend({content : obj}, opts)); |
} |
selectedArray.push(obj); |
} |
if (selectedIndex > selectedArray.length || selectedIndex < 0) { |
selectedIndex = 0; |
} |
_start(); |
}; |
$.fancybox.showActivity = function() { |
clearInterval(loadingTimer); |
loading.show(); |
loadingTimer = setInterval(_animate_loading, 66); |
}; |
$.fancybox.hideActivity = function() { |
loading.hide(); |
}; |
$.fancybox.next = function() { |
return $.fancybox.pos( currentIndex + 1); |
}; |
$.fancybox.prev = function() { |
return $.fancybox.pos( currentIndex - 1); |
}; |
$.fancybox.pos = function(pos) { |
if (busy) { |
return; |
} |
pos = parseInt(pos); |
selectedArray = currentArray; |
if (pos > -1 && pos < currentArray.length) { |
selectedIndex = pos; |
_start(); |
} else if (currentOpts.cyclic && currentArray.length > 1) { |
selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1; |
_start(); |
} |
return; |
}; |
$.fancybox.cancel = function() { |
if (busy) { |
return; |
} |
busy = true; |
$.event.trigger('fancybox-cancel'); |
_abort(); |
selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts); |
busy = false; |
}; |
// Note: within an iframe use - parent.$.fancybox.close(); |
$.fancybox.close = function() { |
if (busy || wrap.is(':hidden')) { |
return; |
} |
busy = true; |
if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { |
busy = false; |
return; |
} |
_abort(); |
$(close.add( nav_left ).add( nav_right )).hide(); |
$(content.add( overlay )).unbind(); |
$(window).unbind("resize.fb scroll.fb"); |
$(document).unbind('keydown.fb'); |
content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank'); |
if (currentOpts.titlePosition !== 'inside') { |
title.empty(); |
} |
wrap.stop(); |
function _cleanup() { |
overlay.fadeOut('fast'); |
title.empty().hide(); |
wrap.hide(); |
$.event.trigger('fancybox-cleanup'); |
content.empty(); |
currentOpts.onClosed(currentArray, currentIndex, currentOpts); |
currentArray = selectedOpts = []; |
currentIndex = selectedIndex = 0; |
currentOpts = selectedOpts = {}; |
busy = false; |
} |
if (currentOpts.transitionOut == 'elastic') { |
start_pos = _get_zoom_from(); |
var pos = wrap.position(); |
final_pos = { |
top : pos.top , |
left : pos.left, |
width : wrap.width(), |
height : wrap.height() |
}; |
if (currentOpts.opacity) { |
final_pos.opacity = 1; |
} |
title.empty().hide(); |
fx.prop = 1; |
$(fx).animate({ prop: 0 }, { |
duration : currentOpts.speedOut, |
easing : currentOpts.easingOut, |
step : _draw, |
complete : _cleanup |
}); |
} else { |
wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup); |
} |
}; |
$.fancybox.resize = function() { |
if (overlay.is(':visible')) { |
overlay.css('height', $(document).height()); |
} |
$.fancybox.center(true); |
}; |
$.fancybox.center = function() { |
var view, align; |
if (busy) { |
return; |
} |
align = arguments[0] === true ? 1 : 0; |
view = _get_viewport(); |
if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) { |
return; |
} |
wrap |
.stop() |
.animate({ |
'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)), |
'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding)) |
}, typeof arguments[0] == 'number' ? arguments[0] : 200); |
}; |
$.fancybox.init = function() { |
if ($("#fancybox-wrap").length) { |
return; |
} |
$('body').append( |
tmp = $('<div id="fancybox-tmp"></div>'), |
loading = $('<div id="fancybox-loading"><div></div></div>'), |
overlay = $('<div id="fancybox-overlay"></div>'), |
wrap = $('<div id="fancybox-wrap"></div>') |
); |
outer = $('<div id="fancybox-outer"></div>') |
.append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>') |
.appendTo( wrap ); |
outer.append( |
content = $('<div id="fancybox-content"></div>'), |
close = $('<a id="fancybox-close"></a>'), |
title = $('<div id="fancybox-title"></div>'), |
nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'), |
nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>') |
); |
close.click($.fancybox.close); |
loading.click($.fancybox.cancel); |
nav_left.click(function(e) { |
e.preventDefault(); |
$.fancybox.prev(); |
}); |
nav_right.click(function(e) { |
e.preventDefault(); |
$.fancybox.next(); |
}); |
if ($.fn.mousewheel) { |
wrap.bind('mousewheel.fb', function(e, delta) { |
if (busy) { |
e.preventDefault(); |
} else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) { |
e.preventDefault(); |
$.fancybox[ delta > 0 ? 'prev' : 'next'](); |
} |
}); |
} |
if (!$.support.opacity) { |
wrap.addClass('fancybox-ie'); |
} |
if (isIE6) { |
loading.addClass('fancybox-ie6'); |
wrap.addClass('fancybox-ie6'); |
$('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer); |
} |
}; |
$.fn.fancybox.defaults = { |
padding : 10, |
margin : 40, |
opacity : false, |
modal : false, |
cyclic : false, |
scrolling : 'auto', // 'auto', 'yes' or 'no' |
width : 560, |
height : 340, |
autoScale : true, |
autoDimensions : true, |
centerOnScroll : false, |
ajax : {}, |
swf : { wmode: 'transparent' }, |
hideOnOverlayClick : true, |
hideOnContentClick : false, |
overlayShow : true, |
overlayOpacity : 0.7, |
overlayColor : '#777', |
titleShow : true, |
titlePosition : 'float', // 'float', 'outside', 'inside' or 'over' |
titleFormat : null, |
titleFromAlt : false, |
transitionIn : 'fade', // 'elastic', 'fade' or 'none' |
transitionOut : 'fade', // 'elastic', 'fade' or 'none' |
speedIn : 300, |
speedOut : 300, |
changeSpeed : 300, |
changeFade : 'fast', |
easingIn : 'swing', |
easingOut : 'swing', |
showCloseButton : true, |
showNavArrows : true, |
enableEscapeButton : true, |
enableKeyboardNav : true, |
onStart : function(){}, |
onCancel : function(){}, |
onComplete : function(){}, |
onCleanup : function(){}, |
onClosed : function(){}, |
onError : function(){} |
}; |
$(document).ready(function() { |
$.fancybox.init(); |
}); |
})(jQuery); |
/trunk/squelettes/css/fancybox/fancy_shadow_n.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/css/fancybox/fancy_shadow_n.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/css/cel_consultation.css |
---|
New file |
0,0 → 1,158 |
/* =========================== Balises ============================ */ |
dt { |
font-weight:bold; |
margin-right:0.3em; |
} |
dd { |
width: auto; |
} |
/* =========================== Style g�n�ral ============================ */ |
hr.nettoyage { |
clear: both; |
display: hidden; |
} |
.gauche { |
float:left; |
} |
.droite { |
float:right; |
} |
/* =========================== Titres ============================ */ |
.titre_consultation { |
padding-bottom: 10px; |
} |
.etape { |
color: #9AC343; |
padding-bottom:20px; |
} |
/* =========================== Formulaires ============================ */ |
#image_recherche { |
width: 500px; |
} |
.element_formulaire_en_ligne { |
padding-left: 10px; |
padding-right: 10px; |
} |
.element_formulaire, #conteneur_liens_lat_lon { |
padding-bottom : 5px; |
} |
.conteneur_carte { |
height: 600px; |
} |
/* =========================== Aide ============================ */ |
#ref-rech-opt-txt td, th { |
border: 1px solid #36560B; |
padding: 7px 5px; |
} |
/* =========================== R�sultats ============================ */ |
.images_liste li { |
display:inline; |
background:none repeat scroll 0 0 transparent; |
float:left; |
list-style-image:none; |
margin-left: 0px; |
margin-bottom: 10px; |
} |
.image_information { |
border: 1px solid; |
padding-right: 5px; |
position: absolute; |
} |
.image_information { |
background: white; |
margin-top: -6px; |
border: 1px solid #222222; |
z-index: 20; |
} |
.image_information_pliable { |
position: absolute; |
} |
.conteneur_image { |
height: 160px; |
padding-right:30px; |
} |
h4.lien_pliage_invisible { |
display:none; |
} |
.conteneur_image_deplie { |
margin-bottom: 120px |
} |
a.lien_voir_image { |
background-image: none; |
} |
.lien_voir_image img { |
border: none; |
padding: 0px; |
} |
a.voir_fiche_eflore { |
padding: 4px 10px 4px 16px |
} |
/* ============ Pagination =============================================== */ |
.page_courante { |
font-size: 1.5em; |
} |
.page_courante a { |
color: black; |
} |
.nb_resultats { |
float:right; |
margin-top: 10px; |
} |
/* ============ Styles crées par des effets javascripts automatiques ===== */ |
h4.lien_pliage { |
background-color:white; |
border:1px solid; |
margin-left:0; |
margin-top:-33px; |
padding:2px 2px 5px; |
position:absolute; |
text-decoration:underline; |
z-index:10; |
} |
h4.lien_pliage_deplie { |
border-bottom: none; |
z-index:50; |
} |
h4.lien_pliage:hover { |
cursor: pointer; |
} |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/squelettes/formulaires/image_recherche.tpl.html |
---|
New file |
0,0 → 1,103 |
<!-- CEL_CONSULTATION - DEBUT RECHERCHE IMAGE --> |
<div id="recherche_image"> |
<h2> Recherche d'une image </h2> |
<form method="get" action="?module=Image&action=rechercherImage" id="form_recherche_image"> |
<p> Entrez un nom de genre ou d'espèce, un nom de commune, un numéro de departement ou l'email d'un utilisateur </p> |
<label for="image_recherche">Recherche :</label> |
<input type="text" name="image_recherche" id="image_recherche" value="<?= $criteres ?>" /> |
<input type="hidden" id="module" name="module" value="Image" /> |
<input type="hidden" id="action" name="action" value="rechercherImage" /> |
<input type="submit" value="Valider" /> |
</form> |
</div> |
<hr style="clear:both;visibility:hidden;" /> |
<a href="#" id="afficher_cacher_aide"> Afficher l'aide </a> |
<div id="ref-rech-opt"> |
<h2 id="ref-rech-opt-titre">Options de recherche</h2> |
<div id="ref-rech-opt-txt"> |
<p> |
La recherche avancée permet de préciser la requête en associant des opérateurs au(x) terme(s) recherché(s). Les opérateurs sont listés dans |
le tableau ci-dessous. <br /> |
</p> |
<table class="largeur-14"> |
<thead> |
<tr> |
<th class="largeur-01">Opérateur</th> |
<th class="largeur-10">Signification</th> |
<th class="largeur-03">Exemples</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>taxon:</td> |
<td>Nom scientifique ou une partie de nom</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?module=Image&action=rechercherImage&image_recherche=taxon:Ornithogalum%2520umbellatum%2520L.">taxon:Ornithogalum umbellatum L.</a></td> |
</tr> |
<tr> |
<td>commune:</td> |
<td>Commune</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=Montpellier&module=Image&action=rechercherImage">commune:Montpellier</a></td> |
</tr> |
<tr> |
<td>dept:</td> |
<td>Code de dept sur 2 chiffres</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=dept%3A34&module=Image&action=rechercherImage">dept:34</a></td> |
</tr> |
<tr> |
<td>auteur:</td> |
<td>Email de l'auteur de l'observation</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=auteur%3Ajpm%40tela-botanica.org&module=Image&action=rechercherImage">auteur:jpm@tela-botanica.org</a></td> |
</tr> |
<tr> |
<td>famille:</td> |
<td>Nom latin de la famille</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=famille%3Aasteraceae&module=Image&action=rechercherImage">famille:asteraceae</a></td> |
</tr> |
</tbody> |
</table> |
<p> |
Pour chacune des recherches mentionnées, vous pouvez entrer un mot entier ou bien une partie de mot (ex. commune:Montpellier ou commune:Mont) afin d'élargir les résultats |
</p> |
<p> |
Pour faire une recherche croisée, séparez les criteres uniquement par un + (sans espaces).<br /> |
<em>Exemple :</em> |
<a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=taxon%3ATrifolium%2Bdept%3A34&module=Image&action=rechercherImage">taxon:Trifolium+dept:34</a> |
<br /><br /><br /> |
Des "jokers" permettent d'élargir la recherche. |
</p> |
<table class="largeur-14"> |
<thead> |
<tr> |
<th class="largeur-01">Joker</th> |
<th class="largeur-10">Explication</th> |
<th class="largeur-03">Exemples</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>%</td> |
<td>Remplace n'importe quel nombre de caractères, y compris aucun.</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=%25ignan&module=Image&action=rechercherImage"> |
%ignan</a></td> |
</tr> |
<tr> |
<td>_</td> |
<td>Remplace exactement un caractère (possibilité d'en mettre plusieurs à la suite)</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=____ignan&module=Image&action=rechercherImage">____ignan</a></td> |
</tr> |
</tbody> |
</table> |
</div> |
</div> |
<hr style="clear:both;visibility:hidden;" /> |
<!-- CEL_CONSULTATION - FIN RECHERCHE IMAGE --> |
/trunk/squelettes/formulaires/observation_recherche.tpl.html |
---|
New file |
0,0 → 1,11 |
<!-- CEL_CONSULTATION - DEBUT RECHERCHE OBSERVATION --> |
<div id="recherche_observation"> |
<h2> Recherche d'une observation </h2> |
<form action="" id="form_recherche_observation"> |
<label for="observation_recherche">Recherche :</label> |
<input type="text" name="observation_recherche" id="observation_recherche" /><br /> |
<input type="submit" value="Valider" /> |
</form> |
</div> |
<!-- CEL_CONSULTATION - FIN RECHERCHE OBSERVATION --> |
/trunk/squelettes/js/consultation.js |
---|
New file |
0,0 → 1,79 |
function initialiserElementsPliables() { |
$('.conteneur_image_deplie').addClass('conteneur_image'); |
$('.conteneur_image').removeClass('conteneur_image_deplie'); |
$('.image_information').addClass('image_information_pliable'); |
$('.lien_pliage_invisible').removeClass('lien_pliage_invisible'); |
$('.pliage h4').addClass('lien_pliage'); |
$('.pliage dl').hide(); |
$('.pliage > h4').bind('click', function() { |
$(this).toggleClass('lien_pliage_deplie'); |
$(this).next().slideToggle(); |
return false; |
}); |
} |
function reparerLiensDD() { |
$('.image_information a').bind('click', function() { |
window.location = $(this).attr('href'); |
return false; |
}); |
} |
function initialiserZoom() { |
$('a.lien_voir_image').fancybox({ |
'autoDimension' : true, |
'showCloseButton' : true, |
'showNavArrows' : true, |
'titlePosition' : 'inside', |
'transitionIn' : 'fade', |
'transitionOut' : 'elastic', |
'cyclic' : true, |
}); |
} |
function initialiserLienVoirFicheEfore() { |
$('a.lien_fiche_eflore').click(function(event) { |
event.preventDefault(); |
window.open($(this).attr('href')); |
}); |
} |
function initialiserLazyLoading() { |
$("img").lazyload(); |
} |
function initialiserPanneauRechercheAvancee() { |
$("#ref-rech-opt").hide(); |
$("#afficher_cacher_aide").bind('click', function() { |
if(!$("#ref-rech-opt").is(':visible')) { |
$('#ref-rech-opt').slideDown('slow', function() { |
$("#afficher_cacher_aide").html("Cacher l'aide"); |
}); |
} else { |
$('#ref-rech-opt').slideUp('slow', function() { |
$("#afficher_cacher_aide").html("Afficher l'aide") |
}); |
} |
}); |
} |
$(document).ready(function() { |
initialiserPanneauRechercheAvancee(); |
//reparerLiensDD(); |
initialiserZoom(); |
initialiserElementsPliables(); |
initialiserLienVoirFicheEfore(); |
//initialiserLazyLoading(); |
}); |
/trunk/squelettes/js/jquery.lazyload.js |
---|
New file |
0,0 → 1,164 |
/* |
* Lazy Load - jQuery plugin for lazy loading images |
* |
* Copyright (c) 2007-2009 Mika Tuupola |
* |
* Licensed under the MIT license: |
* http://www.opensource.org/licenses/mit-license.php |
* |
* Project home: |
* http://www.appelsiini.net/projects/lazyload |
* |
* Version: 1.5.0 |
* |
*/ |
(function($) { |
$.fn.lazyload = function(options) { |
var settings = { |
threshold : 0, |
failurelimit : 0, |
event : "scroll", |
effect : "show", |
container : window |
}; |
if(options) { |
$.extend(settings, options); |
} |
/* Fire one scroll event per scroll. Not one scroll event per image. */ |
var elements = this; |
if ("scroll" == settings.event) { |
$(settings.container).bind("scroll", function(event) { |
var counter = 0; |
elements.each(function() { |
if ($.abovethetop(this, settings) || |
$.leftofbegin(this, settings)) { |
/* Nothing. */ |
} else if (!$.belowthefold(this, settings) && |
!$.rightoffold(this, settings)) { |
$(this).trigger("appear"); |
} else { |
if (counter++ > settings.failurelimit) { |
return false; |
} |
} |
}); |
/* Remove image from array so it is not looped next time. */ |
var temp = $.grep(elements, function(element) { |
return !element.loaded; |
}); |
elements = $(temp); |
}); |
} |
this.each(function() { |
var self = this; |
/* Save original only if it is not defined in HTML. */ |
if (undefined == $(self).attr("original")) { |
$(self).attr("original", $(self).attr("src")); |
} |
if ("scroll" != settings.event || |
undefined == $(self).attr("src") || |
settings.placeholder == $(self).attr("src") || |
($.abovethetop(self, settings) || |
$.leftofbegin(self, settings) || |
$.belowthefold(self, settings) || |
$.rightoffold(self, settings) )) { |
if (settings.placeholder) { |
$(self).attr("src", settings.placeholder); |
} else { |
$(self).removeAttr("src"); |
} |
self.loaded = false; |
} else { |
self.loaded = true; |
} |
/* When appear is triggered load original image. */ |
$(self).one("appear", function() { |
if (!this.loaded) { |
$("<img />") |
.bind("load", function() { |
$(self) |
.hide() |
.attr("src", $(self).attr("original")) |
[settings.effect](settings.effectspeed); |
self.loaded = true; |
}) |
.attr("src", $(self).attr("original")); |
}; |
}); |
/* When wanted event is triggered load original image */ |
/* by triggering appear. */ |
if ("scroll" != settings.event) { |
$(self).bind(settings.event, function(event) { |
if (!self.loaded) { |
$(self).trigger("appear"); |
} |
}); |
} |
}); |
/* Force initial check if images should appear. */ |
$(settings.container).trigger(settings.event); |
return this; |
}; |
/* Convenience methods in jQuery namespace. */ |
/* Use as $.belowthefold(element, {threshold : 100, container : window}) */ |
$.belowthefold = function(element, settings) { |
if (settings.container === undefined || settings.container === window) { |
var fold = $(window).height() + $(window).scrollTop(); |
} else { |
var fold = $(settings.container).offset().top + $(settings.container).height(); |
} |
return fold <= $(element).offset().top - settings.threshold; |
}; |
$.rightoffold = function(element, settings) { |
if (settings.container === undefined || settings.container === window) { |
var fold = $(window).width() + $(window).scrollLeft(); |
} else { |
var fold = $(settings.container).offset().left + $(settings.container).width(); |
} |
return fold <= $(element).offset().left - settings.threshold; |
}; |
$.abovethetop = function(element, settings) { |
if (settings.container === undefined || settings.container === window) { |
var fold = $(window).scrollTop(); |
} else { |
var fold = $(settings.container).offset().top; |
} |
return fold >= $(element).offset().top + settings.threshold + $(element).height(); |
}; |
$.leftofbegin = function(element, settings) { |
if (settings.container === undefined || settings.container === window) { |
var fold = $(window).scrollLeft(); |
} else { |
var fold = $(settings.container).offset().left; |
} |
return fold >= $(element).offset().left + settings.threshold + $(element).width(); |
}; |
/* Custom selectors for your convenience. */ |
/* Use as $("img:below-the-fold").something() */ |
$.extend($.expr[':'], { |
"below-the-fold" : "$.belowthefold(a, {threshold : 0, container: window})", |
"above-the-fold" : "!$.belowthefold(a, {threshold : 0, container: window})", |
"right-of-fold" : "$.rightoffold(a, {threshold : 0, container: window})", |
"left-of-fold" : "!$.rightoffold(a, {threshold : 0, container: window})" |
}); |
})(jQuery); |
/trunk/squelettes/js/fancybox/jquery.mousewheel-3.0.4.pack.js |
---|
New file |
0,0 → 1,14 |
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) |
* Licensed under the MIT License (LICENSE.txt). |
* |
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. |
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. |
* Thanks to: Seamus Leahy for adding deltaX and deltaY |
* |
* Version: 3.0.4 |
* |
* Requires: 1.2.2+ |
*/ |
(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a= |
f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); |
/trunk/squelettes/js/fancybox/fancy_nav_right.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_nav_right.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/style.css |
---|
New file |
0,0 → 1,65 |
html, body, div, ul { |
margin: 0; |
padding: 0; |
} |
body { |
color: #262626; |
background: #f4f4f4; |
font: normal 12px/18px Verdana, sans-serif; |
} |
#content { |
width: 400px; |
margin: 40px auto 0 auto; |
padding: 0 60px 30px 60px; |
border: solid 1px #cbcbcb; |
background: #fafafa; |
-moz-box-shadow: 0px 0px 10px #cbcbcb; |
-webkit-box-shadow: 0px 0px 10px #cbcbcb; |
} |
h1 { |
margin: 30px 0 15px 0; |
font-size: 30px; |
font-weight: bold; |
font-family: Arial; |
} |
h1 span { |
font-size: 50%; |
letter-spacing: -0.05em; |
} |
hr { |
border: none; |
height: 1px; line-height: 1px; |
background: #E5E5E5; |
margin-bottom: 20px; |
padding: 0; |
} |
p { |
margin: 0; |
padding: 7px 0; |
} |
a { |
outline: none; |
} |
a img { |
border: 1px solid #BBB; |
padding: 2px; |
margin: 10px 20px 10px 0; |
vertical-align: top; |
} |
a img.last { |
margin-right: 0; |
} |
ul { |
margin-bottom: 24px; |
padding-left: 30px; |
} |
/trunk/squelettes/js/fancybox/fancy_title_main.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_title_main.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/blank.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/squelettes/js/fancybox/blank.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_shadow_nw.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_shadow_nw.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_shadow_e.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_shadow_e.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancybox.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancybox.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_title_left.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_title_left.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_shadow_sw.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_shadow_sw.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_nav_left.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_nav_left.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/ajax.txt |
---|
New file |
0,0 → 1,6 |
<div style="width:400px;"> |
<h2>This comes from ajax request</h2> |
<p> |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean non velit. Donec pharetra, felis ut tristique adipiscing, diam magna rhoncus neque, sit amet convallis nibh nibh vel libero. Nulla facilisi. In eleifend nisl quis lorem. Duis semper fringilla justo. Proin imperdiet sapien sed lectus. Integer quis nisl et est elementum tempor. Morbi quis tellus nec turpis suscipit molestie. Praesent sed pede. Pellentesque ac orci. Sed sit amet urna eget tellus hendrerit aliquet. Nulla consectetur, pede aliquam ornare placerat, nunc augue commodo leo, sit amet elementum dolor est eleifend magna. |
</p> |
</div> |
Property changes: |
Added: svn:eol-style |
+native |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancybox-x.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancybox-x.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancybox-y.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancybox-y.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/jquery.fancybox-1.3.4.js |
---|
New file |
0,0 → 1,1156 |
/* |
* FancyBox - jQuery Plugin |
* Simple and fancy lightbox alternative |
* |
* Examples and documentation at: http://fancybox.net |
* |
* Copyright (c) 2008 - 2010 Janis Skarnelis |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. |
* |
* Version: 1.3.4 (11/11/2010) |
* Requires: jQuery v1.3+ |
* |
* Dual licensed under the MIT and GPL licenses: |
* http://www.opensource.org/licenses/mit-license.php |
* http://www.gnu.org/licenses/gpl.html |
*/ |
;(function($) { |
var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right, |
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [], |
ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i, |
loadingTimer, loadingFrame = 1, |
titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }), |
isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest, |
/* |
* Private methods |
*/ |
_abort = function() { |
loading.hide(); |
imgPreloader.onerror = imgPreloader.onload = null; |
if (ajaxLoader) { |
ajaxLoader.abort(); |
} |
tmp.empty(); |
}, |
_error = function() { |
if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) { |
loading.hide(); |
busy = false; |
return; |
} |
selectedOpts.titleShow = false; |
selectedOpts.width = 'auto'; |
selectedOpts.height = 'auto'; |
tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' ); |
_process_inline(); |
}, |
_start = function() { |
var obj = selectedArray[ selectedIndex ], |
href, |
type, |
title, |
str, |
emb, |
ret; |
_abort(); |
selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox'))); |
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts); |
if (ret === false) { |
busy = false; |
return; |
} else if (typeof ret == 'object') { |
selectedOpts = $.extend(selectedOpts, ret); |
} |
title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || ''; |
if (obj.nodeName && !selectedOpts.orig) { |
selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj); |
} |
if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) { |
title = selectedOpts.orig.attr('alt'); |
} |
href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null; |
if ((/^(?:javascript)/i).test(href) || href == '#') { |
href = null; |
} |
if (selectedOpts.type) { |
type = selectedOpts.type; |
if (!href) { |
href = selectedOpts.content; |
} |
} else if (selectedOpts.content) { |
type = 'html'; |
} else if (href) { |
if (href.match(imgRegExp)) { |
type = 'image'; |
} else if (href.match(swfRegExp)) { |
type = 'swf'; |
} else if ($(obj).hasClass("iframe")) { |
type = 'iframe'; |
} else if (href.indexOf("#") === 0) { |
type = 'inline'; |
} else { |
type = 'ajax'; |
} |
} |
if (!type) { |
_error(); |
return; |
} |
if (type == 'inline') { |
obj = href.substr(href.indexOf("#")); |
type = $(obj).length > 0 ? 'inline' : 'ajax'; |
} |
selectedOpts.type = type; |
selectedOpts.href = href; |
selectedOpts.title = title; |
if (selectedOpts.autoDimensions) { |
if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') { |
selectedOpts.width = 'auto'; |
selectedOpts.height = 'auto'; |
} else { |
selectedOpts.autoDimensions = false; |
} |
} |
if (selectedOpts.modal) { |
selectedOpts.overlayShow = true; |
selectedOpts.hideOnOverlayClick = false; |
selectedOpts.hideOnContentClick = false; |
selectedOpts.enableEscapeButton = false; |
selectedOpts.showCloseButton = false; |
} |
selectedOpts.padding = parseInt(selectedOpts.padding, 10); |
selectedOpts.margin = parseInt(selectedOpts.margin, 10); |
tmp.css('padding', (selectedOpts.padding + selectedOpts.margin)); |
$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() { |
$(this).replaceWith(content.children()); |
}); |
switch (type) { |
case 'html' : |
tmp.html( selectedOpts.content ); |
_process_inline(); |
break; |
case 'inline' : |
if ( $(obj).parent().is('#fancybox-content') === true) { |
busy = false; |
return; |
} |
$('<div class="fancybox-inline-tmp" />') |
.hide() |
.insertBefore( $(obj) ) |
.bind('fancybox-cleanup', function() { |
$(this).replaceWith(content.children()); |
}).bind('fancybox-cancel', function() { |
$(this).replaceWith(tmp.children()); |
}); |
$(obj).appendTo(tmp); |
_process_inline(); |
break; |
case 'image': |
busy = false; |
$.fancybox.showActivity(); |
imgPreloader = new Image(); |
imgPreloader.onerror = function() { |
_error(); |
}; |
imgPreloader.onload = function() { |
busy = true; |
imgPreloader.onerror = imgPreloader.onload = null; |
_process_image(); |
}; |
imgPreloader.src = href; |
break; |
case 'swf': |
selectedOpts.scrolling = 'no'; |
str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>'; |
emb = ''; |
$.each(selectedOpts.swf, function(name, val) { |
str += '<param name="' + name + '" value="' + val + '"></param>'; |
emb += ' ' + name + '="' + val + '"'; |
}); |
str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>'; |
tmp.html(str); |
_process_inline(); |
break; |
case 'ajax': |
busy = false; |
$.fancybox.showActivity(); |
selectedOpts.ajax.win = selectedOpts.ajax.success; |
ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { |
url : href, |
data : selectedOpts.ajax.data || {}, |
error : function(XMLHttpRequest, textStatus, errorThrown) { |
if ( XMLHttpRequest.status > 0 ) { |
_error(); |
} |
}, |
success : function(data, textStatus, XMLHttpRequest) { |
var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader; |
if (o.status == 200) { |
if ( typeof selectedOpts.ajax.win == 'function' ) { |
ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); |
if (ret === false) { |
loading.hide(); |
return; |
} else if (typeof ret == 'string' || typeof ret == 'object') { |
data = ret; |
} |
} |
tmp.html( data ); |
_process_inline(); |
} |
} |
})); |
break; |
case 'iframe': |
_show(); |
break; |
} |
}, |
_process_inline = function() { |
var |
w = selectedOpts.width, |
h = selectedOpts.height; |
if (w.toString().indexOf('%') > -1) { |
w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px'; |
} else { |
w = w == 'auto' ? 'auto' : w + 'px'; |
} |
if (h.toString().indexOf('%') > -1) { |
h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px'; |
} else { |
h = h == 'auto' ? 'auto' : h + 'px'; |
} |
tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>'); |
selectedOpts.width = tmp.width(); |
selectedOpts.height = tmp.height(); |
_show(); |
}, |
_process_image = function() { |
selectedOpts.width = imgPreloader.width; |
selectedOpts.height = imgPreloader.height; |
$("<img />").attr({ |
'id' : 'fancybox-img', |
'src' : imgPreloader.src, |
'alt' : selectedOpts.title |
}).appendTo( tmp ); |
_show(); |
}, |
_show = function() { |
var pos, equal; |
loading.hide(); |
if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { |
$.event.trigger('fancybox-cancel'); |
busy = false; |
return; |
} |
busy = true; |
$(content.add( overlay )).unbind(); |
$(window).unbind("resize.fb scroll.fb"); |
$(document).unbind('keydown.fb'); |
if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') { |
wrap.css('height', wrap.height()); |
} |
currentArray = selectedArray; |
currentIndex = selectedIndex; |
currentOpts = selectedOpts; |
if (currentOpts.overlayShow) { |
overlay.css({ |
'background-color' : currentOpts.overlayColor, |
'opacity' : currentOpts.overlayOpacity, |
'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto', |
'height' : $(document).height() |
}); |
if (!overlay.is(':visible')) { |
if (isIE6) { |
$('select:not(#fancybox-tmp select)').filter(function() { |
return this.style.visibility !== 'hidden'; |
}).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() { |
this.style.visibility = 'inherit'; |
}); |
} |
overlay.show(); |
} |
} else { |
overlay.hide(); |
} |
final_pos = _get_zoom_to(); |
_process_title(); |
if (wrap.is(":visible")) { |
$( close.add( nav_left ).add( nav_right ) ).hide(); |
pos = wrap.position(), |
start_pos = { |
top : pos.top, |
left : pos.left, |
width : wrap.width(), |
height : wrap.height() |
}; |
equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height); |
content.fadeTo(currentOpts.changeFade, 0.3, function() { |
var finish_resizing = function() { |
content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish); |
}; |
$.event.trigger('fancybox-change'); |
content |
.empty() |
.removeAttr('filter') |
.css({ |
'border-width' : currentOpts.padding, |
'width' : final_pos.width - currentOpts.padding * 2, |
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 |
}); |
if (equal) { |
finish_resizing(); |
} else { |
fx.prop = 0; |
$(fx).animate({prop: 1}, { |
duration : currentOpts.changeSpeed, |
easing : currentOpts.easingChange, |
step : _draw, |
complete : finish_resizing |
}); |
} |
}); |
return; |
} |
wrap.removeAttr("style"); |
content.css('border-width', currentOpts.padding); |
if (currentOpts.transitionIn == 'elastic') { |
start_pos = _get_zoom_from(); |
content.html( tmp.contents() ); |
wrap.show(); |
if (currentOpts.opacity) { |
final_pos.opacity = 0; |
} |
fx.prop = 0; |
$(fx).animate({prop: 1}, { |
duration : currentOpts.speedIn, |
easing : currentOpts.easingIn, |
step : _draw, |
complete : _finish |
}); |
return; |
} |
if (currentOpts.titlePosition == 'inside' && titleHeight > 0) { |
title.show(); |
} |
content |
.css({ |
'width' : final_pos.width - currentOpts.padding * 2, |
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 |
}) |
.html( tmp.contents() ); |
wrap |
.css(final_pos) |
.fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish ); |
}, |
_format_title = function(title) { |
if (title && title.length) { |
if (currentOpts.titlePosition == 'float') { |
return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>'; |
} |
return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>'; |
} |
return false; |
}, |
_process_title = function() { |
titleStr = currentOpts.title || ''; |
titleHeight = 0; |
title |
.empty() |
.removeAttr('style') |
.removeClass(); |
if (currentOpts.titleShow === false) { |
title.hide(); |
return; |
} |
titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr); |
if (!titleStr || titleStr === '') { |
title.hide(); |
return; |
} |
title |
.addClass('fancybox-title-' + currentOpts.titlePosition) |
.html( titleStr ) |
.appendTo( 'body' ) |
.show(); |
switch (currentOpts.titlePosition) { |
case 'inside': |
title |
.css({ |
'width' : final_pos.width - (currentOpts.padding * 2), |
'marginLeft' : currentOpts.padding, |
'marginRight' : currentOpts.padding |
}); |
titleHeight = title.outerHeight(true); |
title.appendTo( outer ); |
final_pos.height += titleHeight; |
break; |
case 'over': |
title |
.css({ |
'marginLeft' : currentOpts.padding, |
'width' : final_pos.width - (currentOpts.padding * 2), |
'bottom' : currentOpts.padding |
}) |
.appendTo( outer ); |
break; |
case 'float': |
title |
.css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1) |
.appendTo( wrap ); |
break; |
default: |
title |
.css({ |
'width' : final_pos.width - (currentOpts.padding * 2), |
'paddingLeft' : currentOpts.padding, |
'paddingRight' : currentOpts.padding |
}) |
.appendTo( wrap ); |
break; |
} |
title.hide(); |
}, |
_set_navigation = function() { |
if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) { |
$(document).bind('keydown.fb', function(e) { |
if (e.keyCode == 27 && currentOpts.enableEscapeButton) { |
e.preventDefault(); |
$.fancybox.close(); |
} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') { |
e.preventDefault(); |
$.fancybox[ e.keyCode == 37 ? 'prev' : 'next'](); |
} |
}); |
} |
if (!currentOpts.showNavArrows) { |
nav_left.hide(); |
nav_right.hide(); |
return; |
} |
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) { |
nav_left.show(); |
} |
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) { |
nav_right.show(); |
} |
}, |
_finish = function () { |
if (!$.support.opacity) { |
content.get(0).style.removeAttribute('filter'); |
wrap.get(0).style.removeAttribute('filter'); |
} |
if (selectedOpts.autoDimensions) { |
content.css('height', 'auto'); |
} |
wrap.css('height', 'auto'); |
if (titleStr && titleStr.length) { |
title.show(); |
} |
if (currentOpts.showCloseButton) { |
close.show(); |
} |
_set_navigation(); |
if (currentOpts.hideOnContentClick) { |
content.bind('click', $.fancybox.close); |
} |
if (currentOpts.hideOnOverlayClick) { |
overlay.bind('click', $.fancybox.close); |
} |
$(window).bind("resize.fb", $.fancybox.resize); |
if (currentOpts.centerOnScroll) { |
$(window).bind("scroll.fb", $.fancybox.center); |
} |
if (currentOpts.type == 'iframe') { |
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content); |
} |
wrap.show(); |
busy = false; |
$.fancybox.center(); |
currentOpts.onComplete(currentArray, currentIndex, currentOpts); |
_preload_images(); |
}, |
_preload_images = function() { |
var href, |
objNext; |
if ((currentArray.length -1) > currentIndex) { |
href = currentArray[ currentIndex + 1 ].href; |
if (typeof href !== 'undefined' && href.match(imgRegExp)) { |
objNext = new Image(); |
objNext.src = href; |
} |
} |
if (currentIndex > 0) { |
href = currentArray[ currentIndex - 1 ].href; |
if (typeof href !== 'undefined' && href.match(imgRegExp)) { |
objNext = new Image(); |
objNext.src = href; |
} |
} |
}, |
_draw = function(pos) { |
var dim = { |
width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10), |
height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10), |
top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10), |
left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10) |
}; |
if (typeof final_pos.opacity !== 'undefined') { |
dim.opacity = pos < 0.5 ? 0.5 : pos; |
} |
wrap.css(dim); |
content.css({ |
'width' : dim.width - currentOpts.padding * 2, |
'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2 |
}); |
}, |
_get_viewport = function() { |
return [ |
$(window).width() - (currentOpts.margin * 2), |
$(window).height() - (currentOpts.margin * 2), |
$(document).scrollLeft() + currentOpts.margin, |
$(document).scrollTop() + currentOpts.margin |
]; |
}, |
_get_zoom_to = function () { |
var view = _get_viewport(), |
to = {}, |
resize = currentOpts.autoScale, |
double_padding = currentOpts.padding * 2, |
ratio; |
if (currentOpts.width.toString().indexOf('%') > -1) { |
to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10); |
} else { |
to.width = currentOpts.width + double_padding; |
} |
if (currentOpts.height.toString().indexOf('%') > -1) { |
to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10); |
} else { |
to.height = currentOpts.height + double_padding; |
} |
if (resize && (to.width > view[0] || to.height > view[1])) { |
if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') { |
ratio = (currentOpts.width ) / (currentOpts.height ); |
if ((to.width ) > view[0]) { |
to.width = view[0]; |
to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10); |
} |
if ((to.height) > view[1]) { |
to.height = view[1]; |
to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10); |
} |
} else { |
to.width = Math.min(to.width, view[0]); |
to.height = Math.min(to.height, view[1]); |
} |
} |
to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10); |
to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10); |
return to; |
}, |
_get_obj_pos = function(obj) { |
var pos = obj.offset(); |
pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0; |
pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0; |
pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0; |
pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0; |
pos.width = obj.width(); |
pos.height = obj.height(); |
return pos; |
}, |
_get_zoom_from = function() { |
var orig = selectedOpts.orig ? $(selectedOpts.orig) : false, |
from = {}, |
pos, |
view; |
if (orig && orig.length) { |
pos = _get_obj_pos(orig); |
from = { |
width : pos.width + (currentOpts.padding * 2), |
height : pos.height + (currentOpts.padding * 2), |
top : pos.top - currentOpts.padding - 20, |
left : pos.left - currentOpts.padding - 20 |
}; |
} else { |
view = _get_viewport(); |
from = { |
width : currentOpts.padding * 2, |
height : currentOpts.padding * 2, |
top : parseInt(view[3] + view[1] * 0.5, 10), |
left : parseInt(view[2] + view[0] * 0.5, 10) |
}; |
} |
return from; |
}, |
_animate_loading = function() { |
if (!loading.is(':visible')){ |
clearInterval(loadingTimer); |
return; |
} |
$('div', loading).css('top', (loadingFrame * -40) + 'px'); |
loadingFrame = (loadingFrame + 1) % 12; |
}; |
/* |
* Public methods |
*/ |
$.fn.fancybox = function(options) { |
if (!$(this).length) { |
return this; |
} |
$(this) |
.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {}))) |
.unbind('click.fb') |
.bind('click.fb', function(e) { |
e.preventDefault(); |
if (busy) { |
return; |
} |
busy = true; |
$(this).blur(); |
selectedArray = []; |
selectedIndex = 0; |
var rel = $(this).attr('rel') || ''; |
if (!rel || rel == '' || rel === 'nofollow') { |
selectedArray.push(this); |
} else { |
selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]"); |
selectedIndex = selectedArray.index( this ); |
} |
_start(); |
return; |
}); |
return this; |
}; |
$.fancybox = function(obj) { |
var opts; |
if (busy) { |
return; |
} |
busy = true; |
opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {}; |
selectedArray = []; |
selectedIndex = parseInt(opts.index, 10) || 0; |
if ($.isArray(obj)) { |
for (var i = 0, j = obj.length; i < j; i++) { |
if (typeof obj[i] == 'object') { |
$(obj[i]).data('fancybox', $.extend({}, opts, obj[i])); |
} else { |
obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts)); |
} |
} |
selectedArray = jQuery.merge(selectedArray, obj); |
} else { |
if (typeof obj == 'object') { |
$(obj).data('fancybox', $.extend({}, opts, obj)); |
} else { |
obj = $({}).data('fancybox', $.extend({content : obj}, opts)); |
} |
selectedArray.push(obj); |
} |
if (selectedIndex > selectedArray.length || selectedIndex < 0) { |
selectedIndex = 0; |
} |
_start(); |
}; |
$.fancybox.showActivity = function() { |
clearInterval(loadingTimer); |
loading.show(); |
loadingTimer = setInterval(_animate_loading, 66); |
}; |
$.fancybox.hideActivity = function() { |
loading.hide(); |
}; |
$.fancybox.next = function() { |
return $.fancybox.pos( currentIndex + 1); |
}; |
$.fancybox.prev = function() { |
return $.fancybox.pos( currentIndex - 1); |
}; |
$.fancybox.pos = function(pos) { |
if (busy) { |
return; |
} |
pos = parseInt(pos); |
selectedArray = currentArray; |
if (pos > -1 && pos < currentArray.length) { |
selectedIndex = pos; |
_start(); |
} else if (currentOpts.cyclic && currentArray.length > 1) { |
selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1; |
_start(); |
} |
return; |
}; |
$.fancybox.cancel = function() { |
if (busy) { |
return; |
} |
busy = true; |
$.event.trigger('fancybox-cancel'); |
_abort(); |
selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts); |
busy = false; |
}; |
// Note: within an iframe use - parent.$.fancybox.close(); |
$.fancybox.close = function() { |
if (busy || wrap.is(':hidden')) { |
return; |
} |
busy = true; |
if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { |
busy = false; |
return; |
} |
_abort(); |
$(close.add( nav_left ).add( nav_right )).hide(); |
$(content.add( overlay )).unbind(); |
$(window).unbind("resize.fb scroll.fb"); |
$(document).unbind('keydown.fb'); |
content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank'); |
if (currentOpts.titlePosition !== 'inside') { |
title.empty(); |
} |
wrap.stop(); |
function _cleanup() { |
overlay.fadeOut('fast'); |
title.empty().hide(); |
wrap.hide(); |
$.event.trigger('fancybox-cleanup'); |
content.empty(); |
currentOpts.onClosed(currentArray, currentIndex, currentOpts); |
currentArray = selectedOpts = []; |
currentIndex = selectedIndex = 0; |
currentOpts = selectedOpts = {}; |
busy = false; |
} |
if (currentOpts.transitionOut == 'elastic') { |
start_pos = _get_zoom_from(); |
var pos = wrap.position(); |
final_pos = { |
top : pos.top , |
left : pos.left, |
width : wrap.width(), |
height : wrap.height() |
}; |
if (currentOpts.opacity) { |
final_pos.opacity = 1; |
} |
title.empty().hide(); |
fx.prop = 1; |
$(fx).animate({ prop: 0 }, { |
duration : currentOpts.speedOut, |
easing : currentOpts.easingOut, |
step : _draw, |
complete : _cleanup |
}); |
} else { |
wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup); |
} |
}; |
$.fancybox.resize = function() { |
if (overlay.is(':visible')) { |
overlay.css('height', $(document).height()); |
} |
$.fancybox.center(true); |
}; |
$.fancybox.center = function() { |
var view, align; |
if (busy) { |
return; |
} |
align = arguments[0] === true ? 1 : 0; |
view = _get_viewport(); |
if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) { |
return; |
} |
wrap |
.stop() |
.animate({ |
'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)), |
'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding)) |
}, typeof arguments[0] == 'number' ? arguments[0] : 200); |
}; |
$.fancybox.init = function() { |
if ($("#fancybox-wrap").length) { |
return; |
} |
$('body').append( |
tmp = $('<div id="fancybox-tmp"></div>'), |
loading = $('<div id="fancybox-loading"><div></div></div>'), |
overlay = $('<div id="fancybox-overlay"></div>'), |
wrap = $('<div id="fancybox-wrap"></div>') |
); |
outer = $('<div id="fancybox-outer"></div>') |
.append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>') |
.appendTo( wrap ); |
outer.append( |
content = $('<div id="fancybox-content"></div>'), |
close = $('<a id="fancybox-close"></a>'), |
title = $('<div id="fancybox-title"></div>'), |
nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'), |
nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>') |
); |
close.click($.fancybox.close); |
loading.click($.fancybox.cancel); |
nav_left.click(function(e) { |
e.preventDefault(); |
$.fancybox.prev(); |
}); |
nav_right.click(function(e) { |
e.preventDefault(); |
$.fancybox.next(); |
}); |
if ($.fn.mousewheel) { |
wrap.bind('mousewheel.fb', function(e, delta) { |
if (busy) { |
e.preventDefault(); |
} else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) { |
e.preventDefault(); |
$.fancybox[ delta > 0 ? 'prev' : 'next'](); |
} |
}); |
} |
if (!$.support.opacity) { |
wrap.addClass('fancybox-ie'); |
} |
if (isIE6) { |
loading.addClass('fancybox-ie6'); |
wrap.addClass('fancybox-ie6'); |
$('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer); |
} |
}; |
$.fn.fancybox.defaults = { |
padding : 10, |
margin : 40, |
opacity : false, |
modal : false, |
cyclic : false, |
scrolling : 'auto', // 'auto', 'yes' or 'no' |
width : 560, |
height : 340, |
autoScale : true, |
autoDimensions : true, |
centerOnScroll : false, |
ajax : {}, |
swf : { wmode: 'transparent' }, |
hideOnOverlayClick : true, |
hideOnContentClick : false, |
overlayShow : true, |
overlayOpacity : 0.7, |
overlayColor : '#777', |
titleShow : true, |
titlePosition : 'float', // 'float', 'outside', 'inside' or 'over' |
titleFormat : null, |
titleFromAlt : false, |
transitionIn : 'fade', // 'elastic', 'fade' or 'none' |
transitionOut : 'fade', // 'elastic', 'fade' or 'none' |
speedIn : 300, |
speedOut : 300, |
changeSpeed : 300, |
changeFade : 'fast', |
easingIn : 'swing', |
easingOut : 'swing', |
showCloseButton : true, |
showNavArrows : true, |
enableEscapeButton : true, |
enableKeyboardNav : true, |
onStart : function(){}, |
onCancel : function(){}, |
onComplete : function(){}, |
onCleanup : function(){}, |
onClosed : function(){}, |
onError : function(){} |
}; |
$(document).ready(function() { |
$.fancybox.init(); |
}); |
})(jQuery); |
/trunk/squelettes/js/fancybox/fancy_shadow_n.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_shadow_n.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_close.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_close.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/index.html |
---|
New file |
0,0 → 1,165 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
<head> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
<meta http-equiv="imagetoolbar" content="no" /> |
<title>FancyBox 1.3.4 | Demonstration</title> |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> |
<script> |
!window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>'); |
</script> |
<script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script> |
<script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script> |
<link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" /> |
<link rel="stylesheet" href="style.css" /> |
<script type="text/javascript"> |
$(document).ready(function() { |
/* |
* Examples - images |
*/ |
$("a#example1").fancybox(); |
$("a#example2").fancybox({ |
'overlayShow' : false, |
'transitionIn' : 'elastic', |
'transitionOut' : 'elastic' |
}); |
$("a#example3").fancybox({ |
'transitionIn' : 'none', |
'transitionOut' : 'none' |
}); |
$("a#example4").fancybox({ |
'opacity' : true, |
'overlayShow' : false, |
'transitionIn' : 'elastic', |
'transitionOut' : 'none' |
}); |
$("a#example5").fancybox(); |
$("a#example6").fancybox({ |
'titlePosition' : 'outside', |
'overlayColor' : '#000', |
'overlayOpacity' : 0.9 |
}); |
$("a#example7").fancybox({ |
'titlePosition' : 'inside' |
}); |
$("a#example8").fancybox({ |
'titlePosition' : 'over' |
}); |
$("a[rel=example_group]").fancybox({ |
'transitionIn' : 'none', |
'transitionOut' : 'none', |
'titlePosition' : 'over', |
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { |
return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; |
} |
}); |
/* |
* Examples - various |
*/ |
$("#various1").fancybox({ |
'titlePosition' : 'inside', |
'transitionIn' : 'none', |
'transitionOut' : 'none' |
}); |
$("#various2").fancybox(); |
$("#various3").fancybox({ |
'width' : '75%', |
'height' : '75%', |
'autoScale' : false, |
'transitionIn' : 'none', |
'transitionOut' : 'none', |
'type' : 'iframe' |
}); |
$("#various4").fancybox({ |
'padding' : 0, |
'autoScale' : false, |
'transitionIn' : 'none', |
'transitionOut' : 'none' |
}); |
}); |
</script> |
</head> |
<body> |
<div id="content"> |
<h1>fancybox <span>v1.3.4</span></h1> |
<p>This is a demonstration. <a href="http://fancybox.net">Home page</a></p> |
<hr /> |
<p> |
Different animations<br /> |
<a id="example1" href="./example/1_b.jpg"><img alt="example1" src="./example/1_s.jpg" /></a> |
<a id="example2" href="./example/2_b.jpg"><img alt="example2" src="./example/2_s.jpg" /></a> |
<a id="example3" href="./example/3_b.jpg"><img alt="example3" src="./example/3_s.jpg" /></a> |
<a id="example4" href="./example/4_b.jpg"><img class="last" alt="example4" src="./example/4_s.jpg" /></a> |
</p> |
<p> |
Different title positions<br /> |
<a id="example5" href="./example/5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit."><img alt="example4" src="./example/5_s.jpg" /></a> |
<a id="example6" href="./example/6_b.jpg" title="Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Vivamus fringilla congue laoreet."><img alt="example5" src="./example/6_s.jpg" /></a> |
<a id="example7" href="./example/7_b.jpg" title="Cras neque mi, semper at interdum id, dapibus in leo. Suspendisse nunc leo, eleifend sit amet iaculis et, cursus sed turpis."><img alt="example6" src="./example/7_s.jpg" /></a> |
<a id="example8" href="./example/8_b.jpg" title="Sed vel sapien vel sem tempus placerat eu ut tortor. Nulla facilisi. Sed adipiscing, turpis ut cursus molestie, sem eros viverra mauris, quis sollicitudin sapien enim nec est. ras pulvinar placerat diam eu consectetur."><img class="last" alt="example7" src="./example/8_s.jpg" /></a> |
</p> |
<p> |
Image gallery (ps, try using mouse scroll wheel)<br /> |
<a rel="example_group" href="./example/9_b.jpg" title="Lorem ipsum dolor sit amet"><img alt="" src="./example/9_s.jpg" /></a> |
<a rel="example_group" href="./example/10_b.jpg" title=""><img alt="" src="./example/10_s.jpg" /></a> |
<a rel="example_group" href="./example/11_b.jpg" title=""><img alt="" src="./example/11_s.jpg" /></a> |
<a rel="example_group" href="./example/12_b.jpg" title=""><img class="last" alt="" src="./example/12_s.jpg" /></a> |
</p> |
<p> |
Various examples |
</p> |
<ul> |
<li><a id="various1" href="#inline1" title="Lorem ipsum dolor sit amet">Inline</a></li> |
<li><a id="various2" href="ajax.txt">Ajax</a></li> |
<li><a id="various3" href="http://google.ca">Iframe</a></li> |
<li><a id="various4" href="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">Swf</a></li> |
</ul> |
<div style="display: none;"> |
<div id="inline1" style="width:400px;height:100px;overflow:auto;"> |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Nulla et lorem eu nibh adipiscing ultricies nec at lacus. Cras laoreet ultricies sem, at blandit mi eleifend aliquam. Nunc enim ipsum, vehicula non pretium varius, cursus ac tortor. Vivamus fringilla congue laoreet. Quisque ultrices sodales orci, quis rhoncus justo auctor in. Phasellus dui eros, bibendum eu feugiat ornare, faucibus eu mi. Nunc aliquet tempus sem, id aliquam diam varius ac. Maecenas nisl nunc, molestie vitae eleifend vel, iaculis sed magna. Aenean tempus lacus vitae orci posuere porttitor eget non felis. Donec lectus elit, aliquam nec eleifend sit amet, vestibulum sed nunc. |
</div> |
</div> |
<p> |
Ajax example will not run from your local computer and requires a server to run. |
</p> |
<p> |
Photo Credit: <a href="http://www.flickr.com/people/kharied/">Katie Harris</a> |
</p> |
</div> |
</body> |
</html> |
/trunk/squelettes/js/fancybox/fancy_shadow_ne.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_shadow_ne.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_shadow_s.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_shadow_s.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/jquery.easing-1.3.pack.js |
---|
New file |
0,0 → 1,72 |
/* |
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ |
* |
* Uses the built in easing capabilities added In jQuery 1.1 |
* to offer multiple easing options |
* |
* TERMS OF USE - jQuery Easing |
* |
* Open source under the BSD License. |
* |
* Copyright © 2008 George McGinley Smith |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without modification, |
* are permitted provided that the following conditions are met: |
* |
* Redistributions of source code must retain the above copyright notice, this list of |
* conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list |
* of conditions and the following disclaimer in the documentation and/or other materials |
* provided with the distribution. |
* |
* Neither the name of the author nor the names of contributors may be used to endorse |
* or promote products derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY |
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
* OF THE POSSIBILITY OF SUCH DAMAGE. |
* |
*/ |
// t: current time, b: begInnIng value, c: change In value, d: duration |
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}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{})) |
/* |
* |
* TERMS OF USE - EASING EQUATIONS |
* |
* Open source under the BSD License. |
* |
* Copyright © 2001 Robert Penner |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without modification, |
* are permitted provided that the following conditions are met: |
* |
* Redistributions of source code must retain the above copyright notice, this list of |
* conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list |
* of conditions and the following disclaimer in the documentation and/or other materials |
* provided with the distribution. |
* |
* Neither the name of the author nor the names of contributors may be used to endorse |
* or promote products derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY |
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
* OF THE POSSIBILITY OF SUCH DAMAGE. |
* |
*/ |
/trunk/squelettes/js/fancybox/jquery-1.4.3.min.js |
---|
New file |
0,0 → 1,166 |
/*! |
* jQuery JavaScript Library v1.4.3 |
* http://jquery.com/ |
* |
* Copyright 2010, John Resig |
* Dual licensed under the MIT or GPL Version 2 licenses. |
* http://jquery.org/license |
* |
* Includes Sizzle.js |
* http://sizzlejs.com/ |
* Copyright 2010, The Dojo Foundation |
* Released under the MIT, BSD, and GPL Licenses. |
* |
* Date: Thu Oct 14 23:10:06 2010 -0400 |
*/ |
(function(E,A){function U(){return false}function ba(){return true}function ja(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ga(a){var b,d,e=[],f=[],h,k,l,n,s,v,B,D;k=c.data(this,this.nodeType?"events":"__events__");if(typeof k==="function")k=k.events;if(!(a.liveFired===this||!k||!k.live||a.button&&a.type==="click")){if(a.namespace)D=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var H=k.live.slice(0);for(n=0;n<H.length;n++){k=H[n];k.origType.replace(X, |
"")===a.type?f.push(k.selector):H.splice(n--,1)}f=c(a.target).closest(f,a.currentTarget);s=0;for(v=f.length;s<v;s++){B=f[s];for(n=0;n<H.length;n++){k=H[n];if(B.selector===k.selector&&(!D||D.test(k.namespace))){l=B.elem;h=null;if(k.preType==="mouseenter"||k.preType==="mouseleave"){a.type=k.preType;h=c(a.relatedTarget).closest(k.selector)[0]}if(!h||h!==l)e.push({elem:l,handleObj:k,level:B.level})}}}s=0;for(v=e.length;s<v;s++){f=e[s];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data; |
a.handleObj=f.handleObj;D=f.handleObj.origHandler.apply(f.elem,arguments);if(D===false||a.isPropagationStopped()){d=f.level;if(D===false)b=false}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ha,"`").replace(Ia,"&")}function ka(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Ja.test(b))return c.filter(b, |
e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function la(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var k in e[h])c.event.add(this,h,e[h][k],e[h][k].data)}}})}function Ka(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 ma(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?La:Ma,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function ca(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Na.test(a)?e(a,h):ca(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)? |
e(a,""):c.each(b,function(f,h){ca(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(na.concat.apply([],na.slice(0,b)),function(){d[this]=a});return d}function oa(a){if(!da[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";da[a]=d}return da[a]}function ea(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var u=E.document,c=function(){function a(){if(!b.isReady){try{u.documentElement.doScroll("left")}catch(i){setTimeout(a, |
1);return}b.ready()}}var b=function(i,r){return new b.fn.init(i,r)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,k=/\S/,l=/^\s+/,n=/\s+$/,s=/\W/,v=/\d/,B=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,D=/^[\],:{}\s]*$/,H=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,G=/(?:^|:|,)(?:\s*\[)+/g,M=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,j=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false, |
q=[],t,x=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=Array.prototype.push,N=Array.prototype.slice,R=String.prototype.trim,Q=Array.prototype.indexOf,L={};b.fn=b.prototype={init:function(i,r){var y,z,F;if(!i)return this;if(i.nodeType){this.context=this[0]=i;this.length=1;return this}if(i==="body"&&!r&&u.body){this.context=u;this[0]=u.body;this.selector="body";this.length=1;return this}if(typeof i==="string")if((y=h.exec(i))&&(y[1]||!r))if(y[1]){F=r?r.ownerDocument||r:u;if(z=B.exec(i))if(b.isPlainObject(r)){i= |
[u.createElement(z[1])];b.fn.attr.call(i,r,true)}else i=[F.createElement(z[1])];else{z=b.buildFragment([y[1]],[F]);i=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,i)}else{if((z=u.getElementById(y[2]))&&z.parentNode){if(z.id!==y[2])return f.find(i);this.length=1;this[0]=z}this.context=u;this.selector=i;return this}else if(!r&&!s.test(i)){this.selector=i;this.context=u;i=u.getElementsByTagName(i);return b.merge(this,i)}else return!r||r.jquery?(r||f).find(i):b(r).find(i); |
else if(b.isFunction(i))return f.ready(i);if(i.selector!==A){this.selector=i.selector;this.context=i.context}return b.makeArray(i,this)},selector:"",jquery:"1.4.3",length:0,size:function(){return this.length},toArray:function(){return N.call(this,0)},get:function(i){return i==null?this.toArray():i<0?this.slice(i)[0]:this[i]},pushStack:function(i,r,y){var z=b();b.isArray(i)?P.apply(z,i):b.merge(z,i);z.prevObject=this;z.context=this.context;if(r==="find")z.selector=this.selector+(this.selector?" ": |
"")+y;else if(r)z.selector=this.selector+"."+r+"("+y+")";return z},each:function(i,r){return b.each(this,i,r)},ready:function(i){b.bindReady();if(b.isReady)i.call(u,b);else q&&q.push(i);return this},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(i){return this.pushStack(b.map(this,function(r,y){return i.call(r, |
y,r)}))},end:function(){return this.prevObject||b(null)},push:P,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var i=arguments[0]||{},r=1,y=arguments.length,z=false,F,I,K,J,fa;if(typeof i==="boolean"){z=i;i=arguments[1]||{};r=2}if(typeof i!=="object"&&!b.isFunction(i))i={};if(y===r){i=this;--r}for(;r<y;r++)if((F=arguments[r])!=null)for(I in F){K=i[I];J=F[I];if(i!==J)if(z&&J&&(b.isPlainObject(J)||(fa=b.isArray(J)))){if(fa){fa=false;clone=K&&b.isArray(K)?K:[]}else clone= |
K&&b.isPlainObject(K)?K:{};i[I]=b.extend(z,clone,J)}else if(J!==A)i[I]=J}return i};b.extend({noConflict:function(i){E.$=e;if(i)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(i){i===true&&b.readyWait--;if(!b.readyWait||i!==true&&!b.isReady){if(!u.body)return setTimeout(b.ready,1);b.isReady=true;if(!(i!==true&&--b.readyWait>0)){if(q){for(var r=0;i=q[r++];)i.call(u,b);q=null}b.fn.triggerHandler&&b(u).triggerHandler("ready")}}},bindReady:function(){if(!p){p=true;if(u.readyState==="complete")return setTimeout(b.ready, |
1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i== |
null||!v.test(i)||isNaN(i)},type:function(i){return i==null?String(i):L[x.call(i)]||"object"},isPlainObject:function(i){if(!i||b.type(i)!=="object"||i.nodeType||b.isWindow(i))return false;if(i.constructor&&!C.call(i,"constructor")&&!C.call(i.constructor.prototype,"isPrototypeOf"))return false;for(var r in i);return r===A||C.call(i,r)},isEmptyObject:function(i){for(var r in i)return false;return true},error:function(i){throw i;},parseJSON:function(i){if(typeof i!=="string"||!i)return null;i=b.trim(i); |
if(D.test(i.replace(H,"@").replace(w,"]").replace(G,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(i):(new Function("return "+i))();else b.error("Invalid JSON: "+i)},noop:function(){},globalEval:function(i){if(i&&k.test(i)){var r=u.getElementsByTagName("head")[0]||u.documentElement,y=u.createElement("script");y.type="text/javascript";if(b.support.scriptEval)y.appendChild(u.createTextNode(i));else y.text=i;r.insertBefore(y,r.firstChild);r.removeChild(y)}},nodeName:function(i,r){return i.nodeName&&i.nodeName.toUpperCase()=== |
r.toUpperCase()},each:function(i,r,y){var z,F=0,I=i.length,K=I===A||b.isFunction(i);if(y)if(K)for(z in i){if(r.apply(i[z],y)===false)break}else for(;F<I;){if(r.apply(i[F++],y)===false)break}else if(K)for(z in i){if(r.call(i[z],z,i[z])===false)break}else for(y=i[0];F<I&&r.call(y,F,y)!==false;y=i[++F]);return i},trim:R?function(i){return i==null?"":R.call(i)}:function(i){return i==null?"":i.toString().replace(l,"").replace(n,"")},makeArray:function(i,r){var y=r||[];if(i!=null){var z=b.type(i);i.length== |
null||z==="string"||z==="function"||z==="regexp"||b.isWindow(i)?P.call(y,i):b.merge(y,i)}return y},inArray:function(i,r){if(r.indexOf)return r.indexOf(i);for(var y=0,z=r.length;y<z;y++)if(r[y]===i)return y;return-1},merge:function(i,r){var y=i.length,z=0;if(typeof r.length==="number")for(var F=r.length;z<F;z++)i[y++]=r[z];else for(;r[z]!==A;)i[y++]=r[z++];i.length=y;return i},grep:function(i,r,y){var z=[],F;y=!!y;for(var I=0,K=i.length;I<K;I++){F=!!r(i[I],I);y!==F&&z.push(i[I])}return z},map:function(i, |
r,y){for(var z=[],F,I=0,K=i.length;I<K;I++){F=r(i[I],I,y);if(F!=null)z[z.length]=F}return z.concat.apply([],z)},guid:1,proxy:function(i,r,y){if(arguments.length===2)if(typeof r==="string"){y=i;i=y[r];r=A}else if(r&&!b.isFunction(r)){y=r;r=A}if(!r&&i)r=function(){return i.apply(y||this,arguments)};if(i)r.guid=i.guid=i.guid||r.guid||b.guid++;return r},access:function(i,r,y,z,F,I){var K=i.length;if(typeof r==="object"){for(var J in r)b.access(i,J,r[J],z,F,y);return i}if(y!==A){z=!I&&z&&b.isFunction(y); |
for(J=0;J<K;J++)F(i[J],r,z?y.call(i[J],J,F(i[J],r)):y,I);return i}return K?F(i[0],r):A},now:function(){return(new Date).getTime()},uaMatch:function(i){i=i.toLowerCase();i=M.exec(i)||g.exec(i)||j.exec(i)||i.indexOf("compatible")<0&&o.exec(i)||[];return{browser:i[1]||"",version:i[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,r){L["[object "+r+"]"]=r.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version= |
m.version}if(b.browser.webkit)b.browser.safari=true;if(Q)b.inArray=function(i,r){return Q.call(r,i)};if(!/\s/.test("\u00a0")){l=/^[\s\xA0]+/;n=/[\s\xA0]+$/}f=b(u);if(u.addEventListener)t=function(){u.removeEventListener("DOMContentLoaded",t,false);b.ready()};else if(u.attachEvent)t=function(){if(u.readyState==="complete"){u.detachEvent("onreadystatechange",t);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=u.documentElement,b=u.createElement("script"),d=u.createElement("div"), |
e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],k=u.createElement("select"),l=k.appendChild(u.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")), |
hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:l.selected,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};k.disabled=true;c.support.optDisabled=!l.disabled;b.type="text/javascript";try{b.appendChild(u.createTextNode("window."+e+"=1;"))}catch(n){}a.insertBefore(b, |
a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function s(){c.support.noCloneEvent=false;d.detachEvent("onclick",s)});d.cloneNode(true).fireEvent("onclick")}d=u.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=u.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var s=u.createElement("div"); |
s.style.width=s.style.paddingLeft="1px";u.body.appendChild(s);c.boxModel=c.support.boxModel=s.offsetWidth===2;if("zoom"in s.style){s.style.display="inline";s.style.zoom=1;c.support.inlineBlockNeedsLayout=s.offsetWidth===2;s.style.display="";s.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=s.offsetWidth!==2}s.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var v=s.getElementsByTagName("td");c.support.reliableHiddenOffsets=v[0].offsetHeight=== |
0;v[0].style.display="";v[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&v[0].offsetHeight===0;s.innerHTML="";u.body.removeChild(s).style.display="none"});a=function(s){var v=u.createElement("div");s="on"+s;var B=s in v;if(!B){v.setAttribute(s,"return;");B=typeof v[s]==="function"}return B};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength", |
cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var pa={},Oa=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?pa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===A)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]= |
c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==A)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?pa:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else if(d)delete f[e];else for(var k in a)delete a[k]}},acceptData:function(a){if(a.nodeName){var b= |
c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){if(typeof a==="undefined")return this.length?c.data(this[0]):null;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===A){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(e===A&&this.length){e=c.data(this[0],a);if(e===A&&this[0].nodeType===1){e=this[0].getAttribute("data-"+a);if(typeof e=== |
"string")try{e=e==="true"?true:e==="false"?false:e==="null"?null:!c.isNaN(e)?parseFloat(e):Oa.test(e)?c.parseJSON(e):e}catch(f){}else e=A}}return e===A&&d[1]?this.data(d[0]):e}else return this.each(function(){var h=c(this),k=[d[0],b];h.triggerHandler("setData"+d[1]+"!",k);c.data(this,a,b);h.triggerHandler("changeData"+d[1]+"!",k)})},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 e=c.data(a,b);if(!d)return e|| |
[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===A)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 qa=/[\n\t]/g,ga=/\s+/,Pa=/\r/g,Qa=/^(?:href|src|style)$/,Ra=/^(?:button|input)$/i,Sa=/^(?:button|input|object|select|textarea)$/i,Ta=/^a(?:rea)?$/i,ra=/^(?:radio|checkbox)$/i;c.fn.extend({attr:function(a,b){return c.access(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(s){var v=c(this);v.addClass(a.call(this,s,v.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ga),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1)if(f.className){for(var h=" "+f.className+" ",k=f.className,l=0,n=b.length;l<n;l++)if(h.indexOf(" "+b[l]+" ")<0)k+=" "+b[l];f.className=c.trim(k)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(n){var s= |
c(this);s.removeClass(a.call(this,n,s.attr("class")))});if(a&&typeof a==="string"||a===A)for(var b=(a||"").split(ga),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(qa," "),k=0,l=b.length;k<l;k++)h=h.replace(" "+b[k]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this, |
f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,k=c(this),l=b,n=a.split(ga);f=n[h++];){l=e?l:!k.hasClass(f);k[l?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=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(qa," ").indexOf(a)>-1)return true;return false}, |
val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&& |
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected= |
c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); |
if(d===null)a.nodeType===1&&a.removeAttribute(b);else 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:Sa.test(a.nodeName)||Ta.test(a.nodeName)&&a.href?0:A;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return A;a=!c.support.hrefNormalized&&e&& |
h?a.getAttribute(b,2):a.getAttribute(b);return a===null?A:a}}});var X=/\.(.*)$/,ha=/^(?:textarea|input|select)$/i,Ha=/\./g,Ia=/ /g,Ua=/[^\w\s.|`]/g,Va=function(a){return a.replace(Ua,"\\$&")},sa={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var k=a.nodeType?"events":"__events__",l=h[k],n=h.handle;if(typeof l=== |
"function"){n=l.handle;l=l.events}else if(!l){a.nodeType||(h[k]=h=function(){});h.events=l={}}if(!n)h.handle=n=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(n.elem,arguments):A};n.elem=a;b=b.split(" ");for(var s=0,v;k=b[s++];){h=f?c.extend({},f):{handler:d,data:e};if(k.indexOf(".")>-1){v=k.split(".");k=v.shift();h.namespace=v.slice(0).sort().join(".")}else{v=[];h.namespace=""}h.type=k;if(!h.guid)h.guid=d.guid;var B=l[k],D=c.event.special[k]||{};if(!B){B=l[k]=[]; |
if(!D.setup||D.setup.call(a,e,v,n)===false)if(a.addEventListener)a.addEventListener(k,n,false);else a.attachEvent&&a.attachEvent("on"+k,n)}if(D.add){D.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}B.push(h);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,k=0,l,n,s,v,B,D,H=a.nodeType?"events":"__events__",w=c.data(a),G=w&&w[H];if(w&&G){if(typeof G==="function"){w=G;G=G.events}if(b&&b.type){d=b.handler;b=b.type}if(!b|| |
typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in G)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[k++];){v=f;l=f.indexOf(".")<0;n=[];if(!l){n=f.split(".");f=n.shift();s=RegExp("(^|\\.)"+c.map(n.slice(0).sort(),Va).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(B=G[f])if(d){v=c.event.special[f]||{};for(h=e||0;h<B.length;h++){D=B[h];if(d.guid===D.guid){if(l||s.test(D.namespace)){e==null&&B.splice(h--,1);v.remove&&v.remove.call(a,D)}if(e!=null)break}}if(B.length===0||e!=null&&B.length===1){if(!v.teardown|| |
v.teardown.call(a,n)===false)c.removeEvent(a,f,w.handle);delete G[f]}}else for(h=0;h<B.length;h++){D=B[h];if(l||s.test(D.namespace)){c.event.remove(a,v,D.handler,h);B.splice(h--,1)}}}if(c.isEmptyObject(G)){if(b=w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,H);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type= |
f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return A;a.result=A;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)=== |
false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){e=a.target;var k,l=f.replace(X,""),n=c.nodeName(e,"a")&&l==="click",s=c.event.special[l]||{};if((!s._default||s._default.call(d,a)===false)&&!n&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[l]){if(k=e["on"+l])e["on"+l]=null;c.event.triggered=true;e[l]()}}catch(v){}if(k)e["on"+l]=k;c.event.triggered=false}}},handle:function(a){var b,d,e; |
d=[];var f,h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var k=d.length;f<k;f++){var l=d[f];if(b||e.test(l.namespace)){a.handler=l.handler;a.data= |
l.data;a.handleObj=l;l=l.handler.apply(this,h);if(l!==A){a.result=l;if(l===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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), |
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||u;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=u.documentElement;d=u.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|| |
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==A)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,Y(a.origType,a.selector),c.extend({},a,{handler:Ga,guid:a.handler.guid}))},remove:function(a){c.event.remove(this, |
Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=u.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp= |
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U}; |
var ta=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){}},ua=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?ua:ta,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?ua:ta)}}});if(!c.support.submitBubbles)c.event.special.submit={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){a.liveFired=A;return ja("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){a.liveFired=A;return ja("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V, |
va=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(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired= |
A;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.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 Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",va(a))}},setup:function(){if(this.type=== |
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ha.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ha.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}u.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){sa[b]++===0&&u.addEventListener(a,d,true)},teardown:function(){--sa[b]=== |
0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, |
a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,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]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= |
1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var wa={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var k,l=0,n,s,v=h||this.selector;h=h?this:c(this.context);if(typeof d=== |
"object"&&!d.preventDefault){for(k in d)h[b](k,e,d[k],v);return this}if(c.isFunction(e)){f=e;e=A}for(d=(d||"").split(" ");(k=d[l++])!=null;){n=X.exec(k);s="";if(n){s=n[0];k=k.replace(X,"")}if(k==="hover")d.push("mouseenter"+s,"mouseleave"+s);else{n=k;if(k==="focus"||k==="blur"){d.push(wa[k]+s);k+=s}else k=(wa[k]||k)+s;if(b==="live"){s=0;for(var B=h.length;s<B;s++)c.event.add(h[s],"live."+Y(k,v),{data:e,selector:v,handler:f,origType:k,origHandler:f,preType:n})}else h.unbind("live."+Y(k,v),f)}}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(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",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,j,o,m,p,q){p=0;for(var t=m.length;p<t;p++){var x=m[p];if(x){x=x[g];for(var C=false;x;){if(x.sizcache===o){C=m[x.sizset];break}if(x.nodeType===1&&!q){x.sizcache=o;x.sizset=p}if(x.nodeName.toLowerCase()===j){C=x;break}x=x[g]}m[p]=C}}}function b(g,j,o,m,p,q){p=0;for(var t=m.length;p<t;p++){var x=m[p];if(x){x=x[g];for(var C=false;x;){if(x.sizcache===o){C=m[x.sizset];break}if(x.nodeType===1){if(!q){x.sizcache=o;x.sizset=p}if(typeof j!=="string"){if(x===j){C=true;break}}else if(l.filter(j, |
[x]).length>0){C=x;break}}x=x[g]}m[p]=C}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,k=true;[0,0].sort(function(){k=false;return 0});var l=function(g,j,o,m){o=o||[];var p=j=j||u;if(j.nodeType!==1&&j.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var q=[],t,x,C,P,N=true,R=l.isXML(j),Q=g,L;do{d.exec("");if(t=d.exec(Q)){Q=t[3];q.push(t[1]);if(t[2]){P=t[3]; |
break}}}while(t);if(q.length>1&&s.exec(g))if(q.length===2&&n.relative[q[0]])x=M(q[0]+q[1],j);else for(x=n.relative[q[0]]?[j]:l(q.shift(),j);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();x=M(g,x)}else{if(!m&&q.length>1&&j.nodeType===9&&!R&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){t=l.find(q.shift(),j,R);j=t.expr?l.filter(t.expr,t.set)[0]:t.set[0]}if(j){t=m?{expr:q.pop(),set:D(m)}:l.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&j.parentNode?j.parentNode:j,R);x=t.expr?l.filter(t.expr, |
t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h= |
k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*")); |
return{set:m,expr:g}};l.filter=function(g,j,o,m){for(var p=g,q=[],t=j,x,C,P=j&&j[0]&&l.isXML(j[0]);g&&j.length;){for(var N in n.filter)if((x=n.leftMatch[N].exec(g))!=null&&x[2]){var R=n.filter[N],Q,L;L=x[1];C=false;x.splice(1,1);if(L.substr(L.length-1)!=="\\"){if(t===q)q=[];if(n.preFilter[N])if(x=n.preFilter[N](x,t,o,q,m,P)){if(x===true)continue}else C=Q=true;if(x)for(var i=0;(L=t[i])!=null;i++)if(L){Q=R(L,x,i,t);var r=m^!!Q;if(o&&Q!=null)if(r)C=true;else t[i]=false;else if(r){q.push(L);C=true}}if(Q!== |
A){o||(t=q);g=g.replace(n.match[N],"");if(!C)return[];break}}}if(g===p)if(C==null)l.error(g);else break;p=g}return t};l.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=l.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,j){var o=typeof j==="string",m=o&&!/\W/.test(j);o=o&&!m;if(m)j=j.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=o||q&&q.nodeName.toLowerCase()=== |
j?q||false:q===j}o&&l.filter(j,g,true)},">":function(g,j){var o=typeof j==="string",m,p=0,q=g.length;if(o&&!/\W/.test(j))for(j=j.toLowerCase();p<q;p++){if(m=g[p]){o=m.parentNode;g[p]=o.nodeName.toLowerCase()===j?o:false}}else{for(;p<q;p++)if(m=g[p])g[p]=o?m.parentNode:m.parentNode===j;o&&l.filter(j,g,true)}},"":function(g,j,o){var m=e++,p=b,q;if(typeof j==="string"&&!/\W/.test(j)){q=j=j.toLowerCase();p=a}p("parentNode",j,m,g,q,o)},"~":function(g,j,o){var m=e++,p=b,q;if(typeof j==="string"&&!/\W/.test(j)){q= |
j=j.toLowerCase();p=a}p("previousSibling",j,m,g,q,o)}},find:{ID:function(g,j,o){if(typeof j.getElementById!=="undefined"&&!o)return(g=j.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,j){if(typeof j.getElementsByName!=="undefined"){for(var o=[],m=j.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&o.push(m[p]);return o.length===0?null:o}},TAG:function(g,j){return j.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,j,o,m,p,q){g=" "+g[1].replace(/\\/g, |
"")+" ";if(q)return g;q=0;for(var t;(t=j[q])!=null;q++)if(t)if(p^(t.className&&(" "+t.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))o||m.push(t);else if(o)j[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var j=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=j[1]+(j[2]||1)-0;g[3]=j[3]-0}g[0]=e++;return g},ATTR:function(g,j,o, |
m,p,q){j=g[1].replace(/\\/g,"");if(!q&&n.attrMap[j])g[1]=n.attrMap[j];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,j,o,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,j);else{g=l.filter(g[3],j,o,true^p);o||m.push.apply(m,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,j,o){return!!l(o[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},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)}},setFilters:{first:function(g,j){return j===0},last:function(g,j,o,m){return j===m.length-1},even:function(g,j){return j%2===0},odd:function(g,j){return j%2===1},lt:function(g,j,o){return j<o[3]-0},gt:function(g,j,o){return j>o[3]-0},nth:function(g,j,o){return o[3]- |
0===j},eq:function(g,j,o){return o[3]-0===j}},filter:{PSEUDO:function(g,j,o,m){var p=j[1],q=n.filters[p];if(q)return q(g,o,j,m);else if(p==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(j[3])>=0;else if(p==="not"){j=j[3];o=0;for(m=j.length;o<m;o++)if(j[o]===g)return false;return true}else l.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,j){var o=j[1],m=g;switch(o){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(o=== |
"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":o=j[2];var p=j[3];if(o===1&&p===0)return true;var q=j[0],t=g.parentNode;if(t&&(t.sizcache!==q||!g.nodeIndex)){var x=0;for(m=t.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++x;t.sizcache=q}m=g.nodeIndex-p;return o===0?m===0:m%o===0&&m/o>=0}},ID:function(g,j){return g.nodeType===1&&g.getAttribute("id")===j},TAG:function(g,j){return j==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== |
j},CLASS:function(g,j){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(j)>-1},ATTR:function(g,j){var o=j[1];o=n.attrHandle[o]?n.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);var m=o+"",p=j[2],q=j[4];return o==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&o!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,j,o,m){var p=n.setFilters[j[2]]; |
if(p)return p(g,o,j,m)}}},s=n.match.POS,v=function(g,j){return"\\"+(j-0+1)},B;for(B in n.match){n.match[B]=RegExp(n.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[B]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[B].source.replace(/\\(\d+)/g,v))}var D=function(g,j){g=Array.prototype.slice.call(g,0);if(j){j.push.apply(j,g);return j}return g};try{Array.prototype.slice.call(u.documentElement.childNodes,0)}catch(H){D=function(g,j){var o=j||[],m=0;if(f.call(g)==="[object Array]")Array.prototype.push.apply(o, |
g);else if(typeof g.length==="number")for(var p=g.length;m<p;m++)o.push(g[m]);else for(;g[m];m++)o.push(g[m]);return o}}var w,G;if(u.documentElement.compareDocumentPosition)w=function(g,j){if(g===j){h=true;return 0}if(!g.compareDocumentPosition||!j.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(j)&4?-1:1};else{w=function(g,j){var o=[],m=[],p=g.parentNode,q=j.parentNode,t=p;if(g===j){h=true;return 0}else if(p===q)return G(g,j);else if(p){if(!q)return 1}else return-1; |
for(;t;){o.unshift(t);t=t.parentNode}for(t=q;t;){m.unshift(t);t=t.parentNode}p=o.length;q=m.length;for(t=0;t<p&&t<q;t++)if(o[t]!==m[t])return G(o[t],m[t]);return t===p?G(g,m[t],-1):G(o[t],j,1)};G=function(g,j,o){if(g===j)return o;for(g=g.nextSibling;g;){if(g===j)return-1;g=g.nextSibling}return 1}}l.getText=function(g){for(var j="",o,m=0;g[m];m++){o=g[m];if(o.nodeType===3||o.nodeType===4)j+=o.nodeValue;else if(o.nodeType!==8)j+=l.getText(o.childNodes)}return j};(function(){var g=u.createElement("div"), |
j="script"+(new Date).getTime();g.innerHTML="<a name='"+j+"'/>";var o=u.documentElement;o.insertBefore(g,o.firstChild);if(u.getElementById(j)){n.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:A:[]};n.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}o.removeChild(g); |
o=g=null})();(function(){var g=u.createElement("div");g.appendChild(u.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(j,o){var m=o.getElementsByTagName(j[1]);if(j[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(j){return j.getAttribute("href",2)};g=null})();u.querySelectorAll&& |
function(){var g=l,j=u.createElement("div");j.innerHTML="<p class='TEST'></p>";if(!(j.querySelectorAll&&j.querySelectorAll(".TEST").length===0)){l=function(m,p,q,t){p=p||u;if(!t&&!l.isXML(p))if(p.nodeType===9)try{return D(p.querySelectorAll(m),q)}catch(x){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var C=p.id,P=p.id="__sizzle__";try{return D(p.querySelectorAll("#"+P+" "+m),q)}catch(N){}finally{if(C)p.id=C;else p.removeAttribute("id")}}return g(m,p,q,t)};for(var o in g)l[o]=g[o]; |
j=null}}();(function(){var g=u.documentElement,j=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{j.call(u.documentElement,":sizzle")}catch(m){o=true}if(j)l.matchesSelector=function(p,q){try{if(o||!n.match.PSEUDO.test(q))return j.call(p,q)}catch(t){}return l(q,null,null,[p]).length>0}})();(function(){var g=u.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(j,o,m){if(typeof o.getElementsByClassName!=="undefined"&&!m)return o.getElementsByClassName(j[1])};g=null}}})();l.contains=u.documentElement.contains?function(g,j){return g!==j&&(g.contains?g.contains(j):true)}:function(g,j){return!!(g.compareDocumentPosition(j)&16)};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var M=function(g, |
j){for(var o=[],m="",p,q=j.nodeType?[j]:j;p=n.match.PSEUDO.exec(g);){m+=p[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;p=0;for(var t=q.length;p<t;p++)l(g,q[p],o);return l.filter(m,o)};c.find=l;c.expr=l.selectors;c.expr[":"]=c.expr.filters;c.unique=l.uniqueSort;c.text=l.getText;c.isXMLDoc=l.isXML;c.contains=l.contains})();var Wa=/Until$/,Xa=/^(?:parents|prevUntil|prevAll)/,Ya=/,/,Ja=/^.[^:#\[\.,]*$/,Za=Array.prototype.slice,$a=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("", |
"find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var k=0;k<d;k++)if(b[k]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(ka(this,a,false),"not",a)},filter:function(a){return this.pushStack(ka(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a, |
b){var d=[],e,f,h=this[0];if(c.isArray(a)){var k={},l,n=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:n})}h=h.parentNode;n++}}return d}k=$a.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(k?k.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h|| |
!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="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){var d=typeof a==="string"?c(a,b||this.context):c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},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",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")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Wa.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||Ya.test(e))&&Xa.test(a))f=f.reverse();return this.pushStack(f,a,Za.call(arguments).join(","))}}); |
c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===A||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===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 xa=/ jQuery\d+="(?:\d+|null)"/g, |
$=/^\s+/,ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,za=/<([\w:]+)/,ab=/<tbody/i,bb=/<|&#?\w+;/,Aa=/<(?:script|object|embed|option|style)/i,Ba=/checked\s*(?:[^=]|=\s*.checked.)/i,cb=/\=([^="'>\s]+\/)>/g,O={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,"",""]};O.optgroup=O.option;O.tbody=O.tfoot=O.colgroup=O.caption=O.thead;O.th=O.td;if(!c.support.htmlSerialize)O._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==A)return this.empty().append((this[0]&&this[0].ownerDocument||u).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},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)})},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,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,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*")); |
c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}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);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(xa,"").replace(cb,'="$1">').replace($, |
"")],e)[0]}else return this.cloneNode(true)});if(a===true){la(this,b);la(this.find("*"),b.find("*"))}return b},html:function(a){if(a===A)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(xa,""):null;else if(typeof a==="string"&&!Aa.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!O[(za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ya,"<$1></$2>");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(e){this.empty().append(a)}}else c.isFunction(a)? |
this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),e=d.html();d.replaceWith(a.call(this,b,e))});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){var e,f,h=a[0],k=[],l;if(!c.support.checkClone&&arguments.length===3&&typeof h==="string"&&Ba.test(h))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(h))return this.each(function(s){var v=c(this);a[0]=h.call(this,s,b?v.html():A);v.domManip(a,b,d)});if(this[0]){e=h&&h.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);l=e.fragment;if(f=l.childNodes.length===1?l=l.firstChild: |
l.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var n=this.length;f<n;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):this[f]:this[f],f>0||e.cacheable||this.length>1?l.cloneNode(true):l)}k.length&&c.each(k,Ka)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:u;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===u&&!Aa.test(a[0])&&(c.support.checkClone|| |
!Ba.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h= |
d.length;f<h;f++){var k=(f>0?this.clone(true):this).get();c(d[f])[b](k);e=e.concat(k)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||u;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||u;for(var f=[],h=0,k;(k=a[h])!=null;h++){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!bb.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(ya,"<$1></$2>");var l=(za.exec(k)||["",""])[1].toLowerCase(),n=O[l]||O._default, |
s=n[0],v=b.createElement("div");for(v.innerHTML=n[1]+k+n[2];s--;)v=v.lastChild;if(!c.support.tbody){s=ab.test(k);l=l==="table"&&!s?v.firstChild&&v.firstChild.childNodes:n[1]==="<table>"&&!s?v.childNodes:[];for(n=l.length-1;n>=0;--n)c.nodeName(l[n],"tbody")&&!l[n].childNodes.length&&l[n].parentNode.removeChild(l[n])}!c.support.leadingWhitespace&&$.test(k)&&v.insertBefore(b.createTextNode($.exec(k)[0]),v.firstChild);k=v.childNodes}if(k.nodeType)f.push(k);else f=c.merge(f,k)}}if(d)for(h=0;f[h];h++)if(e&& |
c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,k=0,l;(l=a[k])!=null;k++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=e[d])&&b.events)for(var n in b.events)f[n]? |
c.event.remove(l,n):c.removeEvent(l,n,b.handle);if(h)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete e[d]}}});var Ca=/alpha\([^)]*\)/i,db=/opacity=([^)]*)/,eb=/-([a-z])/ig,fb=/([A-Z])/g,Da=/^-?\d+(?:px)?$/i,gb=/^-?\d/,hb={position:"absolute",visibility:"hidden",display:"block"},La=["Left","Right"],Ma=["Top","Bottom"],W,ib=u.defaultView&&u.defaultView.getComputedStyle,jb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===A)return this; |
return c.access(this,a,b,true,function(d,e,f){return f!==A?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),k=a.style,l=c.cssHooks[h];b=c.cssProps[h]|| |
h;if(d!==A){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==A)try{k[b]=d}catch(n){}}}else{if(l&&"get"in l&&(f=l.get(a,false,e))!==A)return f;return k[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==A)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]= |
e[f]},camelCase:function(a){return a.replace(eb,jb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=ma(d,b,f);else c.swap(d,hb,function(){h=ma(d,b,f)});return h+"px"}},set:function(d,e){if(Da.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return db.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"": |
b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=d.filter||"";d.filter=Ca.test(f)?f.replace(Ca,e):d.filter+" "+e}};if(ib)W=function(a,b,d){var e;d=d.replace(fb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return A;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};else if(u.documentElement.currentStyle)W=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b], |
h=a.style;if(!Da.test(f)&&gb.test(f)){d=h.left;e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f};if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var kb=c.now(),lb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, |
mb=/^(?:select|textarea)/i,nb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ob=/^(?:GET|HEAD|DELETE)$/,Na=/\[\]$/,T=/\=\?(&|$)/,ia=/\?/,pb=/([?&])_=[^&]*/,qb=/^(\w+:)?\/\/([^\/?#]+)/,rb=/%20/g,sb=/#.*$/,Ea=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ea)return Ea.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d= |
b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(k,l){if(l==="success"||l==="notmodified")h.html(f?c("<div>").append(k.responseText.replace(lb,"")).find(f):k.responseText);d&&h.each(d,[k.responseText,l,k])}});return this},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||mb.test(this.nodeName)||nb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, |
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,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", |
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),k=ob.test(h);b.url=b.url.replace(sb,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ia.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| |
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+kb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var l=E[d];E[d]=function(m){f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);if(c.isFunction(l))l(m);else{E[d]=A;try{delete E[d]}catch(p){}}v&&v.removeChild(B)}}if(b.dataType==="script"&&b.cache===null)b.cache= |
false;if(b.cache===false&&h==="GET"){var n=c.now(),s=b.url.replace(pb,"$1_="+n);b.url=s+(s===b.url?(ia.test(b.url)?"&":"?")+"_="+n:"")}if(b.data&&h==="GET")b.url+=(ia.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");n=(n=qb.exec(b.url))&&(n[1]&&n[1]!==location.protocol||n[2]!==location.host);if(b.dataType==="script"&&h==="GET"&&n){var v=u.getElementsByTagName("head")[0]||u.documentElement,B=u.createElement("script");if(b.scriptCharset)B.charset=b.scriptCharset;B.src= |
b.url;if(!d){var D=false;B.onload=B.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);B.onload=B.onreadystatechange=null;v&&B.parentNode&&v.removeChild(B)}}}v.insertBefore(B,v.firstChild);return A}var H=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!k||a&&a.contentType)w.setRequestHeader("Content-Type", |
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}n||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(G){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& |
c.triggerGlobal(b,"ajaxSend",[w,b]);var M=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){H||c.handleComplete(b,w,e,f);H=true;if(w)w.onreadystatechange=c.noop}else if(!H&&w&&(w.readyState===4||m==="timeout")){H=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| |
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&g.call&&g.call(w);M("abort")}}catch(j){}b.async&&b.timeout>0&&setTimeout(function(){w&&!H&&M("timeout")},b.timeout);try{w.send(k||b.data==null?null:b.data)}catch(o){c.handleError(b,w,null,o);c.handleComplete(b,w,e,f)}b.async||M();return w}},param:function(a,b){var d=[],e=function(h,k){k=c.isFunction(k)?k():k;d[d.length]=encodeURIComponent(h)+ |
"="+encodeURIComponent(k)};if(b===A)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)ca(f,a[f],b,e);return d.join("&").replace(rb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",[b,a])},handleComplete:function(a, |
b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),e=a.getResponseHeader("Etag"); |
if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});if(E.ActiveXObject)c.ajaxSettings.xhr= |
function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var da={},tb=/^(?:toggle|show|hide)$/,ub=/^([+\-]=)?([\d+.\-]+)(.*)$/,aa,na=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",3),a,b,d);else{a= |
0;for(b=this.length;a<b;a++){if(!c.data(this[a],"olddisplay")&&this[a].style.display==="none")this[a].style.display="";this[a].style.display===""&&c.css(this[a],"display")==="none"&&c.data(this[a],"olddisplay",oa(this[a].nodeName))}for(a=0;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",d)}for(a= |
0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,d,e);if(c.isEmptyObject(a))return this.each(f.complete); |
return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),k,l=this.nodeType===1,n=l&&c(this).is(":hidden"),s=this;for(k in a){var v=c.camelCase(k);if(k!==v){a[v]=a[k];delete a[k];k=v}if(a[k]==="hide"&&n||a[k]==="show"&&!n)return h.complete.call(this);if(l&&(k==="height"||k==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(oa(this.nodeName)=== |
"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[k])){(h.specialEasing=h.specialEasing||{})[k]=a[k][1];a[k]=a[k][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(B,D){var H=new c.fx(s,h,B);if(tb.test(D))H[D==="toggle"?n?"show":"hide":D](a);else{var w=ub.exec(D),G=H.cur(true)||0;if(w){var M=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(s,B,(M||1)+g); |
G=(M||1)/H.cur(true)*G;c.style(s,B,G+g)}if(w[1])M=(w[1]==="-="?-1:1)*M+G;H.custom(G,M,g)}else H.custom(G,D,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, |
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* |
Math.PI)/2+0.5)*e+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]||c.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=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(h){return f.step(h)} |
this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var f=this;a=c.fx;e.elem=this.elem;if(e()&&c.timers.push(e)&&!aa)aa=setInterval(a.tick,a.interval)},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=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(l,n){f.style["overflow"+n]=h.overflow[l]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| |
this.options.show)for(var k in this.options.curAnim)c.style(this.elem,k,this.options.orig[k]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,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||c.fx.stop()},interval:13,stop:function(){clearInterval(aa);aa=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};var vb=/^t(?:able|d|h)$/i,Fa=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in u.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(k){c.offset.setOffset(this,a,k)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=ea(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&& |
h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,e=b.ownerDocument,f,h=e.documentElement,k=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle; |
for(var l=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==k&&b!==h;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;f=e?e.getComputedStyle(b,null):b.currentStyle;l-=b.scrollTop;n-=b.scrollLeft;if(b===d){l+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&vb.test(b.nodeName))){l+=parseFloat(f.borderTopWidth)||0;n+=parseFloat(f.borderLeftWidth)||0}d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&f.overflow!=="visible"){l+= |
parseFloat(f.borderTopWidth)||0;n+=parseFloat(f.borderLeftWidth)||0}f=f}if(f.position==="relative"||f.position==="static"){l+=k.offsetTop;n+=k.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){l+=Math.max(h.scrollTop,k.scrollTop);n+=Math.max(h.scrollLeft,k.scrollLeft)}return{top:l,left:n}};c.offset={initialize:function(){var a=u.body,b=u.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||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>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells= |
f.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!==h;a.removeChild(b);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.css(a, |
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a, |
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.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(e){var f=this[0],h;if(!f)return null;if(e!==A)return this.each(function(){if(h=ea(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=ea(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); |
c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(h){var k=c(this);k[d](e.call(this,h,k[d]()))});return c.isWindow(f)?f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b]:f.nodeType===9?Math.max(f.documentElement["client"+ |
b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]):e===A?parseFloat(c.css(f,d)):this.css(d,typeof e==="string"?e:e+"px")}})})(window); |
/trunk/squelettes/js/fancybox/fancy_shadow_w.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_shadow_w.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/jquery.fancybox-1.3.4.css |
---|
New file |
0,0 → 1,359 |
/* |
* FancyBox - jQuery Plugin |
* Simple and fancy lightbox alternative |
* |
* Examples and documentation at: http://fancybox.net |
* |
* Copyright (c) 2008 - 2010 Janis Skarnelis |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. |
* |
* Version: 1.3.4 (11/11/2010) |
* Requires: jQuery v1.3+ |
* |
* Dual licensed under the MIT and GPL licenses: |
* http://www.opensource.org/licenses/mit-license.php |
* http://www.gnu.org/licenses/gpl.html |
*/ |
#fancybox-loading { |
position: fixed; |
top: 50%; |
left: 50%; |
width: 40px; |
height: 40px; |
margin-top: -20px; |
margin-left: -20px; |
cursor: pointer; |
overflow: hidden; |
z-index: 1104; |
display: none; |
} |
#fancybox-loading div { |
position: absolute; |
top: 0; |
left: 0; |
width: 40px; |
height: 480px; |
background-image: url('fancybox.png'); |
} |
#fancybox-overlay { |
position: absolute; |
top: 0; |
left: 0; |
width: 100%; |
z-index: 1100; |
display: none; |
} |
#fancybox-tmp { |
padding: 0; |
margin: 0; |
border: 0; |
overflow: auto; |
display: none; |
} |
#fancybox-wrap { |
position: absolute; |
top: 0; |
left: 0; |
padding: 20px; |
z-index: 1101; |
outline: none; |
display: none; |
} |
#fancybox-outer { |
position: relative; |
width: 100%; |
height: 100%; |
background: #fff; |
} |
#fancybox-content { |
width: 0; |
height: 0; |
padding: 0; |
outline: none; |
position: relative; |
overflow: hidden; |
z-index: 1102; |
border: 0px solid #fff; |
} |
#fancybox-hide-sel-frame { |
position: absolute; |
top: 0; |
left: 0; |
width: 100%; |
height: 100%; |
background: transparent; |
z-index: 1101; |
} |
#fancybox-close { |
position: absolute; |
top: -15px; |
right: -15px; |
width: 30px; |
height: 30px; |
background: transparent url('fancybox.png') -40px 0px; |
cursor: pointer; |
z-index: 1103; |
display: none; |
} |
#fancybox-error { |
color: #444; |
font: normal 12px/20px Arial; |
padding: 14px; |
margin: 0; |
} |
#fancybox-img { |
width: 100%; |
height: 100%; |
padding: 0; |
margin: 0; |
border: none; |
outline: none; |
line-height: 0; |
vertical-align: top; |
} |
#fancybox-frame { |
width: 100%; |
height: 100%; |
border: none; |
display: block; |
} |
#fancybox-left, #fancybox-right { |
position: absolute; |
bottom: 0px; |
height: 100%; |
width: 35%; |
cursor: pointer; |
outline: none; |
background: transparent url('blank.gif'); |
z-index: 1102; |
display: none; |
} |
#fancybox-left { |
left: 0px; |
} |
#fancybox-right { |
right: 0px; |
} |
#fancybox-left-ico, #fancybox-right-ico { |
position: absolute; |
top: 50%; |
left: -9999px; |
width: 30px; |
height: 30px; |
margin-top: -15px; |
cursor: pointer; |
z-index: 1102; |
display: block; |
} |
#fancybox-left-ico { |
background-image: url('fancybox.png'); |
background-position: -40px -30px; |
} |
#fancybox-right-ico { |
background-image: url('fancybox.png'); |
background-position: -40px -60px; |
} |
#fancybox-left:hover, #fancybox-right:hover { |
visibility: visible; /* IE6 */ |
} |
#fancybox-left:hover span { |
left: 20px; |
} |
#fancybox-right:hover span { |
left: auto; |
right: 20px; |
} |
.fancybox-bg { |
position: absolute; |
padding: 0; |
margin: 0; |
border: 0; |
width: 20px; |
height: 20px; |
z-index: 1001; |
} |
#fancybox-bg-n { |
top: -20px; |
left: 0; |
width: 100%; |
background-image: url('fancybox-x.png'); |
} |
#fancybox-bg-ne { |
top: -20px; |
right: -20px; |
background-image: url('fancybox.png'); |
background-position: -40px -162px; |
} |
#fancybox-bg-e { |
top: 0; |
right: -20px; |
height: 100%; |
background-image: url('fancybox-y.png'); |
background-position: -20px 0px; |
} |
#fancybox-bg-se { |
bottom: -20px; |
right: -20px; |
background-image: url('fancybox.png'); |
background-position: -40px -182px; |
} |
#fancybox-bg-s { |
bottom: -20px; |
left: 0; |
width: 100%; |
background-image: url('fancybox-x.png'); |
background-position: 0px -20px; |
} |
#fancybox-bg-sw { |
bottom: -20px; |
left: -20px; |
background-image: url('fancybox.png'); |
background-position: -40px -142px; |
} |
#fancybox-bg-w { |
top: 0; |
left: -20px; |
height: 100%; |
background-image: url('fancybox-y.png'); |
} |
#fancybox-bg-nw { |
top: -20px; |
left: -20px; |
background-image: url('fancybox.png'); |
background-position: -40px -122px; |
} |
#fancybox-title { |
font-family: Helvetica; |
font-size: 12px; |
z-index: 1102; |
} |
.fancybox-title-inside { |
padding-bottom: 10px; |
text-align: center; |
color: #333; |
background: #fff; |
position: relative; |
} |
.fancybox-title-outside { |
padding-top: 10px; |
color: #fff; |
} |
.fancybox-title-over { |
position: absolute; |
bottom: 0; |
left: 0; |
color: #FFF; |
text-align: left; |
} |
#fancybox-title-over { |
padding: 10px; |
background-image: url('fancy_title_over.png'); |
display: block; |
} |
.fancybox-title-float { |
position: absolute; |
left: 0; |
bottom: -20px; |
height: 32px; |
} |
#fancybox-title-float-wrap { |
border: none; |
border-collapse: collapse; |
width: auto; |
} |
#fancybox-title-float-wrap td { |
border: none; |
white-space: nowrap; |
} |
#fancybox-title-float-left { |
padding: 0 0 0 15px; |
background: url('fancybox.png') -40px -90px no-repeat; |
} |
#fancybox-title-float-main { |
color: #FFF; |
line-height: 29px; |
font-weight: bold; |
padding: 0 0 3px 0; |
background: url('fancybox-x.png') 0px -40px; |
} |
#fancybox-title-float-right { |
padding: 0 0 0 15px; |
background: url('fancybox.png') -55px -90px no-repeat; |
} |
/* IE6 */ |
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } |
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); } |
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { |
height: expression(this.parentNode.clientHeight + "px"); |
} |
#fancybox-loading.fancybox-ie6 { |
position: absolute; margin-top: 0; |
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); |
} |
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); } |
/* IE6, IE7, IE8 */ |
.fancybox-ie .fancybox-bg { background: transparent !important; } |
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); } |
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } |
/trunk/squelettes/js/fancybox/fancy_title_over.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_title_over.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_shadow_se.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_shadow_se.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/jquery.fancybox-1.3.4.pack.js |
---|
New file |
0,0 → 1,46 |
/* |
* FancyBox - jQuery Plugin |
* Simple and fancy lightbox alternative |
* |
* Examples and documentation at: http://fancybox.net |
* |
* Copyright (c) 2008 - 2010 Janis Skarnelis |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. |
* |
* Version: 1.3.4 (11/11/2010) |
* Requires: jQuery v1.3+ |
* |
* Dual licensed under the MIT and GPL licenses: |
* http://www.opensource.org/licenses/mit-license.php |
* http://www.gnu.org/licenses/gpl.html |
*/ |
;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'); |
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)|| |
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick= |
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel", |
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+ |
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win== |
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+ |
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor, |
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length? |
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding}); |
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height== |
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents()); |
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode== |
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto"); |
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j); |
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c); |
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type== |
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"), |
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)}; |
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k= |
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+ |
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h= |
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1; |
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5- |
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f); |
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()}); |
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}}; |
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing", |
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery); |
/trunk/squelettes/js/fancybox/fancy_loading.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_loading.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/fancybox/fancy_title_right.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/trunk/squelettes/js/fancybox/fancy_title_right.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/trunk/squelettes/js/jquery-1.4.2.min.js |
---|
New file |
0,0 → 1,6240 |
/*! |
* jQuery JavaScript Library v1.4.2 |
* http://jquery.com/ |
* |
* Copyright 2010, John Resig |
* Dual licensed under the MIT or GPL Version 2 licenses. |
* http://jquery.org/license |
* |
* Includes Sizzle.js |
* http://sizzlejs.com/ |
* Copyright 2010, The Dojo Foundation |
* Released under the MIT, BSD, and GPL Licenses. |
* |
* Date: Sat Feb 13 22:33:48 2010 -0500 |
*/ |
(function( window, undefined ) { |
// Define a local copy of jQuery |
var jQuery = function( selector, context ) { |
// The jQuery object is actually just the init constructor 'enhanced' |
return new jQuery.fn.init( selector, context ); |
}, |
// Map over jQuery in case of overwrite |
_jQuery = window.jQuery, |
// Map over the $ in case of overwrite |
_$ = window.$, |
// Use the correct document accordingly with window argument (sandbox) |
document = window.document, |
// A central reference to the root jQuery(document) |
rootjQuery, |
// A simple way to check for HTML strings or ID strings |
// (both of which we optimize for) |
quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/, |
// Is it a simple selector |
isSimple = /^.[^:#\[\.,]*$/, |
// Check if a string has a non-whitespace character in it |
rnotwhite = /\S/, |
// Used for trimming whitespace |
rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g, |
// Match a standalone tag |
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, |
// Keep a UserAgent string for use with jQuery.browser |
userAgent = navigator.userAgent, |
// For matching the engine and version of the browser |
browserMatch, |
// Has the ready events already been bound? |
readyBound = false, |
// The functions to execute on DOM ready |
readyList = [], |
// The ready event handler |
DOMContentLoaded, |
// Save a reference to some core methods |
toString = Object.prototype.toString, |
hasOwnProperty = Object.prototype.hasOwnProperty, |
push = Array.prototype.push, |
slice = Array.prototype.slice, |
indexOf = Array.prototype.indexOf; |
jQuery.fn = jQuery.prototype = { |
init: function( selector, context ) { |
var match, elem, ret, doc; |
// Handle $(""), $(null), or $(undefined) |
if ( !selector ) { |
return this; |
} |
// Handle $(DOMElement) |
if ( selector.nodeType ) { |
this.context = this[0] = selector; |
this.length = 1; |
return this; |
} |
// The body element only exists once, optimize finding it |
if ( selector === "body" && !context ) { |
this.context = document; |
this[0] = document.body; |
this.selector = "body"; |
this.length = 1; |
return this; |
} |
// Handle HTML strings |
if ( typeof selector === "string" ) { |
// Are we dealing with HTML string or an ID? |
match = quickExpr.exec( selector ); |
// Verify a match, and that no context was specified for #id |
if ( match && (match[1] || !context) ) { |
// HANDLE: $(html) -> $(array) |
if ( match[1] ) { |
doc = (context ? context.ownerDocument || context : document); |
// If a single string is passed in and it's a single tag |
// just do a createElement and skip the rest |
ret = rsingleTag.exec( selector ); |
if ( ret ) { |
if ( jQuery.isPlainObject( context ) ) { |
selector = [ document.createElement( ret[1] ) ]; |
jQuery.fn.attr.call( selector, context, true ); |
} else { |
selector = [ doc.createElement( ret[1] ) ]; |
} |
} else { |
ret = buildFragment( [ match[1] ], [ doc ] ); |
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes; |
} |
return jQuery.merge( this, selector ); |
// HANDLE: $("#id") |
} else { |
elem = document.getElementById( match[2] ); |
if ( elem ) { |
// Handle the case where IE and Opera return items |
// by name instead of ID |
if ( elem.id !== match[2] ) { |
return rootjQuery.find( selector ); |
} |
// Otherwise, we inject the element directly into the jQuery object |
this.length = 1; |
this[0] = elem; |
} |
this.context = document; |
this.selector = selector; |
return this; |
} |
// HANDLE: $("TAG") |
} else if ( !context && /^\w+$/.test( selector ) ) { |
this.selector = selector; |
this.context = document; |
selector = document.getElementsByTagName( selector ); |
return jQuery.merge( this, selector ); |
// HANDLE: $(expr, $(...)) |
} else if ( !context || context.jquery ) { |
return (context || rootjQuery).find( selector ); |
// HANDLE: $(expr, context) |
// (which is just equivalent to: $(context).find(expr) |
} else { |
return jQuery( context ).find( selector ); |
} |
// HANDLE: $(function) |
// Shortcut for document ready |
} else if ( jQuery.isFunction( selector ) ) { |
return rootjQuery.ready( selector ); |
} |
if (selector.selector !== undefined) { |
this.selector = selector.selector; |
this.context = selector.context; |
} |
return jQuery.makeArray( selector, this ); |
}, |
// Start with an empty selector |
selector: "", |
// The current version of jQuery being used |
jquery: "1.4.2", |
// The default length of a jQuery object is 0 |
length: 0, |
// The number of elements contained in the matched element set |
size: function() { |
return this.length; |
}, |
toArray: function() { |
return slice.call( this, 0 ); |
}, |
// Get the Nth element in the matched element set OR |
// Get the whole matched element set as a clean array |
get: function( num ) { |
return num == null ? |
// Return a 'clean' array |
this.toArray() : |
// Return just the object |
( num < 0 ? this.slice(num)[ 0 ] : this[ num ] ); |
}, |
// Take an array of elements and push it onto the stack |
// (returning the new matched element set) |
pushStack: function( elems, name, selector ) { |
// Build a new jQuery matched element set |
var ret = jQuery(); |
if ( jQuery.isArray( elems ) ) { |
push.apply( ret, elems ); |
} else { |
jQuery.merge( ret, elems ); |
} |
// Add the old object onto the stack (as a reference) |
ret.prevObject = this; |
ret.context = this.context; |
if ( name === "find" ) { |
ret.selector = this.selector + (this.selector ? " " : "") + selector; |
} else if ( name ) { |
ret.selector = this.selector + "." + name + "(" + selector + ")"; |
} |
// Return the newly-formed element set |
return ret; |
}, |
// Execute a callback for every element in the matched set. |
// (You can seed the arguments with an array of args, but this is |
// only used internally.) |
each: function( callback, args ) { |
return jQuery.each( this, callback, args ); |
}, |
ready: function( fn ) { |
// Attach the listeners |
jQuery.bindReady(); |
// If the DOM is already ready |
if ( jQuery.isReady ) { |
// Execute the function immediately |
fn.call( document, jQuery ); |
// Otherwise, remember the function for later |
} else if ( readyList ) { |
// Add the function to the wait list |
readyList.push( fn ); |
} |
return this; |
}, |
eq: function( i ) { |
return i === -1 ? |
this.slice( i ) : |
this.slice( i, +i + 1 ); |
}, |
first: function() { |
return this.eq( 0 ); |
}, |
last: function() { |
return this.eq( -1 ); |
}, |
slice: function() { |
return this.pushStack( slice.apply( this, arguments ), |
"slice", slice.call(arguments).join(",") ); |
}, |
map: function( callback ) { |
return this.pushStack( jQuery.map(this, function( elem, i ) { |
return callback.call( elem, i, elem ); |
})); |
}, |
end: function() { |
return this.prevObject || jQuery(null); |
}, |
// For internal use only. |
// Behaves like an Array's method, not like a jQuery method. |
push: push, |
sort: [].sort, |
splice: [].splice |
}; |
// Give the init function the jQuery prototype for later instantiation |
jQuery.fn.init.prototype = jQuery.fn; |
jQuery.extend = jQuery.fn.extend = function() { |
// copy reference to target object |
var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy; |
// Handle a deep copy situation |
if ( typeof target === "boolean" ) { |
deep = target; |
target = arguments[1] || {}; |
// skip the boolean and the target |
i = 2; |
} |
// Handle case when target is a string or something (possible in deep copy) |
if ( typeof target !== "object" && !jQuery.isFunction(target) ) { |
target = {}; |
} |
// extend jQuery itself if only one argument is passed |
if ( length === i ) { |
target = this; |
--i; |
} |
for ( ; i < length; i++ ) { |
// Only deal with non-null/undefined values |
if ( (options = arguments[ i ]) != null ) { |
// Extend the base object |
for ( name in options ) { |
src = target[ name ]; |
copy = options[ name ]; |
// Prevent never-ending loop |
if ( target === copy ) { |
continue; |
} |
// Recurse if we're merging object literal values or arrays |
if ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) { |
var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src |
: jQuery.isArray(copy) ? [] : {}; |
// Never move original objects, clone them |
target[ name ] = jQuery.extend( deep, clone, copy ); |
// Don't bring in undefined values |
} else if ( copy !== undefined ) { |
target[ name ] = copy; |
} |
} |
} |
} |
// Return the modified object |
return target; |
}; |
jQuery.extend({ |
noConflict: function( deep ) { |
window.$ = _$; |
if ( deep ) { |
window.jQuery = _jQuery; |
} |
return jQuery; |
}, |
// Is the DOM ready to be used? Set to true once it occurs. |
isReady: false, |
// Handle when the DOM is ready |
ready: function() { |
// Make sure that the DOM is not already loaded |
if ( !jQuery.isReady ) { |
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). |
if ( !document.body ) { |
return setTimeout( jQuery.ready, 13 ); |
} |
// Remember that the DOM is ready |
jQuery.isReady = true; |
// If there are functions bound, to execute |
if ( readyList ) { |
// Execute all of them |
var fn, i = 0; |
while ( (fn = readyList[ i++ ]) ) { |
fn.call( document, jQuery ); |
} |
// Reset the list of functions |
readyList = null; |
} |
// Trigger any bound ready events |
if ( jQuery.fn.triggerHandler ) { |
jQuery( document ).triggerHandler( "ready" ); |
} |
} |
}, |
bindReady: function() { |
if ( readyBound ) { |
return; |
} |
readyBound = true; |
// Catch cases where $(document).ready() is called after the |
// browser event has already occurred. |
if ( document.readyState === "complete" ) { |
return jQuery.ready(); |
} |
// Mozilla, Opera and webkit nightlies currently support this event |
if ( document.addEventListener ) { |
// Use the handy event callback |
document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); |
// A fallback to window.onload, that will always work |
window.addEventListener( "load", jQuery.ready, false ); |
// If IE event model is used |
} else if ( document.attachEvent ) { |
// ensure firing before onload, |
// maybe late but safe also for iframes |
document.attachEvent("onreadystatechange", DOMContentLoaded); |
// A fallback to window.onload, that will always work |
window.attachEvent( "onload", jQuery.ready ); |
// If IE and not a frame |
// continually check to see if the document is ready |
var toplevel = false; |
try { |
toplevel = window.frameElement == null; |
} catch(e) {} |
if ( document.documentElement.doScroll && toplevel ) { |
doScrollCheck(); |
} |
} |
}, |
// See test/unit/core.js for details concerning isFunction. |
// Since version 1.3, DOM methods and functions like alert |
// aren't supported. They return false on IE (#2968). |
isFunction: function( obj ) { |
return toString.call(obj) === "[object Function]"; |
}, |
isArray: function( obj ) { |
return toString.call(obj) === "[object Array]"; |
}, |
isPlainObject: function( obj ) { |
// Must be an Object. |
// Because of IE, we also have to check the presence of the constructor property. |
// Make sure that DOM nodes and window objects don't pass through, as well |
if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) { |
return false; |
} |
// Not own constructor property must be Object |
if ( obj.constructor |
&& !hasOwnProperty.call(obj, "constructor") |
&& !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) { |
return false; |
} |
// Own properties are enumerated firstly, so to speed up, |
// if last one is own, then all properties are own. |
var key; |
for ( key in obj ) {} |
return key === undefined || hasOwnProperty.call( obj, key ); |
}, |
isEmptyObject: function( obj ) { |
for ( var name in obj ) { |
return false; |
} |
return true; |
}, |
error: function( msg ) { |
throw msg; |
}, |
parseJSON: function( data ) { |
if ( typeof data !== "string" || !data ) { |
return null; |
} |
// Make sure leading/trailing whitespace is removed (IE can't handle it) |
data = jQuery.trim( data ); |
// Make sure the incoming data is actual JSON |
// Logic borrowed from http://json.org/json2.js |
if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@") |
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]") |
.replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) { |
// Try to use the native JSON parser first |
return window.JSON && window.JSON.parse ? |
window.JSON.parse( data ) : |
(new Function("return " + data))(); |
} else { |
jQuery.error( "Invalid JSON: " + data ); |
} |
}, |
noop: function() {}, |
// Evalulates a script in a global context |
globalEval: function( data ) { |
if ( data && rnotwhite.test(data) ) { |
// Inspired by code by Andrea Giammarchi |
// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html |
var head = document.getElementsByTagName("head")[0] || document.documentElement, |
script = document.createElement("script"); |
script.type = "text/javascript"; |
if ( jQuery.support.scriptEval ) { |
script.appendChild( document.createTextNode( data ) ); |
} else { |
script.text = data; |
} |
// Use insertBefore instead of appendChild to circumvent an IE6 bug. |
// This arises when a base node is used (#2709). |
head.insertBefore( script, head.firstChild ); |
head.removeChild( script ); |
} |
}, |
nodeName: function( elem, name ) { |
return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); |
}, |
// args is for internal usage only |
each: function( object, callback, args ) { |
var name, i = 0, |
length = object.length, |
isObj = length === undefined || jQuery.isFunction(object); |
if ( args ) { |
if ( isObj ) { |
for ( name in object ) { |
if ( callback.apply( object[ name ], args ) === false ) { |
break; |
} |
} |
} else { |
for ( ; i < length; ) { |
if ( callback.apply( object[ i++ ], args ) === false ) { |
break; |
} |
} |
} |
// A special, fast, case for the most common use of each |
} else { |
if ( isObj ) { |
for ( name in object ) { |
if ( callback.call( object[ name ], name, object[ name ] ) === false ) { |
break; |
} |
} |
} else { |
for ( var value = object[0]; |
i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} |
} |
} |
return object; |
}, |
trim: function( text ) { |
return (text || "").replace( rtrim, "" ); |
}, |
// results is for internal usage only |
makeArray: function( array, results ) { |
var ret = results || []; |
if ( array != null ) { |
// The window, strings (and functions) also have 'length' |
// The extra typeof function check is to prevent crashes |
// in Safari 2 (See: #3039) |
if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) { |
push.call( ret, array ); |
} else { |
jQuery.merge( ret, array ); |
} |
} |
return ret; |
}, |
inArray: function( elem, array ) { |
if ( array.indexOf ) { |
return array.indexOf( elem ); |
} |
for ( var i = 0, length = array.length; i < length; i++ ) { |
if ( array[ i ] === elem ) { |
return i; |
} |
} |
return -1; |
}, |
merge: function( first, second ) { |
var i = first.length, j = 0; |
if ( typeof second.length === "number" ) { |
for ( var l = second.length; j < l; j++ ) { |
first[ i++ ] = second[ j ]; |
} |
} else { |
while ( second[j] !== undefined ) { |
first[ i++ ] = second[ j++ ]; |
} |
} |
first.length = i; |
return first; |
}, |
grep: function( elems, callback, inv ) { |
var ret = []; |
// Go through the array, only saving the items |
// that pass the validator function |
for ( var i = 0, length = elems.length; i < length; i++ ) { |
if ( !inv !== !callback( elems[ i ], i ) ) { |
ret.push( elems[ i ] ); |
} |
} |
return ret; |
}, |
// arg is for internal usage only |
map: function( elems, callback, arg ) { |
var ret = [], value; |
// Go through the array, translating each of the items to their |
// new value (or values). |
for ( var i = 0, length = elems.length; i < length; i++ ) { |
value = callback( elems[ i ], i, arg ); |
if ( value != null ) { |
ret[ ret.length ] = value; |
} |
} |
return ret.concat.apply( [], ret ); |
}, |
// A global GUID counter for objects |
guid: 1, |
proxy: function( fn, proxy, thisObject ) { |
if ( arguments.length === 2 ) { |
if ( typeof proxy === "string" ) { |
thisObject = fn; |
fn = thisObject[ proxy ]; |
proxy = undefined; |
} else if ( proxy && !jQuery.isFunction( proxy ) ) { |
thisObject = proxy; |
proxy = undefined; |
} |
} |
if ( !proxy && fn ) { |
proxy = function() { |
return fn.apply( thisObject || this, arguments ); |
}; |
} |
// Set the guid of unique handler to the same of original handler, so it can be removed |
if ( fn ) { |
proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; |
} |
// So proxy can be declared as an argument |
return proxy; |
}, |
// Use of jQuery.browser is frowned upon. |
// More details: http://docs.jquery.com/Utilities/jQuery.browser |
uaMatch: function( ua ) { |
ua = ua.toLowerCase(); |
var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) || |
/(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) || |
/(msie) ([\w.]+)/.exec( ua ) || |
!/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) || |
[]; |
return { browser: match[1] || "", version: match[2] || "0" }; |
}, |
browser: {} |
}); |
browserMatch = jQuery.uaMatch( userAgent ); |
if ( browserMatch.browser ) { |
jQuery.browser[ browserMatch.browser ] = true; |
jQuery.browser.version = browserMatch.version; |
} |
// Deprecated, use jQuery.browser.webkit instead |
if ( jQuery.browser.webkit ) { |
jQuery.browser.safari = true; |
} |
if ( indexOf ) { |
jQuery.inArray = function( elem, array ) { |
return indexOf.call( array, elem ); |
}; |
} |
// All jQuery objects should point back to these |
rootjQuery = jQuery(document); |
// Cleanup functions for the document ready method |
if ( document.addEventListener ) { |
DOMContentLoaded = function() { |
document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); |
jQuery.ready(); |
}; |
} else if ( document.attachEvent ) { |
DOMContentLoaded = function() { |
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). |
if ( document.readyState === "complete" ) { |
document.detachEvent( "onreadystatechange", DOMContentLoaded ); |
jQuery.ready(); |
} |
}; |
} |
// The DOM ready check for Internet Explorer |
function doScrollCheck() { |
if ( jQuery.isReady ) { |
return; |
} |
try { |
// If IE is used, use the trick by Diego Perini |
// http://javascript.nwbox.com/IEContentLoaded/ |
document.documentElement.doScroll("left"); |
} catch( error ) { |
setTimeout( doScrollCheck, 1 ); |
return; |
} |
// and execute any waiting functions |
jQuery.ready(); |
} |
function evalScript( i, elem ) { |
if ( elem.src ) { |
jQuery.ajax({ |
url: elem.src, |
async: false, |
dataType: "script" |
}); |
} else { |
jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); |
} |
if ( elem.parentNode ) { |
elem.parentNode.removeChild( elem ); |
} |
} |
// Mutifunctional method to get and set values to a collection |
// The value/s can be optionally by executed if its a function |
function access( elems, key, value, exec, fn, pass ) { |
var length = elems.length; |
// Setting many attributes |
if ( typeof key === "object" ) { |
for ( var k in key ) { |
access( elems, k, key[k], exec, fn, value ); |
} |
return elems; |
} |
// Setting one attribute |
if ( value !== undefined ) { |
// Optionally, function values get executed if exec is true |
exec = !pass && exec && jQuery.isFunction(value); |
for ( var i = 0; i < length; i++ ) { |
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); |
} |
return elems; |
} |
// Getting an attribute |
return length ? fn( elems[0], key ) : undefined; |
} |
function now() { |
return (new Date).getTime(); |
} |
(function() { |
jQuery.support = {}; |
var root = document.documentElement, |
script = document.createElement("script"), |
div = document.createElement("div"), |
id = "script" + now(); |
div.style.display = "none"; |
div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; |
var all = div.getElementsByTagName("*"), |
a = div.getElementsByTagName("a")[0]; |
// Can't get basic test support |
if ( !all || !all.length || !a ) { |
return; |
} |
jQuery.support = { |
// IE strips leading whitespace when .innerHTML is used |
leadingWhitespace: div.firstChild.nodeType === 3, |
// Make sure that tbody elements aren't automatically inserted |
// IE will insert them into empty tables |
tbody: !div.getElementsByTagName("tbody").length, |
// Make sure that link elements get serialized correctly by innerHTML |
// This requires a wrapper element in IE |
htmlSerialize: !!div.getElementsByTagName("link").length, |
// Get the style information from getAttribute |
// (IE uses .cssText insted) |
style: /red/.test( a.getAttribute("style") ), |
// Make sure that URLs aren't manipulated |
// (IE normalizes it by default) |
hrefNormalized: a.getAttribute("href") === "/a", |
// Make sure that element opacity exists |
// (IE uses filter instead) |
// Use a regex to work around a WebKit issue. See #5145 |
opacity: /^0.55$/.test( a.style.opacity ), |
// Verify style float existence |
// (IE uses styleFloat instead of cssFloat) |
cssFloat: !!a.style.cssFloat, |
// Make sure that if no value is specified for a checkbox |
// that it defaults to "on". |
// (WebKit defaults to "" instead) |
checkOn: div.getElementsByTagName("input")[0].value === "on", |
// Make sure that a selected-by-default option has a working selected property. |
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup) |
optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected, |
parentNode: div.removeChild( div.appendChild( document.createElement("div") ) ).parentNode === null, |
// Will be defined later |
deleteExpando: true, |
checkClone: false, |
scriptEval: false, |
noCloneEvent: true, |
boxModel: null |
}; |
script.type = "text/javascript"; |
try { |
script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); |
} catch(e) {} |
root.insertBefore( script, root.firstChild ); |
// Make sure that the execution of code works by injecting a script |
// tag with appendChild/createTextNode |
// (IE doesn't support this, fails, and uses .text instead) |
if ( window[ id ] ) { |
jQuery.support.scriptEval = true; |
delete window[ id ]; |
} |
// Test to see if it's possible to delete an expando from an element |
// Fails in Internet Explorer |
try { |
delete script.test; |
} catch(e) { |
jQuery.support.deleteExpando = false; |
} |
root.removeChild( script ); |
if ( div.attachEvent && div.fireEvent ) { |
div.attachEvent("onclick", function click() { |
// Cloning a node shouldn't copy over any |
// bound event handlers (IE does this) |
jQuery.support.noCloneEvent = false; |
div.detachEvent("onclick", click); |
}); |
div.cloneNode(true).fireEvent("onclick"); |
} |
div = document.createElement("div"); |
div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>"; |
var fragment = document.createDocumentFragment(); |
fragment.appendChild( div.firstChild ); |
// WebKit doesn't clone checked state correctly in fragments |
jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; |
// Figure out if the W3C box model works as expected |
// document.body must exist before we can do this |
jQuery(function() { |
var div = document.createElement("div"); |
div.style.width = div.style.paddingLeft = "1px"; |
document.body.appendChild( div ); |
jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; |
document.body.removeChild( div ).style.display = 'none'; |
div = null; |
}); |
// Technique from Juriy Zaytsev |
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ |
var eventSupported = function( eventName ) { |
var el = document.createElement("div"); |
eventName = "on" + eventName; |
var isSupported = (eventName in el); |
if ( !isSupported ) { |
el.setAttribute(eventName, "return;"); |
isSupported = typeof el[eventName] === "function"; |
} |
el = null; |
return isSupported; |
}; |
jQuery.support.submitBubbles = eventSupported("submit"); |
jQuery.support.changeBubbles = eventSupported("change"); |
// release memory in IE |
root = script = div = all = a = null; |
})(); |
jQuery.props = { |
"for": "htmlFor", |
"class": "className", |
readonly: "readOnly", |
maxlength: "maxLength", |
cellspacing: "cellSpacing", |
rowspan: "rowSpan", |
colspan: "colSpan", |
tabindex: "tabIndex", |
usemap: "useMap", |
frameborder: "frameBorder" |
}; |
var expando = "jQuery" + now(), uuid = 0, windowData = {}; |
jQuery.extend({ |
cache: {}, |
expando:expando, |
// The following elements throw uncatchable exceptions if you |
// attempt to add expando properties to them. |
noData: { |
"embed": true, |
"object": true, |
"applet": true |
}, |
data: function( elem, name, data ) { |
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { |
return; |
} |
elem = elem == window ? |
windowData : |
elem; |
var id = elem[ expando ], cache = jQuery.cache, thisCache; |
if ( !id && typeof name === "string" && data === undefined ) { |
return null; |
} |
// Compute a unique ID for the element |
if ( !id ) { |
id = ++uuid; |
} |
// Avoid generating a new cache unless none exists and we |
// want to manipulate it. |
if ( typeof name === "object" ) { |
elem[ expando ] = id; |
thisCache = cache[ id ] = jQuery.extend(true, {}, name); |
} else if ( !cache[ id ] ) { |
elem[ expando ] = id; |
cache[ id ] = {}; |
} |
thisCache = cache[ id ]; |
// Prevent overriding the named cache with undefined values |
if ( data !== undefined ) { |
thisCache[ name ] = data; |
} |
return typeof name === "string" ? thisCache[ name ] : thisCache; |
}, |
removeData: function( elem, name ) { |
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { |
return; |
} |
elem = elem == window ? |
windowData : |
elem; |
var id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ]; |
// If we want to remove a specific section of the element's data |
if ( name ) { |
if ( thisCache ) { |
// Remove the section of cache data |
delete thisCache[ name ]; |
// If we've removed all the data, remove the element's cache |
if ( jQuery.isEmptyObject(thisCache) ) { |
jQuery.removeData( elem ); |
} |
} |
// Otherwise, we want to remove all of the element's data |
} else { |
if ( jQuery.support.deleteExpando ) { |
delete elem[ jQuery.expando ]; |
} else if ( elem.removeAttribute ) { |
elem.removeAttribute( jQuery.expando ); |
} |
// Completely remove the data cache |
delete cache[ id ]; |
} |
} |
}); |
jQuery.fn.extend({ |
data: function( key, value ) { |
if ( typeof key === "undefined" && this.length ) { |
return jQuery.data( this[0] ); |
} else if ( typeof key === "object" ) { |
return this.each(function() { |
jQuery.data( this, key ); |
}); |
} |
var parts = key.split("."); |
parts[1] = parts[1] ? "." + parts[1] : ""; |
if ( value === undefined ) { |
var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); |
if ( data === undefined && this.length ) { |
data = jQuery.data( this[0], key ); |
} |
return data === undefined && parts[1] ? |
this.data( parts[0] ) : |
data; |
} else { |
return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() { |
jQuery.data( this, key, value ); |
}); |
} |
}, |
removeData: function( key ) { |
return this.each(function() { |
jQuery.removeData( this, key ); |
}); |
} |
}); |
jQuery.extend({ |
queue: function( elem, type, data ) { |
if ( !elem ) { |
return; |
} |
type = (type || "fx") + "queue"; |
var q = jQuery.data( elem, type ); |
// Speed up dequeue by getting out quickly if this is just a lookup |
if ( !data ) { |
return q || []; |
} |
if ( !q || jQuery.isArray(data) ) { |
q = jQuery.data( elem, type, jQuery.makeArray(data) ); |
} else { |
q.push( data ); |
} |
return q; |
}, |
dequeue: function( elem, type ) { |
type = type || "fx"; |
var queue = jQuery.queue( elem, type ), fn = queue.shift(); |
// If the fx queue is dequeued, always remove the progress sentinel |
if ( fn === "inprogress" ) { |
fn = queue.shift(); |
} |
if ( fn ) { |
// Add a progress sentinel to prevent the fx queue from being |
// automatically dequeued |
if ( type === "fx" ) { |
queue.unshift("inprogress"); |
} |
fn.call(elem, function() { |
jQuery.dequeue(elem, type); |
}); |
} |
} |
}); |
jQuery.fn.extend({ |
queue: function( type, data ) { |
if ( typeof type !== "string" ) { |
data = type; |
type = "fx"; |
} |
if ( data === undefined ) { |
return jQuery.queue( this[0], type ); |
} |
return this.each(function( i, elem ) { |
var queue = jQuery.queue( this, type, data ); |
if ( type === "fx" && queue[0] !== "inprogress" ) { |
jQuery.dequeue( this, type ); |
} |
}); |
}, |
dequeue: function( type ) { |
return this.each(function() { |
jQuery.dequeue( this, type ); |
}); |
}, |
// Based off of the plugin by Clint Helfers, with permission. |
// http://blindsignals.com/index.php/2009/07/jquery-delay/ |
delay: function( time, type ) { |
time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; |
type = type || "fx"; |
return this.queue( type, function() { |
var elem = this; |
setTimeout(function() { |
jQuery.dequeue( elem, type ); |
}, time ); |
}); |
}, |
clearQueue: function( type ) { |
return this.queue( type || "fx", [] ); |
} |
}); |
var rclass = /[\n\t]/g, |
rspace = /\s+/, |
rreturn = /\r/g, |
rspecialurl = /href|src|style/, |
rtype = /(button|input)/i, |
rfocusable = /(button|input|object|select|textarea)/i, |
rclickable = /^(a|area)$/i, |
rradiocheck = /radio|checkbox/; |
jQuery.fn.extend({ |
attr: function( name, value ) { |
return access( this, name, value, true, jQuery.attr ); |
}, |
removeAttr: function( name, fn ) { |
return this.each(function(){ |
jQuery.attr( this, name, "" ); |
if ( this.nodeType === 1 ) { |
this.removeAttribute( name ); |
} |
}); |
}, |
addClass: function( value ) { |
if ( jQuery.isFunction(value) ) { |
return this.each(function(i) { |
var self = jQuery(this); |
self.addClass( value.call(this, i, self.attr("class")) ); |
}); |
} |
if ( value && typeof value === "string" ) { |
var classNames = (value || "").split( rspace ); |
for ( var i = 0, l = this.length; i < l; i++ ) { |
var elem = this[i]; |
if ( elem.nodeType === 1 ) { |
if ( !elem.className ) { |
elem.className = value; |
} else { |
var className = " " + elem.className + " ", setClass = elem.className; |
for ( var c = 0, cl = classNames.length; c < cl; c++ ) { |
if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { |
setClass += " " + classNames[c]; |
} |
} |
elem.className = jQuery.trim( setClass ); |
} |
} |
} |
} |
return this; |
}, |
removeClass: function( value ) { |
if ( jQuery.isFunction(value) ) { |
return this.each(function(i) { |
var self = jQuery(this); |
self.removeClass( value.call(this, i, self.attr("class")) ); |
}); |
} |
if ( (value && typeof value === "string") || value === undefined ) { |
var classNames = (value || "").split(rspace); |
for ( var i = 0, l = this.length; i < l; i++ ) { |
var elem = this[i]; |
if ( elem.nodeType === 1 && elem.className ) { |
if ( value ) { |
var className = (" " + elem.className + " ").replace(rclass, " "); |
for ( var c = 0, cl = classNames.length; c < cl; c++ ) { |
className = className.replace(" " + classNames[c] + " ", " "); |
} |
elem.className = jQuery.trim( className ); |
} else { |
elem.className = ""; |
} |
} |
} |
} |
return this; |
}, |
toggleClass: function( value, stateVal ) { |
var type = typeof value, isBool = typeof stateVal === "boolean"; |
if ( jQuery.isFunction( value ) ) { |
return this.each(function(i) { |
var self = jQuery(this); |
self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); |
}); |
} |
return this.each(function() { |
if ( type === "string" ) { |
// toggle individual class names |
var className, i = 0, self = jQuery(this), |
state = stateVal, |
classNames = value.split( rspace ); |
while ( (className = classNames[ i++ ]) ) { |
// check each className given, space seperated list |
state = isBool ? state : !self.hasClass( className ); |
self[ state ? "addClass" : "removeClass" ]( className ); |
} |
} else if ( type === "undefined" || type === "boolean" ) { |
if ( this.className ) { |
// store className if set |
jQuery.data( this, "__className__", this.className ); |
} |
// toggle whole className |
this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || ""; |
} |
}); |
}, |
hasClass: function( selector ) { |
var className = " " + selector + " "; |
for ( var i = 0, l = this.length; i < l; i++ ) { |
if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { |
return true; |
} |
} |
return false; |
}, |
val: function( value ) { |
if ( value === undefined ) { |
var elem = this[0]; |
if ( elem ) { |
if ( jQuery.nodeName( elem, "option" ) ) { |
return (elem.attributes.value || {}).specified ? elem.value : elem.text; |
} |
// We need to handle select boxes special |
if ( jQuery.nodeName( elem, "select" ) ) { |
var index = elem.selectedIndex, |
values = [], |
options = elem.options, |
one = elem.type === "select-one"; |
// Nothing was selected |
if ( index < 0 ) { |
return null; |
} |
// Loop through all the selected options |
for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { |
var option = options[ i ]; |
if ( option.selected ) { |
// Get the specifc value for the option |
value = jQuery(option).val(); |
// We don't need an array for one selects |
if ( one ) { |
return value; |
} |
// Multi-Selects return an array |
values.push( value ); |
} |
} |
return values; |
} |
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified |
if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { |
return elem.getAttribute("value") === null ? "on" : elem.value; |
} |
// Everything else, we just grab the value |
return (elem.value || "").replace(rreturn, ""); |
} |
return undefined; |
} |
var isFunction = jQuery.isFunction(value); |
return this.each(function(i) { |
var self = jQuery(this), val = value; |
if ( this.nodeType !== 1 ) { |
return; |
} |
if ( isFunction ) { |
val = value.call(this, i, self.val()); |
} |
// Typecast each time if the value is a Function and the appended |
// value is therefore different each time. |
if ( typeof val === "number" ) { |
val += ""; |
} |
if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { |
this.checked = jQuery.inArray( self.val(), val ) >= 0; |
} else if ( jQuery.nodeName( this, "select" ) ) { |
var values = jQuery.makeArray(val); |
jQuery( "option", this ).each(function() { |
this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; |
}); |
if ( !values.length ) { |
this.selectedIndex = -1; |
} |
} else { |
this.value = val; |
} |
}); |
} |
}); |
jQuery.extend({ |
attrFn: { |
val: true, |
css: true, |
html: true, |
text: true, |
data: true, |
width: true, |
height: true, |
offset: true |
}, |
attr: function( elem, name, value, pass ) { |
// don't set attributes on text and comment nodes |
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { |
return undefined; |
} |
if ( pass && name in jQuery.attrFn ) { |
return jQuery(elem)[name](value); |
} |
var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), |
// Whether we are setting (or getting) |
set = value !== undefined; |
// Try to normalize/fix the name |
name = notxml && jQuery.props[ name ] || name; |
// Only do all the following if this is a node (faster for style) |
if ( elem.nodeType === 1 ) { |
// These attributes require special treatment |
var special = rspecialurl.test( name ); |
// Safari mis-reports the default selected property of an option |
// Accessing the parent's selectedIndex property fixes it |
if ( name === "selected" && !jQuery.support.optSelected ) { |
var parent = elem.parentNode; |
if ( parent ) { |
parent.selectedIndex; |
// Make sure that it also works with optgroups, see #5701 |
if ( parent.parentNode ) { |
parent.parentNode.selectedIndex; |
} |
} |
} |
// If applicable, access the attribute via the DOM 0 way |
if ( name in elem && notxml && !special ) { |
if ( set ) { |
// We can't allow the type property to be changed (since it causes problems in IE) |
if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { |
jQuery.error( "type property can't be changed" ); |
} |
elem[ name ] = value; |
} |
// browsers index elements by id/name on forms, give priority to attributes. |
if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { |
return elem.getAttributeNode( name ).nodeValue; |
} |
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set |
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ |
if ( name === "tabIndex" ) { |
var attributeNode = elem.getAttributeNode( "tabIndex" ); |
return attributeNode && attributeNode.specified ? |
attributeNode.value : |
rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? |
0 : |
undefined; |
} |
return elem[ name ]; |
} |
if ( !jQuery.support.style && notxml && name === "style" ) { |
if ( set ) { |
elem.style.cssText = "" + value; |
} |
return elem.style.cssText; |
} |
if ( set ) { |
// convert the value to a string (all browsers do this but IE) see #1070 |
elem.setAttribute( name, "" + value ); |
} |
var attr = !jQuery.support.hrefNormalized && notxml && special ? |
// Some attributes require a special call on IE |
elem.getAttribute( name, 2 ) : |
elem.getAttribute( name ); |
// Non-existent attributes return null, we normalize to undefined |
return attr === null ? undefined : attr; |
} |
// elem is actually elem.style ... set the style |
// Using attr for specific style information is now deprecated. Use style instead. |
return jQuery.style( elem, name, value ); |
} |
}); |
var rnamespaces = /\.(.*)$/, |
fcleanup = function( nm ) { |
return nm.replace(/[^\w\s\.\|`]/g, function( ch ) { |
return "\\" + ch; |
}); |
}; |
/* |
* A number of helper functions used for managing events. |
* Many of the ideas behind this code originated from |
* Dean Edwards' addEvent library. |
*/ |
jQuery.event = { |
// Bind an event to an element |
// Original by Dean Edwards |
add: function( elem, types, handler, data ) { |
if ( elem.nodeType === 3 || elem.nodeType === 8 ) { |
return; |
} |
// For whatever reason, IE has trouble passing the window object |
// around, causing it to be cloned in the process |
if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) { |
elem = window; |
} |
var handleObjIn, handleObj; |
if ( handler.handler ) { |
handleObjIn = handler; |
handler = handleObjIn.handler; |
} |
// Make sure that the function being executed has a unique ID |
if ( !handler.guid ) { |
handler.guid = jQuery.guid++; |
} |
// Init the element's event structure |
var elemData = jQuery.data( elem ); |
// If no elemData is found then we must be trying to bind to one of the |
// banned noData elements |
if ( !elemData ) { |
return; |
} |
var events = elemData.events = elemData.events || {}, |
eventHandle = elemData.handle, eventHandle; |
if ( !eventHandle ) { |
elemData.handle = eventHandle = function() { |
// Handle the second event of a trigger and when |
// an event is called after a page has unloaded |
return typeof jQuery !== "undefined" && !jQuery.event.triggered ? |
jQuery.event.handle.apply( eventHandle.elem, arguments ) : |
undefined; |
}; |
} |
// Add elem as a property of the handle function |
// This is to prevent a memory leak with non-native events in IE. |
eventHandle.elem = elem; |
// Handle multiple events separated by a space |
// jQuery(...).bind("mouseover mouseout", fn); |
types = types.split(" "); |
var type, i = 0, namespaces; |
while ( (type = types[ i++ ]) ) { |
handleObj = handleObjIn ? |
jQuery.extend({}, handleObjIn) : |
{ handler: handler, data: data }; |
// Namespaced event handlers |
if ( type.indexOf(".") > -1 ) { |
namespaces = type.split("."); |
type = namespaces.shift(); |
handleObj.namespace = namespaces.slice(0).sort().join("."); |
} else { |
namespaces = []; |
handleObj.namespace = ""; |
} |
handleObj.type = type; |
handleObj.guid = handler.guid; |
// Get the current list of functions bound to this event |
var handlers = events[ type ], |
special = jQuery.event.special[ type ] || {}; |
// Init the event handler queue |
if ( !handlers ) { |
handlers = events[ type ] = []; |
// Check for a special event handler |
// Only use addEventListener/attachEvent if the special |
// events handler returns false |
if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { |
// Bind the global event handler to the element |
if ( elem.addEventListener ) { |
elem.addEventListener( type, eventHandle, false ); |
} else if ( elem.attachEvent ) { |
elem.attachEvent( "on" + type, eventHandle ); |
} |
} |
} |
if ( special.add ) { |
special.add.call( elem, handleObj ); |
if ( !handleObj.handler.guid ) { |
handleObj.handler.guid = handler.guid; |
} |
} |
// Add the function to the element's handler list |
handlers.push( handleObj ); |
// Keep track of which events have been used, for global triggering |
jQuery.event.global[ type ] = true; |
} |
// Nullify elem to prevent memory leaks in IE |
elem = null; |
}, |
global: {}, |
// Detach an event or set of events from an element |
remove: function( elem, types, handler, pos ) { |
// don't do events on text and comment nodes |
if ( elem.nodeType === 3 || elem.nodeType === 8 ) { |
return; |
} |
var ret, type, fn, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, |
elemData = jQuery.data( elem ), |
events = elemData && elemData.events; |
if ( !elemData || !events ) { |
return; |
} |
// types is actually an event object here |
if ( types && types.type ) { |
handler = types.handler; |
types = types.type; |
} |
// Unbind all events for the element |
if ( !types || typeof types === "string" && types.charAt(0) === "." ) { |
types = types || ""; |
for ( type in events ) { |
jQuery.event.remove( elem, type + types ); |
} |
return; |
} |
// Handle multiple events separated by a space |
// jQuery(...).unbind("mouseover mouseout", fn); |
types = types.split(" "); |
while ( (type = types[ i++ ]) ) { |
origType = type; |
handleObj = null; |
all = type.indexOf(".") < 0; |
namespaces = []; |
if ( !all ) { |
// Namespaced event handlers |
namespaces = type.split("."); |
type = namespaces.shift(); |
namespace = new RegExp("(^|\\.)" + |
jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)") |
} |
eventType = events[ type ]; |
if ( !eventType ) { |
continue; |
} |
if ( !handler ) { |
for ( var j = 0; j < eventType.length; j++ ) { |
handleObj = eventType[ j ]; |
if ( all || namespace.test( handleObj.namespace ) ) { |
jQuery.event.remove( elem, origType, handleObj.handler, j ); |
eventType.splice( j--, 1 ); |
} |
} |
continue; |
} |
special = jQuery.event.special[ type ] || {}; |
for ( var j = pos || 0; j < eventType.length; j++ ) { |
handleObj = eventType[ j ]; |
if ( handler.guid === handleObj.guid ) { |
// remove the given handler for the given type |
if ( all || namespace.test( handleObj.namespace ) ) { |
if ( pos == null ) { |
eventType.splice( j--, 1 ); |
} |
if ( special.remove ) { |
special.remove.call( elem, handleObj ); |
} |
} |
if ( pos != null ) { |
break; |
} |
} |
} |
// remove generic event handler if no more handlers exist |
if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { |
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { |
removeEvent( elem, type, elemData.handle ); |
} |
ret = null; |
delete events[ type ]; |
} |
} |
// Remove the expando if it's no longer used |
if ( jQuery.isEmptyObject( events ) ) { |
var handle = elemData.handle; |
if ( handle ) { |
handle.elem = null; |
} |
delete elemData.events; |
delete elemData.handle; |
if ( jQuery.isEmptyObject( elemData ) ) { |
jQuery.removeData( elem ); |
} |
} |
}, |
// bubbling is internal |
trigger: function( event, data, elem /*, bubbling */ ) { |
// Event object or event type |
var type = event.type || event, |
bubbling = arguments[3]; |
if ( !bubbling ) { |
event = typeof event === "object" ? |
// jQuery.Event object |
event[expando] ? event : |
// Object literal |
jQuery.extend( jQuery.Event(type), event ) : |
// Just the event type (string) |
jQuery.Event(type); |
if ( type.indexOf("!") >= 0 ) { |
event.type = type = type.slice(0, -1); |
event.exclusive = true; |
} |
// Handle a global trigger |
if ( !elem ) { |
// Don't bubble custom events when global (to avoid too much overhead) |
event.stopPropagation(); |
// Only trigger if we've ever bound an event for it |
if ( jQuery.event.global[ type ] ) { |
jQuery.each( jQuery.cache, function() { |
if ( this.events && this.events[type] ) { |
jQuery.event.trigger( event, data, this.handle.elem ); |
} |
}); |
} |
} |
// Handle triggering a single element |
// don't do events on text and comment nodes |
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { |
return undefined; |
} |
// Clean up in case it is reused |
event.result = undefined; |
event.target = elem; |
// Clone the incoming data, if any |
data = jQuery.makeArray( data ); |
data.unshift( event ); |
} |
event.currentTarget = elem; |
// Trigger the event, it is assumed that "handle" is a function |
var handle = jQuery.data( elem, "handle" ); |
if ( handle ) { |
handle.apply( elem, data ); |
} |
var parent = elem.parentNode || elem.ownerDocument; |
// Trigger an inline bound script |
try { |
if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { |
if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { |
event.result = false; |
} |
} |
// prevent IE from throwing an error for some elements with some event types, see #3533 |
} catch (e) {} |
if ( !event.isPropagationStopped() && parent ) { |
jQuery.event.trigger( event, data, parent, true ); |
} else if ( !event.isDefaultPrevented() ) { |
var target = event.target, old, |
isClick = jQuery.nodeName(target, "a") && type === "click", |
special = jQuery.event.special[ type ] || {}; |
if ( (!special._default || special._default.call( elem, event ) === false) && |
!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { |
try { |
if ( target[ type ] ) { |
// Make sure that we don't accidentally re-trigger the onFOO events |
old = target[ "on" + type ]; |
if ( old ) { |
target[ "on" + type ] = null; |
} |
jQuery.event.triggered = true; |
target[ type ](); |
} |
// prevent IE from throwing an error for some elements with some event types, see #3533 |
} catch (e) {} |
if ( old ) { |
target[ "on" + type ] = old; |
} |
jQuery.event.triggered = false; |
} |
} |
}, |
handle: function( event ) { |
var all, handlers, namespaces, namespace, events; |
event = arguments[0] = jQuery.event.fix( event || window.event ); |
event.currentTarget = this; |
// Namespaced event handlers |
all = event.type.indexOf(".") < 0 && !event.exclusive; |
if ( !all ) { |
namespaces = event.type.split("."); |
event.type = namespaces.shift(); |
namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)"); |
} |
var events = jQuery.data(this, "events"), handlers = events[ event.type ]; |
if ( events && handlers ) { |
// Clone the handlers to prevent manipulation |
handlers = handlers.slice(0); |
for ( var j = 0, l = handlers.length; j < l; j++ ) { |
var handleObj = handlers[ j ]; |
// Filter the functions by class |
if ( all || namespace.test( handleObj.namespace ) ) { |
// Pass in a reference to the handler function itself |
// So that we can later remove it |
event.handler = handleObj.handler; |
event.data = handleObj.data; |
event.handleObj = handleObj; |
var ret = handleObj.handler.apply( this, arguments ); |
if ( ret !== undefined ) { |
event.result = ret; |
if ( ret === false ) { |
event.preventDefault(); |
event.stopPropagation(); |
} |
} |
if ( event.isImmediatePropagationStopped() ) { |
break; |
} |
} |
} |
} |
return event.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(" "), |
fix: function( event ) { |
if ( event[ expando ] ) { |
return event; |
} |
// store a copy of the original event object |
// and "clone" to set read-only properties |
var originalEvent = event; |
event = jQuery.Event( originalEvent ); |
for ( var i = this.props.length, prop; i; ) { |
prop = this.props[ --i ]; |
event[ prop ] = originalEvent[ prop ]; |
} |
// Fix target property, if necessary |
if ( !event.target ) { |
event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either |
} |
// check if target is a textnode (safari) |
if ( event.target.nodeType === 3 ) { |
event.target = event.target.parentNode; |
} |
// Add relatedTarget, if necessary |
if ( !event.relatedTarget && event.fromElement ) { |
event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; |
} |
// Calculate pageX/Y if missing and clientX/Y available |
if ( event.pageX == null && event.clientX != null ) { |
var doc = document.documentElement, body = document.body; |
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); |
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); |
} |
// Add which for key events |
if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) { |
event.which = event.charCode || event.keyCode; |
} |
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) |
if ( !event.metaKey && event.ctrlKey ) { |
event.metaKey = event.ctrlKey; |
} |
// Add which for click: 1 === left; 2 === middle; 3 === right |
// Note: button is not normalized, so don't use it |
if ( !event.which && event.button !== undefined ) { |
event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); |
} |
return event; |
}, |
// Deprecated, use jQuery.guid instead |
guid: 1E8, |
// Deprecated, use jQuery.proxy instead |
proxy: jQuery.proxy, |
special: { |
ready: { |
// Make sure the ready event is setup |
setup: jQuery.bindReady, |
teardown: jQuery.noop |
}, |
live: { |
add: function( handleObj ) { |
jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) ); |
}, |
remove: function( handleObj ) { |
var remove = true, |
type = handleObj.origType.replace(rnamespaces, ""); |
jQuery.each( jQuery.data(this, "events").live || [], function() { |
if ( type === this.origType.replace(rnamespaces, "") ) { |
remove = false; |
return false; |
} |
}); |
if ( remove ) { |
jQuery.event.remove( this, handleObj.origType, liveHandler ); |
} |
} |
}, |
beforeunload: { |
setup: function( data, namespaces, eventHandle ) { |
// We only want to do this special case on windows |
if ( this.setInterval ) { |
this.onbeforeunload = eventHandle; |
} |
return false; |
}, |
teardown: function( namespaces, eventHandle ) { |
if ( this.onbeforeunload === eventHandle ) { |
this.onbeforeunload = null; |
} |
} |
} |
} |
}; |
var removeEvent = document.removeEventListener ? |
function( elem, type, handle ) { |
elem.removeEventListener( type, handle, false ); |
} : |
function( elem, type, handle ) { |
elem.detachEvent( "on" + type, handle ); |
}; |
jQuery.Event = function( src ) { |
// Allow instantiation without the 'new' keyword |
if ( !this.preventDefault ) { |
return new jQuery.Event( src ); |
} |
// Event object |
if ( src && src.type ) { |
this.originalEvent = src; |
this.type = src.type; |
// Event type |
} else { |
this.type = src; |
} |
// timeStamp is buggy for some events on Firefox(#3843) |
// So we won't rely on the native value |
this.timeStamp = now(); |
// Mark it as fixed |
this[ expando ] = true; |
}; |
function returnFalse() { |
return false; |
} |
function returnTrue() { |
return true; |
} |
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding |
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html |
jQuery.Event.prototype = { |
preventDefault: function() { |
this.isDefaultPrevented = returnTrue; |
var e = this.originalEvent; |
if ( !e ) { |
return; |
} |
// if preventDefault exists run it on the original event |
if ( e.preventDefault ) { |
e.preventDefault(); |
} |
// otherwise set the returnValue property of the original event to false (IE) |
e.returnValue = false; |
}, |
stopPropagation: function() { |
this.isPropagationStopped = returnTrue; |
var e = this.originalEvent; |
if ( !e ) { |
return; |
} |
// if stopPropagation exists run it on the original event |
if ( e.stopPropagation ) { |
e.stopPropagation(); |
} |
// otherwise set the cancelBubble property of the original event to true (IE) |
e.cancelBubble = true; |
}, |
stopImmediatePropagation: function() { |
this.isImmediatePropagationStopped = returnTrue; |
this.stopPropagation(); |
}, |
isDefaultPrevented: returnFalse, |
isPropagationStopped: returnFalse, |
isImmediatePropagationStopped: returnFalse |
}; |
// Checks if an event happened on an element within another element |
// Used in jQuery.event.special.mouseenter and mouseleave handlers |
var withinElement = function( event ) { |
// Check if mouse(over|out) are still within the same parent element |
var parent = event.relatedTarget; |
// Firefox sometimes assigns relatedTarget a XUL element |
// which we cannot access the parentNode property of |
try { |
// Traverse up the tree |
while ( parent && parent !== this ) { |
parent = parent.parentNode; |
} |
if ( parent !== this ) { |
// set the correct event type |
event.type = event.data; |
// handle event if we actually just moused on to a non sub-element |
jQuery.event.handle.apply( this, arguments ); |
} |
// assuming we've left the element since we most likely mousedover a xul element |
} catch(e) { } |
}, |
// In case of event delegation, we only need to rename the event.type, |
// liveHandler will take care of the rest. |
delegate = function( event ) { |
event.type = event.data; |
jQuery.event.handle.apply( this, arguments ); |
}; |
// Create mouseenter and mouseleave events |
jQuery.each({ |
mouseenter: "mouseover", |
mouseleave: "mouseout" |
}, function( orig, fix ) { |
jQuery.event.special[ orig ] = { |
setup: function( data ) { |
jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); |
}, |
teardown: function( data ) { |
jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); |
} |
}; |
}); |
// submit delegation |
if ( !jQuery.support.submitBubbles ) { |
jQuery.event.special.submit = { |
setup: function( data, namespaces ) { |
if ( this.nodeName.toLowerCase() !== "form" ) { |
jQuery.event.add(this, "click.specialSubmit", function( e ) { |
var elem = e.target, type = elem.type; |
if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { |
return trigger( "submit", this, arguments ); |
} |
}); |
jQuery.event.add(this, "keypress.specialSubmit", function( e ) { |
var elem = e.target, type = elem.type; |
if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { |
return trigger( "submit", this, arguments ); |
} |
}); |
} else { |
return false; |
} |
}, |
teardown: function( namespaces ) { |
jQuery.event.remove( this, ".specialSubmit" ); |
} |
}; |
} |
// change delegation, happens here so we have bind. |
if ( !jQuery.support.changeBubbles ) { |
var formElems = /textarea|input|select/i, |
changeFilters, |
getVal = function( elem ) { |
var type = elem.type, val = elem.value; |
if ( type === "radio" || type === "checkbox" ) { |
val = elem.checked; |
} else if ( type === "select-multiple" ) { |
val = elem.selectedIndex > -1 ? |
jQuery.map( elem.options, function( elem ) { |
return elem.selected; |
}).join("-") : |
""; |
} else if ( elem.nodeName.toLowerCase() === "select" ) { |
val = elem.selectedIndex; |
} |
return val; |
}, |
testChange = function testChange( e ) { |
var elem = e.target, data, val; |
if ( !formElems.test( elem.nodeName ) || elem.readOnly ) { |
return; |
} |
data = jQuery.data( elem, "_change_data" ); |
val = getVal(elem); |
// the current data will be also retrieved by beforeactivate |
if ( e.type !== "focusout" || elem.type !== "radio" ) { |
jQuery.data( elem, "_change_data", val ); |
} |
if ( data === undefined || val === data ) { |
return; |
} |
if ( data != null || val ) { |
e.type = "change"; |
return jQuery.event.trigger( e, arguments[1], elem ); |
} |
}; |
jQuery.event.special.change = { |
filters: { |
focusout: testChange, |
click: function( e ) { |
var elem = e.target, type = elem.type; |
if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { |
return testChange.call( this, e ); |
} |
}, |
// Change has to be called before submit |
// Keydown will be called before keypress, which is used in submit-event delegation |
keydown: function( e ) { |
var elem = e.target, type = elem.type; |
if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || |
(e.keyCode === 32 && (type === "checkbox" || type === "radio")) || |
type === "select-multiple" ) { |
return testChange.call( this, e ); |
} |
}, |
// Beforeactivate happens also before the previous element is blurred |
// with this event you can't trigger a change event, but you can store |
// information/focus[in] is not needed anymore |
beforeactivate: function( e ) { |
var elem = e.target; |
jQuery.data( elem, "_change_data", getVal(elem) ); |
} |
}, |
setup: function( data, namespaces ) { |
if ( this.type === "file" ) { |
return false; |
} |
for ( var type in changeFilters ) { |
jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); |
} |
return formElems.test( this.nodeName ); |
}, |
teardown: function( namespaces ) { |
jQuery.event.remove( this, ".specialChange" ); |
return formElems.test( this.nodeName ); |
} |
}; |
changeFilters = jQuery.event.special.change.filters; |
} |
function trigger( type, elem, args ) { |
args[0].type = type; |
return jQuery.event.handle.apply( elem, args ); |
} |
// Create "bubbling" focus and blur events |
if ( document.addEventListener ) { |
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { |
jQuery.event.special[ fix ] = { |
setup: function() { |
this.addEventListener( orig, handler, true ); |
}, |
teardown: function() { |
this.removeEventListener( orig, handler, true ); |
} |
}; |
function handler( e ) { |
e = jQuery.event.fix( e ); |
e.type = fix; |
return jQuery.event.handle.call( this, e ); |
} |
}); |
} |
jQuery.each(["bind", "one"], function( i, name ) { |
jQuery.fn[ name ] = function( type, data, fn ) { |
// Handle object literals |
if ( typeof type === "object" ) { |
for ( var key in type ) { |
this[ name ](key, data, type[key], fn); |
} |
return this; |
} |
if ( jQuery.isFunction( data ) ) { |
fn = data; |
data = undefined; |
} |
var handler = name === "one" ? jQuery.proxy( fn, function( event ) { |
jQuery( this ).unbind( event, handler ); |
return fn.apply( this, arguments ); |
}) : fn; |
if ( type === "unload" && name !== "one" ) { |
this.one( type, data, fn ); |
} else { |
for ( var i = 0, l = this.length; i < l; i++ ) { |
jQuery.event.add( this[i], type, handler, data ); |
} |
} |
return this; |
}; |
}); |
jQuery.fn.extend({ |
unbind: function( type, fn ) { |
// Handle object literals |
if ( typeof type === "object" && !type.preventDefault ) { |
for ( var key in type ) { |
this.unbind(key, type[key]); |
} |
} else { |
for ( var i = 0, l = this.length; i < l; i++ ) { |
jQuery.event.remove( this[i], type, fn ); |
} |
} |
return this; |
}, |
delegate: function( selector, types, data, fn ) { |
return this.live( types, data, fn, selector ); |
}, |
undelegate: function( selector, types, fn ) { |
if ( arguments.length === 0 ) { |
return this.unbind( "live" ); |
} else { |
return this.die( types, null, fn, selector ); |
} |
}, |
trigger: function( type, data ) { |
return this.each(function() { |
jQuery.event.trigger( type, data, this ); |
}); |
}, |
triggerHandler: function( type, data ) { |
if ( this[0] ) { |
var event = jQuery.Event( type ); |
event.preventDefault(); |
event.stopPropagation(); |
jQuery.event.trigger( event, data, this[0] ); |
return event.result; |
} |
}, |
toggle: function( fn ) { |
// Save reference to arguments for access in closure |
var args = arguments, i = 1; |
// link all the functions, so any of them can unbind this click handler |
while ( i < args.length ) { |
jQuery.proxy( fn, args[ i++ ] ); |
} |
return this.click( jQuery.proxy( fn, function( event ) { |
// Figure out which function to execute |
var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; |
jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); |
// Make sure that clicks stop |
event.preventDefault(); |
// and execute the function |
return args[ lastToggle ].apply( this, arguments ) || false; |
})); |
}, |
hover: function( fnOver, fnOut ) { |
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); |
} |
}); |
var liveMap = { |
focus: "focusin", |
blur: "focusout", |
mouseenter: "mouseover", |
mouseleave: "mouseout" |
}; |
jQuery.each(["live", "die"], function( i, name ) { |
jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { |
var type, i = 0, match, namespaces, preType, |
selector = origSelector || this.selector, |
context = origSelector ? this : jQuery( this.context ); |
if ( jQuery.isFunction( data ) ) { |
fn = data; |
data = undefined; |
} |
types = (types || "").split(" "); |
while ( (type = types[ i++ ]) != null ) { |
match = rnamespaces.exec( type ); |
namespaces = ""; |
if ( match ) { |
namespaces = match[0]; |
type = type.replace( rnamespaces, "" ); |
} |
if ( type === "hover" ) { |
types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); |
continue; |
} |
preType = type; |
if ( type === "focus" || type === "blur" ) { |
types.push( liveMap[ type ] + namespaces ); |
type = type + namespaces; |
} else { |
type = (liveMap[ type ] || type) + namespaces; |
} |
if ( name === "live" ) { |
// bind live handler |
context.each(function(){ |
jQuery.event.add( this, liveConvert( type, selector ), |
{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); |
}); |
} else { |
// unbind live handler |
context.unbind( liveConvert( type, selector ), fn ); |
} |
} |
return this; |
} |
}); |
function liveHandler( event ) { |
var stop, elems = [], selectors = [], args = arguments, |
related, match, handleObj, elem, j, i, l, data, |
events = jQuery.data( this, "events" ); |
// Make sure we avoid non-left-click bubbling in Firefox (#3861) |
if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) { |
return; |
} |
event.liveFired = this; |
var live = events.live.slice(0); |
for ( j = 0; j < live.length; j++ ) { |
handleObj = live[j]; |
if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { |
selectors.push( handleObj.selector ); |
} else { |
live.splice( j--, 1 ); |
} |
} |
match = jQuery( event.target ).closest( selectors, event.currentTarget ); |
for ( i = 0, l = match.length; i < l; i++ ) { |
for ( j = 0; j < live.length; j++ ) { |
handleObj = live[j]; |
if ( match[i].selector === handleObj.selector ) { |
elem = match[i].elem; |
related = null; |
// Those two events require additional checking |
if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { |
related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; |
} |
if ( !related || related !== elem ) { |
elems.push({ elem: elem, handleObj: handleObj }); |
} |
} |
} |
} |
for ( i = 0, l = elems.length; i < l; i++ ) { |
match = elems[i]; |
event.currentTarget = match.elem; |
event.data = match.handleObj.data; |
event.handleObj = match.handleObj; |
if ( match.handleObj.origHandler.apply( match.elem, args ) === false ) { |
stop = false; |
break; |
} |
} |
return stop; |
} |
function liveConvert( type, selector ) { |
return "live." + (type && type !== "*" ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&"); |
} |
jQuery.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( i, name ) { |
// Handle event binding |
jQuery.fn[ name ] = function( fn ) { |
return fn ? this.bind( name, fn ) : this.trigger( name ); |
}; |
if ( jQuery.attrFn ) { |
jQuery.attrFn[ name ] = true; |
} |
}); |
// Prevent memory leaks in IE |
// Window isn't included so as not to unbind existing unload events |
// More info: |
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/ |
if ( window.attachEvent && !window.addEventListener ) { |
window.attachEvent("onunload", function() { |
for ( var id in jQuery.cache ) { |
if ( jQuery.cache[ id ].handle ) { |
// Try/Catch is to handle iframes being unloaded, see #4280 |
try { |
jQuery.event.remove( jQuery.cache[ id ].handle.elem ); |
} catch(e) {} |
} |
} |
}); |
} |
/*! |
* Sizzle CSS Selector Engine - v1.0 |
* Copyright 2009, The Dojo Foundation |
* Released under the MIT, BSD, and GPL Licenses. |
* More information: http://sizzlejs.com/ |
*/ |
(function(){ |
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, |
done = 0, |
toString = Object.prototype.toString, |
hasDuplicate = false, |
baseHasDuplicate = true; |
// Here we check if the JavaScript engine is using some sort of |
// optimization where it does not always call our comparision |
// function. If that is the case, discard the hasDuplicate value. |
// Thus far that includes Google Chrome. |
[0, 0].sort(function(){ |
baseHasDuplicate = false; |
return 0; |
}); |
var Sizzle = function(selector, context, results, seed) { |
results = results || []; |
var origContext = context = context || document; |
if ( context.nodeType !== 1 && context.nodeType !== 9 ) { |
return []; |
} |
if ( !selector || typeof selector !== "string" ) { |
return results; |
} |
var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context), |
soFar = selector; |
// Reset the position of the chunker regexp (start from head) |
while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) { |
soFar = m[3]; |
parts.push( m[1] ); |
if ( m[2] ) { |
extra = m[3]; |
break; |
} |
} |
if ( parts.length > 1 && origPOS.exec( selector ) ) { |
if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { |
set = posProcess( parts[0] + parts[1], context ); |
} else { |
set = Expr.relative[ parts[0] ] ? |
[ context ] : |
Sizzle( parts.shift(), context ); |
while ( parts.length ) { |
selector = parts.shift(); |
if ( Expr.relative[ selector ] ) { |
selector += parts.shift(); |
} |
set = posProcess( selector, set ); |
} |
} |
} else { |
// Take a shortcut and set the context if the root selector is an ID |
// (but not if it'll be faster if the inner selector is an ID) |
if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && |
Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { |
var ret = Sizzle.find( parts.shift(), context, contextXML ); |
context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0]; |
} |
if ( context ) { |
var ret = seed ? |
{ expr: parts.pop(), set: makeArray(seed) } : |
Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); |
set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set; |
if ( parts.length > 0 ) { |
checkSet = makeArray(set); |
} else { |
prune = false; |
} |
while ( parts.length ) { |
var cur = parts.pop(), pop = cur; |
if ( !Expr.relative[ cur ] ) { |
cur = ""; |
} else { |
pop = parts.pop(); |
} |
if ( pop == null ) { |
pop = context; |
} |
Expr.relative[ cur ]( checkSet, pop, contextXML ); |
} |
} else { |
checkSet = parts = []; |
} |
} |
if ( !checkSet ) { |
checkSet = set; |
} |
if ( !checkSet ) { |
Sizzle.error( cur || selector ); |
} |
if ( toString.call(checkSet) === "[object Array]" ) { |
if ( !prune ) { |
results.push.apply( results, checkSet ); |
} else if ( context && context.nodeType === 1 ) { |
for ( var i = 0; checkSet[i] != null; i++ ) { |
if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) { |
results.push( set[i] ); |
} |
} |
} else { |
for ( var i = 0; checkSet[i] != null; i++ ) { |
if ( checkSet[i] && checkSet[i].nodeType === 1 ) { |
results.push( set[i] ); |
} |
} |
} |
} else { |
makeArray( checkSet, results ); |
} |
if ( extra ) { |
Sizzle( extra, origContext, results, seed ); |
Sizzle.uniqueSort( results ); |
} |
return results; |
}; |
Sizzle.uniqueSort = function(results){ |
if ( sortOrder ) { |
hasDuplicate = baseHasDuplicate; |
results.sort(sortOrder); |
if ( hasDuplicate ) { |
for ( var i = 1; i < results.length; i++ ) { |
if ( results[i] === results[i-1] ) { |
results.splice(i--, 1); |
} |
} |
} |
} |
return results; |
}; |
Sizzle.matches = function(expr, set){ |
return Sizzle(expr, null, null, set); |
}; |
Sizzle.find = function(expr, context, isXML){ |
var set, match; |
if ( !expr ) { |
return []; |
} |
for ( var i = 0, l = Expr.order.length; i < l; i++ ) { |
var type = Expr.order[i], match; |
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { |
var left = match[1]; |
match.splice(1,1); |
if ( left.substr( left.length - 1 ) !== "\\" ) { |
match[1] = (match[1] || "").replace(/\\/g, ""); |
set = Expr.find[ type ]( match, context, isXML ); |
if ( set != null ) { |
expr = expr.replace( Expr.match[ type ], "" ); |
break; |
} |
} |
} |
} |
if ( !set ) { |
set = context.getElementsByTagName("*"); |
} |
return {set: set, expr: expr}; |
}; |
Sizzle.filter = function(expr, set, inplace, not){ |
var old = expr, result = [], curLoop = set, match, anyFound, |
isXMLFilter = set && set[0] && isXML(set[0]); |
while ( expr && set.length ) { |
for ( var type in Expr.filter ) { |
if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { |
var filter = Expr.filter[ type ], found, item, left = match[1]; |
anyFound = false; |
match.splice(1,1); |
if ( left.substr( left.length - 1 ) === "\\" ) { |
continue; |
} |
if ( curLoop === result ) { |
result = []; |
} |
if ( Expr.preFilter[ type ] ) { |
match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); |
if ( !match ) { |
anyFound = found = true; |
} else if ( match === true ) { |
continue; |
} |
} |
if ( match ) { |
for ( var i = 0; (item = curLoop[i]) != null; i++ ) { |
if ( item ) { |
found = filter( item, match, i, curLoop ); |
var pass = not ^ !!found; |
if ( inplace && found != null ) { |
if ( pass ) { |
anyFound = true; |
} else { |
curLoop[i] = false; |
} |
} else if ( pass ) { |
result.push( item ); |
anyFound = true; |
} |
} |
} |
} |
if ( found !== undefined ) { |
if ( !inplace ) { |
curLoop = result; |
} |
expr = expr.replace( Expr.match[ type ], "" ); |
if ( !anyFound ) { |
return []; |
} |
break; |
} |
} |
} |
// Improper expression |
if ( expr === old ) { |
if ( anyFound == null ) { |
Sizzle.error( expr ); |
} else { |
break; |
} |
} |
old = expr; |
} |
return curLoop; |
}; |
Sizzle.error = function( msg ) { |
throw "Syntax error, unrecognized expression: " + msg; |
}; |
var Expr = Sizzle.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\))?/ |
}, |
leftMatch: {}, |
attrMap: { |
"class": "className", |
"for": "htmlFor" |
}, |
attrHandle: { |
href: function(elem){ |
return elem.getAttribute("href"); |
} |
}, |
relative: { |
"+": function(checkSet, part){ |
var isPartStr = typeof part === "string", |
isTag = isPartStr && !/\W/.test(part), |
isPartStrNotTag = isPartStr && !isTag; |
if ( isTag ) { |
part = part.toLowerCase(); |
} |
for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { |
if ( (elem = checkSet[i]) ) { |
while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} |
checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? |
elem || false : |
elem === part; |
} |
} |
if ( isPartStrNotTag ) { |
Sizzle.filter( part, checkSet, true ); |
} |
}, |
">": function(checkSet, part){ |
var isPartStr = typeof part === "string"; |
if ( isPartStr && !/\W/.test(part) ) { |
part = part.toLowerCase(); |
for ( var i = 0, l = checkSet.length; i < l; i++ ) { |
var elem = checkSet[i]; |
if ( elem ) { |
var parent = elem.parentNode; |
checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; |
} |
} |
} else { |
for ( var i = 0, l = checkSet.length; i < l; i++ ) { |
var elem = checkSet[i]; |
if ( elem ) { |
checkSet[i] = isPartStr ? |
elem.parentNode : |
elem.parentNode === part; |
} |
} |
if ( isPartStr ) { |
Sizzle.filter( part, checkSet, true ); |
} |
} |
}, |
"": function(checkSet, part, isXML){ |
var doneName = done++, checkFn = dirCheck; |
if ( typeof part === "string" && !/\W/.test(part) ) { |
var nodeCheck = part = part.toLowerCase(); |
checkFn = dirNodeCheck; |
} |
checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML); |
}, |
"~": function(checkSet, part, isXML){ |
var doneName = done++, checkFn = dirCheck; |
if ( typeof part === "string" && !/\W/.test(part) ) { |
var nodeCheck = part = part.toLowerCase(); |
checkFn = dirNodeCheck; |
} |
checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML); |
} |
}, |
find: { |
ID: function(match, context, isXML){ |
if ( typeof context.getElementById !== "undefined" && !isXML ) { |
var m = context.getElementById(match[1]); |
return m ? [m] : []; |
} |
}, |
NAME: function(match, context){ |
if ( typeof context.getElementsByName !== "undefined" ) { |
var ret = [], results = context.getElementsByName(match[1]); |
for ( var i = 0, l = results.length; i < l; i++ ) { |
if ( results[i].getAttribute("name") === match[1] ) { |
ret.push( results[i] ); |
} |
} |
return ret.length === 0 ? null : ret; |
} |
}, |
TAG: function(match, context){ |
return context.getElementsByTagName(match[1]); |
} |
}, |
preFilter: { |
CLASS: function(match, curLoop, inplace, result, not, isXML){ |
match = " " + match[1].replace(/\\/g, "") + " "; |
if ( isXML ) { |
return match; |
} |
for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { |
if ( elem ) { |
if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) { |
if ( !inplace ) { |
result.push( elem ); |
} |
} else if ( inplace ) { |
curLoop[i] = false; |
} |
} |
} |
return false; |
}, |
ID: function(match){ |
return match[1].replace(/\\/g, ""); |
}, |
TAG: function(match, curLoop){ |
return match[1].toLowerCase(); |
}, |
CHILD: function(match){ |
if ( match[1] === "nth" ) { |
// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' |
var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( |
match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || |
!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); |
// calculate the numbers (first)n+(last) including if they are negative |
match[2] = (test[1] + (test[2] || 1)) - 0; |
match[3] = test[3] - 0; |
} |
// TODO: Move to normal caching system |
match[0] = done++; |
return match; |
}, |
ATTR: function(match, curLoop, inplace, result, not, isXML){ |
var name = match[1].replace(/\\/g, ""); |
if ( !isXML && Expr.attrMap[name] ) { |
match[1] = Expr.attrMap[name]; |
} |
if ( match[2] === "~=" ) { |
match[4] = " " + match[4] + " "; |
} |
return match; |
}, |
PSEUDO: function(match, curLoop, inplace, result, not){ |
if ( match[1] === "not" ) { |
// If we're dealing with a complex expression, or a simple one |
if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { |
match[3] = Sizzle(match[3], null, null, curLoop); |
} else { |
var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); |
if ( !inplace ) { |
result.push.apply( result, ret ); |
} |
return false; |
} |
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { |
return true; |
} |
return match; |
}, |
POS: function(match){ |
match.unshift( true ); |
return match; |
} |
}, |
filters: { |
enabled: function(elem){ |
return elem.disabled === false && elem.type !== "hidden"; |
}, |
disabled: function(elem){ |
return elem.disabled === true; |
}, |
checked: function(elem){ |
return elem.checked === true; |
}, |
selected: function(elem){ |
// Accessing this property makes selected-by-default |
// options in Safari work properly |
elem.parentNode.selectedIndex; |
return elem.selected === true; |
}, |
parent: function(elem){ |
return !!elem.firstChild; |
}, |
empty: function(elem){ |
return !elem.firstChild; |
}, |
has: function(elem, i, match){ |
return !!Sizzle( match[3], elem ).length; |
}, |
header: function(elem){ |
return /h\d/i.test( elem.nodeName ); |
}, |
text: function(elem){ |
return "text" === elem.type; |
}, |
radio: function(elem){ |
return "radio" === elem.type; |
}, |
checkbox: function(elem){ |
return "checkbox" === elem.type; |
}, |
file: function(elem){ |
return "file" === elem.type; |
}, |
password: function(elem){ |
return "password" === elem.type; |
}, |
submit: function(elem){ |
return "submit" === elem.type; |
}, |
image: function(elem){ |
return "image" === elem.type; |
}, |
reset: function(elem){ |
return "reset" === elem.type; |
}, |
button: function(elem){ |
return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; |
}, |
input: function(elem){ |
return /input|select|textarea|button/i.test(elem.nodeName); |
} |
}, |
setFilters: { |
first: function(elem, i){ |
return i === 0; |
}, |
last: function(elem, i, match, array){ |
return i === array.length - 1; |
}, |
even: function(elem, i){ |
return i % 2 === 0; |
}, |
odd: function(elem, i){ |
return i % 2 === 1; |
}, |
lt: function(elem, i, match){ |
return i < match[3] - 0; |
}, |
gt: function(elem, i, match){ |
return i > match[3] - 0; |
}, |
nth: function(elem, i, match){ |
return match[3] - 0 === i; |
}, |
eq: function(elem, i, match){ |
return match[3] - 0 === i; |
} |
}, |
filter: { |
PSEUDO: function(elem, match, i, array){ |
var name = match[1], filter = Expr.filters[ name ]; |
if ( filter ) { |
return filter( elem, i, match, array ); |
} else if ( name === "contains" ) { |
return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; |
} else if ( name === "not" ) { |
var not = match[3]; |
for ( var i = 0, l = not.length; i < l; i++ ) { |
if ( not[i] === elem ) { |
return false; |
} |
} |
return true; |
} else { |
Sizzle.error( "Syntax error, unrecognized expression: " + name ); |
} |
}, |
CHILD: function(elem, match){ |
var type = match[1], node = elem; |
switch (type) { |
case 'only': |
case 'first': |
while ( (node = node.previousSibling) ) { |
if ( node.nodeType === 1 ) { |
return false; |
} |
} |
if ( type === "first" ) { |
return true; |
} |
node = elem; |
case 'last': |
while ( (node = node.nextSibling) ) { |
if ( node.nodeType === 1 ) { |
return false; |
} |
} |
return true; |
case 'nth': |
var first = match[2], last = match[3]; |
if ( first === 1 && last === 0 ) { |
return true; |
} |
var doneName = match[0], |
parent = elem.parentNode; |
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { |
var count = 0; |
for ( node = parent.firstChild; node; node = node.nextSibling ) { |
if ( node.nodeType === 1 ) { |
node.nodeIndex = ++count; |
} |
} |
parent.sizcache = doneName; |
} |
var diff = elem.nodeIndex - last; |
if ( first === 0 ) { |
return diff === 0; |
} else { |
return ( diff % first === 0 && diff / first >= 0 ); |
} |
} |
}, |
ID: function(elem, match){ |
return elem.nodeType === 1 && elem.getAttribute("id") === match; |
}, |
TAG: function(elem, match){ |
return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; |
}, |
CLASS: function(elem, match){ |
return (" " + (elem.className || elem.getAttribute("class")) + " ") |
.indexOf( match ) > -1; |
}, |
ATTR: function(elem, match){ |
var name = match[1], |
result = Expr.attrHandle[ name ] ? |
Expr.attrHandle[ name ]( elem ) : |
elem[ name ] != null ? |
elem[ name ] : |
elem.getAttribute( name ), |
value = result + "", |
type = match[2], |
check = match[4]; |
return result == null ? |
type === "!=" : |
type === "=" ? |
value === check : |
type === "*=" ? |
value.indexOf(check) >= 0 : |
type === "~=" ? |
(" " + value + " ").indexOf(check) >= 0 : |
!check ? |
value && result !== false : |
type === "!=" ? |
value !== check : |
type === "^=" ? |
value.indexOf(check) === 0 : |
type === "$=" ? |
value.substr(value.length - check.length) === check : |
type === "|=" ? |
value === check || value.substr(0, check.length + 1) === check + "-" : |
false; |
}, |
POS: function(elem, match, i, array){ |
var name = match[2], filter = Expr.setFilters[ name ]; |
if ( filter ) { |
return filter( elem, i, match, array ); |
} |
} |
} |
}; |
var origPOS = Expr.match.POS; |
for ( var type in Expr.match ) { |
Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source ); |
Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, function(all, num){ |
return "\\" + (num - 0 + 1); |
})); |
} |
var makeArray = function(array, results) { |
array = Array.prototype.slice.call( array, 0 ); |
if ( results ) { |
results.push.apply( results, array ); |
return results; |
} |
return array; |
}; |
// Perform a simple check to determine if the browser is capable of |
// converting a NodeList to an array using builtin methods. |
// Also verifies that the returned array holds DOM nodes |
// (which is not the case in the Blackberry browser) |
try { |
Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; |
// Provide a fallback method if it does not work |
} catch(e){ |
makeArray = function(array, results) { |
var ret = results || []; |
if ( toString.call(array) === "[object Array]" ) { |
Array.prototype.push.apply( ret, array ); |
} else { |
if ( typeof array.length === "number" ) { |
for ( var i = 0, l = array.length; i < l; i++ ) { |
ret.push( array[i] ); |
} |
} else { |
for ( var i = 0; array[i]; i++ ) { |
ret.push( array[i] ); |
} |
} |
} |
return ret; |
}; |
} |
var sortOrder; |
if ( document.documentElement.compareDocumentPosition ) { |
sortOrder = function( a, b ) { |
if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { |
if ( a == b ) { |
hasDuplicate = true; |
} |
return a.compareDocumentPosition ? -1 : 1; |
} |
var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1; |
if ( ret === 0 ) { |
hasDuplicate = true; |
} |
return ret; |
}; |
} else if ( "sourceIndex" in document.documentElement ) { |
sortOrder = function( a, b ) { |
if ( !a.sourceIndex || !b.sourceIndex ) { |
if ( a == b ) { |
hasDuplicate = true; |
} |
return a.sourceIndex ? -1 : 1; |
} |
var ret = a.sourceIndex - b.sourceIndex; |
if ( ret === 0 ) { |
hasDuplicate = true; |
} |
return ret; |
}; |
} else if ( document.createRange ) { |
sortOrder = function( a, b ) { |
if ( !a.ownerDocument || !b.ownerDocument ) { |
if ( a == b ) { |
hasDuplicate = true; |
} |
return a.ownerDocument ? -1 : 1; |
} |
var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange(); |
aRange.setStart(a, 0); |
aRange.setEnd(a, 0); |
bRange.setStart(b, 0); |
bRange.setEnd(b, 0); |
var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange); |
if ( ret === 0 ) { |
hasDuplicate = true; |
} |
return ret; |
}; |
} |
// Utility function for retreiving the text value of an array of DOM nodes |
function getText( elems ) { |
var ret = "", elem; |
for ( var i = 0; elems[i]; i++ ) { |
elem = elems[i]; |
// Get the text from text nodes and CDATA nodes |
if ( elem.nodeType === 3 || elem.nodeType === 4 ) { |
ret += elem.nodeValue; |
// Traverse everything else, except comment nodes |
} else if ( elem.nodeType !== 8 ) { |
ret += getText( elem.childNodes ); |
} |
} |
return ret; |
} |
// Check to see if the browser returns elements by name when |
// querying by getElementById (and provide a workaround) |
(function(){ |
// We're going to inject a fake input element with a specified name |
var form = document.createElement("div"), |
id = "script" + (new Date).getTime(); |
form.innerHTML = "<a name='" + id + "'/>"; |
// Inject it into the root element, check its status, and remove it quickly |
var root = document.documentElement; |
root.insertBefore( form, root.firstChild ); |
// The workaround has to do additional checks after a getElementById |
// Which slows things down for other browsers (hence the branching) |
if ( document.getElementById( id ) ) { |
Expr.find.ID = function(match, context, isXML){ |
if ( typeof context.getElementById !== "undefined" && !isXML ) { |
var m = context.getElementById(match[1]); |
return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; |
} |
}; |
Expr.filter.ID = function(elem, match){ |
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); |
return elem.nodeType === 1 && node && node.nodeValue === match; |
}; |
} |
root.removeChild( form ); |
root = form = null; // release memory in IE |
})(); |
(function(){ |
// Check to see if the browser returns only elements |
// when doing getElementsByTagName("*") |
// Create a fake element |
var div = document.createElement("div"); |
div.appendChild( document.createComment("") ); |
// Make sure no comments are found |
if ( div.getElementsByTagName("*").length > 0 ) { |
Expr.find.TAG = function(match, context){ |
var results = context.getElementsByTagName(match[1]); |
// Filter out possible comments |
if ( match[1] === "*" ) { |
var tmp = []; |
for ( var i = 0; results[i]; i++ ) { |
if ( results[i].nodeType === 1 ) { |
tmp.push( results[i] ); |
} |
} |
results = tmp; |
} |
return results; |
}; |
} |
// Check to see if an attribute returns normalized href attributes |
div.innerHTML = "<a href='#'></a>"; |
if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && |
div.firstChild.getAttribute("href") !== "#" ) { |
Expr.attrHandle.href = function(elem){ |
return elem.getAttribute("href", 2); |
}; |
} |
div = null; // release memory in IE |
})(); |
if ( document.querySelectorAll ) { |
(function(){ |
var oldSizzle = Sizzle, div = document.createElement("div"); |
div.innerHTML = "<p class='TEST'></p>"; |
// Safari can't handle uppercase or unicode characters when |
// in quirks mode. |
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { |
return; |
} |
Sizzle = function(query, context, extra, seed){ |
context = context || document; |
// Only use querySelectorAll on non-XML documents |
// (ID selectors don't work in non-HTML documents) |
if ( !seed && context.nodeType === 9 && !isXML(context) ) { |
try { |
return makeArray( context.querySelectorAll(query), extra ); |
} catch(e){} |
} |
return oldSizzle(query, context, extra, seed); |
}; |
for ( var prop in oldSizzle ) { |
Sizzle[ prop ] = oldSizzle[ prop ]; |
} |
div = null; // release memory in IE |
})(); |
} |
(function(){ |
var div = document.createElement("div"); |
div.innerHTML = "<div class='test e'></div><div class='test'></div>"; |
// Opera can't find a second classname (in 9.6) |
// Also, make sure that getElementsByClassName actually exists |
if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { |
return; |
} |
// Safari caches class attributes, doesn't catch changes (in 3.2) |
div.lastChild.className = "e"; |
if ( div.getElementsByClassName("e").length === 1 ) { |
return; |
} |
Expr.order.splice(1, 0, "CLASS"); |
Expr.find.CLASS = function(match, context, isXML) { |
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { |
return context.getElementsByClassName(match[1]); |
} |
}; |
div = null; // release memory in IE |
})(); |
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { |
for ( var i = 0, l = checkSet.length; i < l; i++ ) { |
var elem = checkSet[i]; |
if ( elem ) { |
elem = elem[dir]; |
var match = false; |
while ( elem ) { |
if ( elem.sizcache === doneName ) { |
match = checkSet[elem.sizset]; |
break; |
} |
if ( elem.nodeType === 1 && !isXML ){ |
elem.sizcache = doneName; |
elem.sizset = i; |
} |
if ( elem.nodeName.toLowerCase() === cur ) { |
match = elem; |
break; |
} |
elem = elem[dir]; |
} |
checkSet[i] = match; |
} |
} |
} |
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { |
for ( var i = 0, l = checkSet.length; i < l; i++ ) { |
var elem = checkSet[i]; |
if ( elem ) { |
elem = elem[dir]; |
var match = false; |
while ( elem ) { |
if ( elem.sizcache === doneName ) { |
match = checkSet[elem.sizset]; |
break; |
} |
if ( elem.nodeType === 1 ) { |
if ( !isXML ) { |
elem.sizcache = doneName; |
elem.sizset = i; |
} |
if ( typeof cur !== "string" ) { |
if ( elem === cur ) { |
match = true; |
break; |
} |
} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { |
match = elem; |
break; |
} |
} |
elem = elem[dir]; |
} |
checkSet[i] = match; |
} |
} |
} |
var contains = document.compareDocumentPosition ? function(a, b){ |
return !!(a.compareDocumentPosition(b) & 16); |
} : function(a, b){ |
return a !== b && (a.contains ? a.contains(b) : true); |
}; |
var isXML = function(elem){ |
// documentElement is verified for cases where it doesn't yet exist |
// (such as loading iframes in IE - #4833) |
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; |
return documentElement ? documentElement.nodeName !== "HTML" : false; |
}; |
var posProcess = function(selector, context){ |
var tmpSet = [], later = "", match, |
root = context.nodeType ? [context] : context; |
// Position selectors must be done after the filter |
// And so must :not(positional) so we move all PSEUDOs to the end |
while ( (match = Expr.match.PSEUDO.exec( selector )) ) { |
later += match[0]; |
selector = selector.replace( Expr.match.PSEUDO, "" ); |
} |
selector = Expr.relative[selector] ? selector + "*" : selector; |
for ( var i = 0, l = root.length; i < l; i++ ) { |
Sizzle( selector, root[i], tmpSet ); |
} |
return Sizzle.filter( later, tmpSet ); |
}; |
// EXPOSE |
jQuery.find = Sizzle; |
jQuery.expr = Sizzle.selectors; |
jQuery.expr[":"] = jQuery.expr.filters; |
jQuery.unique = Sizzle.uniqueSort; |
jQuery.text = getText; |
jQuery.isXMLDoc = isXML; |
jQuery.contains = contains; |
return; |
window.Sizzle = Sizzle; |
})(); |
var runtil = /Until$/, |
rparentsprev = /^(?:parents|prevUntil|prevAll)/, |
// Note: This RegExp should be improved, or likely pulled from Sizzle |
rmultiselector = /,/, |
slice = Array.prototype.slice; |
// Implement the identical functionality for filter and not |
var winnow = function( elements, qualifier, keep ) { |
if ( jQuery.isFunction( qualifier ) ) { |
return jQuery.grep(elements, function( elem, i ) { |
return !!qualifier.call( elem, i, elem ) === keep; |
}); |
} else if ( qualifier.nodeType ) { |
return jQuery.grep(elements, function( elem, i ) { |
return (elem === qualifier) === keep; |
}); |
} else if ( typeof qualifier === "string" ) { |
var filtered = jQuery.grep(elements, function( elem ) { |
return elem.nodeType === 1; |
}); |
if ( isSimple.test( qualifier ) ) { |
return jQuery.filter(qualifier, filtered, !keep); |
} else { |
qualifier = jQuery.filter( qualifier, filtered ); |
} |
} |
return jQuery.grep(elements, function( elem, i ) { |
return (jQuery.inArray( elem, qualifier ) >= 0) === keep; |
}); |
}; |
jQuery.fn.extend({ |
find: function( selector ) { |
var ret = this.pushStack( "", "find", selector ), length = 0; |
for ( var i = 0, l = this.length; i < l; i++ ) { |
length = ret.length; |
jQuery.find( selector, this[i], ret ); |
if ( i > 0 ) { |
// Make sure that the results are unique |
for ( var n = length; n < ret.length; n++ ) { |
for ( var r = 0; r < length; r++ ) { |
if ( ret[r] === ret[n] ) { |
ret.splice(n--, 1); |
break; |
} |
} |
} |
} |
} |
return ret; |
}, |
has: function( target ) { |
var targets = jQuery( target ); |
return this.filter(function() { |
for ( var i = 0, l = targets.length; i < l; i++ ) { |
if ( jQuery.contains( this, targets[i] ) ) { |
return true; |
} |
} |
}); |
}, |
not: function( selector ) { |
return this.pushStack( winnow(this, selector, false), "not", selector); |
}, |
filter: function( selector ) { |
return this.pushStack( winnow(this, selector, true), "filter", selector ); |
}, |
is: function( selector ) { |
return !!selector && jQuery.filter( selector, this ).length > 0; |
}, |
closest: function( selectors, context ) { |
if ( jQuery.isArray( selectors ) ) { |
var ret = [], cur = this[0], match, matches = {}, selector; |
if ( cur && selectors.length ) { |
for ( var i = 0, l = selectors.length; i < l; i++ ) { |
selector = selectors[i]; |
if ( !matches[selector] ) { |
matches[selector] = jQuery.expr.match.POS.test( selector ) ? |
jQuery( selector, context || this.context ) : |
selector; |
} |
} |
while ( cur && cur.ownerDocument && cur !== context ) { |
for ( selector in matches ) { |
match = matches[selector]; |
if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { |
ret.push({ selector: selector, elem: cur }); |
delete matches[selector]; |
} |
} |
cur = cur.parentNode; |
} |
} |
return ret; |
} |
var pos = jQuery.expr.match.POS.test( selectors ) ? |
jQuery( selectors, context || this.context ) : null; |
return this.map(function( i, cur ) { |
while ( cur && cur.ownerDocument && cur !== context ) { |
if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) { |
return cur; |
} |
cur = cur.parentNode; |
} |
return null; |
}); |
}, |
// Determine the position of an element within |
// the matched set of elements |
index: function( elem ) { |
if ( !elem || typeof elem === "string" ) { |
return jQuery.inArray( this[0], |
// If it receives a string, the selector is used |
// If it receives nothing, the siblings are used |
elem ? jQuery( elem ) : this.parent().children() ); |
} |
// Locate the position of the desired element |
return jQuery.inArray( |
// If it receives a jQuery object, the first element is used |
elem.jquery ? elem[0] : elem, this ); |
}, |
add: function( selector, context ) { |
var set = typeof selector === "string" ? |
jQuery( selector, context || this.context ) : |
jQuery.makeArray( selector ), |
all = jQuery.merge( this.get(), set ); |
return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? |
all : |
jQuery.unique( all ) ); |
}, |
andSelf: function() { |
return this.add( this.prevObject ); |
} |
}); |
// A painfully simple check to see if an element is disconnected |
// from a document (should be improved, where feasible). |
function isDisconnected( node ) { |
return !node || !node.parentNode || node.parentNode.nodeType === 11; |
} |
jQuery.each({ |
parent: function( elem ) { |
var parent = elem.parentNode; |
return parent && parent.nodeType !== 11 ? parent : null; |
}, |
parents: function( elem ) { |
return jQuery.dir( elem, "parentNode" ); |
}, |
parentsUntil: function( elem, i, until ) { |
return jQuery.dir( elem, "parentNode", until ); |
}, |
next: function( elem ) { |
return jQuery.nth( elem, 2, "nextSibling" ); |
}, |
prev: function( elem ) { |
return jQuery.nth( elem, 2, "previousSibling" ); |
}, |
nextAll: function( elem ) { |
return jQuery.dir( elem, "nextSibling" ); |
}, |
prevAll: function( elem ) { |
return jQuery.dir( elem, "previousSibling" ); |
}, |
nextUntil: function( elem, i, until ) { |
return jQuery.dir( elem, "nextSibling", until ); |
}, |
prevUntil: function( elem, i, until ) { |
return jQuery.dir( elem, "previousSibling", until ); |
}, |
siblings: function( elem ) { |
return jQuery.sibling( elem.parentNode.firstChild, elem ); |
}, |
children: function( elem ) { |
return jQuery.sibling( elem.firstChild ); |
}, |
contents: function( elem ) { |
return jQuery.nodeName( elem, "iframe" ) ? |
elem.contentDocument || elem.contentWindow.document : |
jQuery.makeArray( elem.childNodes ); |
} |
}, function( name, fn ) { |
jQuery.fn[ name ] = function( until, selector ) { |
var ret = jQuery.map( this, fn, until ); |
if ( !runtil.test( name ) ) { |
selector = until; |
} |
if ( selector && typeof selector === "string" ) { |
ret = jQuery.filter( selector, ret ); |
} |
ret = this.length > 1 ? jQuery.unique( ret ) : ret; |
if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { |
ret = ret.reverse(); |
} |
return this.pushStack( ret, name, slice.call(arguments).join(",") ); |
}; |
}); |
jQuery.extend({ |
filter: function( expr, elems, not ) { |
if ( not ) { |
expr = ":not(" + expr + ")"; |
} |
return jQuery.find.matches(expr, elems); |
}, |
dir: function( elem, dir, until ) { |
var matched = [], cur = elem[dir]; |
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { |
if ( cur.nodeType === 1 ) { |
matched.push( cur ); |
} |
cur = cur[dir]; |
} |
return matched; |
}, |
nth: function( cur, result, dir, elem ) { |
result = result || 1; |
var num = 0; |
for ( ; cur; cur = cur[dir] ) { |
if ( cur.nodeType === 1 && ++num === result ) { |
break; |
} |
} |
return cur; |
}, |
sibling: function( n, elem ) { |
var r = []; |
for ( ; n; n = n.nextSibling ) { |
if ( n.nodeType === 1 && n !== elem ) { |
r.push( n ); |
} |
} |
return r; |
} |
}); |
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, |
rleadingWhitespace = /^\s+/, |
rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g, |
rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i, |
rtagName = /<([\w:]+)/, |
rtbody = /<tbody/i, |
rhtml = /<|&#?\w+;/, |
rnocache = /<script|<object|<embed|<option|<style/i, |
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5) |
fcloseTag = function( all, front, tag ) { |
return rselfClosing.test( tag ) ? |
all : |
front + "></" + tag + ">"; |
}, |
wrapMap = { |
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, "", "" ] |
}; |
wrapMap.optgroup = wrapMap.option; |
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; |
wrapMap.th = wrapMap.td; |
// IE can't serialize <link> and <script> tags normally |
if ( !jQuery.support.htmlSerialize ) { |
wrapMap._default = [ 1, "div<div>", "</div>" ]; |
} |
jQuery.fn.extend({ |
text: function( text ) { |
if ( jQuery.isFunction(text) ) { |
return this.each(function(i) { |
var self = jQuery(this); |
self.text( text.call(this, i, self.text()) ); |
}); |
} |
if ( typeof text !== "object" && text !== undefined ) { |
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); |
} |
return jQuery.text( this ); |
}, |
wrapAll: function( html ) { |
if ( jQuery.isFunction( html ) ) { |
return this.each(function(i) { |
jQuery(this).wrapAll( html.call(this, i) ); |
}); |
} |
if ( this[0] ) { |
// The elements to wrap the target around |
var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); |
if ( this[0].parentNode ) { |
wrap.insertBefore( this[0] ); |
} |
wrap.map(function() { |
var elem = this; |
while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { |
elem = elem.firstChild; |
} |
return elem; |
}).append(this); |
} |
return this; |
}, |
wrapInner: function( html ) { |
if ( jQuery.isFunction( html ) ) { |
return this.each(function(i) { |
jQuery(this).wrapInner( html.call(this, i) ); |
}); |
} |
return this.each(function() { |
var self = jQuery( this ), contents = self.contents(); |
if ( contents.length ) { |
contents.wrapAll( html ); |
} else { |
self.append( html ); |
} |
}); |
}, |
wrap: function( html ) { |
return this.each(function() { |
jQuery( this ).wrapAll( html ); |
}); |
}, |
unwrap: function() { |
return this.parent().each(function() { |
if ( !jQuery.nodeName( this, "body" ) ) { |
jQuery( this ).replaceWith( this.childNodes ); |
} |
}).end(); |
}, |
append: function() { |
return this.domManip(arguments, true, function( elem ) { |
if ( this.nodeType === 1 ) { |
this.appendChild( elem ); |
} |
}); |
}, |
prepend: function() { |
return this.domManip(arguments, true, function( elem ) { |
if ( this.nodeType === 1 ) { |
this.insertBefore( elem, this.firstChild ); |
} |
}); |
}, |
before: function() { |
if ( this[0] && this[0].parentNode ) { |
return this.domManip(arguments, false, function( elem ) { |
this.parentNode.insertBefore( elem, this ); |
}); |
} else if ( arguments.length ) { |
var set = jQuery(arguments[0]); |
set.push.apply( set, this.toArray() ); |
return this.pushStack( set, "before", arguments ); |
} |
}, |
after: function() { |
if ( this[0] && this[0].parentNode ) { |
return this.domManip(arguments, false, function( elem ) { |
this.parentNode.insertBefore( elem, this.nextSibling ); |
}); |
} else if ( arguments.length ) { |
var set = this.pushStack( this, "after", arguments ); |
set.push.apply( set, jQuery(arguments[0]).toArray() ); |
return set; |
} |
}, |
// keepData is for internal use only--do not document |
remove: function( selector, keepData ) { |
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { |
if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { |
if ( !keepData && elem.nodeType === 1 ) { |
jQuery.cleanData( elem.getElementsByTagName("*") ); |
jQuery.cleanData( [ elem ] ); |
} |
if ( elem.parentNode ) { |
elem.parentNode.removeChild( elem ); |
} |
} |
} |
return this; |
}, |
empty: function() { |
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { |
// Remove element nodes and prevent memory leaks |
if ( elem.nodeType === 1 ) { |
jQuery.cleanData( elem.getElementsByTagName("*") ); |
} |
// Remove any remaining nodes |
while ( elem.firstChild ) { |
elem.removeChild( elem.firstChild ); |
} |
} |
return this; |
}, |
clone: function( events ) { |
// Do the clone |
var ret = this.map(function() { |
if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { |
// IE copies events bound via attachEvent when |
// using cloneNode. Calling detachEvent on the |
// clone will also remove the events from the orignal |
// In order to get around this, we use innerHTML. |
// Unfortunately, this means some modifications to |
// attributes in IE that are actually only stored |
// as properties will not be copied (such as the |
// the name attribute on an input). |
var html = this.outerHTML, ownerDocument = this.ownerDocument; |
if ( !html ) { |
var div = ownerDocument.createElement("div"); |
div.appendChild( this.cloneNode(true) ); |
html = div.innerHTML; |
} |
return jQuery.clean([html.replace(rinlinejQuery, "") |
// Handle the case in IE 8 where action=/test/> self-closes a tag |
.replace(/=([^="'>\s]+\/)>/g, '="$1">') |
.replace(rleadingWhitespace, "")], ownerDocument)[0]; |
} else { |
return this.cloneNode(true); |
} |
}); |
// Copy the events from the original to the clone |
if ( events === true ) { |
cloneCopyEvent( this, ret ); |
cloneCopyEvent( this.find("*"), ret.find("*") ); |
} |
// Return the cloned set |
return ret; |
}, |
html: function( value ) { |
if ( value === undefined ) { |
return this[0] && this[0].nodeType === 1 ? |
this[0].innerHTML.replace(rinlinejQuery, "") : |
null; |
// See if we can take a shortcut and just use innerHTML |
} else if ( typeof value === "string" && !rnocache.test( value ) && |
(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) && |
!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) { |
value = value.replace(rxhtmlTag, fcloseTag); |
try { |
for ( var i = 0, l = this.length; i < l; i++ ) { |
// Remove element nodes and prevent memory leaks |
if ( this[i].nodeType === 1 ) { |
jQuery.cleanData( this[i].getElementsByTagName("*") ); |
this[i].innerHTML = value; |
} |
} |
// If using innerHTML throws an exception, use the fallback method |
} catch(e) { |
this.empty().append( value ); |
} |
} else if ( jQuery.isFunction( value ) ) { |
this.each(function(i){ |
var self = jQuery(this), old = self.html(); |
self.empty().append(function(){ |
return value.call( this, i, old ); |
}); |
}); |
} else { |
this.empty().append( value ); |
} |
return this; |
}, |
replaceWith: function( value ) { |
if ( this[0] && this[0].parentNode ) { |
// Make sure that the elements are removed from the DOM before they are inserted |
// this can help fix replacing a parent with child elements |
if ( jQuery.isFunction( value ) ) { |
return this.each(function(i) { |
var self = jQuery(this), old = self.html(); |
self.replaceWith( value.call( this, i, old ) ); |
}); |
} |
if ( typeof value !== "string" ) { |
value = jQuery(value).detach(); |
} |
return this.each(function() { |
var next = this.nextSibling, parent = this.parentNode; |
jQuery(this).remove(); |
if ( next ) { |
jQuery(next).before( value ); |
} else { |
jQuery(parent).append( value ); |
} |
}); |
} else { |
return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ); |
} |
}, |
detach: function( selector ) { |
return this.remove( selector, true ); |
}, |
domManip: function( args, table, callback ) { |
var results, first, value = args[0], scripts = [], fragment, parent; |
// We can't cloneNode fragments that contain checked, in WebKit |
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) { |
return this.each(function() { |
jQuery(this).domManip( args, table, callback, true ); |
}); |
} |
if ( jQuery.isFunction(value) ) { |
return this.each(function(i) { |
var self = jQuery(this); |
args[0] = value.call(this, i, table ? self.html() : undefined); |
self.domManip( args, table, callback ); |
}); |
} |
if ( this[0] ) { |
parent = value && value.parentNode; |
// If we're in a fragment, just use that instead of building a new one |
if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) { |
results = { fragment: parent }; |
} else { |
results = buildFragment( args, this, scripts ); |
} |
fragment = results.fragment; |
if ( fragment.childNodes.length === 1 ) { |
first = fragment = fragment.firstChild; |
} else { |
first = fragment.firstChild; |
} |
if ( first ) { |
table = table && jQuery.nodeName( first, "tr" ); |
for ( var i = 0, l = this.length; i < l; i++ ) { |
callback.call( |
table ? |
root(this[i], first) : |
this[i], |
i > 0 || results.cacheable || this.length > 1 ? |
fragment.cloneNode(true) : |
fragment |
); |
} |
} |
if ( scripts.length ) { |
jQuery.each( scripts, evalScript ); |
} |
} |
return this; |
function root( elem, cur ) { |
return jQuery.nodeName(elem, "table") ? |
(elem.getElementsByTagName("tbody")[0] || |
elem.appendChild(elem.ownerDocument.createElement("tbody"))) : |
elem; |
} |
} |
}); |
function cloneCopyEvent(orig, ret) { |
var i = 0; |
ret.each(function() { |
if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) { |
return; |
} |
var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events; |
if ( events ) { |
delete curData.handle; |
curData.events = {}; |
for ( var type in events ) { |
for ( var handler in events[ type ] ) { |
jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); |
} |
} |
} |
}); |
} |
function buildFragment( args, nodes, scripts ) { |
var fragment, cacheable, cacheresults, |
doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document); |
// Only cache "small" (1/2 KB) strings that are associated with the main document |
// Cloning options loses the selected state, so don't cache them |
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment |
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache |
if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document && |
!rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) { |
cacheable = true; |
cacheresults = jQuery.fragments[ args[0] ]; |
if ( cacheresults ) { |
if ( cacheresults !== 1 ) { |
fragment = cacheresults; |
} |
} |
} |
if ( !fragment ) { |
fragment = doc.createDocumentFragment(); |
jQuery.clean( args, doc, fragment, scripts ); |
} |
if ( cacheable ) { |
jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1; |
} |
return { fragment: fragment, cacheable: cacheable }; |
} |
jQuery.fragments = {}; |
jQuery.each({ |
appendTo: "append", |
prependTo: "prepend", |
insertBefore: "before", |
insertAfter: "after", |
replaceAll: "replaceWith" |
}, function( name, original ) { |
jQuery.fn[ name ] = function( selector ) { |
var ret = [], insert = jQuery( selector ), |
parent = this.length === 1 && this[0].parentNode; |
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { |
insert[ original ]( this[0] ); |
return this; |
} else { |
for ( var i = 0, l = insert.length; i < l; i++ ) { |
var elems = (i > 0 ? this.clone(true) : this).get(); |
jQuery.fn[ original ].apply( jQuery(insert[i]), elems ); |
ret = ret.concat( elems ); |
} |
return this.pushStack( ret, name, insert.selector ); |
} |
}; |
}); |
jQuery.extend({ |
clean: function( elems, context, fragment, scripts ) { |
context = context || document; |
// !context.createElement fails in IE with an error but returns typeof 'object' |
if ( typeof context.createElement === "undefined" ) { |
context = context.ownerDocument || context[0] && context[0].ownerDocument || document; |
} |
var ret = []; |
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { |
if ( typeof elem === "number" ) { |
elem += ""; |
} |
if ( !elem ) { |
continue; |
} |
// Convert html string into DOM nodes |
if ( typeof elem === "string" && !rhtml.test( elem ) ) { |
elem = context.createTextNode( elem ); |
} else if ( typeof elem === "string" ) { |
// Fix "XHTML"-style tags in all browsers |
elem = elem.replace(rxhtmlTag, fcloseTag); |
// Trim whitespace, otherwise indexOf won't work as expected |
var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(), |
wrap = wrapMap[ tag ] || wrapMap._default, |
depth = wrap[0], |
div = context.createElement("div"); |
// Go to html and back, then peel off extra wrappers |
div.innerHTML = wrap[1] + elem + wrap[2]; |
// Move to the right depth |
while ( depth-- ) { |
div = div.lastChild; |
} |
// Remove IE's autoinserted <tbody> from table fragments |
if ( !jQuery.support.tbody ) { |
// String was a <table>, *may* have spurious <tbody> |
var hasBody = rtbody.test(elem), |
tbody = tag === "table" && !hasBody ? |
div.firstChild && div.firstChild.childNodes : |
// String was a bare <thead> or <tfoot> |
wrap[1] === "<table>" && !hasBody ? |
div.childNodes : |
[]; |
for ( var j = tbody.length - 1; j >= 0 ; --j ) { |
if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { |
tbody[ j ].parentNode.removeChild( tbody[ j ] ); |
} |
} |
} |
// IE completely kills leading whitespace when innerHTML is used |
if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { |
div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); |
} |
elem = div.childNodes; |
} |
if ( elem.nodeType ) { |
ret.push( elem ); |
} else { |
ret = jQuery.merge( ret, elem ); |
} |
} |
if ( fragment ) { |
for ( var i = 0; ret[i]; i++ ) { |
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { |
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); |
} else { |
if ( ret[i].nodeType === 1 ) { |
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) ); |
} |
fragment.appendChild( ret[i] ); |
} |
} |
} |
return ret; |
}, |
cleanData: function( elems ) { |
var data, id, cache = jQuery.cache, |
special = jQuery.event.special, |
deleteExpando = jQuery.support.deleteExpando; |
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { |
id = elem[ jQuery.expando ]; |
if ( id ) { |
data = cache[ id ]; |
if ( data.events ) { |
for ( var type in data.events ) { |
if ( special[ type ] ) { |
jQuery.event.remove( elem, type ); |
} else { |
removeEvent( elem, type, data.handle ); |
} |
} |
} |
if ( deleteExpando ) { |
delete elem[ jQuery.expando ]; |
} else if ( elem.removeAttribute ) { |
elem.removeAttribute( jQuery.expando ); |
} |
delete cache[ id ]; |
} |
} |
} |
}); |
// exclude the following css properties to add px |
var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, |
ralpha = /alpha\([^)]*\)/, |
ropacity = /opacity=([^)]*)/, |
rfloat = /float/i, |
rdashAlpha = /-([a-z])/ig, |
rupper = /([A-Z])/g, |
rnumpx = /^-?\d+(?:px)?$/i, |
rnum = /^-?\d/, |
cssShow = { position: "absolute", visibility: "hidden", display:"block" }, |
cssWidth = [ "Left", "Right" ], |
cssHeight = [ "Top", "Bottom" ], |
// cache check for defaultView.getComputedStyle |
getComputedStyle = document.defaultView && document.defaultView.getComputedStyle, |
// normalize float css property |
styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat", |
fcamelCase = function( all, letter ) { |
return letter.toUpperCase(); |
}; |
jQuery.fn.css = function( name, value ) { |
return access( this, name, value, true, function( elem, name, value ) { |
if ( value === undefined ) { |
return jQuery.curCSS( elem, name ); |
} |
if ( typeof value === "number" && !rexclude.test(name) ) { |
value += "px"; |
} |
jQuery.style( elem, name, value ); |
}); |
}; |
jQuery.extend({ |
style: function( elem, name, value ) { |
// don't set styles on text and comment nodes |
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { |
return undefined; |
} |
// ignore negative width and height values #1599 |
if ( (name === "width" || name === "height") && parseFloat(value) < 0 ) { |
value = undefined; |
} |
var style = elem.style || elem, set = value !== undefined; |
// IE uses filters for opacity |
if ( !jQuery.support.opacity && name === "opacity" ) { |
if ( set ) { |
// IE has trouble with opacity if it does not have layout |
// Force it by setting the zoom level |
style.zoom = 1; |
// Set the alpha filter to set the opacity |
var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"; |
var filter = style.filter || jQuery.curCSS( elem, "filter" ) || ""; |
style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity; |
} |
return style.filter && style.filter.indexOf("opacity=") >= 0 ? |
(parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "": |
""; |
} |
// Make sure we're using the right name for getting the float value |
if ( rfloat.test( name ) ) { |
name = styleFloat; |
} |
name = name.replace(rdashAlpha, fcamelCase); |
if ( set ) { |
style[ name ] = value; |
} |
return style[ name ]; |
}, |
css: function( elem, name, force, extra ) { |
if ( name === "width" || name === "height" ) { |
var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight; |
function getWH() { |
val = name === "width" ? elem.offsetWidth : elem.offsetHeight; |
if ( extra === "border" ) { |
return; |
} |
jQuery.each( which, function() { |
if ( !extra ) { |
val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; |
} |
if ( extra === "margin" ) { |
val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; |
} else { |
val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; |
} |
}); |
} |
if ( elem.offsetWidth !== 0 ) { |
getWH(); |
} else { |
jQuery.swap( elem, props, getWH ); |
} |
return Math.max(0, Math.round(val)); |
} |
return jQuery.curCSS( elem, name, force ); |
}, |
curCSS: function( elem, name, force ) { |
var ret, style = elem.style, filter; |
// IE uses filters for opacity |
if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) { |
ret = ropacity.test(elem.currentStyle.filter || "") ? |
(parseFloat(RegExp.$1) / 100) + "" : |
""; |
return ret === "" ? |
"1" : |
ret; |
} |
// Make sure we're using the right name for getting the float value |
if ( rfloat.test( name ) ) { |
name = styleFloat; |
} |
if ( !force && style && style[ name ] ) { |
ret = style[ name ]; |
} else if ( getComputedStyle ) { |
// Only "float" is needed here |
if ( rfloat.test( name ) ) { |
name = "float"; |
} |
name = name.replace( rupper, "-$1" ).toLowerCase(); |
var defaultView = elem.ownerDocument.defaultView; |
if ( !defaultView ) { |
return null; |
} |
var computedStyle = defaultView.getComputedStyle( elem, null ); |
if ( computedStyle ) { |
ret = computedStyle.getPropertyValue( name ); |
} |
// We should always get a number back from opacity |
if ( name === "opacity" && ret === "" ) { |
ret = "1"; |
} |
} else if ( elem.currentStyle ) { |
var camelCase = name.replace(rdashAlpha, fcamelCase); |
ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; |
// From the awesome hack by Dean Edwards |
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 |
// If we're not dealing with a regular pixel number |
// but a number that has a weird ending, we need to convert it to pixels |
if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { |
// Remember the original values |
var left = style.left, rsLeft = elem.runtimeStyle.left; |
// Put in the new values to get a computed value out |
elem.runtimeStyle.left = elem.currentStyle.left; |
style.left = camelCase === "fontSize" ? "1em" : (ret || 0); |
ret = style.pixelLeft + "px"; |
// Revert the changed values |
style.left = left; |
elem.runtimeStyle.left = rsLeft; |
} |
} |
return ret; |
}, |
// A method for quickly swapping in/out CSS properties to get correct calculations |
swap: function( elem, options, callback ) { |
var old = {}; |
// Remember the old values, and insert the new ones |
for ( var name in options ) { |
old[ name ] = elem.style[ name ]; |
elem.style[ name ] = options[ name ]; |
} |
callback.call( elem ); |
// Revert the old values |
for ( var name in options ) { |
elem.style[ name ] = old[ name ]; |
} |
} |
}); |
if ( jQuery.expr && jQuery.expr.filters ) { |
jQuery.expr.filters.hidden = function( elem ) { |
var width = elem.offsetWidth, height = elem.offsetHeight, |
skip = elem.nodeName.toLowerCase() === "tr"; |
return width === 0 && height === 0 && !skip ? |
true : |
width > 0 && height > 0 && !skip ? |
false : |
jQuery.curCSS(elem, "display") === "none"; |
}; |
jQuery.expr.filters.visible = function( elem ) { |
return !jQuery.expr.filters.hidden( elem ); |
}; |
} |
var jsc = now(), |
rscript = /<script(.|\s)*?\/script>/gi, |
rselectTextarea = /select|textarea/i, |
rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i, |
jsre = /=\?(&|$)/, |
rquery = /\?/, |
rts = /(\?|&)_=.*?(&|$)/, |
rurl = /^(\w+:)?\/\/([^\/?#]+)/, |
r20 = /%20/g, |
// Keep a copy of the old load method |
_load = jQuery.fn.load; |
jQuery.fn.extend({ |
load: function( url, params, callback ) { |
if ( typeof url !== "string" ) { |
return _load.call( this, url ); |
// Don't do a request if no elements are being requested |
} else if ( !this.length ) { |
return this; |
} |
var off = url.indexOf(" "); |
if ( off >= 0 ) { |
var selector = url.slice(off, url.length); |
url = url.slice(0, off); |
} |
// Default to a GET request |
var type = "GET"; |
// If the second parameter was provided |
if ( params ) { |
// If it's a function |
if ( jQuery.isFunction( params ) ) { |
// We assume that it's the callback |
callback = params; |
params = null; |
// Otherwise, build a param string |
} else if ( typeof params === "object" ) { |
params = jQuery.param( params, jQuery.ajaxSettings.traditional ); |
type = "POST"; |
} |
} |
var self = this; |
// Request the remote document |
jQuery.ajax({ |
url: url, |
type: type, |
dataType: "html", |
data: params, |
complete: function( res, status ) { |
// If successful, inject the HTML into all the matched elements |
if ( status === "success" || status === "notmodified" ) { |
// See if a selector was specified |
self.html( selector ? |
// Create a dummy div to hold the results |
jQuery("<div />") |
// inject the contents of the document in, removing the scripts |
// to avoid any 'Permission Denied' errors in IE |
.append(res.responseText.replace(rscript, "")) |
// Locate the specified elements |
.find(selector) : |
// If not, just inject the full result |
res.responseText ); |
} |
if ( callback ) { |
self.each( callback, [res.responseText, status, res] ); |
} |
} |
}); |
return this; |
}, |
serialize: function() { |
return jQuery.param(this.serializeArray()); |
}, |
serializeArray: function() { |
return this.map(function() { |
return this.elements ? jQuery.makeArray(this.elements) : this; |
}) |
.filter(function() { |
return this.name && !this.disabled && |
(this.checked || rselectTextarea.test(this.nodeName) || |
rinput.test(this.type)); |
}) |
.map(function( i, elem ) { |
var val = jQuery(this).val(); |
return val == null ? |
null : |
jQuery.isArray(val) ? |
jQuery.map( val, function( val, i ) { |
return { name: elem.name, value: val }; |
}) : |
{ name: elem.name, value: val }; |
}).get(); |
} |
}); |
// Attach a bunch of functions for handling common AJAX events |
jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function( i, o ) { |
jQuery.fn[o] = function( f ) { |
return this.bind(o, f); |
}; |
}); |
jQuery.extend({ |
get: function( url, data, callback, type ) { |
// shift arguments if data argument was omited |
if ( jQuery.isFunction( data ) ) { |
type = type || callback; |
callback = data; |
data = null; |
} |
return jQuery.ajax({ |
type: "GET", |
url: url, |
data: data, |
success: callback, |
dataType: type |
}); |
}, |
getScript: function( url, callback ) { |
return jQuery.get(url, null, callback, "script"); |
}, |
getJSON: function( url, data, callback ) { |
return jQuery.get(url, data, callback, "json"); |
}, |
post: function( url, data, callback, type ) { |
// shift arguments if data argument was omited |
if ( jQuery.isFunction( data ) ) { |
type = type || callback; |
callback = data; |
data = {}; |
} |
return jQuery.ajax({ |
type: "POST", |
url: url, |
data: data, |
success: callback, |
dataType: type |
}); |
}, |
ajaxSetup: function( settings ) { |
jQuery.extend( jQuery.ajaxSettings, settings ); |
}, |
ajaxSettings: { |
url: location.href, |
global: true, |
type: "GET", |
contentType: "application/x-www-form-urlencoded", |
processData: true, |
async: true, |
/* |
timeout: 0, |
data: null, |
username: null, |
password: null, |
traditional: false, |
*/ |
// Create the request object; Microsoft failed to properly |
// implement the XMLHttpRequest in IE7 (can't request local files), |
// so we use the ActiveXObject when it is available |
// This function can be overriden by calling jQuery.ajaxSetup |
xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ? |
function() { |
return new window.XMLHttpRequest(); |
} : |
function() { |
try { |
return new window.ActiveXObject("Microsoft.XMLHTTP"); |
} catch(e) {} |
}, |
accepts: { |
xml: "application/xml, text/xml", |
html: "text/html", |
script: "text/javascript, application/javascript", |
json: "application/json, text/javascript", |
text: "text/plain", |
_default: "*/*" |
} |
}, |
// Last-Modified header cache for next request |
lastModified: {}, |
etag: {}, |
ajax: function( origSettings ) { |
var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings); |
var jsonp, status, data, |
callbackContext = origSettings && origSettings.context || s, |
type = s.type.toUpperCase(); |
// convert data if not already a string |
if ( s.data && s.processData && typeof s.data !== "string" ) { |
s.data = jQuery.param( s.data, s.traditional ); |
} |
// Handle JSONP Parameter Callbacks |
if ( s.dataType === "jsonp" ) { |
if ( type === "GET" ) { |
if ( !jsre.test( s.url ) ) { |
s.url += (rquery.test( s.url ) ? "&" : "?") + (s.jsonp || "callback") + "=?"; |
} |
} else if ( !s.data || !jsre.test(s.data) ) { |
s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; |
} |
s.dataType = "json"; |
} |
// Build temporary JSONP function |
if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) { |
jsonp = s.jsonpCallback || ("jsonp" + jsc++); |
// Replace the =? sequence both in the query string and the data |
if ( s.data ) { |
s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); |
} |
s.url = s.url.replace(jsre, "=" + jsonp + "$1"); |
// We need to make sure |
// that a JSONP style response is executed properly |
s.dataType = "script"; |
// Handle JSONP-style loading |
window[ jsonp ] = window[ jsonp ] || function( tmp ) { |
data = tmp; |
success(); |
complete(); |
// Garbage collect |
window[ jsonp ] = undefined; |
try { |
delete window[ jsonp ]; |
} catch(e) {} |
if ( head ) { |
head.removeChild( script ); |
} |
}; |
} |
if ( s.dataType === "script" && s.cache === null ) { |
s.cache = false; |
} |
if ( s.cache === false && type === "GET" ) { |
var ts = now(); |
// try replacing _= if it is there |
var ret = s.url.replace(rts, "$1_=" + ts + "$2"); |
// if nothing was replaced, add timestamp to the end |
s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : ""); |
} |
// If data is available, append data to url for get requests |
if ( s.data && type === "GET" ) { |
s.url += (rquery.test(s.url) ? "&" : "?") + s.data; |
} |
// Watch for a new set of requests |
if ( s.global && ! jQuery.active++ ) { |
jQuery.event.trigger( "ajaxStart" ); |
} |
// Matches an absolute URL, and saves the domain |
var parts = rurl.exec( s.url ), |
remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host); |
// If we're requesting a remote document |
// and trying to load JSON or Script with a GET |
if ( s.dataType === "script" && type === "GET" && remote ) { |
var head = document.getElementsByTagName("head")[0] || document.documentElement; |
var script = document.createElement("script"); |
script.src = s.url; |
if ( s.scriptCharset ) { |
script.charset = s.scriptCharset; |
} |
// Handle Script loading |
if ( !jsonp ) { |
var done = false; |
// Attach handlers for all browsers |
script.onload = script.onreadystatechange = function() { |
if ( !done && (!this.readyState || |
this.readyState === "loaded" || this.readyState === "complete") ) { |
done = true; |
success(); |
complete(); |
// Handle memory leak in IE |
script.onload = script.onreadystatechange = null; |
if ( head && script.parentNode ) { |
head.removeChild( script ); |
} |
} |
}; |
} |
// Use insertBefore instead of appendChild to circumvent an IE6 bug. |
// This arises when a base node is used (#2709 and #4378). |
head.insertBefore( script, head.firstChild ); |
// We handle everything using the script element injection |
return undefined; |
} |
var requestDone = false; |
// Create the request object |
var xhr = s.xhr(); |
if ( !xhr ) { |
return; |
} |
// Open the socket |
// Passing null username, generates a login popup on Opera (#2865) |
if ( s.username ) { |
xhr.open(type, s.url, s.async, s.username, s.password); |
} else { |
xhr.open(type, s.url, s.async); |
} |
// Need an extra try/catch for cross domain requests in Firefox 3 |
try { |
// Set the correct header, if data is being sent |
if ( s.data || origSettings && origSettings.contentType ) { |
xhr.setRequestHeader("Content-Type", s.contentType); |
} |
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. |
if ( s.ifModified ) { |
if ( jQuery.lastModified[s.url] ) { |
xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]); |
} |
if ( jQuery.etag[s.url] ) { |
xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]); |
} |
} |
// Set header so the called script knows that it's an XMLHttpRequest |
// Only send the header if it's not a remote XHR |
if ( !remote ) { |
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); |
} |
// Set the Accepts header for the server, depending on the dataType |
xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? |
s.accepts[ s.dataType ] + ", */*" : |
s.accepts._default ); |
} catch(e) {} |
// Allow custom headers/mimetypes and early abort |
if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) { |
// Handle the global AJAX counter |
if ( s.global && ! --jQuery.active ) { |
jQuery.event.trigger( "ajaxStop" ); |
} |
// close opended socket |
xhr.abort(); |
return false; |
} |
if ( s.global ) { |
trigger("ajaxSend", [xhr, s]); |
} |
// Wait for a response to come back |
var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) { |
// The request was aborted |
if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) { |
// Opera doesn't call onreadystatechange before this point |
// so we simulate the call |
if ( !requestDone ) { |
complete(); |
} |
requestDone = true; |
if ( xhr ) { |
xhr.onreadystatechange = jQuery.noop; |
} |
// The transfer is complete and the data is available, or the request timed out |
} else if ( !requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout") ) { |
requestDone = true; |
xhr.onreadystatechange = jQuery.noop; |
status = isTimeout === "timeout" ? |
"timeout" : |
!jQuery.httpSuccess( xhr ) ? |
"error" : |
s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? |
"notmodified" : |
"success"; |
var errMsg; |
if ( status === "success" ) { |
// Watch for, and catch, XML document parse errors |
try { |
// process the data (runs the xml through httpData regardless of callback) |
data = jQuery.httpData( xhr, s.dataType, s ); |
} catch(err) { |
status = "parsererror"; |
errMsg = err; |
} |
} |
// Make sure that the request was successful or notmodified |
if ( status === "success" || status === "notmodified" ) { |
// JSONP handles its own success callback |
if ( !jsonp ) { |
success(); |
} |
} else { |
jQuery.handleError(s, xhr, status, errMsg); |
} |
// Fire the complete handlers |
complete(); |
if ( isTimeout === "timeout" ) { |
xhr.abort(); |
} |
// Stop memory leaks |
if ( s.async ) { |
xhr = null; |
} |
} |
}; |
// Override the abort handler, if we can (IE doesn't allow it, but that's OK) |
// Opera doesn't fire onreadystatechange at all on abort |
try { |
var oldAbort = xhr.abort; |
xhr.abort = function() { |
if ( xhr ) { |
oldAbort.call( xhr ); |
} |
onreadystatechange( "abort" ); |
}; |
} catch(e) { } |
// Timeout checker |
if ( s.async && s.timeout > 0 ) { |
setTimeout(function() { |
// Check to see if the request is still happening |
if ( xhr && !requestDone ) { |
onreadystatechange( "timeout" ); |
} |
}, s.timeout); |
} |
// Send the data |
try { |
xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null ); |
} catch(e) { |
jQuery.handleError(s, xhr, null, e); |
// Fire the complete handlers |
complete(); |
} |
// firefox 1.5 doesn't fire statechange for sync requests |
if ( !s.async ) { |
onreadystatechange(); |
} |
function success() { |
// If a local callback was specified, fire it and pass it the data |
if ( s.success ) { |
s.success.call( callbackContext, data, status, xhr ); |
} |
// Fire the global callback |
if ( s.global ) { |
trigger( "ajaxSuccess", [xhr, s] ); |
} |
} |
function complete() { |
// Process result |
if ( s.complete ) { |
s.complete.call( callbackContext, xhr, status); |
} |
// The request was completed |
if ( s.global ) { |
trigger( "ajaxComplete", [xhr, s] ); |
} |
// Handle the global AJAX counter |
if ( s.global && ! --jQuery.active ) { |
jQuery.event.trigger( "ajaxStop" ); |
} |
} |
function trigger(type, args) { |
(s.context ? jQuery(s.context) : jQuery.event).trigger(type, args); |
} |
// return XMLHttpRequest to allow aborting the request etc. |
return xhr; |
}, |
handleError: function( s, xhr, status, e ) { |
// If a local callback was specified, fire it |
if ( s.error ) { |
s.error.call( s.context || s, xhr, status, e ); |
} |
// Fire the global callback |
if ( s.global ) { |
(s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] ); |
} |
}, |
// Counter for holding the number of active queries |
active: 0, |
// Determines if an XMLHttpRequest was successful or not |
httpSuccess: function( xhr ) { |
try { |
// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 |
return !xhr.status && location.protocol === "file:" || |
// Opera returns 0 when status is 304 |
( xhr.status >= 200 && xhr.status < 300 ) || |
xhr.status === 304 || xhr.status === 1223 || xhr.status === 0; |
} catch(e) {} |
return false; |
}, |
// Determines if an XMLHttpRequest returns NotModified |
httpNotModified: function( xhr, url ) { |
var lastModified = xhr.getResponseHeader("Last-Modified"), |
etag = xhr.getResponseHeader("Etag"); |
if ( lastModified ) { |
jQuery.lastModified[url] = lastModified; |
} |
if ( etag ) { |
jQuery.etag[url] = etag; |
} |
// Opera returns 0 when status is 304 |
return xhr.status === 304 || xhr.status === 0; |
}, |
httpData: function( xhr, type, s ) { |
var ct = xhr.getResponseHeader("content-type") || "", |
xml = type === "xml" || !type && ct.indexOf("xml") >= 0, |
data = xml ? xhr.responseXML : xhr.responseText; |
if ( xml && data.documentElement.nodeName === "parsererror" ) { |
jQuery.error( "parsererror" ); |
} |
// Allow a pre-filtering function to sanitize the response |
// s is checked to keep backwards compatibility |
if ( s && s.dataFilter ) { |
data = s.dataFilter( data, type ); |
} |
// The filter can actually parse the response |
if ( typeof data === "string" ) { |
// Get the JavaScript object, if JSON is used. |
if ( type === "json" || !type && ct.indexOf("json") >= 0 ) { |
data = jQuery.parseJSON( data ); |
// If the type is "script", eval it in global context |
} else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) { |
jQuery.globalEval( data ); |
} |
} |
return data; |
}, |
// Serialize an array of form elements or a set of |
// key/values into a query string |
param: function( a, traditional ) { |
var s = []; |
// Set traditional to true for jQuery <= 1.3.2 behavior. |
if ( traditional === undefined ) { |
traditional = jQuery.ajaxSettings.traditional; |
} |
// If an array was passed in, assume that it is an array of form elements. |
if ( jQuery.isArray(a) || a.jquery ) { |
// Serialize the form elements |
jQuery.each( a, function() { |
add( this.name, this.value ); |
}); |
} else { |
// If traditional, encode the "old" way (the way 1.3.2 or older |
// did it), otherwise encode params recursively. |
for ( var prefix in a ) { |
buildParams( prefix, a[prefix] ); |
} |
} |
// Return the resulting serialization |
return s.join("&").replace(r20, "+"); |
function buildParams( prefix, obj ) { |
if ( jQuery.isArray(obj) ) { |
// Serialize array item. |
jQuery.each( obj, function( i, v ) { |
if ( traditional || /\[\]$/.test( prefix ) ) { |
// Treat each array item as a scalar. |
add( prefix, v ); |
} else { |
// If array item is non-scalar (array or object), encode its |
// numeric index to resolve deserialization ambiguity issues. |
// Note that rack (as of 1.0.0) can't currently deserialize |
// nested arrays properly, and attempting to do so may cause |
// a server error. Possible fixes are to modify rack's |
// deserialization algorithm or to provide an option or flag |
// to force array serialization to be shallow. |
buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v ); |
} |
}); |
} else if ( !traditional && obj != null && typeof obj === "object" ) { |
// Serialize object item. |
jQuery.each( obj, function( k, v ) { |
buildParams( prefix + "[" + k + "]", v ); |
}); |
} else { |
// Serialize scalar item. |
add( prefix, obj ); |
} |
} |
function add( key, value ) { |
// If value is a function, invoke it and return its value |
value = jQuery.isFunction(value) ? value() : value; |
s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value); |
} |
} |
}); |
var elemdisplay = {}, |
rfxtypes = /toggle|show|hide/, |
rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/, |
timerId, |
fxAttrs = [ |
// height animations |
[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], |
// width animations |
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], |
// opacity animations |
[ "opacity" ] |
]; |
jQuery.fn.extend({ |
show: function( speed, callback ) { |
if ( speed || speed === 0) { |
return this.animate( genFx("show", 3), speed, callback); |
} else { |
for ( var i = 0, l = this.length; i < l; i++ ) { |
var old = jQuery.data(this[i], "olddisplay"); |
this[i].style.display = old || ""; |
if ( jQuery.css(this[i], "display") === "none" ) { |
var nodeName = this[i].nodeName, display; |
if ( elemdisplay[ nodeName ] ) { |
display = elemdisplay[ nodeName ]; |
} else { |
var elem = jQuery("<" + nodeName + " />").appendTo("body"); |
display = elem.css("display"); |
if ( display === "none" ) { |
display = "block"; |
} |
elem.remove(); |
elemdisplay[ nodeName ] = display; |
} |
jQuery.data(this[i], "olddisplay", display); |
} |
} |
// Set the display of the elements in a second loop |
// to avoid the constant reflow |
for ( var j = 0, k = this.length; j < k; j++ ) { |
this[j].style.display = jQuery.data(this[j], "olddisplay") || ""; |
} |
return this; |
} |
}, |
hide: function( speed, callback ) { |
if ( speed || speed === 0 ) { |
return this.animate( genFx("hide", 3), speed, callback); |
} else { |
for ( var i = 0, l = this.length; i < l; i++ ) { |
var old = jQuery.data(this[i], "olddisplay"); |
if ( !old && old !== "none" ) { |
jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display")); |
} |
} |
// Set the display of the elements in a second loop |
// to avoid the constant reflow |
for ( var j = 0, k = this.length; j < k; j++ ) { |
this[j].style.display = "none"; |
} |
return this; |
} |
}, |
// Save the old toggle function |
_toggle: jQuery.fn.toggle, |
toggle: function( fn, fn2 ) { |
var bool = typeof fn === "boolean"; |
if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) { |
this._toggle.apply( this, arguments ); |
} else if ( fn == null || bool ) { |
this.each(function() { |
var state = bool ? fn : jQuery(this).is(":hidden"); |
jQuery(this)[ state ? "show" : "hide" ](); |
}); |
} else { |
this.animate(genFx("toggle", 3), fn, fn2); |
} |
return this; |
}, |
fadeTo: function( speed, to, callback ) { |
return this.filter(":hidden").css("opacity", 0).show().end() |
.animate({opacity: to}, speed, callback); |
}, |
animate: function( prop, speed, easing, callback ) { |
var optall = jQuery.speed(speed, easing, callback); |
if ( jQuery.isEmptyObject( prop ) ) { |
return this.each( optall.complete ); |
} |
return this[ optall.queue === false ? "each" : "queue" ](function() { |
var opt = jQuery.extend({}, optall), p, |
hidden = this.nodeType === 1 && jQuery(this).is(":hidden"), |
self = this; |
for ( p in prop ) { |
var name = p.replace(rdashAlpha, fcamelCase); |
if ( p !== name ) { |
prop[ name ] = prop[ p ]; |
delete prop[ p ]; |
p = name; |
} |
if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) { |
return opt.complete.call(this); |
} |
if ( ( p === "height" || p === "width" ) && this.style ) { |
// Store display property |
opt.display = jQuery.css(this, "display"); |
// Make sure that nothing sneaks out |
opt.overflow = this.style.overflow; |
} |
if ( jQuery.isArray( prop[p] ) ) { |
// Create (if needed) and add to specialEasing |
(opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1]; |
prop[p] = prop[p][0]; |
} |
} |
if ( opt.overflow != null ) { |
this.style.overflow = "hidden"; |
} |
opt.curAnim = jQuery.extend({}, prop); |
jQuery.each( prop, function( name, val ) { |
var e = new jQuery.fx( self, opt, name ); |
if ( rfxtypes.test(val) ) { |
e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop ); |
} else { |
var parts = rfxnum.exec(val), |
start = e.cur(true) || 0; |
if ( parts ) { |
var end = parseFloat( parts[2] ), |
unit = parts[3] || "px"; |
// We need to compute starting value |
if ( unit !== "px" ) { |
self.style[ name ] = (end || 1) + unit; |
start = ((end || 1) / e.cur(true)) * start; |
self.style[ name ] = start + unit; |
} |
// If a +=/-= token was provided, we're doing a relative animation |
if ( parts[1] ) { |
end = ((parts[1] === "-=" ? -1 : 1) * end) + start; |
} |
e.custom( start, end, unit ); |
} else { |
e.custom( start, val, "" ); |
} |
} |
}); |
// For JS strict compliance |
return true; |
}); |
}, |
stop: function( clearQueue, gotoEnd ) { |
var timers = jQuery.timers; |
if ( clearQueue ) { |
this.queue([]); |
} |
this.each(function() { |
// go in reverse order so anything added to the queue during the loop is ignored |
for ( var i = timers.length - 1; i >= 0; i-- ) { |
if ( timers[i].elem === this ) { |
if (gotoEnd) { |
// force the next step to be the last |
timers[i](true); |
} |
timers.splice(i, 1); |
} |
} |
}); |
// start the next in the queue if the last step wasn't forced |
if ( !gotoEnd ) { |
this.dequeue(); |
} |
return this; |
} |
}); |
// Generate shortcuts for custom animations |
jQuery.each({ |
slideDown: genFx("show", 1), |
slideUp: genFx("hide", 1), |
slideToggle: genFx("toggle", 1), |
fadeIn: { opacity: "show" }, |
fadeOut: { opacity: "hide" } |
}, function( name, props ) { |
jQuery.fn[ name ] = function( speed, callback ) { |
return this.animate( props, speed, callback ); |
}; |
}); |
jQuery.extend({ |
speed: function( speed, easing, fn ) { |
var opt = speed && typeof speed === "object" ? speed : { |
complete: fn || !fn && easing || |
jQuery.isFunction( speed ) && speed, |
duration: speed, |
easing: fn && easing || easing && !jQuery.isFunction(easing) && easing |
}; |
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : |
jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default; |
// Queueing |
opt.old = opt.complete; |
opt.complete = function() { |
if ( opt.queue !== false ) { |
jQuery(this).dequeue(); |
} |
if ( jQuery.isFunction( opt.old ) ) { |
opt.old.call( this ); |
} |
}; |
return opt; |
}, |
easing: { |
linear: function( p, n, firstNum, diff ) { |
return firstNum + diff * p; |
}, |
swing: function( p, n, firstNum, diff ) { |
return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; |
} |
}, |
timers: [], |
fx: function( elem, options, prop ) { |
this.options = options; |
this.elem = elem; |
this.prop = prop; |
if ( !options.orig ) { |
options.orig = {}; |
} |
} |
}); |
jQuery.fx.prototype = { |
// Simple function for setting a style value |
update: function() { |
if ( this.options.step ) { |
this.options.step.call( this.elem, this.now, this ); |
} |
(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); |
// Set display property to block for height/width animations |
if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) { |
this.elem.style.display = "block"; |
} |
}, |
// Get the current size |
cur: function( force ) { |
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) { |
return this.elem[ this.prop ]; |
} |
var r = parseFloat(jQuery.css(this.elem, this.prop, force)); |
return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0; |
}, |
// Start an animation from one number to another |
custom: function( from, to, unit ) { |
this.startTime = now(); |
this.start = from; |
this.end = to; |
this.unit = unit || this.unit || "px"; |
this.now = this.start; |
this.pos = this.state = 0; |
var self = this; |
function t( gotoEnd ) { |
return self.step(gotoEnd); |
} |
t.elem = this.elem; |
if ( t() && jQuery.timers.push(t) && !timerId ) { |
timerId = setInterval(jQuery.fx.tick, 13); |
} |
}, |
// Simple 'show' function |
show: function() { |
// Remember where we started, so that we can go back to it later |
this.options.orig[this.prop] = jQuery.style( this.elem, this.prop ); |
this.options.show = true; |
// Begin the animation |
// Make sure that we start at a small width/height to avoid any |
// flash of content |
this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur()); |
// Start by showing the element |
jQuery( this.elem ).show(); |
}, |
// Simple 'hide' function |
hide: function() { |
// Remember where we started, so that we can go back to it later |
this.options.orig[this.prop] = jQuery.style( this.elem, this.prop ); |
this.options.hide = true; |
// Begin the animation |
this.custom(this.cur(), 0); |
}, |
// Each step of an animation |
step: function( gotoEnd ) { |
var t = now(), done = true; |
if ( gotoEnd || t >= this.options.duration + this.startTime ) { |
this.now = this.end; |
this.pos = this.state = 1; |
this.update(); |
this.options.curAnim[ this.prop ] = true; |
for ( var i in this.options.curAnim ) { |
if ( this.options.curAnim[i] !== true ) { |
done = false; |
} |
} |
if ( done ) { |
if ( this.options.display != null ) { |
// Reset the overflow |
this.elem.style.overflow = this.options.overflow; |
// Reset the display |
var old = jQuery.data(this.elem, "olddisplay"); |
this.elem.style.display = old ? old : this.options.display; |
if ( jQuery.css(this.elem, "display") === "none" ) { |
this.elem.style.display = "block"; |
} |
} |
// Hide the element if the "hide" operation was done |
if ( this.options.hide ) { |
jQuery(this.elem).hide(); |
} |
// Reset the properties, if the item has been hidden or shown |
if ( this.options.hide || this.options.show ) { |
for ( var p in this.options.curAnim ) { |
jQuery.style(this.elem, p, this.options.orig[p]); |
} |
} |
// Execute the complete function |
this.options.complete.call( this.elem ); |
} |
return false; |
} else { |
var n = t - this.startTime; |
this.state = n / this.options.duration; |
// Perform the easing function, defaults to swing |
var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop]; |
var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing" : "linear"); |
this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration); |
this.now = this.start + ((this.end - this.start) * this.pos); |
// Perform the next step of the animation |
this.update(); |
} |
return true; |
} |
}; |
jQuery.extend( jQuery.fx, { |
tick: function() { |
var timers = jQuery.timers; |
for ( var i = 0; i < timers.length; i++ ) { |
if ( !timers[i]() ) { |
timers.splice(i--, 1); |
} |
} |
if ( !timers.length ) { |
jQuery.fx.stop(); |
} |
}, |
stop: function() { |
clearInterval( timerId ); |
timerId = null; |
}, |
speeds: { |
slow: 600, |
fast: 200, |
// Default speed |
_default: 400 |
}, |
step: { |
opacity: function( fx ) { |
jQuery.style(fx.elem, "opacity", fx.now); |
}, |
_default: function( fx ) { |
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { |
fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit; |
} else { |
fx.elem[ fx.prop ] = fx.now; |
} |
} |
} |
}); |
if ( jQuery.expr && jQuery.expr.filters ) { |
jQuery.expr.filters.animated = function( elem ) { |
return jQuery.grep(jQuery.timers, function( fn ) { |
return elem === fn.elem; |
}).length; |
}; |
} |
function genFx( type, num ) { |
var obj = {}; |
jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() { |
obj[ this ] = type; |
}); |
return obj; |
} |
if ( "getBoundingClientRect" in document.documentElement ) { |
jQuery.fn.offset = function( options ) { |
var elem = this[0]; |
if ( options ) { |
return this.each(function( i ) { |
jQuery.offset.setOffset( this, options, i ); |
}); |
} |
if ( !elem || !elem.ownerDocument ) { |
return null; |
} |
if ( elem === elem.ownerDocument.body ) { |
return jQuery.offset.bodyOffset( elem ); |
} |
var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement, |
clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, |
top = box.top + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop, |
left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft; |
return { top: top, left: left }; |
}; |
} else { |
jQuery.fn.offset = function( options ) { |
var elem = this[0]; |
if ( options ) { |
return this.each(function( i ) { |
jQuery.offset.setOffset( this, options, i ); |
}); |
} |
if ( !elem || !elem.ownerDocument ) { |
return null; |
} |
if ( elem === elem.ownerDocument.body ) { |
return jQuery.offset.bodyOffset( elem ); |
} |
jQuery.offset.initialize(); |
var offsetParent = elem.offsetParent, prevOffsetParent = elem, |
doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement, |
body = doc.body, defaultView = doc.defaultView, |
prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle, |
top = elem.offsetTop, left = elem.offsetLeft; |
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { |
if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { |
break; |
} |
computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; |
top -= elem.scrollTop; |
left -= elem.scrollLeft; |
if ( elem === offsetParent ) { |
top += elem.offsetTop; |
left += elem.offsetLeft; |
if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) { |
top += parseFloat( computedStyle.borderTopWidth ) || 0; |
left += parseFloat( computedStyle.borderLeftWidth ) || 0; |
} |
prevOffsetParent = offsetParent, offsetParent = elem.offsetParent; |
} |
if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) { |
top += parseFloat( computedStyle.borderTopWidth ) || 0; |
left += parseFloat( computedStyle.borderLeftWidth ) || 0; |
} |
prevComputedStyle = computedStyle; |
} |
if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) { |
top += body.offsetTop; |
left += body.offsetLeft; |
} |
if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { |
top += Math.max( docElem.scrollTop, body.scrollTop ); |
left += Math.max( docElem.scrollLeft, body.scrollLeft ); |
} |
return { top: top, left: left }; |
}; |
} |
jQuery.offset = { |
initialize: function() { |
var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0, |
html = "<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>"; |
jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } ); |
container.innerHTML = html; |
body.insertBefore( container, body.firstChild ); |
innerDiv = container.firstChild; |
checkDiv = innerDiv.firstChild; |
td = innerDiv.nextSibling.firstChild.firstChild; |
this.doesNotAddBorder = (checkDiv.offsetTop !== 5); |
this.doesAddBorderForTableAndCells = (td.offsetTop === 5); |
checkDiv.style.position = "fixed", checkDiv.style.top = "20px"; |
// safari subtracts parent border width here which is 5px |
this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15); |
checkDiv.style.position = checkDiv.style.top = ""; |
innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative"; |
this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5); |
this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop); |
body.removeChild( container ); |
body = container = innerDiv = checkDiv = table = td = null; |
jQuery.offset.initialize = jQuery.noop; |
}, |
bodyOffset: function( body ) { |
var top = body.offsetTop, left = body.offsetLeft; |
jQuery.offset.initialize(); |
if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) { |
top += parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0; |
left += parseFloat( jQuery.curCSS(body, "marginLeft", true) ) || 0; |
} |
return { top: top, left: left }; |
}, |
setOffset: function( elem, options, i ) { |
// set position first, in-case top/left are set even on static elem |
if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) { |
elem.style.position = "relative"; |
} |
var curElem = jQuery( elem ), |
curOffset = curElem.offset(), |
curTop = parseInt( jQuery.curCSS( elem, "top", true ), 10 ) || 0, |
curLeft = parseInt( jQuery.curCSS( elem, "left", true ), 10 ) || 0; |
if ( jQuery.isFunction( options ) ) { |
options = options.call( elem, i, curOffset ); |
} |
var props = { |
top: (options.top - curOffset.top) + curTop, |
left: (options.left - curOffset.left) + curLeft |
}; |
if ( "using" in options ) { |
options.using.call( elem, props ); |
} else { |
curElem.css( props ); |
} |
} |
}; |
jQuery.fn.extend({ |
position: function() { |
if ( !this[0] ) { |
return null; |
} |
var elem = this[0], |
// Get *real* offsetParent |
offsetParent = this.offsetParent(), |
// Get correct offsets |
offset = this.offset(), |
parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); |
// Subtract element margins |
// note: when an element has margin: auto the offsetLeft and marginLeft |
// are the same in Safari causing offset.left to incorrectly be 0 |
offset.top -= parseFloat( jQuery.curCSS(elem, "marginTop", true) ) || 0; |
offset.left -= parseFloat( jQuery.curCSS(elem, "marginLeft", true) ) || 0; |
// Add offsetParent borders |
parentOffset.top += parseFloat( jQuery.curCSS(offsetParent[0], "borderTopWidth", true) ) || 0; |
parentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], "borderLeftWidth", true) ) || 0; |
// Subtract the two offsets |
return { |
top: offset.top - parentOffset.top, |
left: offset.left - parentOffset.left |
}; |
}, |
offsetParent: function() { |
return this.map(function() { |
var offsetParent = this.offsetParent || document.body; |
while ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { |
offsetParent = offsetParent.offsetParent; |
} |
return offsetParent; |
}); |
} |
}); |
// Create scrollLeft and scrollTop methods |
jQuery.each( ["Left", "Top"], function( i, name ) { |
var method = "scroll" + name; |
jQuery.fn[ method ] = function(val) { |
var elem = this[0], win; |
if ( !elem ) { |
return null; |
} |
if ( val !== undefined ) { |
// Set the scroll offset |
return this.each(function() { |
win = getWindow( this ); |
if ( win ) { |
win.scrollTo( |
!i ? val : jQuery(win).scrollLeft(), |
i ? val : jQuery(win).scrollTop() |
); |
} else { |
this[ method ] = val; |
} |
}); |
} else { |
win = getWindow( elem ); |
// Return the scroll offset |
return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] : |
jQuery.support.boxModel && win.document.documentElement[ method ] || |
win.document.body[ method ] : |
elem[ method ]; |
} |
}; |
}); |
function getWindow( elem ) { |
return ("scrollTo" in elem && elem.document) ? |
elem : |
elem.nodeType === 9 ? |
elem.defaultView || elem.parentWindow : |
false; |
} |
// Create innerHeight, innerWidth, outerHeight and outerWidth methods |
jQuery.each([ "Height", "Width" ], function( i, name ) { |
var type = name.toLowerCase(); |
// innerHeight and innerWidth |
jQuery.fn["inner" + name] = function() { |
return this[0] ? |
jQuery.css( this[0], type, false, "padding" ) : |
null; |
}; |
// outerHeight and outerWidth |
jQuery.fn["outer" + name] = function( margin ) { |
return this[0] ? |
jQuery.css( this[0], type, false, margin ? "margin" : "border" ) : |
null; |
}; |
jQuery.fn[ type ] = function( size ) { |
// Get window width or height |
var elem = this[0]; |
if ( !elem ) { |
return size == null ? null : this; |
} |
if ( jQuery.isFunction( size ) ) { |
return this.each(function( i ) { |
var self = jQuery( this ); |
self[ type ]( size.call( this, i, self[ type ]() ) ); |
}); |
} |
return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window? |
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode |
elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] || |
elem.document.body[ "client" + name ] : |
// Get document width or height |
(elem.nodeType === 9) ? // is it a document |
// Either scroll[Width/Height] or offset[Width/Height], whichever is greater |
Math.max( |
elem.documentElement["client" + name], |
elem.body["scroll" + name], elem.documentElement["scroll" + name], |
elem.body["offset" + name], elem.documentElement["offset" + name] |
) : |
// Get or set width or height on the element |
size === undefined ? |
// Get width or height on the element |
jQuery.css( elem, type ) : |
// Set the width or height on the element (default to pixels if value is unitless) |
this.css( type, typeof size === "string" ? size : size + "px" ); |
}; |
}); |
// Expose jQuery to the global object |
window.jQuery = window.$ = jQuery; |
})(window); |
/trunk/squelettes/navigation/menu.tpl.html |
---|
New file |
0,0 → 1,3 |
<!-- CEL_CONSULTATION - DEBUT MENU NAVIGATION --> |
<!-- CEL_CONSULTATION - FIN MENU NAVIGATION --> |
/trunk/squelettes/navigation/pagination.tpl.html |
---|
New file |
0,0 → 1,40 |
<?php if($nb_resultats > 0) {?> |
<?php if($nb_pages > 1) {?> |
Pages |
<?php } ?> |
<?php if(($page_en_cours >= $pages_debut_intervalle) && (($page_en_cours != 1)) && ($nb_pages != 1)) { ?> |
<a class="premiere_page" href="<?= $url_base_pagination.'0' ?>" title="Première page">[1]</a> ... |
<?php } ?> |
<?php if($page_en_cours > 1) { ?> |
<a class="page_prededente" href="<?= $url_base_pagination.(($page_en_cours - 2) * $taille_page) ?>" title="Page précedente"><<</a> |
<?php } ?> |
<?php if($nb_pages > 1) { ?> |
<span class="pages"> |
<?php for($i = $pages_debut_intervalle; ($i < $pages_debut_intervalle+$pages_taille_intervalle) && $i <= $nb_pages ; $i++) : ?> |
<?php if($page_en_cours == $i) { ?> |
<span class="page_courante"> |
<?php } else { ?> |
<span> |
<?php } ?> |
<a class="premiere_page" href="<?= $url_base_pagination.(($i-1) * $taille_page) ?>" title="Page numéro <?= $i ?>"><?= $i ?></a> |
</span> |
<?php endfor; ?> |
</span> |
<?php } ?> |
<?php if($page_en_cours < $nb_pages) { ?> |
<a class="page_prededente" href="<?= $url_base_pagination.(($page_en_cours) * $taille_page) ?>" title="Page suivante">>></a> |
<?php } ?> |
<?php if(($page_en_cours != $nb_pages) && ($nb_pages > $pages_taille_intervalle)) { ?> |
... <a class="derniere_page" href="<?= $url_base_pagination.(($nb_pages - 1) * $taille_page) ?>" title="Dernière page">[<?= $nb_pages; ?>]</a> |
<?php } ?> |
<span class="nb_resultats"> Résultats <?= $intervalle_min.' - '.$intervalle_max ?> sur <?= $nb_resultats; ?></span> |
<?php } ?> |
<hr style="clear:both;visibility:hidden;" /> |
/trunk/controleurs/Image.php |
---|
New file |
0,0 → 1,227 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Classe de gestion des images. |
* |
* @package ODS_saisie |
* @category Php 5.2 |
* @author Aurélien Peronnet <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version SVN: $Id: Fiche.php 152 2010-09-06 16:19:12Z jpm $ |
*/ |
class Image extends aControleur { |
private $start = 0; |
private $limit = 100; |
private $total_resultats = 0; |
private $intervalle_pages = 5; |
public function __construct() { |
parent::__construct(); |
$this->initialiser(); |
} |
public function initialiser() { |
} |
public function executerActionParDefaut() { |
return $this->rechercherImage(); |
} |
public function afficherFormulaireRechercheImage() { |
$donnees = array('criteres' => ''); |
$formulaire = $this->getVue('formulaires/image_recherche',$donnees); |
$this->setSortie(self::RENDU_CORPS, $formulaire); |
} |
public function rechercherImage() { |
if (!isset($_GET['image_recherche']) || trim($_GET['image_recherche']) == '') { |
$_GET['image_recherche'] = ''; |
} |
if (isset($_GET['start'])) { |
$this->start = $_GET['start']; |
} |
if (isset($_GET['limit'])) { |
$this->limit = $_GET['limit']; |
} |
$critere_pour_dao = $_GET['image_recherche']; |
if (aControleur::estUneRechercheGenerale($critere_pour_dao)) { |
$critere_pour_dao = aControleur::convertirChaineRequeteGeneralePourDao($critere_pour_dao); |
} else { |
$critere_pour_dao = aControleur::convertirChaineRequetePourDao($critere_pour_dao); |
} |
$image_dao = new ImageDao(); |
$resultat_recherche = $image_dao->getListeImage($critere_pour_dao, $this->start, $this->limit); |
$critere_a_reafficher = aControleur::convertirChaineRequetePourMoteur($_GET['image_recherche']); |
$this->afficherResultatRechercheImage($resultat_recherche, $critere_a_reafficher); |
} |
public function afficherResultatRechercheImage($donnees_images, $criteres = '') { |
$images = array(); |
if (isset($donnees_images['images'])) { |
$images = $donnees_images['images']; |
$this->total_resultats = $donnees_images['total']; |
} |
foreach ($images as &$image) { |
$taille_image = array($image['hauteur'],$image['largeur']); |
$image['taille'] = $this->calculerDimensionPourVignette($taille_image); |
$id = $image['id_image']; |
$format_galerie = Config::get('format_image_galerie'); |
$format_zoom = Config::get('format_image_zoom'); |
$image['url_image_format_galerie'] = $this->getUrlImageBase($id, $format_galerie); |
$image['url_image_format_zoom'] = $this->getUrlImageBase($id, $format_zoom); |
$image['url_fiche_eflore'] = $this->getUrlFicheEfloreNumNom($image['nom_sel_nn']); |
} |
$donnees['pagination'] = $this->afficherBarrePagination($criteres); |
$donnees['images'] = $images; |
$donnees['criteres'] = $criteres; |
$this->setSortie(self::RENDU_CORPS, $this->getVue('formulaires/image_recherche',$donnees).$this->getVue('listes/image_liste', $donnees)); |
} |
// +---------------------------------------------------------------------------------------------------------------+ |
// METHODES D'AFFICHAGE DE PAGE |
public function afficherBarrePagination($criteres) { |
if (isset($_GET['start'])) { |
$this->start = $_GET['start']; |
} |
if (isset($_GET['limit'])) { |
$this->limit = $_GET['limit']; |
} |
if ($this->start == 0) { |
$page_en_cours = 1; |
} else if ($this->total_resultats != 0) { |
$page_en_cours = floor(($this->start + 1)/$this->limit + 1); |
} |
$pages_avant_apres = (ceil($this->intervalle_pages /2) + 1); |
$pages_debut_intervalle = 0; |
$nb_pages = 0; |
if ($page_en_cours < $pages_avant_apres) { |
$pages_debut_intervalle = 1; |
} else { |
$pages_debut_intervalle = $page_en_cours - $pages_avant_apres + 2; |
} |
$pages_a_afficher = $this->intervalle_pages; |
$intervalle_max = (($page_en_cours) * $this->limit); |
$donnees['url_base_pagination'] = '?module=Image&action=rechercherImage&image_recherche='.$criteres.'&limit='.$this->limit.'&start='; |
$nb_pages = ceil($this->total_resultats/$this->limit); |
if ($page_en_cours == $nb_pages) { |
$intervalle_max = $this->total_resultats; |
} |
$donnees['pages_taille_intervalle'] = $this->intervalle_pages; |
$donnees['pages_debut_intervalle'] = $pages_debut_intervalle; |
$donnees['page_en_cours'] = $page_en_cours; |
$donnees['intervalle_min'] = (($page_en_cours-1) * $this->limit); |
$donnees['intervalle_max'] = $intervalle_max; |
$donnees['nb_resultats'] = $this->total_resultats; |
$donnees['nb_pages'] = $nb_pages; |
$donnees['taille_page'] = $this->limit; |
return $this->getVue('navigation/pagination',$donnees); |
} |
// +---------------------------------------------------------------------------------------------------------------+ |
// METHODES POUR L'AFFICHAGE DE DONNEES |
private function getUrlImageRedirigee($id, $format) { |
$id = sprintf('%09s', $id); |
$chemin_sur_serveur = Config::get('url_redirection_images'); |
return $chemin_sur_serveur.$id.$format; |
} |
private function getVraieUrlImageBase($id, $format) { |
$id = sprintf('%09s', $id) ; |
$id = wordwrap($id, 3 , '_', true) ; |
$chemin_sur_serveur = Config::get('url_base_images'); |
$id_fichier = $id.".jpg" ; |
$niveauDossier = split("_", $id) ; |
$dossierNiveau1 = $niveauDossier[0] ; |
$dossierNiveau2 = $niveauDossier[1] ; |
$fichier = $chemin_sur_serveur.'/'.$dossierNiveau1.'/'.$dossierNiveau2.'/'.$format.'/'.$id.'_'.$format.'.jpg' ; |
return $fichier; |
} |
private function getUrlImageBase($id, $format = 'L') { |
$url = ''; |
if(Config::get('utilise_redirection_images')) { |
$url = $this->getUrlImageRedirigee($id, $format); |
} else { |
$url = $this->getVraieUrlImageBase($id, $format); |
} |
return $url; |
} |
private function getTypeMime($format) { |
$mime = ''; |
switch ($format) { |
case 'atom' : |
$mime = 'application/atom+xml'; |
break; |
case 'rss1' : |
case 'rss2' : |
$mime = 'application/rss+xml'; |
break; |
default: |
$mime = 'text/html'; |
} |
return $mime; |
} |
private function calculerDimensionPourVignette($tab_dimension_originale) { |
$taille_max = Config::get('taille_max_vignettes'); |
$res = array('hauteur' => $taille_max,'largeur' => $taille_max) ; |
return $res; |
} |
} |
?> |
/trunk/controleurs/Observation.php |
---|
New file |
0,0 → 1,49 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Classe de gestion des observations. |
* |
* @package ODS_saisie |
* @category Php 5.2 |
* @author Aurélien Peronnet <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version SVN: $Id: Fiche.php 152 2010-09-06 16:19:12Z jpm $ |
*/ |
class Observation extends aControleur { |
public function __construct() { |
parent::__construct(); |
$this->initialiser(); |
} |
public function initialiser() { |
} |
public function executerActionParDefaut() { |
return $this->afficherFormulaireRechercheObservation(); |
} |
public function afficherFormulaireRechercheObservation() { |
$donnees = array(); |
$formulaire = $this->getVue('formulaires/observation_recherche',$donnees); |
$this->setSortie(self::RENDU_CORPS, $formulaire); |
} |
public function afficherResultatRechercheObservation() { |
$this->setSortie(self::RENDU_CORPS, $this->getVue('listes/observation_liste', $donnees)); |
} |
// +---------------------------------------------------------------------------------------------------------------+ |
// METHODES APPELEES LORS DE LA VALIDATION D'UN FORMULAIRE |
// +---------------------------------------------------------------------------------------------------------------+ |
// METHODES DE RECHERCHE DE DONNEES |
} |
?> |
/trunk/controleurs/AppControleur.php |
---|
New file |
0,0 → 1,214 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Classe mère des controleurs de l'application. |
* Elle repartie les demandes utilisateurs dans les différents modules, executent les actions et redistribue le code |
* html dans les différentes fonctions d'affichage. |
* C'est une Singleton. |
* |
* @category PHP 5.2 |
* @package saisie |
* @author Aurélien Peronnet <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license GPL-v3 et CECILL-v2 |
* @version $Id: AppControleur.php 160 2010-09-13 13:10:41Z aurelien $ |
*/ |
class AppControleur extends Controleur { |
/** |
* Instance de la classe pointant sur elle même (pour le pattern singleton) |
*/ |
private static $instance = null; |
/** |
* Instance de l'utilisateur en cours |
*/ |
private static $utilisateur = null; |
/** |
* Paramètres |
*/ |
private static $parametres = array(); |
/** |
* Constructeur vide |
*/ |
public function __construct() { |
$sortie = array('titre' => '', 'description' => '', 'tags' => '', |
'corps' => '', 'tete' => '', 'pied' => '', 'navigation' => ''); |
$url = new Url(Config::get('url_base_index')); |
self::$parametres = array( 'module' => 'Image', |
'action' => 'executerActionParDefaut', |
'sortie' => $sortie, |
'url' => $url); |
parent::__construct(); |
} |
/** |
* Initialisation du controleur principal en fonction des paramètres de l'url. |
*/ |
public static function initialiser() { |
self::verifierCreationInstance(); |
//self::gererSession(); |
date_default_timezone_set('Europe/Paris'); |
if (isset($_GET['module'])) { |
self::$parametres['module'] = $_GET['module']; |
} |
self::$parametres['url']->setVariableRequete('module', self::$parametres['module']); |
if (isset($_GET['action'])) { |
self::$parametres['action'] = $_GET['action']; |
} |
self::$parametres['url']->setVariableRequete('action', self::$parametres['action']); |
$registre = Registre::getInstance(); |
$registre->set('parametres', &self::$parametres); |
$ClasseModule = self::$parametres['module']; |
$action = self::$parametres['action']; |
$module = new $ClasseModule(); |
$module->$action(); |
self::fusionnerSortie($module->getSortie()); |
} |
private static function gererSession() { |
if (Config::get('session_demarrage')) { |
// Attribution d'un nom à la session |
session_name(Config::get('session_nom')); |
// Démarrage de la session |
session_start(); |
} |
} |
/** |
* Fusionne un tableau de sortie par défaut avec le tableau renvoyé par l'action du module. |
* @param array le tableauàfusionner |
*/ |
private static function fusionnerSortie($sortie) { |
self::$parametres['sortie'] = array_merge(self::$parametres['sortie'], $sortie); |
} |
/** |
* Vérifie si l'instance de classe été crée, si non la crée. |
*/ |
private static function verifierCreationInstance() { |
if (empty(self::$instance)) { |
self::$instance = new AppControleur(); |
} |
} |
public static function getInstance() { |
self::verifierCreationInstance(); |
return self::$instance; |
} |
/** |
* Retourne le titre du contenu de l'application. |
*/ |
public static function getMetaTitre() { |
$sortie = self::$parametres['sortie']['titre']; |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) { |
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
/** |
* Retourne la description du contenu de l'application. |
*/ |
public static function getMetaDescription() { |
$sortie = self::$parametres['sortie']['description']; |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) { |
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
/** |
* Retourne les mots-clés (tags) du contenu de l'application. |
*/ |
public static function getMetaTags() { |
$sortie = self::$parametres['sortie']['tags']; |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) { |
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
/** |
* Retourne le contenu du corps de l'application. |
*/ |
public static function getContenuCorps() { |
$sortie = self::$parametres['sortie']['corps']; |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) { |
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
/** |
* Retourne le contenu de la tête de l'application. |
*/ |
public static function getContenuTete() { |
$sortie = self::$parametres['sortie']['tete']; |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) { |
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
/** |
* Retourne le contenu du pied de l'application. |
*/ |
public static function getContenuPied() { |
$sortie = self::$parametres['sortie']['pied']; |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) { |
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
/** |
* Retourne les éléments de navigation de l'application. |
*/ |
public static function getContenuNavigation() { |
$sortie = self::$parametres['sortie']['navigation']; |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) { |
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
/** |
* Retourne les chronos pris dans l'appli |
*/ |
public static function getChrono() { |
$sortie = ''; |
if (Config::get('chronometrage')) { |
$chrono = Chronometre::afficherChrono(); |
$sortie = mb_convert_encoding($chrono, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
/** |
* Retourne les messages d'exceptions et d'erreurs. |
*/ |
public static function getExceptions() { |
$sortie = (Config::get('fw_debogage')) ? GestionnaireException::getExceptions() : ''; |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) { |
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage')); |
} |
return $sortie; |
} |
} |
?> |
/trunk/controleurs/aControleur.php |
---|
New file |
0,0 → 1,379 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Classe Controleur générale de l'application saisie. |
* |
* @category php5.2 |
* @package saisie |
* @author Aurélien Peronnet <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version SVN: $Id: aControleur.php 152 2010-09-06 16:19:12Z aurelien $ |
*/ |
abstract class aControleur extends Controleur { |
const FMT_DATE = '%d/%m/%Y';// Supporte les formats de dates non valides (1989-00-00) |
const FMT_DATE_TXT = '%A %d %B %Y'; |
const FMT_DATE_HEURE = '%d/%m/%Y %H:%i:%s';// Supporte les formats de dates non valides (1989-00-00 00:00:00) |
const FMT_DATE_HEURE_TXT = '%A %d %B %Yà%H:%M'; |
const META_TITRE = 'titre'; |
const META_DESCRIPTION = 'description'; |
const META_TAGS = 'tags'; |
const RENDU_TETE = 'tete'; |
const RENDU_CORPS = 'corps'; |
const RENDU_PIED = 'pied'; |
const RENDU_NAVIGATION = 'navigation'; |
const TYPE_AUTRE = 'AUTRE'; |
const TYPE_TOTAL = 'TOTAL'; |
const SEPARATEUR_TYPE_VALEUR = '##'; |
const SEPARATEUR_VALEURS = ';;'; |
const SEPARATEUR_DONNEES = '||'; |
const VALEUR_NULL = 'NC'; |
private $sortie = array(); |
private $parametres = array(); |
protected static $hierarchie_appels = array(); |
// FIXME : voir s'il est plus intéressant d'utiliser une méthode dans les classes filles |
protected $url = null; |
public function __construct() { |
$registre = Registre::getInstance(); |
$this->parametres = $registre->get('parametres'); |
$this->url = $this->parametres['url']; |
parent::__construct(); |
} |
/** |
* Attribue une position de sortie à un contenu. |
*/ |
protected function setSortie($position, $contenu, $fusionner = false) { |
if ($this->verifierExistenceTypeSortie($position)) { |
if ($fusionner) { |
$this->sortie[$position] .= $contenu; |
} else { |
$this->sortie[$position] = $contenu; |
} |
} |
} |
/** |
* Vérifie l'existence du type de sortie indiqué pour son utilisation dans le tableau de sortie. |
* @param string le type de sortie à tester. |
* @return bool true si le type de sortie est valide, sinon false. |
*/ |
private function verifierExistenceTypeSortie($type) { |
$existe = true; |
if ($type != self::RENDU_TETE && |
$type != self::RENDU_NAVIGATION && |
$type != self::RENDU_CORPS && |
$type != self::RENDU_PIED && |
$type != self::META_TITRE && |
$type != self::META_DESCRIPTION && |
$type != self::META_TAGS) { |
trigger_error("Le type de sortie '$type' n'est pas une valeur prédéfinie.", E_USER_WARNING); |
$existe = false; |
} |
return $existe; |
} |
/** |
* Retourne le tableau de sortie à utiliser dans le controleur principal de l'application. |
*/ |
public function getSortie() { |
return $this->sortie; |
} |
/** |
* Execute l'action d'un module donnée et fusionne le résultat avec le tableau de sortie. |
*/ |
protected function executerAction($ClasseModule, $action) { |
$module = new $ClasseModule(); |
$module->$action(); |
$this->fusionnerSortie($module->getSortie()); |
} |
/** |
* Fusionne un tableau de sortie par défaut avec le tableau passé en paramètre. |
* @param array le tableauàfusionner |
*/ |
private function fusionnerSortie($sortie) { |
$this->sortie = array_merge($this->sortie, $sortie); |
} |
protected function formaterParenthese($chaine_a_afficher) { |
if ($chaine_a_afficher != '') { |
$chaine_a_afficher = '('.$chaine_a_afficher.')'; |
} |
return $chaine_a_afficher; |
} |
protected function formaterSautDeLigne($chaine_a_formater) { |
$txt_a_retourner = preg_replace('/\n/', '<br />', $chaine_a_formater); |
return $txt_a_retourner; |
} |
protected function formaterTableauDeTxt($tableau_de_txt, $majuscule = true, $point_final = true) { |
$chaine_a_afficher = ''; |
$taille_du_tableau = count($tableau_de_txt); |
if ($taille_du_tableau > 0) { |
$index_avt_dernier = $taille_du_tableau - 1; |
for ($i = 0; $i < $taille_du_tableau; $i++) { |
$mot = $tableau_de_txt[$i]; |
if ($i != $index_avt_dernier) { |
$chaine_a_afficher .= $mot.', '; |
} else { |
$chaine_a_afficher .= $this->nettoyerPointFinal($mot); |
if ($point_final) { |
$chaine_a_afficher .= '.'; |
} |
} |
} |
} |
if ($majuscule) { |
$chaine_a_afficher = ucfirst($chaine_a_afficher); |
} |
return $chaine_a_afficher; |
} |
protected function formaterOuiNon($chaine_a_formater) { |
$txt_a_retourner = ''; |
if ($chaine_a_formater == '0') { |
$txt_a_retourner = 'non'; |
} else if ($chaine_a_formater == '1') { |
$txt_a_retourner = 'oui'; |
} |
return $txt_a_retourner; |
} |
protected function formaterDate($date, $format = self::FMT_DATE_HEURE) { |
if ($date == '' || $date == '0000-00-00' || $date == '0000-00-00 00:00:00') { |
$date = 'Inconnue'; |
} else { |
if (preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})(?: ([0-9]{2}):([0-9]{2}):([0-9]{2})|)$/', $date, $match)) {// Date Heure |
$annee = $match[1]; |
$mois = $match[2]; |
$jour = $match[3]; |
$heure = (isset($match[4])) ? $match[4] : '00'; |
$minute = (isset($match[5])) ? $match[5] : '00'; |
$seconde = (isset($match[6])) ? $match[6] : '00'; |
if ($format == self::FMT_DATE && $jour == '00' && $mois == '00') { |
$date = $annee; |
} else if ($format == self::FMT_DATE && $jour == '00') { |
$date = strftime('%b', mktime(0, 0, 0, $mois, 1)).' '.$annee; |
} else { |
$timestamp = strtotime($date); |
if ($timestamp !== false) { |
$date = strftime($format, $timestamp); |
} |
} |
} else { |
$e = "La chaine '$date' n'est pas reconnue."; |
trigger_error($e, E_USER_WARNING); |
} |
} |
return $date; |
} |
protected function formaterCourriels($courriels) { |
$fmt_courriels = ''; |
if (!empty($courriels)) { |
$courriels = (is_array($courriels)) ? $courriels : array($courriels); |
foreach ($courriels as $cle => $courriel) { |
$courriel = preg_replace('/@/', ' [arrobase] ', $courriel); |
$courriel = preg_replace('/[.]([^.]+)$/', " [point] $1", $courriel); |
$fmt_courriels[] = $this->getVue('courriel', array('courriel' => $courriel)); |
} |
$fmt_courriels = implode(', ', $fmt_courriels); |
} |
return $fmt_courriels; |
} |
protected function nettoyerPointFinal($mot) { |
$mot = preg_replace('/[.]$/', '', $mot); |
return $mot; |
} |
protected function postraiterDonnees(&$tableau) { |
if (count($tableau) > 0) { |
foreach ($tableau as $cle => &$valeur) { |
if ($valeur == '') { |
$valeur = ' '; |
} else if (is_string($valeur)) { |
$valeur = $this->remplacerEsperluette($valeur); |
} else if (is_array($valeur)) { |
$this->postraiterDonnees($valeur); |
} |
} |
} |
} |
private function remplacerEsperluette($txt) { |
$txt = preg_replace('/&(?!([a-z]+|#[0-9]+|#x[0-9a-f]+);)/i', '&', $txt, -1); |
return $txt; |
} |
protected function chargerPiedDePage() { |
$donnees['appli'] = Application::getInfo(); |
$this->setSortie(self::RENDU_PIED, $this->getVue('pied', $donnees)); |
} |
public static function convertirPourUrl($chaine) { |
$chaine_accents_supprimes = self::supprimerAccents($chaine); |
$chaine_espace_remplaces = urlencode(str_replace(' ','%20',$chaine_accents_supprimes)); |
return $chaine_espace_remplaces; |
} |
public static function convertirChaineRequetePourMoteur($chaine) { |
$chaine_espace_remplaces = urldecode(str_replace('+', '%2B', $chaine)); |
return $chaine_espace_remplaces; |
} |
public static function convertirChaineRequetePourDao($chaine) { |
$chaine = str_replace(':', '=', $chaine); |
$chaine = str_replace(':', '=', $chaine); |
$chaine = str_replace('+', '&', $chaine); |
$chaine = str_replace(' ','%20',$chaine); |
return $chaine; |
} |
public static function convertirChaineRequeteGeneralePourDao($chaine) { |
return 'recherche='.$chaine; |
} |
public static function convertirChainelocaliteDepartementPourRequeteUrl($localite, $departement = null) { |
$chaine = 'commune:'.$localite; |
if($departement == null || $departement == 'null' || $departement == '00null') { |
$chaine += '+dept:'.$departement; |
} |
return self::convertirPourUrl($chaine); |
} |
public static function convertirChaineTaxonPourRequeteUrl($taxon) { |
if($taxon == 'null') { |
$taxon = 'indetermine'; |
} |
$chaine = 'taxon:'.self::convertirPourUrl($taxon); |
return $chaine; |
} |
public static function convertirChaineTaxonPourAffichage($taxon) { |
if($taxon == 'null') { |
$taxon = 'indetermine'; |
} |
$chaine = 'taxon:'.htmlentities($taxon); |
return $chaine; |
} |
public static function convertirChaineTaxonPourAffichageSimple($taxon) { |
if($taxon == 'null') { |
$taxon = 'indetermine'; |
} |
$chaine = htmlentities($taxon); |
return $chaine; |
} |
public static function getUrlFicheEfloreNumNom($num_nomenclatural) { |
return Config::get('url_base_fiche_eflore').$num_nomenclatural; |
} |
public static function convertirChaineAuteurPourRequeteUrl($auteur) { |
$chaine = 'auteur:'.self::convertirPourUrl($auteur); |
return $chaine; |
} |
public static function formaterChaineLocaliteDepartement($localite, $departement = null) { |
$chaine = $localite; |
if($departement != null && $departement != 'null' && $departement != '00null') { |
$chaine .= ' ('.$departement.')'; |
} |
return $chaine; |
} |
public static function formaterChaineTaxon($taxon) { |
if($taxon == 'null') { |
$taxon = 'indetermine'; |
} |
return $taxon; |
} |
public static function couperCourriel($courriel) { |
$tableau_morceaux_courriel = explode('@',$courriel); |
return $tableau_morceaux_courriel[0].'...'; |
} |
public static function supprimerAccents($str, $charset='utf-8') { |
$str = htmlentities($str, ENT_NOQUOTES, $charset); |
$str = preg_replace('#\&([A-za-z])(?:acute|cedil|circ|grave|ring|tilde|uml)\;#', '\1', $str); |
$str = preg_replace('#\&([A-za-z]{2})(?:lig)\;#', '\1', $str); // pour les ligatures e.g. 'œ' |
$str = preg_replace('#\&[^;]+\;#', '', $str); // supprime les autres caractères |
return $str; |
} |
public static function estUneRechercheGenerale($chaine_recherche) { |
return ((strpos($chaine_recherche, ':') === false) && (strlen($chaine_recherche) > 0)); |
} |
public static function construireUrlFluxRssResultatsRecherche($criteres) { |
if(self::estUneRechercheGenerale($criteres)) { |
$parametres = self::convertirChaineRequeteGeneralePourDao($criteres); |
} else { |
$parametres = self::convertirChaineRequetePourDao($criteres); |
} |
return Config::get('url_jrest').'CelSyndicationImage/MultiCriteres/rss2/M/?'.$parametres; |
} |
public static function construireIntituleResultatRecherche($criteres) { |
return 'résultats de cette recherche'; |
} |
public static function getUrlScript() { |
return Config::get('url_base').'squelettes/js/'; |
} |
public static function getUrlStyle() { |
return Config::get('url_base').'squelettes/css/'; |
} |
public static function getUrlStyleImages() { |
return Config::get('url_base').'squelettes/images/'; |
} |
public static function renvoyerInclusionStyle() { |
return SquelettePhp::analyser(Config::get('chemin_squelettes').'inclusion/script.tpl.html', array()); |
} |
public static function renvoyerInclusionScript() { |
return SquelettePhp::analyser(Config::get('chemin_squelettes').'inclusion/style.tpl.html', array()); |
} |
} |
?> |
/trunk/i18n/fr.ini |
---|
New file |
0,0 → 1,3 |
[saisie] |
station = Creation d'un nouvelle station |
espece = Création d'un nouvel individu |
/trunk/index_papyrus.php |
---|
New file |
0,0 → 1,69 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Application de consultation du CEL. |
* Fichier contenant les fonctions nécessaire pour l'insertion de l'application dans Papyrus. |
* |
* @category PHP5 |
* @package cel_consultation |
* @author Aurélien Peronnet <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license GPL-v3 et CECILL-v2 |
* @version SVN:<svn_id> |
*/ |
// Gestion des paramêtres définis dans Papyrus |
if (isset($GLOBALS['_GEN_commun']['info_application']->module) && !isset($_GET['module'])) { |
$_GET['module'] = $GLOBALS['_GEN_commun']['info_application']->module; |
} |
/** Inclusion du fichier principal de l'application*/ |
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'cel_consultation.php'; |
// +--------------------------------------------------------------------------------------------------+ |
// Remplacement de méta tags fournit par Papyrus par ceux créés dans l'appli |
if (AppControleur::getMetaTitre() != '') { |
$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = AppControleur::getMetaTitre(); |
} |
if (AppControleur::getMetaDescription() != '') { |
GEN_modifierMetaName('description', AppControleur::getMetaDescription()); |
} |
if (AppControleur::getMetaTags() != '') { |
GEN_modifierMetaName('keywords', AppControleur::getMetaTags()); |
} |
GEN_stockerFichierScript('jquery',aControleur::getUrlScript().'jquery-1.4.2.min.js'); |
GEN_stockerFichierScript('fancybox',aControleur::getUrlScript().'fancybox/jquery.fancybox-1.3.4.js'); |
GEN_stockerFichierScript('lazyload',aControleur::getUrlScript().'jquery.lazyload.js'); |
GEN_stockerFichierScript('consultation',aControleur::getUrlScript().'consultation.js'); |
GEN_stockerStyleExterne('consultation',aControleur::getUrlStyle().'cel_consultation.css'); |
GEN_stockerStyleExterne('consultation_papyrus',aControleur::getUrlStyle().'cel_consultation_papyrus.css'); |
GEN_stockerStyleExterne('fancybox',aControleur::getUrlStyle().'fancybox/jquery.fancybox-1.3.4.css'); |
// +--------------------------------------------------------------------------------------------------+ |
// Fonctions d'affichage dans Papyrus |
/** |
* Fonction d'affichage de Papyrus, pour le corps de page. |
*/ |
function afficherContenuCorps() { |
return AppControleur::getContenuCorps(); |
} |
function afficherContenuTete() { |
return AppControleur::getContenuTete(); |
} |
function afficherContenuPied() { |
return AppControleur::getContenuPied(); |
} |
function afficherContenuNavigation() { |
return AppControleur::getContenuNavigation(); |
} |
function afficherContenuMenu() { |
return ''; |
} |
?> |
/trunk/configurations/config.default.ini |
---|
New file |
0,0 → 1,61 |
; +------------------------------------------------------------------------------------------------------+ |
; Général |
; Séparateur de dossier |
ds = DIRECTORY_SEPARATOR |
; +------------------------------------------------------------------------------------------------------+ |
; Info sur l'application |
info.nom = Saisie des observations |
; Abréviation de l'application |
info.abr = SODS |
; Code numérique de la version de l'application |
info.version.code.num = "0.1" |
; Code alphabétique de la version de l'application |
info.version.code.alpha = "" |
; Nom de la version de l'application |
info.version.nom = "" |
; Version du Framework nécessaire au fonctionnement de cette application |
info.framework.version = 0.2 |
;Encodage de l'application |
appli_encodage = "UTF-8" |
; Nom de domaine pour l'URL de base de l'application : 162.38.234.9 |
domaine = "www.tela-botanica.org" |
; URL de base de l'application, si elle est laissée vide, l'application fonctionnera en Stand-alone |
url_base = "http://{ref:domaine}/client/collection/v{ref:info.version.code.num}-{ref:info.version.code.alpha}/" |
; URL de base de l'application avec l'indication du fichier de départ |
url_base_index = "{ref:url_base}index.php" |
; URL de base où se situe le .htacces réalisant la réecriture d'URL pour les permaliens de l'application |
url_base_permalien = "{ref:url_base}" |
; Mettre à true si l'application nécessite de s'identifier. |
identification = true |
; Nom de la classe à utiliser pour gérer les utilisateurs |
objet_utilisateur = DrupalUtilisateur |
; +------------------------------------------------------------------------------------------------------+ |
; Paramétrage de la session |
; Devons nous démarrer une session : oui (true) ou non (false) |
session_demarrage = "php:true" |
; Définition du nom de la session à utiliser |
session_nom = "ods_saisie" |
; +------------------------------------------------------------------------------------------------------+ |
; Débogage |
; Indique si oui ou non on veut afficher le débogage. |
fw_debogage = true |
; Indique si oui ou non on veut lancer le chronométrage |
chronometrage = false |
; +------------------------------------------------------------------------------------------------------+ |
; Spécifique à l'application |
; Url du Jrest utilisé pour les services web fournissant les données à l'application |
url_jrest = "http://www.tela-botanica.org/eflore/coel/jrest/" |
; Template d'URL pour les images de l'application |
url_img = "{ref:url_base}squelettes/img/%s" |
; Nom du fichier de l'image à utiliser pour des liens vers des cartes |
img_carte = "carte.png" |
; Template d'URL pour le lien vers une carte (Google Map ou OSM) |
; OSM : http://www.openstreetmap.org/?lat=%s&lon=%s&zoom=17 |
; GGM : http://maps.google.fr/?ll=%s,%s |
lien_vers_carte = "http://www.openstreetmap.org/?lat=%s&lon=%s&zoom=17" |
/trunk/configurations/config_papyrus.ini |
---|
New file |
0,0 → 1,4 |
;Encodage de l'application |
sortie_encodage = "ISO-8859-15" |
taille_max_vignettes = 100; |
format_image_galerie = "CXS"; |
/trunk/configurations |
---|
New file |
Property changes: |
Added: svn:ignore |
+config.ini |
/trunk/framework.defaut.php |
---|
New file |
0,0 → 1,6 |
<?php |
// Inclusion du Framework |
// Renomer ce fichier en "framework.php" |
// Indiquer ci-dessous le chemin vers le fichier autoload.inc.php de la bonne version du Framework |
require_once '/framework/0.2/autoload.inc.php'; |
?> |
/trunk/cel_consultation.php |
---|
New file |
0,0 → 1,53 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Application de consultation du cel. |
* Fichier principal d'initialisation. |
* |
* @category PHP5 |
* @package Saisie |
* @author Aurélien Peronnet <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license GPL-v3 et CECILL-v2 |
* @version $Id: collection.php 142 2010-08-30 12:41:00Z aurelien $ |
*/ |
// Autoload pour cette application |
function __autoload($nom_classe) { |
// Tableau des chemins à inclure pour trouver une classe relatif à ce fichier |
$chemins = array( |
'bibliotheque'.DS.'dao', |
'bibliotheque'.DS.'pear', |
'bibliotheque'.DS.'utilitaires', |
'composants', |
'composants'.DS.'cartographie'); |
foreach ($chemins as $chemin) { |
$fichier_a_inclure = dirname(__FILE__).DS.$chemin.DS.$nom_classe.'.php'; |
if (file_exists($fichier_a_inclure)) { |
include_once $fichier_a_inclure; |
return null; |
} |
} |
} |
// Le fichier autoload.inc.php du Framework de Tela Botanica doit être appelée avant tout autre chose dans l'application. |
// Sinon, rien ne sera chargé. |
// Chemin du fichier chargeant le framework requis |
$framework = dirname(__FILE__).'/framework.php'; |
if (!file_exists($framework)) { |
$e = "Veuillez paramétrer l'emplacement et la version du Framework dans le fichier $framework"; |
trigger_error($e, E_USER_ERROR); |
} else { |
// Inclusion du Framework |
require_once $framework; |
// Ajout d'information concernant cette application |
Application::setChemin(__FILE__);// Obligatoire |
Application::setInfo(Config::get('info')); |
// Lancement du débogage si nécessaire |
if (Config::get('chronometrage')) { |
Chronometre::chrono('Saisie.php - début'); |
} |
// Lancement de l'application |
AppControleur::initialiser(); |
} |
?> |
/trunk/bibliotheque/dao/ObservationDao.php |
---|
New file |
0,0 → 1,36 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Modèle d'accès à la base de données de saisies pour le module observation. |
* |
* @package ODS_saisie |
* @category php 5.2 |
* @author Aurélien Peronnet <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version SVN: $Id: StationDao.php 154 2010-09-13 12:15:11Z aurelien $ |
* |
*/ |
class ObservationDao extends Dao { |
const SERVICE_OBSERVATION = 'OdsObservation'; |
const METHODE_OBSERVATION_INDIVIDU= 'ObservationsPourIndividu'; |
/** |
* Retourne l'ensemble des observations d'une station. |
* |
* @param integer l'id d'une station. |
* @return array un tableau contenant les informations sur les observations de cette station. |
*/ |
public function getListeObservations($criteres) { |
$url = $this->url_jrest.self::SERVICE_OBSERVATION."/"; |
$url = $this->traiterUrlParametres($url); |
$retour = $this->envoyerRequete($url, 'GET'); |
$json = $this->envoyerRequeteConsultation($url); |
$donnees = json_decode($json, true); |
return $donnees; |
} |
} |
?> |
/trunk/bibliotheque/dao/Dao.php |
---|
New file |
0,0 → 1,227 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Classe modèle spécifique à l'application, donc d'accés au données, elle ne devrait pas être appelée de l'extérieur. |
* Elle est abstraite donc doit obligatoirement être étendue. |
* |
* @category Php5 |
* @package ODS_saisie |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version SVN: $Id$ |
*/ |
abstract class Dao { |
const ORDRE_ASCENDANT = 'ASC'; |
const ORDRE_DESCENDANT = 'DESC'; |
const HTTP_REQUETE_SEPARATEUR = '&'; |
protected $distinction = '0'; |
protected $limite_debut = null; |
protected $limite_nbre = null; |
protected $ordre = null; |
protected $url_jrest = null; |
public function __construct() { |
$this->url_jrest = Config::get('url_jrest'); |
} |
//+----------------------------------------------------------------------------------------------------------------+ |
// ACCESSEURS |
public function setDistinction($distinct) { |
$this->distinction = $distinct; |
} |
public function getDistinction() { |
return $this->distinction; |
} |
public function viderDistinction() { |
$this->distinction = null; |
} |
public function avoirLimitation() { |
$limitation = false; |
if (!is_null($this->limite_debut) && !is_null($this->limite_nbre)) { |
$limitation = true; |
} |
return $limitation; |
} |
public function setLimitation($limite_debut, $limite_nbre) { |
$this->limite_debut = $limite_debut; |
$this->limite_nbre = $limite_nbre; |
} |
public function getLimiteDebut() { |
return $this->limite_debut; |
} |
public function getLimiteNbre() { |
return $this->limite_nbre; |
} |
public function viderLimite() { |
$this->limite_debut = null; |
$this->limite_nbre = null; |
} |
public function addOrdre($champ, $trie = self::ORDRE_ASCENDANT) { |
if (!isset($this->ordre[$champ])) { |
if (self::ORDRE_ASCENDANT == $trie || self::ORDRE_DESCENDANT == $trie) { |
$this->ordre[$champ] = $trie; |
} else { |
$e = "La valeur pour le tri doit être : {self::ORDRE_ASCENDANT} ou {self::ORDRE_DESCENDANT}."; |
trigger_error($e, E_USER_WARNING); |
} |
} else { |
$e = "Le champ $champ existe déjà dans le tableau des ordres."; |
trigger_error($e, E_USER_WARNING); |
} |
} |
public function getOrdre() { |
$champs = array(); |
foreach ($this->ordre as $champ => $trie) { |
$champs[] = "$champ $trie"; |
} |
return implode(', ', $champs); |
} |
public function viderOrdre() { |
$this->ordre = null; |
} |
//+----------------------------------------------------------------------------------------------------------------+ |
// MÉTHODES |
protected function envoyerRequeteConsultation($url) { |
$url = $this->traiterUrlParametres($url); |
$retour = $this->envoyerRequete($url, 'GET'); |
return $retour; |
} |
protected function envoyerRequeteRecherche($url) { |
$url = $this->traiterUrlParametres($url); |
$retour = $this->envoyerRequete($url, 'GET'); |
return $retour; |
} |
protected function envoyerRequeteAjout($url, Array $donnees) { |
$retour = $this->envoyerRequete($url, 'PUT', $donnees); |
return $retour; |
} |
protected function envoyerRequeteModif($url, Array $donnees) { |
$retour = $this->envoyerRequete($url, 'POST', $donnees); |
return $retour; |
} |
protected function envoyerRequeteSuppression($url) { |
$retour = $this->envoyerRequete($url, 'DELETE'); |
return $retour; |
} |
private function envoyerRequete($url, $mode, Array $donnees = array()) { |
$contenu = false; |
if ($mode != 'GET' && $mode != 'PUT' && $mode != 'POST' && $mode != 'DELETE') { |
$e = "Le mode de requête '$mode' n'est pas accepté!"; |
trigger_error($e, E_USER_WARNING); |
} else { |
$contexte = stream_context_create(array( |
'http' => array( |
'method' => $mode, |
'header' => "Content-type: application/x-www-form-urlencoded\r\n", |
'content' => http_build_query($donnees, null, self::HTTP_REQUETE_SEPARATEUR)))); |
$flux = @fopen($url, 'r', false, $contexte); |
if (!$flux) { |
$this->traiterEntete($http_response_header, $url); |
$e = "L'ouverture de l'url '$url' par la méthode HTTP '$mode' a échoué!"; |
trigger_error($e, E_USER_WARNING); |
} else { |
// Informations sur les en-têtes et métadonnées du flux |
$entetes = stream_get_meta_data($flux); |
$this->traiterEntete($entetes, $url); |
// Contenu actuel de $url |
$contenu = stream_get_contents($flux); |
fclose($flux); |
} |
} |
$this->reinitialiser(); |
return $contenu; |
} |
private function traiterUrlParametres($url) { |
$parametres = array(); |
if (! is_null($this->getLimiteDebut())) { |
$parametres[] = 'start='.$this->getLimiteDebut(); |
} |
if (! is_null($this->getLimiteNbre())) { |
$parametres[] = 'limit='.$this->getLimiteNbre(); |
} |
if (! is_null($this->ordre)) { |
$parametres[] = 'orderby='.urlencode($this->getOrdre()); |
} |
if ($this->getDistinction() != 0) { |
$parametres[] = 'distinct='.$this->getDistinction(); |
} |
if (count($parametres) > 0) { |
$url_parametres = implode('&', $parametres); |
$url = $url.'?'.$url_parametres; |
} |
return $url; |
} |
private function traiterEntete($entetes, $uri) { |
$infos = $this->analyserEntete($entetes, $uri); |
$this->traiterEnteteDebug($infos); |
$this->traiterEnteteMessage($infos); |
} |
private function analyserEntete($entetes, $uri) { |
$infos = array('date' => null, 'uri' => $uri, 'debugs' => null, 'messages' => null); |
if (isset($entetes['wrapper_data'])) { |
$entetes = $entetes['wrapper_data']; |
} |
foreach ($entetes as $entete) { |
if (preg_match('/^X-DebugJrest-Data: (.+)$/', $entete, $match)) { |
$infos['debugs'] = json_decode($match[1]); |
} |
if (preg_match('/^X-MessageJrest-Data: (.+)$/', $entete, $match)) { |
$infos['messages'] = json_decode($match[1]); |
} |
if (preg_match('/^Date: .+ ([012][0-9]:[012345][0-9]:[012345][0-9]) .*$/', $entete, $match)) { |
$infos['date'] = $match[1]; |
} |
} |
return $infos; |
} |
private function traiterEnteteDebug($entetes) { |
if (isset($entetes['debugs'])) { |
$date = $entetes['date']; |
$uri = $entetes['uri']; |
$debugs = $entetes['debugs']; |
foreach ($debugs as $debug) { |
Debug::printr("DEBUG : $date - $uri :\n$debug"); |
} |
} |
} |
private function traiterEnteteMessage($entetes) { |
if (isset($entetes['messages'])) { |
$date = $entetes['date']; |
$uri = $entetes['uri']; |
$messages = $entetes['messages']; |
foreach ($messages as $message) { |
Debug::printr("MESSAGE : $date - $uri :\n$message"); |
} |
} |
} |
private function reinitialiser() { |
$this->viderDistinction(); |
$this->viderLimite(); |
$this->viderOrdre(); |
} |
} |
?> |
/trunk/bibliotheque/dao/ImageDao.php |
---|
New file |
0,0 → 1,38 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Modèle d'accès à la base de données de saisies pour le module Mages. |
* |
* @package CEL_consultation |
* @category php 5.2 |
* @author Aurélien Peronnet <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version SVN: $Id: StationDao.php 154 2010-09-13 12:15:11Z aurelien $ |
* |
*/ |
class ImageDao extends Dao { |
const SERVICE_IMAGE = 'InventoryImageListPublic'; |
const TYPE_SERVICE_TOUT = '*'; |
const TYPE_SERVICE_CRITERES = 'criteres'; |
public function getListeImage($criteres, $start = 0, $limit = 100) { |
$type_service = self::TYPE_SERVICE_CRITERES; |
if(empty($criteres)) { |
$type_service = self::TYPE_SERVICE_TOUT; |
} |
$url = $this->url_jrest.self::SERVICE_IMAGE.'/'.$type_service.'/?'.$criteres.'&start='.$start.'&limit='.$limit; |
$json = $this->envoyerRequeteConsultation($url); |
$donnees = json_decode($json, true); |
return $donnees; |
} |
} |
?> |