r87510 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87509‎ | r87510 | r87511 >
Date:21:18, 5 May 2011
Author:faurethomas
Status:deferred (Comments)
Tags:
Comment:
added WikiTweet extension
Modified paths:
  • /branches/REL1_16/extensions/WikiTweet (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/WikiTweet.config.php (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/WikiTweet.i18n.php (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/WikiTweet.js (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/WikiTweet.php (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/WikiTweet2.js (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/create_tables.sql (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/deletetweet.php (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/gettweets.php (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/images (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/images/ajax-loader-mini.gif (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/images/answer.png (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/images/default_avatar.png (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/images/lock-small.png (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/jquery.js (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/subscribe.php (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/tweetmail.php (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/unsubscribe.php (added) (history)
  • /branches/REL1_16/extensions/WikiTweet/updatetweet.php (added) (history)

Diff [purge]

Index: branches/REL1_16/extensions/WikiTweet/WikiTweet.i18n.php
@@ -0,0 +1,51 @@
 2+<?php
 3+/**
 4+ * Internationalisation file for WikiTweet extension.
 5+ *
 6+ * @addtogroup Extensions
 7+ */
 8+
 9+$messages = array();
 10+
 11+$messages['en'] = array(
 12+ 'wikitweet-name' => 'MorphoTweets',
 13+ 'wikitweet-pleaselogin' => 'Please login to tweet.',
 14+ 'wikitweet-moretweets' => 'More tweets...',
 15+ 'wikitweet-infoajax' => 'uses the AJAX techno and refresh itself every 5 seconds without loading the page.',
 16+ 'wikitweet-submit' => 'Tweet',
 17+ 'wikitweet-submitandmail' => 'Tweet and mail',
 18+ 'wikitweet-intheroom' => 'You are in the room ',
 19+ 'wikitweet-subscribe' => 'suscribe',
 20+ 'wikitweet-subscribed' => 'suscribed',
 21+ 'wikitweet-unsubscribe' => 'unsuscribe',
 22+ 'wikitweet-delete' => 'delete',
 23+ 'wikitweet-inform' => 'by the Informer',
 24+ 'wikitweet-private' => 'private',
 25+ 'wikitweet-answer' => 'answer to',
 26+ 'wikitweet-anonymous' => 'anonymous',
 27+ 'wikitweet-tweets-tagged' => 'Tweets tagged',
 28+ 'wikitweet-back-timeline' => 'Back to the timeline',
 29+ 'wikitweet-tweets-from-room' => 'Tweets from room',
 30+);
 31+/** French (France)
 32+ */
 33+$messages['fr'] = array(
 34+ 'wikitweet-name' => 'MorphoTweets',
 35+ 'wikitweet-pleaselogin' => 'Veuillez vous connecter pour tweeter.',
 36+ 'wikitweet-moretweets' => 'Plus de tweets...',
 37+ 'wikitweet-infoajax' => 'utilise la technologie ajax et se rafra&icirc;chit automatiquement toutes les 5 secondes sans recharger la page.',
 38+ 'wikitweet-submit' => 'Tweeter',
 39+ 'wikitweet-submitandmail' => 'Tweeter et pr&eacute;venir',
 40+ 'wikitweet-intheroom' => 'Vous &ecirc;tes dans la room ',
 41+ 'wikitweet-subscribe' => 's\'abonner',
 42+ 'wikitweet-subscribed' => 'abonn�',
 43+ 'wikitweet-unsubscribe' => 'se d&eacute;sabonner',
 44+ 'wikitweet-delete' => 'supprimer',
 45+ 'wikitweet-inform' => 'via l\'Informateur',
 46+ 'wikitweet-private' => 'priv&eacute;',
 47+ 'wikitweet-answer' => 'R&eacute;pondre &agrave;',
 48+ 'wikitweet-anonymous' => 'anonyme',
 49+ 'wikitweet-tweets-tagged' => 'Tweets tagg&eacute;s',
 50+ 'wikitweet-back-timeline' => 'Retour au flux',
 51+ 'wikitweet-tweets-from-room' => 'Tweets de la room',
 52+);
Property changes on: branches/REL1_16/extensions/WikiTweet/WikiTweet.i18n.php
___________________________________________________________________
Added: svn:eol-style
153 + native
Index: branches/REL1_16/extensions/WikiTweet/deletetweet.php
@@ -0,0 +1,15 @@
 2+<?php
 3+if( !defined( 'MEDIAWIKI' ) ) {
 4+ echo( "This file is an extension to the MediaWiki software "
 5+ . "and cannot be used standalone.\n" );
 6+ die( -1 );
 7+}
 8+function fnDelTweetAjax($id){
 9+ include('WikiTweet.config.php');
 10+ global $wgDBprefix;
 11+ $dbr =& wfGetDB( DB_SLAVE );
 12+ $dbr->update('wikitweet',array('`show`' => 0),array('id' => $id));
 13+ $o__response = new AjaxResponse('ok');
 14+ return $o__response;
 15+}
 16+?>
Property changes on: branches/REL1_16/extensions/WikiTweet/deletetweet.php
___________________________________________________________________
Added: svn:eol-style
117 + native
Index: branches/REL1_16/extensions/WikiTweet/gettweets.php
@@ -0,0 +1,182 @@
 2+<?php
 3+if( !defined( 'MEDIAWIKI' ) ) {
 4+ echo( "This file is an extension to the MediaWiki software "
 5+ . "and cannot be used standalone.\n" );
 6+ die( -1 );
 7+}
 8+function fnGetTweetsAjax($rows,$room,$user,$size='normal',$tag='',$other_room='')
 9+{
 10+ global $wgDBprefix , $wgScriptPath , $wgLanguageCode;
 11+ include('WikiTweet.config.php');
 12+ include('WikiTweet.i18n.php');
 13+
 14+ $width = "88%";
 15+
 16+ $line_height = $wgWikiTweet['size'][$size]['line_height'];
 17+ $font_size = $wgWikiTweet['size'][$size]['font_size'];
 18+ $avatar_size = $wgWikiTweet['size'][$size]['avatar_size'];
 19+ $span_avatar_width = $wgWikiTweet['size'][$size]['span_avatar_width'];
 20+ $paddingli = $wgWikiTweet['size'][$size]['paddingli'];
 21+ $margin_left = $wgWikiTweet['size'][$size]['margin_left'];
 22+
 23+ $text = "<ol style = ' list-style-image: none;
 24+ list-style-position: outside;
 25+ list-style-type: none;
 26+ margin-left:$margin_left;'>";
 27+
 28+ $dbr =& wfGetDB( DB_SLAVE );
 29+
 30+
 31+ $sql_rooms = ($room == '' or $room == 'main') ? "`room`='' OR `room`='main'" : "`room`='$room'";
 32+ $res1 = $dbr->select( 'wikitweet_subscription' , '*' , "user='" . mysql_real_escape_string( $user ) . "' " );
 33+ $sql_subscriptions = "";
 34+ while($row1 = $dbr->fetchObject($res1))
 35+ {
 36+ $link = $row1->link;
 37+ $type = $row1->type;
 38+ $sql_subscriptions .= " OR `$type`='$link'";
 39+ }
 40+
 41+ if($tag!=''){
 42+ $res = $dbr->select(
 43+ 'wikitweet' ,
 44+ '*' ,
 45+ "`text` like '%$tag%' AND (`show`=1 OR (`show`=2 AND (`text` like '%@$user%' OR `user`='$user')))",
 46+ __METHOD__ ,
 47+ array("ORDER BY" =>" `date` DESC", "LIMIT" => $rows));
 48+ $text .= "<h2>".$messages[$language]['wikitweet-tweets-tagged']." <a>#$tag</a></h2>";
 49+ $text .= "<p><a class='handmouse timeline'>".$messages[$language]['wikitweet-back-timeline']."...</a></p>";
 50+ }
 51+ elseif($other_room!=''){
 52+ $res = $dbr->select(
 53+ 'wikitweet' ,
 54+ '*' ,
 55+ "`room`='$other_room' AND (`show`=1 OR (`show`=2 AND (`text` like '%@$user%' OR `user`='$user')))",
 56+ __METHOD__ ,
 57+ array("ORDER BY" =>" `date` DESC", "LIMIT" => $rows));
 58+ $text .= "<h2>".$messages[$wgLanguageCode]['wikitweet-tweets-from-room']." \"<a>$other_room</a>\"</h2>";
 59+ $text .= "<p><a class='handmouse timeline'>".$messages[$wgLanguageCode]['wikitweet-back-timeline']."...</a></p>";
 60+
 61+ }
 62+ else{
 63+ $res = $dbr->select(
 64+ 'wikitweet' ,
 65+ '*' ,
 66+ "(($sql_rooms $sql_subscriptions )AND `show`=1) OR (`show`=2 AND (`text` like '%@$user%' OR `user`='$user'))",
 67+ __METHOD__ ,
 68+ array("ORDER BY" =>" `date` DESC", "LIMIT" => $rows));
 69+ }
 70+
 71+ while( $row = $dbr->fetchObject( $res ) )
 72+ {
 73+ // Pull out the fields
 74+ $id = $row->id;
 75+ $twext = $row->text;
 76+ $tweetuser = mysql_real_escape_string($row->user);
 77+ $date = $row->date;
 78+ $tweet_room = $row->room;
 79+ $show = $row->show;
 80+ $background_color = "#FFF";
 81+ $viaroom = "";
 82+ $private = "";
 83+ if ( $tweet_room != $room ) {
 84+ $background_color = "#EFEFEF";
 85+ $viaroom = "- via room <a class='handmouse room' value='$tweet_room'>$tweet_room</a>";
 86+ }
 87+ if ( $show == 2 ) {
 88+ $background_color = "#C6DEFE";
 89+ $private = "<img src='$wgScriptPath/Extensions/WikiTweet/images/lock-small.png' />";
 90+ }
 91+
 92+ $dateSrc = $date.' GMT';
 93+ // TODO : "x hours ago, today, etc"
 94+ $date_to_display = date('H:i, F jS', strtotime($dateSrc));
 95+
 96+ $res2 = $dbr->select('wikitweet_avatar','avatar',"`user`='".mysql_real_escape_string($tweetuser)."' ",__METHOD__,false);
 97+ $row2 = $dbr->fetchObject ( $res2 );
 98+ $avatar = (count($row2)>0) ? $row2->avatar : '';
 99+
 100+ $conversion_tab = array(
 101+ "/\>(\S*)/is" => "><a href='$wgScriptPath/index.php/$1'>$1</a>",
 102+ "/\@(\S*)/is" => "@<a href='$wgScriptPath/index.php/User:$1'>$1</a>", // TODO en anglais
 103+ "/\#(\S*)/is" => "<a class='handmouse tag' value='$1'>#$1</a>",
 104+ "/http(\S*)/is" => "<a href='http$1' target='_blank'>http$1</a>",
 105+ "/ www(\S*)/is" => " <a href='http://www$1' target='_blank'>www$1</a>",
 106+ );
 107+ $twext = preg_replace(array_keys($conversion_tab), array_values($conversion_tab), $twext);
 108+ $user_subscribe_text = "";
 109+ $unsubscribe_string = $messages[$wgLanguageCode]['wikitweet-unsubscribe'];
 110+ $subscribe_string = $messages[$wgLanguageCode]['wikitweet-subscribe'];
 111+ $delete_string = $messages[$wgLanguageCode]['wikitweet-delete'];
 112+ $answer_string = $messages[$wgLanguageCode]['wikitweet-answer'];
 113+ $tweetuserclas = str_replace(".","__dot__",$tweetuser);
 114+ $delete_tweet = "";
 115+ $answer = "";
 116+ if($tweetuser!=$user){
 117+ $form_user = "<form style='display:none;'><input type=hidden value='$tweetuser' name='tweetuser' /></form>";
 118+ $user_subscribe_text = "- <a class='handmouse user_subscribe subscribe$tweetuserclas' id='user_subscribe' style='color:#999;display:none;'>$subscribe_string<span id='tweetuser' style='display:none'>$tweetuser</span>$form_user</a><a style='color:#999;' class='handmouse user_unsubscribe unsubscribe$tweetuserclas'>$unsubscribe_string<span id='tweetuser' style='display:none'>$tweetuser</span>$form_user</a>";
 119+ $res3 = $dbr->select('wikitweet_subscription','*',array(
 120+ "`user`='".mysql_real_escape_string($user)."' ",
 121+ "`link`='".mysql_real_escape_string($tweetuser)."' ",
 122+ "`type`='user'",
 123+ ));
 124+ if ( $dbr->numRows($res3) == 0 ) {
 125+ $user_subscribe_text = "- <a style='color:#999;' class='handmouse user_subscribe subscribe$tweetuserclas'>$subscribe_string<span id='tweetuser' style='display:none'>$tweetuser</span>$form_user</a><a class='handmouse user_unsubscribe unsubscribe$tweetuserclas' style='color:#999;display:none;'>$unsubscribe_string<span id='tweetuser' style='display:none'>$tweetuser</span>$form_user</a>";
 126+ }
 127+ $answer = "- <span class='answer' style='cursor:pointer;'><img src='$wgScriptPath/extensions/WikiTweet/images/answer.png'/> $answer_string $tweetuser</span>";
 128+ }
 129+ if((in_array($user, $wgWikiTweet['informers']) and $tweetuser == $wgWikiTweet['informuser']) or $tweetuser==$user or in_array($user, $wgWikiTweet['admin'])){
 130+ $delete_tweet = " - <a class='handmouse delete_tweet' style='color:#999;'>$delete_string<span style='display:none'>$id</span></a>";
 131+ }
 132+ $text .= "<li class='tweet_li' id='$id' user='$tweetuser'
 133+ style = ' display: list-item;
 134+ margin:0;
 135+ line-height: $line_height;
 136+ padding: $paddingli;
 137+ position:relative;
 138+ background-color:$background_color;
 139+ border:3px solid #FFF;
 140+ border-bottom:1px solid #CCC;
 141+ '>
 142+ <span style = ' display:block;
 143+ height: $span_avatar_width;
 144+ left: 0;
 145+ margin: 0 10px 0 0;
 146+ overflow: hidden;
 147+ position: absolute;
 148+ width:$span_avatar_width;
 149+ z-index: 10;
 150+ /*border-bottom:1px solid #CCC;*/
 151+ '>
 152+ <a href='$wgScriptPath/index.php/User:$tweetuser'>
 153+ <img src= '$avatar' width=$avatar_size height=$avatar_size alt='$tweetuser' border=0/>
 154+ </a>
 155+ </span>
 156+ <span style = ' display: block;
 157+ margin-left: 56px;
 158+ min-height: ".$avatar_size."px;
 159+ overflow: hidden;
 160+ width:$width ;
 161+ line-height: $line_height;
 162+ font-size:$font_size;
 163+ /*border-bottom:1px solid #CCC;*/
 164+ '>
 165+
 166+ <span style = ' line-height: $line_height;
 167+ font-size:$font_size;'>
 168+ <b>
 169+ <a href='$wgScriptPath/index.php/User:$tweetuser'>$tweetuser</a>
 170+ </b>
 171+ $twext<br/>
 172+ <small style='color:#999;'>$date_to_display $viaroom <span id='id_user_subscribe'>$user_subscribe_text</span><span id='tempimg2'></span>$delete_tweet $private $answer</small>
 173+ </span>
 174+ </span>
 175+ </li>";
 176+ }
 177+ $text .= '<script type="text/javascript" src="'.$wgScriptPath.'/extensions/WikiTweet/WikiTweet2.js"></script>';
 178+ $text .= "</ol>";
 179+
 180+ $o__response = new AjaxResponse($text);
 181+ return $o__response;
 182+}
 183+?>
Property changes on: branches/REL1_16/extensions/WikiTweet/gettweets.php
___________________________________________________________________
Added: svn:eol-style
1184 + native
Index: branches/REL1_16/extensions/WikiTweet/tweetmail.php
@@ -0,0 +1,57 @@
 2+<?php
 3+function sendWithPear($mailer, $dest, $headers, $body)
 4+ {
 5+ $mailResult = $mailer->send($dest, $headers, $body);
 6+ if( PEAR::isError( $mailResult ) ) {
 7+ return $mailResult->getMessage();
 8+ } else {
 9+ return true;
 10+ }
 11+ }
 12+function send( $to, $from, $subject, $body, $replyto=null ) {
 13+ $wgOutputEncoding = 'UTF-8';
 14+ $wgEnotifImpersonal = false;
 15+ $wgErrorString = '';
 16+ $wgEnotifMaxRecips=500;
 17+ include('WikiTweet.config.php');
 18+ if (is_array( $wgWikiTweet )) {
 19+ require_once( 'Mail.php' );
 20+ $msgid = str_replace(" ", "_", microtime());
 21+ if (function_exists('posix_getpid'))
 22+ $msgid .= '.' . posix_getpid();
 23+ if (is_array($to)) {
 24+ $dest = array();
 25+ foreach ($to as $u)
 26+ $dest[] = $u;
 27+ } else
 28+ $dest = $to;
 29+ $headers['From'] = $from;
 30+ if ($wgEnotifImpersonal)
 31+ $headers['To'] = 'undisclosed-recipients:;';
 32+ else
 33+ $headers['To'] = $to;
 34+ if ( $replyto ) {
 35+ $headers['Reply-To'] = $replyto->toString();
 36+ }
 37+ $headers['Subject'] = $subject;
 38+ $headers['Date'] = date( 'r' );
 39+ $headers['MIME-Version'] = '1.0';
 40+ $headers['Content-type'] = 'text/plain; charset='.$wgOutputEncoding;
 41+ $headers['Content-transfer-encoding'] = '8bit';
 42+ $headers['Message-ID'] = "<$msgid@" . $wgWikiTweet['SMTP']['IDHost'] . '>'; // FIXME
 43+ $headers['X-Mailer'] = 'MediaWiki mailer';
 44+ // Create the mail object using the Mail::factory method
 45+ $mail_object =& Mail::factory('smtp', $wgWikiTweet['SMTP']);
 46+ if( PEAR::isError( $mail_object ) ) {
 47+ wfDebug( "PEAR::Mail factory failed: " . $mail_object->getMessage() . "\n" );
 48+ return new WikiError( $mail_object->getMessage() );
 49+ }
 50+ $chunks = array_chunk( (array)$dest, $wgEnotifMaxRecips );
 51+ foreach ($chunks as $chunk) {
 52+ $e = sendWithPear($mail_object, $chunk, $headers, $body);
 53+ if( $e != true)
 54+ return $e;
 55+ }
 56+ }
 57+ }
 58+?>
\ No newline at end of file
Property changes on: branches/REL1_16/extensions/WikiTweet/tweetmail.php
___________________________________________________________________
Added: svn:eol-style
159 + native
Index: branches/REL1_16/extensions/WikiTweet/updatetweet.php
@@ -0,0 +1,76 @@
 2+<?php
 3+if( !defined( 'MEDIAWIKI' ) ) {
 4+ echo( "This file is an extension to the MediaWiki software "
 5+ . "and cannot be used standalone.\n" );
 6+ die( -1 );
 7+}
 8+function fnUpdateTweetAjax($status, $user, $room, $tomail) {
 9+ $text = '';
 10+ include('WikiTweet.config.php');
 11+ $show = ($tomail==2) ? 2 : 1;
 12+ global $wgDBprefix, $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname;
 13+ $db = mysql_connect($wgDBserver, $wgDBuser, $wgDBpassword);
 14+ mysql_select_db($wgDBname,$db);
 15+
 16+ $dbr =& wfGetDB( DB_SLAVE );
 17+ $dbr->insert('wikitweet',array(
 18+ '`id`' => '' ,
 19+ '`text`' => $status ,
 20+ '`user`' => $user ,
 21+ '`room`' => $room ,
 22+ '`show`' => $show
 23+ ));
 24+
 25+ $dest=array();
 26+ $user_email = $wgWikiTweet['wikimail'];
 27+ include('tweetmail.php');
 28+ if($tomail==1 or $tomail==2){
 29+ $res = $dbr->select('user','user_email',"user_name = '$user' ");
 30+ if ($dbr->numRows($res) > 0){
 31+ $row = $dbr->fetchObject($res);
 32+ $user_email = $row->user_email;
 33+ if ($user_email!=''){
 34+ $status_array = split("@",$status);
 35+ $i = -1;
 36+
 37+ foreach($status_array as $values){
 38+ $i += 1;
 39+ if ($i>0){
 40+ $values_array = split(" ",$values);
 41+ $username = $values_array[0];
 42+ $res2 = $dbr->select('user','user_email',"user_name = '$username' ");
 43+ if ($dbr->numRows($res2) > 0){
 44+ $row2 = $dbr->fetchObject($res2);
 45+ $useremail = $row2->user_email;
 46+ if ($useremail!='')
 47+ array_push($dest,$useremail);
 48+ }
 49+ }
 50+ }
 51+ }
 52+ }
 53+ }
 54+ // r�cup�ration des abonn�s pour envoi de mail (abonn�s user ou abonn�s room)
 55+ $sql1 = "SELECT DISTINCT {$wgDBprefix}user.user_email FROM {$wgDBprefix}user,{$wgDBprefix}wikitweet_subscription wt WHERE wt.user={$wgDBprefix}user.user_name AND ((wt.link = '$room' AND wt.type='room') or (wt.link='$user' AND wt.type='user')) AND wt.user!='$user' ;";
 56+ $req1 = mysql_query($sql1) or die('Error SQL !');
 57+ // TODO
 58+
 59+ while($row1 = mysql_fetch_assoc($req1)){
 60+ $useremail = $row1['user_email'];
 61+ array_push($dest,$useremail);
 62+ $text .= $useremail.'---';
 63+ }
 64+ $lenlist = 0;
 65+ foreach($dest as $destmail){
 66+ $lenlist += strlen($destmail);
 67+ }
 68+ if($lenlist>0){
 69+ send( $dest, $user_email, "A new tweet for or about you !", $status);
 70+ $text .= 'mail sent';
 71+ }
 72+
 73+ mysql_close();
 74+ $o__response = new AjaxResponse($text);
 75+ return $o__response;
 76+}
 77+?>
Property changes on: branches/REL1_16/extensions/WikiTweet/updatetweet.php
___________________________________________________________________
Added: svn:eol-style
178 + native
Index: branches/REL1_16/extensions/WikiTweet/WikiTweet.php
@@ -0,0 +1,246 @@
 2+<?php
 3+/**
 4+ * Parser hook extension adds a <wiki-tweet> tag to wiki markup. The
 5+ * following attributes are used:
 6+ * class = The CSS class to assign to the outer div, defaults
 7+ * to "wiki-tweet"
 8+ *
 9+ * There is also a parser function that uses {{#wiki-tweet:rows}}
 10+ * with optional parameters being includes as "|param=value".
 11+ *
 12+ * @addtogroup Extensions
 13+ * @author Thomas FAUR� <faure.thomas@gmail.com> @whiblog
 14+ * @copyright � 2010 Thomas FAUR�
 15+ * @licence GNU General Public Licence 3.0
 16+ */
 17+
 18+// Make sure we are being properly
 19+if( !defined( 'MEDIAWIKI' ) ) {
 20+ echo( "This file is an extension to the MediaWiki software "
 21+ . "and cannot be used standalone.\n" );
 22+ die( -1 );
 23+}
 24+
 25+## Abort if AJAX is not enabled
 26+if ( !$wgUseAjax ) {
 27+ trigger_error( 'WikiTweet: please enable $wgUseAjax.', E_USER_WARNING );
 28+ return;
 29+}
 30+
 31+// Hook up into MediaWiki
 32+$wgExtensionFunctions[] = 'wikiTweeter';
 33+$wgHooks['LanguageGetMagic'][] = 'wikiTweeterMagic';
 34+$wgExtensionCredits['parserhook'][] = array(
 35+ 'name' => 'WikiTweet',
 36+ 'author' => 'Thomas Faur&eacute;',
 37+ 'description' => 'Create a twitter-like feed into MediaWiki',
 38+ 'url' => 'http://blog.whibe.com/',
 39+ 'version' => '0.5.0'
 40+);
 41+
 42+$dir = dirname(__FILE__) . '/';
 43+$wgExtensionMessagesFiles['WikiTweet'] = $dir . 'WikiTweet.i18n.php';
 44+
 45+# Register Ajax functions to be called from Javascript file
 46+$wgAjaxExportList[] = 'fnGetTweetsAjax' ;
 47+$wgAjaxExportList[] = 'fnUpdateTweetAjax';
 48+$wgAjaxExportList[] = 'fnSubscribeAjax' ;
 49+$wgAjaxExportList[] = 'fnUnsubscribeAjax';
 50+$wgAjaxExportList[] = 'fnDelTweetAjax';
 51+
 52+require_once( 'gettweets.php' );
 53+require_once( 'updatetweet.php' );
 54+require_once( 'subscribe.php' );
 55+require_once( 'deletetweet.php' );
 56+
 57+function wikiTweeter()
 58+{
 59+ global $wgExtensionMessagesFiles, $wgParser, $wgMessageCache;
 60+ // Set the hooks
 61+ $wgParser->setHook('wiki-tweet', 'wikiTweeterRender');
 62+ $wgParser->setFunctionHook('wiki-tweet', 'wikiTweeterFunction');
 63+ // Set our messages
 64+ $wgMessageCache->addMessages( array('wikiTweeter_cannotparse'=> 'wikiTweeter: Cannot parse parameter: '));
 65+ // loading extension messages
 66+ require_once($wgExtensionMessagesFiles['WikiTweet']);
 67+ $wgMessageCache->addMessagesByLang($messages);
 68+}
 69+
 70+// This manipulates the results of the wikiTweeter extension
 71+// into the same function as the <wiki-tweet> tag.
 72+function wikiTweeterFunction($parser)
 73+{
 74+ // Get the arguments
 75+ $fargs = func_get_args();
 76+ $input = array_shift($fargs);
 77+
 78+ // The first category is required
 79+ $rows = array_shift($fargs);
 80+ $params = array();
 81+ $params["rows"] = $rows;
 82+ $params["donotparse"] = 1;
 83+
 84+ // Split the rest of the arguments
 85+ foreach ($fargs as $parm)
 86+ {
 87+ // Split it into its components
 88+ $split = split("=", $parm);
 89+ if (!$split[1])
 90+ {
 91+ return htmlspecialchars(wfMsg(
 92+ 'wikiTweeter_cannotparse')
 93+ . $parm);
 94+ }
 95+ // Save it
 96+ $params[$split[0]] = $split[1];
 97+ }
 98+
 99+ // Return the cloud
 100+ return wikiTweeterRender($input, $params, $parser);
 101+}
 102+
 103+// Sets up the magic for the parser functions
 104+function wikiTweeterMagic(&$magicWords, $langCode)
 105+{
 106+ $magicWords['wiki-tweet'] = array(0, 'wiki-tweet');
 107+ return true;
 108+}
 109+
 110+// The actual processing
 111+function wikiTweeterRender($input, $args, $parser)
 112+{
 113+ // Imports
 114+ global $wgOut;
 115+ global $wgUser;
 116+ global $ableToTweet;
 117+ include("WikiTweet.config.php");
 118+ global $wgScriptPath;
 119+ global $wgDBprefix;
 120+ // Profiling
 121+ wfProfileIn('wikiTweeter::Render');
 122+
 123+ // Disable the cache, otherwise the cloud will only update
 124+ // itself when a user edits and saves the page.
 125+ $parser->disableCache();
 126+
 127+ $dbr =& wfGetDB( DB_SLAVE );
 128+ $res = $dbr->select('wikitweet','distinct(`user`)',false,__METHOD__,false);
 129+
 130+ $avatarlist = '';
 131+ while ($row = $dbr->fetchObject($res))
 132+ {
 133+ // Pull out the fields
 134+ $user = $row->user;
 135+ // determine AVATAR path
 136+ $avatar_parse = $parser->parse("[[image:$user.png]]",$parser->mTitle, $parser->mOptions,true, false)->getText();
 137+ $avatar = '';
 138+ if (strstr($avatar_parse, 'src') == ''){
 139+ $avatar_parse = $parser->parse("[[image:$user.jpg]]",$parser->mTitle, $parser->mOptions,true, false)->getText();
 140+ }
 141+ if (strstr($avatar_parse, 'src') == ''){
 142+ //$avatar_parse = $parser->parse("[[image:Default.tweet.png]]",$parser->mTitle, $parser->mOptions,true, false)->getText();
 143+ $avatar_parse = 'src="'.$wgScriptPath.'/extensions/WikiTweet/images/default_avatar.png"';
 144+ }
 145+ if (strstr($avatar_parse, 'src') != ''){
 146+ $pos_src = strpos($avatar_parse,'src');
 147+ $avatar = substr($avatar_parse,$pos_src+5);
 148+ $pos_guill = strpos($avatar,'"');
 149+ $avatar = substr($avatar,0,$pos_guill);
 150+ }
 151+ // Check Avatar table
 152+ $res2 = $dbr->select('wikitweet_avatar','*',"user='".mysql_real_escape_string($user)."' ",__METHOD__,false);
 153+ if ($dbr->numRows( $res2 ) == 0){
 154+ $res4 = $dbr->insert('wikitweet_avatar',array('`id`'=>'','`user`'=>$user,'`avatar`'=>$avatar));
 155+ }
 156+ else {
 157+ $res5 = $dbr->update('wikitweet_avatar',array('avatar'=>$avatar),array('user'=>mysql_real_escape_string($user)));
 158+ }
 159+ }
 160+ $class = ($args["class"]) ? $args["class"] : "wiki-tweets";
 161+ $size = ($args["size"]) ? $args["size"] : "normal" ;
 162+ $rows = ($args["rows"]) ? $args["rows"] : "10" ;
 163+ $room = ($args["room"]) ? $args["room"] : "main" ;
 164+
 165+
 166+ $text = "<style type='text/css'>
 167+ .handmouse {
 168+ cursor:pointer;
 169+ }
 170+ </style>";
 171+
 172+ $text .= "<div class='$class'";
 173+
 174+ if ($args["style"])
 175+ $text .= " style='" . $args["style"]. "'";
 176+ $text .= ">";
 177+
 178+ $room_subscribe_text = "<a id='room_subscribe' class='handmouse' style='display:none;'>".wfMsg('wikitweet-subscribe')."</a><a id='room_unsubscribe' class='handmouse'>".wfMsg('wikitweet-unsubscribe')."</a>";
 179+ if($room!='main'){
 180+ $res6 = $dbr->select(
 181+ 'wikitweet_subscription',
 182+ '*',
 183+ array(
 184+ "user='".mysql_real_escape_string($wgUser->getName())."' ",
 185+ "link='".mysql_real_escape_string($room)."' ",
 186+ "type='room' "
 187+ ),
 188+ __METHOD__,false
 189+ );
 190+ if ($dbr->numRows( $res6 ) == 0){
 191+ $room_subscribe_text = "<a id='room_subscribe' class='handmouse'>".wfMsg('wikitweet-subscribe')."</a><a id='room_unsubscribe' style='display:none;' class='handmouse'>".wfMsg('wikitweet-unsubscribe')."</a>";
 192+ }
 193+ $text .= "<p>".wfMsg('wikitweet-intheroom')." <b>$room</b> (<span id='id_room_subscribe'>$room_subscribe_text<span id='tempimg'></span></span>)</p>";
 194+ }
 195+
 196+ $text .= '<form id="status_update_form">';
 197+
 198+ if ($wgUser->isLoggedIn() or $wgWikiTweet['allowDisconnected']){
 199+ $text .= '
 200+ <table width=100%>
 201+ <tr><td width=95%>
 202+ <textarea tabindex="1" autocomplete="off" accesskey="u" name="status" id="status" rows="2" cols="40"></textarea>
 203+ </td>
 204+ <td width=5%>
 205+ <div id="stringlength"><span>140</span></div>
 206+ </td></tr>
 207+ </table>
 208+ <INPUT TYPE=submit NAME=submit VALUE="'.wfMsg('wikitweet-submit').'" onclick="return false"/>';
 209+ if($wgWikiTweet['allowAnonymous']){
 210+ $text .= '<INPUT TYPE=submit NAME=submitanonymously VALUE="'.wfMsg('wikitweet-anonymous').'" onclick="return false" style="font-size:0.8em;" />';
 211+ }
 212+ if (in_array($wgUser->getName(), $wgWikiTweet['informers']))
 213+ {
 214+ $text .= '<INPUT TYPE=submit NAME=submitbyinformer VALUE="'.wfMsg('wikitweet-inform').'" onclick="return false" style="font-size:0.8em;" />';
 215+ }
 216+ $text .= '<INPUT TYPE=submit NAME=submitandmail VALUE="'.wfMsg('wikitweet-submitandmail').'" onclick="return false" style="display:none;font-size:0.8em;"/>';
 217+ $text .= '<INPUT TYPE=submit NAME=submitprivate VALUE="'.wfMsg('wikitweet-private').'" onclick="return false" style="display:none;font-size:0.8em;"/>
 218+ <img id ="img_loader" src="'.$wgScriptPath.'/extensions/WikiTweet/images/ajax-loader-mini.gif" style ="padding: 0 5px 0 5px;display:none;"/>
 219+ ';
 220+ }
 221+ else{
 222+ $text.="<p>".wfMsg('wikitweet-pleaselogin')."</p>";
 223+ }
 224+ $text .= '<input type=hidden value="'.$wgUser->getName().'" name="user"/>
 225+ <input type=hidden value="'.$size.'" name="size"/>
 226+ <input type=hidden value="'.$rows.'" name="rows"/>
 227+ <input type=hidden value="'.$room.'" name="room"/>
 228+ </form>';
 229+ $text .= '<script type="text/javascript" src="'.$wgScriptPath.'/extensions/WikiTweet/jquery.js"></script>';
 230+ $text .= '<script type="text/javascript">wgScriptPath = "'.$wgScriptPath.'";</script>';
 231+ $text .= '<script type="text/javascript">var refreshTime='.$wgWikiTweet['refreshTime'].';</script>';
 232+ $text .= '<script type="text/javascript">var InformerUser="'.$wgWikiTweet['informuser'].'";</script>';
 233+ $text .= '<script type="text/javascript">var AnonymousUser="'.$wgWikiTweet['AnonymousUser'].'";</script>';
 234+ $text .= '<script type="text/javascript" src="'.$wgScriptPath.'/extensions/WikiTweet/WikiTweet.js"></script>';
 235+ $text .= '<script type="text/javascript" src="'.$wgScriptPath.'/extensions/WikiTweet/WikiTweet2.js"></script>';
 236+ $text .= "<br/>\n";
 237+ $text .= "<a href = '$wgScriptPath/index.php/".wfMsg('wikitweet-name')."'>".wfMsg('wikitweet-moretweets')."</a><br/>\n";
 238+ $text .= "<div id='lasttweets'>\n";
 239+ $text .= "</div>\n";
 240+ $text .= "<a href = '$wgScriptPath/index.php/".wfMsg('wikitweet-name')."'>".wfMsg('wikitweet-name')."</a> ".wfMsg('wikitweet-infoajax')."<br/>\n";
 241+ $text .= "</div>\n";
 242+
 243+ // Finish up and return the results
 244+ wfProfileOut('wikiTweeter::Render');
 245+ return $text;
 246+}
 247+?>
Property changes on: branches/REL1_16/extensions/WikiTweet/WikiTweet.php
___________________________________________________________________
Added: svn:eol-style
1248 + native
Index: branches/REL1_16/extensions/WikiTweet/images/lock-small.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/REL1_16/extensions/WikiTweet/images/lock-small.png
___________________________________________________________________
Added: svn:mime-type
2249 + image/png
Index: branches/REL1_16/extensions/WikiTweet/images/answer.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/REL1_16/extensions/WikiTweet/images/answer.png
___________________________________________________________________
Added: svn:mime-type
3250 + image/png
Index: branches/REL1_16/extensions/WikiTweet/images/ajax-loader-mini.gif
Cannot display: file marked as a binary type.
svn:mime-type = image/gif
Property changes on: branches/REL1_16/extensions/WikiTweet/images/ajax-loader-mini.gif
___________________________________________________________________
Added: svn:mime-type
4251 + image/gif
Index: branches/REL1_16/extensions/WikiTweet/images/default_avatar.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/REL1_16/extensions/WikiTweet/images/default_avatar.png
___________________________________________________________________
Added: svn:mime-type
5252 + image/png
Index: branches/REL1_16/extensions/WikiTweet/WikiTweet.config.php
@@ -0,0 +1,51 @@
 2+<?php
 3+ $wgWikiTweet = array(
 4+ // User roles configuration :
 5+ 'informuser' => "Informer",
 6+ 'informers' => array("user1","user2"),
 7+ 'admin' => array("user1"),
 8+ 'allowAnonymous' => True, // Is it possible to tweet anonymously ?
 9+ 'AnonymousUser' => 'Anonymous', // Who is the "Anonymous user" (fictive user)
 10+ 'allowDisconnected' => False, // Is it possible to post tweet when not log in ?
 11+ 'refreshTime' => 15000, // Time to refresh in milliseconds
 12+
 13+ // SMTP configuration :
 14+ 'SMTP' => array(
 15+ 'host' => "smtphost", //could also be an IP address
 16+ 'IDHost' => "idhost",
 17+ 'port' => 25,
 18+ 'auth' => false,
 19+ 'username'=> "",
 20+ 'password'=> ""
 21+ ),
 22+ 'wikimail' => 'admin@wikitweet',
 23+
 24+ // Size CSS configuration :
 25+ 'size' => array(
 26+ 'normal' => array(
 27+ 'line_height' => '16px', // Height of a tweet line
 28+ 'font_size' => '14px',
 29+ 'avatar_size' => '48', // Size of the avatar picture (in px)
 30+ 'span_avatar_width' => '50px',
 31+ 'paddingli' => '10px 0 8px',
 32+ 'margin_left' => '0px',
 33+ ),
 34+ 'medium' => array(
 35+ 'line_height' => '13px',
 36+ 'font_size' => '14px',
 37+ 'avatar_size' => '35',
 38+ 'span_avatar_width' => '37px',
 39+ 'paddingli' => '5px 0 3px',
 40+ 'margin_left' => '0px',
 41+ ),
 42+ 'small' => array(
 43+ 'line_height' => '13px',
 44+ 'font_size' => '11px',
 45+ 'avatar_size' => '35',
 46+ 'span_avatar_width' => '37px',
 47+ 'paddingli' => '5px 0 3px',
 48+ 'margin_left' => '0px',
 49+ ),
 50+ ),
 51+ );
 52+?>
Property changes on: branches/REL1_16/extensions/WikiTweet/WikiTweet.config.php
___________________________________________________________________
Added: svn:eol-style
153 + native
Index: branches/REL1_16/extensions/WikiTweet/WikiTweet.js
@@ -0,0 +1,142 @@
 2+var g__timer;
 3+function gettweets() {
 4+ var l__size = $("#status_update_form input[name=size]").val();
 5+ var l__rows = $("#status_update_form input[name=rows]").val();
 6+ var l__room = $("#status_update_form input[name=room]").val();
 7+ var l__user = $("#status_update_form input[name=user]").val();
 8+ sajax_debug_mode = false;
 9+ $("#img_loader").css("display","inline");
 10+ sajax_do_call("fnGetTweetsAjax", [l__rows, l__room, l__user, l__size], ajaxResponse1);
 11+}
 12+ajaxResponse1 = function handleResponse1(response) {
 13+ $("#img_loader").css("display","none");
 14+ $("#lasttweets").html(response.responseText);
 15+ if (g__timer) clearTimeout(g__timer);
 16+ g__timer = setTimeout(gettweets, refreshTime);
 17+}
 18+function gettweets_with_tag(i__tag) {
 19+ var l__size = $("#status_update_form input[name=size]").val();
 20+ var l__rows = $("#status_update_form input[name=rows]").val();
 21+ var l__room = $("#status_update_form input[name=room]").val();
 22+ var l__user = $("#status_update_form input[name=user]").val();
 23+ sajax_debug_mode = false;
 24+ $("#img_loader").css("display","inline");
 25+ sajax_do_call("fnGetTweetsAjax", [l__rows, l__room, l__user, l__size, i__tag], ajaxResponse2);
 26+}
 27+ajaxResponse2 = function handleResponse2(response) {
 28+ $("#img_loader").css("display","none");
 29+ $("#lasttweets").html(response.responseText);
 30+ if (g__timer) clearTimeout(g__timer);
 31+}
 32+function gettweets_from_room(i__room) {
 33+ var l__size = $("#status_update_form input[name=size]").val();
 34+ var l__rows = $("#status_update_form input[name=rows]").val();
 35+ var l__room = $("#status_update_form input[name=room]").val();
 36+ var l__user = $("#status_update_form input[name=user]").val();
 37+ sajax_debug_mode = false;
 38+ $("#img_loader").css("display","inline");
 39+ sajax_do_call("fnGetTweetsAjax", [l__rows, l__room, l__user, l__size, '', i__room], ajaxResponse2);
 40+}
 41+function updatetweet(i__mail, i__userused){
 42+ var l__status = $("#status_update_form textarea[name=status]").val();
 43+ var l__room = $("#status_update_form input[name=room]").val();
 44+ sajax_debug_mode = false;
 45+ sajax_do_call("fnUpdateTweetAjax", [l__status, i__userused, l__room, i__mail], ajaxResponse3);
 46+}
 47+ajaxResponse3 = function handleResponse3(response) {
 48+ $("#status_update_form textarea[name=status]").val("");
 49+ $("#stringlength").html("<span>140</span>");
 50+ gettweets();
 51+}
 52+
 53+ajaxResponse4 = function handleResponse4(response) {
 54+ // ROOM SUBSCRIPTION
 55+ if(data==""){
 56+ $("#tempimg").html("");
 57+ $("#room_subscribe").css("display", "none");
 58+ $("#room_unsubscribe").css("display", "inline");
 59+ }
 60+ else {
 61+ $("#id_room_subscribe").html("error :<br/>"+response.responseText);
 62+ }
 63+}
 64+ajaxResponse5 = function handleResponse5(response) {
 65+ // ROM UNSUBSCRIPTION
 66+ if(data==""){
 67+ $("#tempimg").html("");
 68+ $("#room_unsubscribe").css("display", "none");
 69+ $("#room_subscribe").css("display", "inline");
 70+ }
 71+ else {
 72+ $("#id_room_subscribe").html("error :<br/>"+response.responseText);
 73+ }
 74+}
 75+
 76+gettweets();
 77+$(document).ready(function() {
 78+ $("textarea[name=status]").keyup(function() {
 79+ len = $("#status_update_form textarea[name=status]").val().length;
 80+ addcolor = "";
 81+ if (len >= 140){
 82+ addcolor = " style='color:red;' ";
 83+ }
 84+ len2 = 140-len;
 85+ $("#stringlength").html("<span"+addcolor+">"+len2+"</span>");
 86+ if ($("textarea[name=status]").val().indexOf("@") != -1){
 87+ //status contains @ character
 88+ $("input[name=submitandmail]").css("display","inline");
 89+ $("input[name=submitprivate]").css("display","inline");
 90+ }
 91+ else if($("input[name=submitandmail]").css("display")=="inline"){
 92+ $("input[name=submitandmail]").css("display","none");
 93+ $("input[name=submitprivate]").css("display","none");
 94+ }
 95+
 96+ });
 97+ function submit(mail, userused){
 98+ if(userused == ''){
 99+ userused = $("#status_update_form input[name=user]").val();
 100+ }
 101+ $("input[name=submitandmail]").css("display","none");
 102+ $("input[name=submitprivate]").css("display","none");
 103+ len = $("#status_update_form textarea[name=status]").val().length;
 104+ if (len > 140){
 105+ alert('Reduce your message to 140 characters max.');
 106+ }
 107+ else if (len == 0){
 108+ gettweets();
 109+ }
 110+ else {
 111+ updatetweet(mail, userused);
 112+ }
 113+ }
 114+ $("#status_update_form input[name=submit]").click(function() {
 115+ submit(0,'');
 116+ });
 117+ $("#status_update_form input[name=submitandmail]").click(function() {
 118+ submit(1,'');
 119+ });
 120+ $("#status_update_form input[name=submitbyinformer]").click(function() {
 121+ submit(0,InformerUser);
 122+ });
 123+ $("#status_update_form input[name=submitanonymously]").click(function() {
 124+ submit(0,AnonymousUser);
 125+ });
 126+ $("#status_update_form input[name=submitprivate]").click(function() {
 127+ submit(2,'');
 128+ });
 129+ $("#room_subscribe").click(function() {
 130+ $("#tempimg").html('<img src="'+wgScriptPath+'/extensions/WikiTweet/images/ajax-loader-mini.gif" style ="padding: 0 5px 0 5px;"/>waiting...');
 131+ var i__link = $("#status_update_form input[name=room]").val();
 132+ var i__user = $("#status_update_form input[name=user]").val();
 133+ sajax_debug_mode = false;
 134+ sajax_do_call("fnSubscribeAjax", [i__link, i__user, 'room'], ajaxResponse4);
 135+ });
 136+ $("#room_unsubscribe").click(function() {
 137+ $("#tempimg").html('<img src="'+wgScriptPath+'/extensions/WikiTweet/images/ajax-loader-mini.gif" style ="padding: 0 5px 0 5px;"/>waiting...');
 138+ var i__link = $("#status_update_form input[name=room]").val();
 139+ var i__user = $("#status_update_form input[name=user]").val();
 140+ sajax_debug_mode = false;
 141+ sajax_do_call("fnUnsubscribeAjax", [i__link, i__user, 'room'], ajaxResponse5);
 142+ });
 143+});
Property changes on: branches/REL1_16/extensions/WikiTweet/WikiTweet.js
___________________________________________________________________
Added: svn:eol-style
1144 + native
Index: branches/REL1_16/extensions/WikiTweet/subscribe.php
@@ -0,0 +1,34 @@
 2+<?php
 3+if( !defined( 'MEDIAWIKI' ) ) {
 4+ echo( "This file is an extension to the MediaWiki software "
 5+ . "and cannot be used standalone.\n" );
 6+ die( -1 );
 7+}
 8+function fnSubscribeAjax($link, $user, $type){
 9+ $l__text = '';
 10+ include('WikiTweet.config.php');
 11+ $dbr =& wfGetDB( DB_SLAVE );
 12+ $dbr->insert('wikitweet_subscription',array(
 13+ '`id`' => '' ,
 14+ '`user`' => $user ,
 15+ '`link`' => $link ,
 16+ '`type`' => $type
 17+ ));
 18+ $l__text .= ( $type == "user" ) ? str_replace( "." , "__dot__" , $link ) : '';
 19+ $o__response = new AjaxResponse($l__text);
 20+ return $o__response;
 21+}
 22+function fnUnsubscribeAjax($link, $user, $type){
 23+ $l__text = '';
 24+ include('WikiTweet.config.php');
 25+ $dbr =& wfGetDB( DB_SLAVE );
 26+ $dbr->delete('wikitweet_subscription', array(
 27+ '`user`' => $user,
 28+ '`link`' => $link,
 29+ '`type`' => $type
 30+ ));
 31+ $l__text .= ( $type == "user" ) ? str_replace( "." , "__dot__" , $link ) : '';
 32+ $o__response = new AjaxResponse($l__text);
 33+ return $o__response;
 34+}
 35+?>
Property changes on: branches/REL1_16/extensions/WikiTweet/subscribe.php
___________________________________________________________________
Added: svn:eol-style
136 + native
Index: branches/REL1_16/extensions/WikiTweet/WikiTweet2.js
@@ -0,0 +1,60 @@
 2+ajaxResponse6 = function handleResponse6(response) {
 3+ // USER SUBSCRIPTION
 4+ $("#tempimg2").html("");
 5+ $(".subscribe"+response.responseText).css("display", "none");
 6+ $(".unsubscribe"+response.responseText).css("display", "inline");
 7+}
 8+ajaxResponse7 = function handleResponse7(response) {
 9+ // USER UNSUBSCRIPTION
 10+ $("#tempimg2").html("");
 11+ $(".unsubscribe"+response.responseText).css("display", "none");
 12+ $(".subscribe"+response.responseText).css("display", "inline");
 13+}
 14+ajaxResponse8 = function handleResponse8(response) {
 15+ // DELETE TWEET
 16+ gettweets();
 17+}
 18+
 19+$('.tweet_li').mouseover(function() {
 20+ $(this).css("border-left","3px solid #BBB");
 21+}).mouseout(function(){
 22+ $(this).css("border-left","3px solid #FFF");
 23+});
 24+$(".user_subscribe").click(function() {
 25+ $("#tempimg2",this).html('<img src="'+wgScriptPath+'/extensions/WikiTweet/images/ajax-loader-mini.gif" style ="padding: 0 5px 0 5px;"/>waiting...');
 26+ var i__link = $("span",this).html();
 27+ var i__user = $("#status_update_form input[name=user]").val();
 28+ sajax_debug_mode = false;
 29+ sajax_do_call("fnSubscribeAjax", [i__link, i__user, 'user'], ajaxResponse6);
 30+});
 31+$(".user_unsubscribe").click(function() {
 32+ $("#tempimg2",this).html('<img src="'+wgScriptPath+'/extensions/WikiTweet/images/ajax-loader-mini.gif" style ="padding: 0 5px 0 5px;"/>waiting...');
 33+ var i__link = $("span",this).html();
 34+ var i__user = $("#status_update_form input[name=user]").val();
 35+ sajax_debug_mode = false;
 36+ sajax_do_call("fnUnsubscribeAjax", [i__link, i__user, 'user'], ajaxResponse7);
 37+});
 38+$(".delete_tweet").click(function() {
 39+ var i__id = $("span",this).html();
 40+ sajax_debug_mode = false;
 41+ sajax_do_call("fnDelTweetAjax", [i__id], ajaxResponse8);
 42+});
 43+$(".answer").mouseover(function(){
 44+ $(this).css("text-decoration","underline");
 45+}).mouseout(function(){
 46+ $(this).css("text-decoration","");
 47+
 48+});
 49+$(".answer").click(function(){
 50+ $('textarea#status').val($('textarea#status').val()+'@'+$(this).parents('.tweet_li').attr('user')+' ');
 51+ $('textarea#status').focus();
 52+});
 53+$(".tag").click(function(){
 54+ gettweets_with_tag($(this).attr('value'));
 55+});
 56+$(".room").click(function(){
 57+ gettweets_from_room($(this).attr('value'));
 58+});
 59+$(".timeline").click(function(){
 60+ gettweets();
 61+});
Property changes on: branches/REL1_16/extensions/WikiTweet/WikiTweet2.js
___________________________________________________________________
Added: svn:eol-style
162 + native
Index: branches/REL1_16/extensions/WikiTweet/jquery.js
@@ -0,0 +1,4241 @@
 2+/*!
 3+ * jQuery JavaScript Library v1.3.1
 4+ * http://jquery.com/
 5+ *
 6+ * Copyright (c) 2009 John Resig
 7+ * Dual licensed under the MIT and GPL licenses.
 8+ * http://docs.jquery.com/License
 9+ *
 10+ * Date: 2009-01-21 20:42:16 -0500 (Wed, 21 Jan 2009)
 11+ * Revision: 6158
 12+ */
 13+(function(){
 14+
 15+var
 16+ // Will speed up references to window, and allows munging its name.
 17+ window = this,
 18+ // Will speed up references to undefined, and allows munging its name.
 19+ undefined,
 20+ // Map over jQuery in case of overwrite
 21+ _jQuery = window.jQuery,
 22+ // Map over the $ in case of overwrite
 23+ _$ = window.$,
 24+
 25+ jQuery = window.jQuery = window.$ = function( selector, context ) {
 26+ // The jQuery object is actually just the init constructor 'enhanced'
 27+ return new jQuery.fn.init( selector, context );
 28+ },
 29+
 30+ // A simple way to check for HTML strings or ID strings
 31+ // (both of which we optimize for)
 32+ quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
 33+ // Is it a simple selector
 34+ isSimple = /^.[^:#\[\.,]*$/;
 35+
 36+jQuery.fn = jQuery.prototype = {
 37+ init: function( selector, context ) {
 38+ // Make sure that a selection was provided
 39+ selector = selector || document;
 40+
 41+ // Handle $(DOMElement)
 42+ if ( selector.nodeType ) {
 43+ this[0] = selector;
 44+ this.length = 1;
 45+ this.context = selector;
 46+ return this;
 47+ }
 48+ // Handle HTML strings
 49+ if ( typeof selector === "string" ) {
 50+ // Are we dealing with HTML string or an ID?
 51+ var match = quickExpr.exec( selector );
 52+
 53+ // Verify a match, and that no context was specified for #id
 54+ if ( match && (match[1] || !context) ) {
 55+
 56+ // HANDLE: $(html) -> $(array)
 57+ if ( match[1] )
 58+ selector = jQuery.clean( [ match[1] ], context );
 59+
 60+ // HANDLE: $("#id")
 61+ else {
 62+ var elem = document.getElementById( match[3] );
 63+
 64+ // Handle the case where IE and Opera return items
 65+ // by name instead of ID
 66+ if ( elem && elem.id != match[3] )
 67+ return jQuery().find( selector );
 68+
 69+ // Otherwise, we inject the element directly into the jQuery object
 70+ var ret = jQuery( elem || [] );
 71+ ret.context = document;
 72+ ret.selector = selector;
 73+ return ret;
 74+ }
 75+
 76+ // HANDLE: $(expr, [context])
 77+ // (which is just equivalent to: $(content).find(expr)
 78+ } else
 79+ return jQuery( context ).find( selector );
 80+
 81+ // HANDLE: $(function)
 82+ // Shortcut for document ready
 83+ } else if ( jQuery.isFunction( selector ) )
 84+ return jQuery( document ).ready( selector );
 85+
 86+ // Make sure that old selector state is passed along
 87+ if ( selector.selector && selector.context ) {
 88+ this.selector = selector.selector;
 89+ this.context = selector.context;
 90+ }
 91+
 92+ return this.setArray(jQuery.makeArray(selector));
 93+ },
 94+
 95+ // Start with an empty selector
 96+ selector: "",
 97+
 98+ // The current version of jQuery being used
 99+ jquery: "1.3.1",
 100+
 101+ // The number of elements contained in the matched element set
 102+ size: function() {
 103+ return this.length;
 104+ },
 105+
 106+ // Get the Nth element in the matched element set OR
 107+ // Get the whole matched element set as a clean array
 108+ get: function( num ) {
 109+ return num === undefined ?
 110+
 111+ // Return a 'clean' array
 112+ jQuery.makeArray( this ) :
 113+
 114+ // Return just the object
 115+ this[ num ];
 116+ },
 117+
 118+ // Take an array of elements and push it onto the stack
 119+ // (returning the new matched element set)
 120+ pushStack: function( elems, name, selector ) {
 121+ // Build a new jQuery matched element set
 122+ var ret = jQuery( elems );
 123+
 124+ // Add the old object onto the stack (as a reference)
 125+ ret.prevObject = this;
 126+
 127+ ret.context = this.context;
 128+
 129+ if ( name === "find" )
 130+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
 131+ else if ( name )
 132+ ret.selector = this.selector + "." + name + "(" + selector + ")";
 133+
 134+ // Return the newly-formed element set
 135+ return ret;
 136+ },
 137+
 138+ // Force the current matched set of elements to become
 139+ // the specified array of elements (destroying the stack in the process)
 140+ // You should use pushStack() in order to do this, but maintain the stack
 141+ setArray: function( elems ) {
 142+ // Resetting the length to 0, then using the native Array push
 143+ // is a super-fast way to populate an object with array-like properties
 144+ this.length = 0;
 145+ Array.prototype.push.apply( this, elems );
 146+
 147+ return this;
 148+ },
 149+
 150+ // Execute a callback for every element in the matched set.
 151+ // (You can seed the arguments with an array of args, but this is
 152+ // only used internally.)
 153+ each: function( callback, args ) {
 154+ return jQuery.each( this, callback, args );
 155+ },
 156+
 157+ // Determine the position of an element within
 158+ // the matched set of elements
 159+ index: function( elem ) {
 160+ // Locate the position of the desired element
 161+ return jQuery.inArray(
 162+ // If it receives a jQuery object, the first element is used
 163+ elem && elem.jquery ? elem[0] : elem
 164+ , this );
 165+ },
 166+
 167+ attr: function( name, value, type ) {
 168+ var options = name;
 169+
 170+ // Look for the case where we're accessing a style value
 171+ if ( typeof name === "string" )
 172+ if ( value === undefined )
 173+ return this[0] && jQuery[ type || "attr" ]( this[0], name );
 174+
 175+ else {
 176+ options = {};
 177+ options[ name ] = value;
 178+ }
 179+
 180+ // Check to see if we're setting style values
 181+ return this.each(function(i){
 182+ // Set all the styles
 183+ for ( name in options )
 184+ jQuery.attr(
 185+ type ?
 186+ this.style :
 187+ this,
 188+ name, jQuery.prop( this, options[ name ], type, i, name )
 189+ );
 190+ });
 191+ },
 192+
 193+ css: function( key, value ) {
 194+ // ignore negative width and height values
 195+ if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
 196+ value = undefined;
 197+ return this.attr( key, value, "curCSS" );
 198+ },
 199+
 200+ text: function( text ) {
 201+ if ( typeof text !== "object" && text != null )
 202+ return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
 203+
 204+ var ret = "";
 205+
 206+ jQuery.each( text || this, function(){
 207+ jQuery.each( this.childNodes, function(){
 208+ if ( this.nodeType != 8 )
 209+ ret += this.nodeType != 1 ?
 210+ this.nodeValue :
 211+ jQuery.fn.text( [ this ] );
 212+ });
 213+ });
 214+
 215+ return ret;
 216+ },
 217+
 218+ wrapAll: function( html ) {
 219+ if ( this[0] ) {
 220+ // The elements to wrap the target around
 221+ var wrap = jQuery( html, this[0].ownerDocument ).clone();
 222+
 223+ if ( this[0].parentNode )
 224+ wrap.insertBefore( this[0] );
 225+
 226+ wrap.map(function(){
 227+ var elem = this;
 228+
 229+ while ( elem.firstChild )
 230+ elem = elem.firstChild;
 231+
 232+ return elem;
 233+ }).append(this);
 234+ }
 235+
 236+ return this;
 237+ },
 238+
 239+ wrapInner: function( html ) {
 240+ return this.each(function(){
 241+ jQuery( this ).contents().wrapAll( html );
 242+ });
 243+ },
 244+
 245+ wrap: function( html ) {
 246+ return this.each(function(){
 247+ jQuery( this ).wrapAll( html );
 248+ });
 249+ },
 250+
 251+ append: function() {
 252+ return this.domManip(arguments, true, function(elem){
 253+ if (this.nodeType == 1)
 254+ this.appendChild( elem );
 255+ });
 256+ },
 257+
 258+ prepend: function() {
 259+ return this.domManip(arguments, true, function(elem){
 260+ if (this.nodeType == 1)
 261+ this.insertBefore( elem, this.firstChild );
 262+ });
 263+ },
 264+
 265+ before: function() {
 266+ return this.domManip(arguments, false, function(elem){
 267+ this.parentNode.insertBefore( elem, this );
 268+ });
 269+ },
 270+
 271+ after: function() {
 272+ return this.domManip(arguments, false, function(elem){
 273+ this.parentNode.insertBefore( elem, this.nextSibling );
 274+ });
 275+ },
 276+
 277+ end: function() {
 278+ return this.prevObject || jQuery( [] );
 279+ },
 280+
 281+ // For internal use only.
 282+ // Behaves like an Array's .push method, not like a jQuery method.
 283+ push: [].push,
 284+
 285+ find: function( selector ) {
 286+ if ( this.length === 1 && !/,/.test(selector) ) {
 287+ var ret = this.pushStack( [], "find", selector );
 288+ ret.length = 0;
 289+ jQuery.find( selector, this[0], ret );
 290+ return ret;
 291+ } else {
 292+ var elems = jQuery.map(this, function(elem){
 293+ return jQuery.find( selector, elem );
 294+ });
 295+
 296+ return this.pushStack( /[^+>] [^+>]/.test( selector ) ?
 297+ jQuery.unique( elems ) :
 298+ elems, "find", selector );
 299+ }
 300+ },
 301+
 302+ clone: function( events ) {
 303+ // Do the clone
 304+ var ret = this.map(function(){
 305+ if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
 306+ // IE copies events bound via attachEvent when
 307+ // using cloneNode. Calling detachEvent on the
 308+ // clone will also remove the events from the orignal
 309+ // In order to get around this, we use innerHTML.
 310+ // Unfortunately, this means some modifications to
 311+ // attributes in IE that are actually only stored
 312+ // as properties will not be copied (such as the
 313+ // the name attribute on an input).
 314+ var clone = this.cloneNode(true),
 315+ container = document.createElement("div");
 316+ container.appendChild(clone);
 317+ return jQuery.clean([container.innerHTML])[0];
 318+ } else
 319+ return this.cloneNode(true);
 320+ });
 321+
 322+ // Need to set the expando to null on the cloned set if it exists
 323+ // removeData doesn't work here, IE removes it from the original as well
 324+ // this is primarily for IE but the data expando shouldn't be copied over in any browser
 325+ var clone = ret.find("*").andSelf().each(function(){
 326+ if ( this[ expando ] !== undefined )
 327+ this[ expando ] = null;
 328+ });
 329+
 330+ // Copy the events from the original to the clone
 331+ if ( events === true )
 332+ this.find("*").andSelf().each(function(i){
 333+ if (this.nodeType == 3)
 334+ return;
 335+ var events = jQuery.data( this, "events" );
 336+
 337+ for ( var type in events )
 338+ for ( var handler in events[ type ] )
 339+ jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data );
 340+ });
 341+
 342+ // Return the cloned set
 343+ return ret;
 344+ },
 345+
 346+ filter: function( selector ) {
 347+ return this.pushStack(
 348+ jQuery.isFunction( selector ) &&
 349+ jQuery.grep(this, function(elem, i){
 350+ return selector.call( elem, i );
 351+ }) ||
 352+
 353+ jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
 354+ return elem.nodeType === 1;
 355+ }) ), "filter", selector );
 356+ },
 357+
 358+ closest: function( selector ) {
 359+ var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null;
 360+
 361+ return this.map(function(){
 362+ var cur = this;
 363+ while ( cur && cur.ownerDocument ) {
 364+ if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) )
 365+ return cur;
 366+ cur = cur.parentNode;
 367+ }
 368+ });
 369+ },
 370+
 371+ not: function( selector ) {
 372+ if ( typeof selector === "string" )
 373+ // test special case where just one selector is passed in
 374+ if ( isSimple.test( selector ) )
 375+ return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector );
 376+ else
 377+ selector = jQuery.multiFilter( selector, this );
 378+
 379+ var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
 380+ return this.filter(function() {
 381+ return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
 382+ });
 383+ },
 384+
 385+ add: function( selector ) {
 386+ return this.pushStack( jQuery.unique( jQuery.merge(
 387+ this.get(),
 388+ typeof selector === "string" ?
 389+ jQuery( selector ) :
 390+ jQuery.makeArray( selector )
 391+ )));
 392+ },
 393+
 394+ is: function( selector ) {
 395+ return !!selector && jQuery.multiFilter( selector, this ).length > 0;
 396+ },
 397+
 398+ hasClass: function( selector ) {
 399+ return !!selector && this.is( "." + selector );
 400+ },
 401+
 402+ val: function( value ) {
 403+ if ( value === undefined ) {
 404+ var elem = this[0];
 405+
 406+ if ( elem ) {
 407+ if( jQuery.nodeName( elem, 'option' ) )
 408+ return (elem.attributes.value || {}).specified ? elem.value : elem.text;
 409+
 410+ // We need to handle select boxes special
 411+ if ( jQuery.nodeName( elem, "select" ) ) {
 412+ var index = elem.selectedIndex,
 413+ values = [],
 414+ options = elem.options,
 415+ one = elem.type == "select-one";
 416+
 417+ // Nothing was selected
 418+ if ( index < 0 )
 419+ return null;
 420+
 421+ // Loop through all the selected options
 422+ for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
 423+ var option = options[ i ];
 424+
 425+ if ( option.selected ) {
 426+ // Get the specifc value for the option
 427+ value = jQuery(option).val();
 428+
 429+ // We don't need an array for one selects
 430+ if ( one )
 431+ return value;
 432+
 433+ // Multi-Selects return an array
 434+ values.push( value );
 435+ }
 436+ }
 437+
 438+ return values;
 439+ }
 440+
 441+ // Everything else, we just grab the value
 442+ return (elem.value || "").replace(/\r/g, "");
 443+
 444+ }
 445+
 446+ return undefined;
 447+ }
 448+
 449+ if ( typeof value === "number" )
 450+ value += '';
 451+
 452+ return this.each(function(){
 453+ if ( this.nodeType != 1 )
 454+ return;
 455+
 456+ if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
 457+ this.checked = (jQuery.inArray(this.value, value) >= 0 ||
 458+ jQuery.inArray(this.name, value) >= 0);
 459+
 460+ else if ( jQuery.nodeName( this, "select" ) ) {
 461+ var values = jQuery.makeArray(value);
 462+
 463+ jQuery( "option", this ).each(function(){
 464+ this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
 465+ jQuery.inArray( this.text, values ) >= 0);
 466+ });
 467+
 468+ if ( !values.length )
 469+ this.selectedIndex = -1;
 470+
 471+ } else
 472+ this.value = value;
 473+ });
 474+ },
 475+
 476+ html: function( value ) {
 477+ return value === undefined ?
 478+ (this[0] ?
 479+ this[0].innerHTML :
 480+ null) :
 481+ this.empty().append( value );
 482+ },
 483+
 484+ replaceWith: function( value ) {
 485+ return this.after( value ).remove();
 486+ },
 487+
 488+ eq: function( i ) {
 489+ return this.slice( i, +i + 1 );
 490+ },
 491+
 492+ slice: function() {
 493+ return this.pushStack( Array.prototype.slice.apply( this, arguments ),
 494+ "slice", Array.prototype.slice.call(arguments).join(",") );
 495+ },
 496+
 497+ map: function( callback ) {
 498+ return this.pushStack( jQuery.map(this, function(elem, i){
 499+ return callback.call( elem, i, elem );
 500+ }));
 501+ },
 502+
 503+ andSelf: function() {
 504+ return this.add( this.prevObject );
 505+ },
 506+
 507+ domManip: function( args, table, callback ) {
 508+ if ( this[0] ) {
 509+ var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
 510+ scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),
 511+ first = fragment.firstChild,
 512+ extra = this.length > 1 ? fragment.cloneNode(true) : fragment;
 513+
 514+ if ( first )
 515+ for ( var i = 0, l = this.length; i < l; i++ )
 516+ callback.call( root(this[i], first), i > 0 ? extra.cloneNode(true) : fragment );
 517+
 518+ if ( scripts )
 519+ jQuery.each( scripts, evalScript );
 520+ }
 521+
 522+ return this;
 523+
 524+ function root( elem, cur ) {
 525+ return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
 526+ (elem.getElementsByTagName("tbody")[0] ||
 527+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
 528+ elem;
 529+ }
 530+ }
 531+};
 532+
 533+// Give the init function the jQuery prototype for later instantiation
 534+jQuery.fn.init.prototype = jQuery.fn;
 535+
 536+function evalScript( i, elem ) {
 537+ if ( elem.src )
 538+ jQuery.ajax({
 539+ url: elem.src,
 540+ async: false,
 541+ dataType: "script"
 542+ });
 543+
 544+ else
 545+ jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
 546+
 547+ if ( elem.parentNode )
 548+ elem.parentNode.removeChild( elem );
 549+}
 550+
 551+function now(){
 552+ return +new Date;
 553+}
 554+
 555+jQuery.extend = jQuery.fn.extend = function() {
 556+ // copy reference to target object
 557+ var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
 558+
 559+ // Handle a deep copy situation
 560+ if ( typeof target === "boolean" ) {
 561+ deep = target;
 562+ target = arguments[1] || {};
 563+ // skip the boolean and the target
 564+ i = 2;
 565+ }
 566+
 567+ // Handle case when target is a string or something (possible in deep copy)
 568+ if ( typeof target !== "object" && !jQuery.isFunction(target) )
 569+ target = {};
 570+
 571+ // extend jQuery itself if only one argument is passed
 572+ if ( length == i ) {
 573+ target = this;
 574+ --i;
 575+ }
 576+
 577+ for ( ; i < length; i++ )
 578+ // Only deal with non-null/undefined values
 579+ if ( (options = arguments[ i ]) != null )
 580+ // Extend the base object
 581+ for ( var name in options ) {
 582+ var src = target[ name ], copy = options[ name ];
 583+
 584+ // Prevent never-ending loop
 585+ if ( target === copy )
 586+ continue;
 587+
 588+ // Recurse if we're merging object values
 589+ if ( deep && copy && typeof copy === "object" && !copy.nodeType )
 590+ target[ name ] = jQuery.extend( deep,
 591+ // Never move original objects, clone them
 592+ src || ( copy.length != null ? [ ] : { } )
 593+ , copy );
 594+
 595+ // Don't bring in undefined values
 596+ else if ( copy !== undefined )
 597+ target[ name ] = copy;
 598+
 599+ }
 600+
 601+ // Return the modified object
 602+ return target;
 603+};
 604+
 605+// exclude the following css properties to add px
 606+var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
 607+ // cache defaultView
 608+ defaultView = document.defaultView || {},
 609+ toString = Object.prototype.toString;
 610+
 611+jQuery.extend({
 612+ noConflict: function( deep ) {
 613+ window.$ = _$;
 614+
 615+ if ( deep )
 616+ window.jQuery = _jQuery;
 617+
 618+ return jQuery;
 619+ },
 620+
 621+ // See test/unit/core.js for details concerning isFunction.
 622+ // Since version 1.3, DOM methods and functions like alert
 623+ // aren't supported. They return false on IE (#2968).
 624+ isFunction: function( obj ) {
 625+ return toString.call(obj) === "[object Function]";
 626+ },
 627+
 628+ isArray: function( obj ) {
 629+ return toString.call(obj) === "[object Array]";
 630+ },
 631+
 632+ // check if an element is in a (or is an) XML document
 633+ isXMLDoc: function( elem ) {
 634+ return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
 635+ !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
 636+ },
 637+
 638+ // Evalulates a script in a global context
 639+ globalEval: function( data ) {
 640+ data = jQuery.trim( data );
 641+
 642+ if ( data ) {
 643+ // Inspired by code by Andrea Giammarchi
 644+ // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
 645+ var head = document.getElementsByTagName("head")[0] || document.documentElement,
 646+ script = document.createElement("script");
 647+
 648+ script.type = "text/javascript";
 649+ if ( jQuery.support.scriptEval )
 650+ script.appendChild( document.createTextNode( data ) );
 651+ else
 652+ script.text = data;
 653+
 654+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
 655+ // This arises when a base node is used (#2709).
 656+ head.insertBefore( script, head.firstChild );
 657+ head.removeChild( script );
 658+ }
 659+ },
 660+
 661+ nodeName: function( elem, name ) {
 662+ return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
 663+ },
 664+
 665+ // args is for internal usage only
 666+ each: function( object, callback, args ) {
 667+ var name, i = 0, length = object.length;
 668+
 669+ if ( args ) {
 670+ if ( length === undefined ) {
 671+ for ( name in object )
 672+ if ( callback.apply( object[ name ], args ) === false )
 673+ break;
 674+ } else
 675+ for ( ; i < length; )
 676+ if ( callback.apply( object[ i++ ], args ) === false )
 677+ break;
 678+
 679+ // A special, fast, case for the most common use of each
 680+ } else {
 681+ if ( length === undefined ) {
 682+ for ( name in object )
 683+ if ( callback.call( object[ name ], name, object[ name ] ) === false )
 684+ break;
 685+ } else
 686+ for ( var value = object[0];
 687+ i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
 688+ }
 689+
 690+ return object;
 691+ },
 692+
 693+ prop: function( elem, value, type, i, name ) {
 694+ // Handle executable functions
 695+ if ( jQuery.isFunction( value ) )
 696+ value = value.call( elem, i );
 697+
 698+ // Handle passing in a number to a CSS property
 699+ return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ?
 700+ value + "px" :
 701+ value;
 702+ },
 703+
 704+ className: {
 705+ // internal only, use addClass("class")
 706+ add: function( elem, classNames ) {
 707+ jQuery.each((classNames || "").split(/\s+/), function(i, className){
 708+ if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
 709+ elem.className += (elem.className ? " " : "") + className;
 710+ });
 711+ },
 712+
 713+ // internal only, use removeClass("class")
 714+ remove: function( elem, classNames ) {
 715+ if (elem.nodeType == 1)
 716+ elem.className = classNames !== undefined ?
 717+ jQuery.grep(elem.className.split(/\s+/), function(className){
 718+ return !jQuery.className.has( classNames, className );
 719+ }).join(" ") :
 720+ "";
 721+ },
 722+
 723+ // internal only, use hasClass("class")
 724+ has: function( elem, className ) {
 725+ return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
 726+ }
 727+ },
 728+
 729+ // A method for quickly swapping in/out CSS properties to get correct calculations
 730+ swap: function( elem, options, callback ) {
 731+ var old = {};
 732+ // Remember the old values, and insert the new ones
 733+ for ( var name in options ) {
 734+ old[ name ] = elem.style[ name ];
 735+ elem.style[ name ] = options[ name ];
 736+ }
 737+
 738+ callback.call( elem );
 739+
 740+ // Revert the old values
 741+ for ( var name in options )
 742+ elem.style[ name ] = old[ name ];
 743+ },
 744+
 745+ css: function( elem, name, force ) {
 746+ if ( name == "width" || name == "height" ) {
 747+ var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
 748+
 749+ function getWH() {
 750+ val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
 751+ var padding = 0, border = 0;
 752+ jQuery.each( which, function() {
 753+ padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
 754+ border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
 755+ });
 756+ val -= Math.round(padding + border);
 757+ }
 758+
 759+ if ( jQuery(elem).is(":visible") )
 760+ getWH();
 761+ else
 762+ jQuery.swap( elem, props, getWH );
 763+
 764+ return Math.max(0, val);
 765+ }
 766+
 767+ return jQuery.curCSS( elem, name, force );
 768+ },
 769+
 770+ curCSS: function( elem, name, force ) {
 771+ var ret, style = elem.style;
 772+
 773+ // We need to handle opacity special in IE
 774+ if ( name == "opacity" && !jQuery.support.opacity ) {
 775+ ret = jQuery.attr( style, "opacity" );
 776+
 777+ return ret == "" ?
 778+ "1" :
 779+ ret;
 780+ }
 781+
 782+ // Make sure we're using the right name for getting the float value
 783+ if ( name.match( /float/i ) )
 784+ name = styleFloat;
 785+
 786+ if ( !force && style && style[ name ] )
 787+ ret = style[ name ];
 788+
 789+ else if ( defaultView.getComputedStyle ) {
 790+
 791+ // Only "float" is needed here
 792+ if ( name.match( /float/i ) )
 793+ name = "float";
 794+
 795+ name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
 796+
 797+ var computedStyle = defaultView.getComputedStyle( elem, null );
 798+
 799+ if ( computedStyle )
 800+ ret = computedStyle.getPropertyValue( name );
 801+
 802+ // We should always get a number back from opacity
 803+ if ( name == "opacity" && ret == "" )
 804+ ret = "1";
 805+
 806+ } else if ( elem.currentStyle ) {
 807+ var camelCase = name.replace(/\-(\w)/g, function(all, letter){
 808+ return letter.toUpperCase();
 809+ });
 810+
 811+ ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
 812+
 813+ // From the awesome hack by Dean Edwards
 814+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
 815+
 816+ // If we're not dealing with a regular pixel number
 817+ // but a number that has a weird ending, we need to convert it to pixels
 818+ if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
 819+ // Remember the original values
 820+ var left = style.left, rsLeft = elem.runtimeStyle.left;
 821+
 822+ // Put in the new values to get a computed value out
 823+ elem.runtimeStyle.left = elem.currentStyle.left;
 824+ style.left = ret || 0;
 825+ ret = style.pixelLeft + "px";
 826+
 827+ // Revert the changed values
 828+ style.left = left;
 829+ elem.runtimeStyle.left = rsLeft;
 830+ }
 831+ }
 832+
 833+ return ret;
 834+ },
 835+
 836+ clean: function( elems, context, fragment ) {
 837+ context = context || document;
 838+
 839+ // !context.createElement fails in IE with an error but returns typeof 'object'
 840+ if ( typeof context.createElement === "undefined" )
 841+ context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
 842+
 843+ // If a single string is passed in and it's a single tag
 844+ // just do a createElement and skip the rest
 845+ if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) {
 846+ var match = /^<(\w+)\s*\/?>$/.exec(elems[0]);
 847+ if ( match )
 848+ return [ context.createElement( match[1] ) ];
 849+ }
 850+
 851+ var ret = [], scripts = [], div = context.createElement("div");
 852+
 853+ jQuery.each(elems, function(i, elem){
 854+ if ( typeof elem === "number" )
 855+ elem += '';
 856+
 857+ if ( !elem )
 858+ return;
 859+
 860+ // Convert html string into DOM nodes
 861+ if ( typeof elem === "string" ) {
 862+ // Fix "XHTML"-style tags in all browsers
 863+ elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
 864+ return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
 865+ all :
 866+ front + "></" + tag + ">";
 867+ });
 868+
 869+ // Trim whitespace, otherwise indexOf won't work as expected
 870+ var tags = jQuery.trim( elem ).toLowerCase();
 871+
 872+ var wrap =
 873+ // option or optgroup
 874+ !tags.indexOf("<opt") &&
 875+ [ 1, "<select multiple='multiple'>", "</select>" ] ||
 876+
 877+ !tags.indexOf("<leg") &&
 878+ [ 1, "<fieldset>", "</fieldset>" ] ||
 879+
 880+ tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
 881+ [ 1, "<table>", "</table>" ] ||
 882+
 883+ !tags.indexOf("<tr") &&
 884+ [ 2, "<table><tbody>", "</tbody></table>" ] ||
 885+
 886+ // <thead> matched above
 887+ (!tags.indexOf("<td") || !tags.indexOf("<th")) &&
 888+ [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
 889+
 890+ !tags.indexOf("<col") &&
 891+ [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
 892+
 893+ // IE can't serialize <link> and <script> tags normally
 894+ !jQuery.support.htmlSerialize &&
 895+ [ 1, "div<div>", "</div>" ] ||
 896+
 897+ [ 0, "", "" ];
 898+
 899+ // Go to html and back, then peel off extra wrappers
 900+ div.innerHTML = wrap[1] + elem + wrap[2];
 901+
 902+ // Move to the right depth
 903+ while ( wrap[0]-- )
 904+ div = div.lastChild;
 905+
 906+ // Remove IE's autoinserted <tbody> from table fragments
 907+ if ( !jQuery.support.tbody ) {
 908+
 909+ // String was a <table>, *may* have spurious <tbody>
 910+ var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ?
 911+ div.firstChild && div.firstChild.childNodes :
 912+
 913+ // String was a bare <thead> or <tfoot>
 914+ wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ?
 915+ div.childNodes :
 916+ [];
 917+
 918+ for ( var j = tbody.length - 1; j >= 0 ; --j )
 919+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
 920+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
 921+
 922+ }
 923+
 924+ // IE completely kills leading whitespace when innerHTML is used
 925+ if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
 926+ div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
 927+
 928+ elem = jQuery.makeArray( div.childNodes );
 929+ }
 930+
 931+ if ( elem.nodeType )
 932+ ret.push( elem );
 933+ else
 934+ ret = jQuery.merge( ret, elem );
 935+
 936+ });
 937+
 938+ if ( fragment ) {
 939+ for ( var i = 0; ret[i]; i++ ) {
 940+ if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
 941+ scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
 942+ } else {
 943+ if ( ret[i].nodeType === 1 )
 944+ ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
 945+ fragment.appendChild( ret[i] );
 946+ }
 947+ }
 948+
 949+ return scripts;
 950+ }
 951+
 952+ return ret;
 953+ },
 954+
 955+ attr: function( elem, name, value ) {
 956+ // don't set attributes on text and comment nodes
 957+ if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
 958+ return undefined;
 959+
 960+ var notxml = !jQuery.isXMLDoc( elem ),
 961+ // Whether we are setting (or getting)
 962+ set = value !== undefined;
 963+
 964+ // Try to normalize/fix the name
 965+ name = notxml && jQuery.props[ name ] || name;
 966+
 967+ // Only do all the following if this is a node (faster for style)
 968+ // IE elem.getAttribute passes even for style
 969+ if ( elem.tagName ) {
 970+
 971+ // These attributes require special treatment
 972+ var special = /href|src|style/.test( name );
 973+
 974+ // Safari mis-reports the default selected property of a hidden option
 975+ // Accessing the parent's selectedIndex property fixes it
 976+ if ( name == "selected" && elem.parentNode )
 977+ elem.parentNode.selectedIndex;
 978+
 979+ // If applicable, access the attribute via the DOM 0 way
 980+ if ( name in elem && notxml && !special ) {
 981+ if ( set ){
 982+ // We can't allow the type property to be changed (since it causes problems in IE)
 983+ if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
 984+ throw "type property can't be changed";
 985+
 986+ elem[ name ] = value;
 987+ }
 988+
 989+ // browsers index elements by id/name on forms, give priority to attributes.
 990+ if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
 991+ return elem.getAttributeNode( name ).nodeValue;
 992+
 993+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
 994+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
 995+ if ( name == "tabIndex" ) {
 996+ var attributeNode = elem.getAttributeNode( "tabIndex" );
 997+ return attributeNode && attributeNode.specified
 998+ ? attributeNode.value
 999+ : elem.nodeName.match(/(button|input|object|select|textarea)/i)
 1000+ ? 0
 1001+ : elem.nodeName.match(/^(a|area)$/i) && elem.href
 1002+ ? 0
 1003+ : undefined;
 1004+ }
 1005+
 1006+ return elem[ name ];
 1007+ }
 1008+
 1009+ if ( !jQuery.support.style && notxml && name == "style" )
 1010+ return jQuery.attr( elem.style, "cssText", value );
 1011+
 1012+ if ( set )
 1013+ // convert the value to a string (all browsers do this but IE) see #1070
 1014+ elem.setAttribute( name, "" + value );
 1015+
 1016+ var attr = !jQuery.support.hrefNormalized && notxml && special
 1017+ // Some attributes require a special call on IE
 1018+ ? elem.getAttribute( name, 2 )
 1019+ : elem.getAttribute( name );
 1020+
 1021+ // Non-existent attributes return null, we normalize to undefined
 1022+ return attr === null ? undefined : attr;
 1023+ }
 1024+
 1025+ // elem is actually elem.style ... set the style
 1026+
 1027+ // IE uses filters for opacity
 1028+ if ( !jQuery.support.opacity && name == "opacity" ) {
 1029+ if ( set ) {
 1030+ // IE has trouble with opacity if it does not have layout
 1031+ // Force it by setting the zoom level
 1032+ elem.zoom = 1;
 1033+
 1034+ // Set the alpha filter to set the opacity
 1035+ elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
 1036+ (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
 1037+ }
 1038+
 1039+ return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
 1040+ (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
 1041+ "";
 1042+ }
 1043+
 1044+ name = name.replace(/-([a-z])/ig, function(all, letter){
 1045+ return letter.toUpperCase();
 1046+ });
 1047+
 1048+ if ( set )
 1049+ elem[ name ] = value;
 1050+
 1051+ return elem[ name ];
 1052+ },
 1053+
 1054+ trim: function( text ) {
 1055+ return (text || "").replace( /^\s+|\s+$/g, "" );
 1056+ },
 1057+
 1058+ makeArray: function( array ) {
 1059+ var ret = [];
 1060+
 1061+ if( array != null ){
 1062+ var i = array.length;
 1063+ // The window, strings (and functions) also have 'length'
 1064+ if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval )
 1065+ ret[0] = array;
 1066+ else
 1067+ while( i )
 1068+ ret[--i] = array[i];
 1069+ }
 1070+
 1071+ return ret;
 1072+ },
 1073+
 1074+ inArray: function( elem, array ) {
 1075+ for ( var i = 0, length = array.length; i < length; i++ )
 1076+ // Use === because on IE, window == document
 1077+ if ( array[ i ] === elem )
 1078+ return i;
 1079+
 1080+ return -1;
 1081+ },
 1082+
 1083+ merge: function( first, second ) {
 1084+ // We have to loop this way because IE & Opera overwrite the length
 1085+ // expando of getElementsByTagName
 1086+ var i = 0, elem, pos = first.length;
 1087+ // Also, we need to make sure that the correct elements are being returned
 1088+ // (IE returns comment nodes in a '*' query)
 1089+ if ( !jQuery.support.getAll ) {
 1090+ while ( (elem = second[ i++ ]) != null )
 1091+ if ( elem.nodeType != 8 )
 1092+ first[ pos++ ] = elem;
 1093+
 1094+ } else
 1095+ while ( (elem = second[ i++ ]) != null )
 1096+ first[ pos++ ] = elem;
 1097+
 1098+ return first;
 1099+ },
 1100+
 1101+ unique: function( array ) {
 1102+ var ret = [], done = {};
 1103+
 1104+ try {
 1105+
 1106+ for ( var i = 0, length = array.length; i < length; i++ ) {
 1107+ var id = jQuery.data( array[ i ] );
 1108+
 1109+ if ( !done[ id ] ) {
 1110+ done[ id ] = true;
 1111+ ret.push( array[ i ] );
 1112+ }
 1113+ }
 1114+
 1115+ } catch( e ) {
 1116+ ret = array;
 1117+ }
 1118+
 1119+ return ret;
 1120+ },
 1121+
 1122+ grep: function( elems, callback, inv ) {
 1123+ var ret = [];
 1124+
 1125+ // Go through the array, only saving the items
 1126+ // that pass the validator function
 1127+ for ( var i = 0, length = elems.length; i < length; i++ )
 1128+ if ( !inv != !callback( elems[ i ], i ) )
 1129+ ret.push( elems[ i ] );
 1130+
 1131+ return ret;
 1132+ },
 1133+
 1134+ map: function( elems, callback ) {
 1135+ var ret = [];
 1136+
 1137+ // Go through the array, translating each of the items to their
 1138+ // new value (or values).
 1139+ for ( var i = 0, length = elems.length; i < length; i++ ) {
 1140+ var value = callback( elems[ i ], i );
 1141+
 1142+ if ( value != null )
 1143+ ret[ ret.length ] = value;
 1144+ }
 1145+
 1146+ return ret.concat.apply( [], ret );
 1147+ }
 1148+});
 1149+
 1150+// Use of jQuery.browser is deprecated.
 1151+// It's included for backwards compatibility and plugins,
 1152+// although they should work to migrate away.
 1153+
 1154+var userAgent = navigator.userAgent.toLowerCase();
 1155+
 1156+// Figure out what browser is being used
 1157+jQuery.browser = {
 1158+ version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
 1159+ safari: /webkit/.test( userAgent ),
 1160+ opera: /opera/.test( userAgent ),
 1161+ msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
 1162+ mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
 1163+};
 1164+
 1165+jQuery.each({
 1166+ parent: function(elem){return elem.parentNode;},
 1167+ parents: function(elem){return jQuery.dir(elem,"parentNode");},
 1168+ next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
 1169+ prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
 1170+ nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
 1171+ prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
 1172+ siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
 1173+ children: function(elem){return jQuery.sibling(elem.firstChild);},
 1174+ contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
 1175+}, function(name, fn){
 1176+ jQuery.fn[ name ] = function( selector ) {
 1177+ var ret = jQuery.map( this, fn );
 1178+
 1179+ if ( selector && typeof selector == "string" )
 1180+ ret = jQuery.multiFilter( selector, ret );
 1181+
 1182+ return this.pushStack( jQuery.unique( ret ), name, selector );
 1183+ };
 1184+});
 1185+
 1186+jQuery.each({
 1187+ appendTo: "append",
 1188+ prependTo: "prepend",
 1189+ insertBefore: "before",
 1190+ insertAfter: "after",
 1191+ replaceAll: "replaceWith"
 1192+}, function(name, original){
 1193+ jQuery.fn[ name ] = function() {
 1194+ var args = arguments;
 1195+
 1196+ return this.each(function(){
 1197+ for ( var i = 0, length = args.length; i < length; i++ )
 1198+ jQuery( args[ i ] )[ original ]( this );
 1199+ });
 1200+ };
 1201+});
 1202+
 1203+jQuery.each({
 1204+ removeAttr: function( name ) {
 1205+ jQuery.attr( this, name, "" );
 1206+ if (this.nodeType == 1)
 1207+ this.removeAttribute( name );
 1208+ },
 1209+
 1210+ addClass: function( classNames ) {
 1211+ jQuery.className.add( this, classNames );
 1212+ },
 1213+
 1214+ removeClass: function( classNames ) {
 1215+ jQuery.className.remove( this, classNames );
 1216+ },
 1217+
 1218+ toggleClass: function( classNames, state ) {
 1219+ if( typeof state !== "boolean" )
 1220+ state = !jQuery.className.has( this, classNames );
 1221+ jQuery.className[ state ? "add" : "remove" ]( this, classNames );
 1222+ },
 1223+
 1224+ remove: function( selector ) {
 1225+ if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
 1226+ // Prevent memory leaks
 1227+ jQuery( "*", this ).add([this]).each(function(){
 1228+ jQuery.event.remove(this);
 1229+ jQuery.removeData(this);
 1230+ });
 1231+ if (this.parentNode)
 1232+ this.parentNode.removeChild( this );
 1233+ }
 1234+ },
 1235+
 1236+ empty: function() {
 1237+ // Remove element nodes and prevent memory leaks
 1238+ jQuery( ">*", this ).remove();
 1239+
 1240+ // Remove any remaining nodes
 1241+ while ( this.firstChild )
 1242+ this.removeChild( this.firstChild );
 1243+ }
 1244+}, function(name, fn){
 1245+ jQuery.fn[ name ] = function(){
 1246+ return this.each( fn, arguments );
 1247+ };
 1248+});
 1249+
 1250+// Helper function used by the dimensions and offset modules
 1251+function num(elem, prop) {
 1252+ return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
 1253+}
 1254+var expando = "jQuery" + now(), uuid = 0, windowData = {};
 1255+
 1256+jQuery.extend({
 1257+ cache: {},
 1258+
 1259+ data: function( elem, name, data ) {
 1260+ elem = elem == window ?
 1261+ windowData :
 1262+ elem;
 1263+
 1264+ var id = elem[ expando ];
 1265+
 1266+ // Compute a unique ID for the element
 1267+ if ( !id )
 1268+ id = elem[ expando ] = ++uuid;
 1269+
 1270+ // Only generate the data cache if we're
 1271+ // trying to access or manipulate it
 1272+ if ( name && !jQuery.cache[ id ] )
 1273+ jQuery.cache[ id ] = {};
 1274+
 1275+ // Prevent overriding the named cache with undefined values
 1276+ if ( data !== undefined )
 1277+ jQuery.cache[ id ][ name ] = data;
 1278+
 1279+ // Return the named cache data, or the ID for the element
 1280+ return name ?
 1281+ jQuery.cache[ id ][ name ] :
 1282+ id;
 1283+ },
 1284+
 1285+ removeData: function( elem, name ) {
 1286+ elem = elem == window ?
 1287+ windowData :
 1288+ elem;
 1289+
 1290+ var id = elem[ expando ];
 1291+
 1292+ // If we want to remove a specific section of the element's data
 1293+ if ( name ) {
 1294+ if ( jQuery.cache[ id ] ) {
 1295+ // Remove the section of cache data
 1296+ delete jQuery.cache[ id ][ name ];
 1297+
 1298+ // If we've removed all the data, remove the element's cache
 1299+ name = "";
 1300+
 1301+ for ( name in jQuery.cache[ id ] )
 1302+ break;
 1303+
 1304+ if ( !name )
 1305+ jQuery.removeData( elem );
 1306+ }
 1307+
 1308+ // Otherwise, we want to remove all of the element's data
 1309+ } else {
 1310+ // Clean up the element expando
 1311+ try {
 1312+ delete elem[ expando ];
 1313+ } catch(e){
 1314+ // IE has trouble directly removing the expando
 1315+ // but it's ok with using removeAttribute
 1316+ if ( elem.removeAttribute )
 1317+ elem.removeAttribute( expando );
 1318+ }
 1319+
 1320+ // Completely remove the data cache
 1321+ delete jQuery.cache[ id ];
 1322+ }
 1323+ },
 1324+ queue: function( elem, type, data ) {
 1325+ if ( elem ){
 1326+
 1327+ type = (type || "fx") + "queue";
 1328+
 1329+ var q = jQuery.data( elem, type );
 1330+
 1331+ if ( !q || jQuery.isArray(data) )
 1332+ q = jQuery.data( elem, type, jQuery.makeArray(data) );
 1333+ else if( data )
 1334+ q.push( data );
 1335+
 1336+ }
 1337+ return q;
 1338+ },
 1339+
 1340+ dequeue: function( elem, type ){
 1341+ var queue = jQuery.queue( elem, type ),
 1342+ fn = queue.shift();
 1343+
 1344+ if( !type || type === "fx" )
 1345+ fn = queue[0];
 1346+
 1347+ if( fn !== undefined )
 1348+ fn.call(elem);
 1349+ }
 1350+});
 1351+
 1352+jQuery.fn.extend({
 1353+ data: function( key, value ){
 1354+ var parts = key.split(".");
 1355+ parts[1] = parts[1] ? "." + parts[1] : "";
 1356+
 1357+ if ( value === undefined ) {
 1358+ var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
 1359+
 1360+ if ( data === undefined && this.length )
 1361+ data = jQuery.data( this[0], key );
 1362+
 1363+ return data === undefined && parts[1] ?
 1364+ this.data( parts[0] ) :
 1365+ data;
 1366+ } else
 1367+ return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
 1368+ jQuery.data( this, key, value );
 1369+ });
 1370+ },
 1371+
 1372+ removeData: function( key ){
 1373+ return this.each(function(){
 1374+ jQuery.removeData( this, key );
 1375+ });
 1376+ },
 1377+ queue: function(type, data){
 1378+ if ( typeof type !== "string" ) {
 1379+ data = type;
 1380+ type = "fx";
 1381+ }
 1382+
 1383+ if ( data === undefined )
 1384+ return jQuery.queue( this[0], type );
 1385+
 1386+ return this.each(function(){
 1387+ var queue = jQuery.queue( this, type, data );
 1388+
 1389+ if( type == "fx" && queue.length == 1 )
 1390+ queue[0].call(this);
 1391+ });
 1392+ },
 1393+ dequeue: function(type){
 1394+ return this.each(function(){
 1395+ jQuery.dequeue( this, type );
 1396+ });
 1397+ }
 1398+});/*!
 1399+ * Sizzle CSS Selector Engine - v0.9.3
 1400+ * Copyright 2009, The Dojo Foundation
 1401+ * Released under the MIT, BSD, and GPL Licenses.
 1402+ * More information: http://sizzlejs.com/
 1403+ */
 1404+(function(){
 1405+
 1406+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,
 1407+ done = 0,
 1408+ toString = Object.prototype.toString;
 1409+
 1410+var Sizzle = function(selector, context, results, seed) {
 1411+ results = results || [];
 1412+ context = context || document;
 1413+
 1414+ if ( context.nodeType !== 1 && context.nodeType !== 9 )
 1415+ return [];
 1416+
 1417+ if ( !selector || typeof selector !== "string" ) {
 1418+ return results;
 1419+ }
 1420+
 1421+ var parts = [], m, set, checkSet, check, mode, extra, prune = true;
 1422+
 1423+ // Reset the position of the chunker regexp (start from head)
 1424+ chunker.lastIndex = 0;
 1425+
 1426+ while ( (m = chunker.exec(selector)) !== null ) {
 1427+ parts.push( m[1] );
 1428+
 1429+ if ( m[2] ) {
 1430+ extra = RegExp.rightContext;
 1431+ break;
 1432+ }
 1433+ }
 1434+
 1435+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
 1436+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
 1437+ set = posProcess( parts[0] + parts[1], context );
 1438+ } else {
 1439+ set = Expr.relative[ parts[0] ] ?
 1440+ [ context ] :
 1441+ Sizzle( parts.shift(), context );
 1442+
 1443+ while ( parts.length ) {
 1444+ selector = parts.shift();
 1445+
 1446+ if ( Expr.relative[ selector ] )
 1447+ selector += parts.shift();
 1448+
 1449+ set = posProcess( selector, set );
 1450+ }
 1451+ }
 1452+ } else {
 1453+ var ret = seed ?
 1454+ { expr: parts.pop(), set: makeArray(seed) } :
 1455+ Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, isXML(context) );
 1456+ set = Sizzle.filter( ret.expr, ret.set );
 1457+
 1458+ if ( parts.length > 0 ) {
 1459+ checkSet = makeArray(set);
 1460+ } else {
 1461+ prune = false;
 1462+ }
 1463+
 1464+ while ( parts.length ) {
 1465+ var cur = parts.pop(), pop = cur;
 1466+
 1467+ if ( !Expr.relative[ cur ] ) {
 1468+ cur = "";
 1469+ } else {
 1470+ pop = parts.pop();
 1471+ }
 1472+
 1473+ if ( pop == null ) {
 1474+ pop = context;
 1475+ }
 1476+
 1477+ Expr.relative[ cur ]( checkSet, pop, isXML(context) );
 1478+ }
 1479+ }
 1480+
 1481+ if ( !checkSet ) {
 1482+ checkSet = set;
 1483+ }
 1484+
 1485+ if ( !checkSet ) {
 1486+ throw "Syntax error, unrecognized expression: " + (cur || selector);
 1487+ }
 1488+
 1489+ if ( toString.call(checkSet) === "[object Array]" ) {
 1490+ if ( !prune ) {
 1491+ results.push.apply( results, checkSet );
 1492+ } else if ( context.nodeType === 1 ) {
 1493+ for ( var i = 0; checkSet[i] != null; i++ ) {
 1494+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
 1495+ results.push( set[i] );
 1496+ }
 1497+ }
 1498+ } else {
 1499+ for ( var i = 0; checkSet[i] != null; i++ ) {
 1500+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
 1501+ results.push( set[i] );
 1502+ }
 1503+ }
 1504+ }
 1505+ } else {
 1506+ makeArray( checkSet, results );
 1507+ }
 1508+
 1509+ if ( extra ) {
 1510+ Sizzle( extra, context, results, seed );
 1511+ }
 1512+
 1513+ return results;
 1514+};
 1515+
 1516+Sizzle.matches = function(expr, set){
 1517+ return Sizzle(expr, null, null, set);
 1518+};
 1519+
 1520+Sizzle.find = function(expr, context, isXML){
 1521+ var set, match;
 1522+
 1523+ if ( !expr ) {
 1524+ return [];
 1525+ }
 1526+
 1527+ for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
 1528+ var type = Expr.order[i], match;
 1529+
 1530+ if ( (match = Expr.match[ type ].exec( expr )) ) {
 1531+ var left = RegExp.leftContext;
 1532+
 1533+ if ( left.substr( left.length - 1 ) !== "\\" ) {
 1534+ match[1] = (match[1] || "").replace(/\\/g, "");
 1535+ set = Expr.find[ type ]( match, context, isXML );
 1536+ if ( set != null ) {
 1537+ expr = expr.replace( Expr.match[ type ], "" );
 1538+ break;
 1539+ }
 1540+ }
 1541+ }
 1542+ }
 1543+
 1544+ if ( !set ) {
 1545+ set = context.getElementsByTagName("*");
 1546+ }
 1547+
 1548+ return {set: set, expr: expr};
 1549+};
 1550+
 1551+Sizzle.filter = function(expr, set, inplace, not){
 1552+ var old = expr, result = [], curLoop = set, match, anyFound;
 1553+
 1554+ while ( expr && set.length ) {
 1555+ for ( var type in Expr.filter ) {
 1556+ if ( (match = Expr.match[ type ].exec( expr )) != null ) {
 1557+ var filter = Expr.filter[ type ], found, item;
 1558+ anyFound = false;
 1559+
 1560+ if ( curLoop == result ) {
 1561+ result = [];
 1562+ }
 1563+
 1564+ if ( Expr.preFilter[ type ] ) {
 1565+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not );
 1566+
 1567+ if ( !match ) {
 1568+ anyFound = found = true;
 1569+ } else if ( match === true ) {
 1570+ continue;
 1571+ }
 1572+ }
 1573+
 1574+ if ( match ) {
 1575+ for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
 1576+ if ( item ) {
 1577+ found = filter( item, match, i, curLoop );
 1578+ var pass = not ^ !!found;
 1579+
 1580+ if ( inplace && found != null ) {
 1581+ if ( pass ) {
 1582+ anyFound = true;
 1583+ } else {
 1584+ curLoop[i] = false;
 1585+ }
 1586+ } else if ( pass ) {
 1587+ result.push( item );
 1588+ anyFound = true;
 1589+ }
 1590+ }
 1591+ }
 1592+ }
 1593+
 1594+ if ( found !== undefined ) {
 1595+ if ( !inplace ) {
 1596+ curLoop = result;
 1597+ }
 1598+
 1599+ expr = expr.replace( Expr.match[ type ], "" );
 1600+
 1601+ if ( !anyFound ) {
 1602+ return [];
 1603+ }
 1604+
 1605+ break;
 1606+ }
 1607+ }
 1608+ }
 1609+
 1610+ expr = expr.replace(/\s*,\s*/, "");
 1611+
 1612+ // Improper expression
 1613+ if ( expr == old ) {
 1614+ if ( anyFound == null ) {
 1615+ throw "Syntax error, unrecognized expression: " + expr;
 1616+ } else {
 1617+ break;
 1618+ }
 1619+ }
 1620+
 1621+ old = expr;
 1622+ }
 1623+
 1624+ return curLoop;
 1625+};
 1626+
 1627+var Expr = Sizzle.selectors = {
 1628+ order: [ "ID", "NAME", "TAG" ],
 1629+ match: {
 1630+ ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
 1631+ CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
 1632+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
 1633+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
 1634+ TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
 1635+ CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
 1636+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
 1637+ PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
 1638+ },
 1639+ attrMap: {
 1640+ "class": "className",
 1641+ "for": "htmlFor"
 1642+ },
 1643+ attrHandle: {
 1644+ href: function(elem){
 1645+ return elem.getAttribute("href");
 1646+ }
 1647+ },
 1648+ relative: {
 1649+ "+": function(checkSet, part){
 1650+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
 1651+ var elem = checkSet[i];
 1652+ if ( elem ) {
 1653+ var cur = elem.previousSibling;
 1654+ while ( cur && cur.nodeType !== 1 ) {
 1655+ cur = cur.previousSibling;
 1656+ }
 1657+ checkSet[i] = typeof part === "string" ?
 1658+ cur || false :
 1659+ cur === part;
 1660+ }
 1661+ }
 1662+
 1663+ if ( typeof part === "string" ) {
 1664+ Sizzle.filter( part, checkSet, true );
 1665+ }
 1666+ },
 1667+ ">": function(checkSet, part, isXML){
 1668+ if ( typeof part === "string" && !/\W/.test(part) ) {
 1669+ part = isXML ? part : part.toUpperCase();
 1670+
 1671+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
 1672+ var elem = checkSet[i];
 1673+ if ( elem ) {
 1674+ var parent = elem.parentNode;
 1675+ checkSet[i] = parent.nodeName === part ? parent : false;
 1676+ }
 1677+ }
 1678+ } else {
 1679+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
 1680+ var elem = checkSet[i];
 1681+ if ( elem ) {
 1682+ checkSet[i] = typeof part === "string" ?
 1683+ elem.parentNode :
 1684+ elem.parentNode === part;
 1685+ }
 1686+ }
 1687+
 1688+ if ( typeof part === "string" ) {
 1689+ Sizzle.filter( part, checkSet, true );
 1690+ }
 1691+ }
 1692+ },
 1693+ "": function(checkSet, part, isXML){
 1694+ var doneName = "done" + (done++), checkFn = dirCheck;
 1695+
 1696+ if ( !part.match(/\W/) ) {
 1697+ var nodeCheck = part = isXML ? part : part.toUpperCase();
 1698+ checkFn = dirNodeCheck;
 1699+ }
 1700+
 1701+ checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
 1702+ },
 1703+ "~": function(checkSet, part, isXML){
 1704+ var doneName = "done" + (done++), checkFn = dirCheck;
 1705+
 1706+ if ( typeof part === "string" && !part.match(/\W/) ) {
 1707+ var nodeCheck = part = isXML ? part : part.toUpperCase();
 1708+ checkFn = dirNodeCheck;
 1709+ }
 1710+
 1711+ checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
 1712+ }
 1713+ },
 1714+ find: {
 1715+ ID: function(match, context, isXML){
 1716+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
 1717+ var m = context.getElementById(match[1]);
 1718+ return m ? [m] : [];
 1719+ }
 1720+ },
 1721+ NAME: function(match, context, isXML){
 1722+ if ( typeof context.getElementsByName !== "undefined" && !isXML ) {
 1723+ return context.getElementsByName(match[1]);
 1724+ }
 1725+ },
 1726+ TAG: function(match, context){
 1727+ return context.getElementsByTagName(match[1]);
 1728+ }
 1729+ },
 1730+ preFilter: {
 1731+ CLASS: function(match, curLoop, inplace, result, not){
 1732+ match = " " + match[1].replace(/\\/g, "") + " ";
 1733+
 1734+ var elem;
 1735+ for ( var i = 0; (elem = curLoop[i]) != null; i++ ) {
 1736+ if ( elem ) {
 1737+ if ( not ^ (" " + elem.className + " ").indexOf(match) >= 0 ) {
 1738+ if ( !inplace )
 1739+ result.push( elem );
 1740+ } else if ( inplace ) {
 1741+ curLoop[i] = false;
 1742+ }
 1743+ }
 1744+ }
 1745+
 1746+ return false;
 1747+ },
 1748+ ID: function(match){
 1749+ return match[1].replace(/\\/g, "");
 1750+ },
 1751+ TAG: function(match, curLoop){
 1752+ for ( var i = 0; curLoop[i] === false; i++ ){}
 1753+ return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
 1754+ },
 1755+ CHILD: function(match){
 1756+ if ( match[1] == "nth" ) {
 1757+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
 1758+ var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
 1759+ match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
 1760+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
 1761+
 1762+ // calculate the numbers (first)n+(last) including if they are negative
 1763+ match[2] = (test[1] + (test[2] || 1)) - 0;
 1764+ match[3] = test[3] - 0;
 1765+ }
 1766+
 1767+ // TODO: Move to normal caching system
 1768+ match[0] = "done" + (done++);
 1769+
 1770+ return match;
 1771+ },
 1772+ ATTR: function(match){
 1773+ var name = match[1].replace(/\\/g, "");
 1774+
 1775+ if ( Expr.attrMap[name] ) {
 1776+ match[1] = Expr.attrMap[name];
 1777+ }
 1778+
 1779+ if ( match[2] === "~=" ) {
 1780+ match[4] = " " + match[4] + " ";
 1781+ }
 1782+
 1783+ return match;
 1784+ },
 1785+ PSEUDO: function(match, curLoop, inplace, result, not){
 1786+ if ( match[1] === "not" ) {
 1787+ // If we're dealing with a complex expression, or a simple one
 1788+ if ( match[3].match(chunker).length > 1 ) {
 1789+ match[3] = Sizzle(match[3], null, null, curLoop);
 1790+ } else {
 1791+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
 1792+ if ( !inplace ) {
 1793+ result.push.apply( result, ret );
 1794+ }
 1795+ return false;
 1796+ }
 1797+ } else if ( Expr.match.POS.test( match[0] ) ) {
 1798+ return true;
 1799+ }
 1800+
 1801+ return match;
 1802+ },
 1803+ POS: function(match){
 1804+ match.unshift( true );
 1805+ return match;
 1806+ }
 1807+ },
 1808+ filters: {
 1809+ enabled: function(elem){
 1810+ return elem.disabled === false && elem.type !== "hidden";
 1811+ },
 1812+ disabled: function(elem){
 1813+ return elem.disabled === true;
 1814+ },
 1815+ checked: function(elem){
 1816+ return elem.checked === true;
 1817+ },
 1818+ selected: function(elem){
 1819+ // Accessing this property makes selected-by-default
 1820+ // options in Safari work properly
 1821+ elem.parentNode.selectedIndex;
 1822+ return elem.selected === true;
 1823+ },
 1824+ parent: function(elem){
 1825+ return !!elem.firstChild;
 1826+ },
 1827+ empty: function(elem){
 1828+ return !elem.firstChild;
 1829+ },
 1830+ has: function(elem, i, match){
 1831+ return !!Sizzle( match[3], elem ).length;
 1832+ },
 1833+ header: function(elem){
 1834+ return /h\d/i.test( elem.nodeName );
 1835+ },
 1836+ text: function(elem){
 1837+ return "text" === elem.type;
 1838+ },
 1839+ radio: function(elem){
 1840+ return "radio" === elem.type;
 1841+ },
 1842+ checkbox: function(elem){
 1843+ return "checkbox" === elem.type;
 1844+ },
 1845+ file: function(elem){
 1846+ return "file" === elem.type;
 1847+ },
 1848+ password: function(elem){
 1849+ return "password" === elem.type;
 1850+ },
 1851+ submit: function(elem){
 1852+ return "submit" === elem.type;
 1853+ },
 1854+ image: function(elem){
 1855+ return "image" === elem.type;
 1856+ },
 1857+ reset: function(elem){
 1858+ return "reset" === elem.type;
 1859+ },
 1860+ button: function(elem){
 1861+ return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
 1862+ },
 1863+ input: function(elem){
 1864+ return /input|select|textarea|button/i.test(elem.nodeName);
 1865+ }
 1866+ },
 1867+ setFilters: {
 1868+ first: function(elem, i){
 1869+ return i === 0;
 1870+ },
 1871+ last: function(elem, i, match, array){
 1872+ return i === array.length - 1;
 1873+ },
 1874+ even: function(elem, i){
 1875+ return i % 2 === 0;
 1876+ },
 1877+ odd: function(elem, i){
 1878+ return i % 2 === 1;
 1879+ },
 1880+ lt: function(elem, i, match){
 1881+ return i < match[3] - 0;
 1882+ },
 1883+ gt: function(elem, i, match){
 1884+ return i > match[3] - 0;
 1885+ },
 1886+ nth: function(elem, i, match){
 1887+ return match[3] - 0 == i;
 1888+ },
 1889+ eq: function(elem, i, match){
 1890+ return match[3] - 0 == i;
 1891+ }
 1892+ },
 1893+ filter: {
 1894+ CHILD: function(elem, match){
 1895+ var type = match[1], parent = elem.parentNode;
 1896+
 1897+ var doneName = match[0];
 1898+
 1899+ if ( parent && (!parent[ doneName ] || !elem.nodeIndex) ) {
 1900+ var count = 1;
 1901+
 1902+ for ( var node = parent.firstChild; node; node = node.nextSibling ) {
 1903+ if ( node.nodeType == 1 ) {
 1904+ node.nodeIndex = count++;
 1905+ }
 1906+ }
 1907+
 1908+ parent[ doneName ] = count - 1;
 1909+ }
 1910+
 1911+ if ( type == "first" ) {
 1912+ return elem.nodeIndex == 1;
 1913+ } else if ( type == "last" ) {
 1914+ return elem.nodeIndex == parent[ doneName ];
 1915+ } else if ( type == "only" ) {
 1916+ return parent[ doneName ] == 1;
 1917+ } else if ( type == "nth" ) {
 1918+ var add = false, first = match[2], last = match[3];
 1919+
 1920+ if ( first == 1 && last == 0 ) {
 1921+ return true;
 1922+ }
 1923+
 1924+ if ( first == 0 ) {
 1925+ if ( elem.nodeIndex == last ) {
 1926+ add = true;
 1927+ }
 1928+ } else if ( (elem.nodeIndex - last) % first == 0 && (elem.nodeIndex - last) / first >= 0 ) {
 1929+ add = true;
 1930+ }
 1931+
 1932+ return add;
 1933+ }
 1934+ },
 1935+ PSEUDO: function(elem, match, i, array){
 1936+ var name = match[1], filter = Expr.filters[ name ];
 1937+
 1938+ if ( filter ) {
 1939+ return filter( elem, i, match, array );
 1940+ } else if ( name === "contains" ) {
 1941+ return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0;
 1942+ } else if ( name === "not" ) {
 1943+ var not = match[3];
 1944+
 1945+ for ( var i = 0, l = not.length; i < l; i++ ) {
 1946+ if ( not[i] === elem ) {
 1947+ return false;
 1948+ }
 1949+ }
 1950+
 1951+ return true;
 1952+ }
 1953+ },
 1954+ ID: function(elem, match){
 1955+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
 1956+ },
 1957+ TAG: function(elem, match){
 1958+ return (match === "*" && elem.nodeType === 1) || elem.nodeName === match;
 1959+ },
 1960+ CLASS: function(elem, match){
 1961+ return match.test( elem.className );
 1962+ },
 1963+ ATTR: function(elem, match){
 1964+ var result = Expr.attrHandle[ match[1] ] ? Expr.attrHandle[ match[1] ]( elem ) : elem[ match[1] ] || elem.getAttribute( match[1] ), value = result + "", type = match[2], check = match[4];
 1965+ return result == null ?
 1966+ type === "!=" :
 1967+ type === "=" ?
 1968+ value === check :
 1969+ type === "*=" ?
 1970+ value.indexOf(check) >= 0 :
 1971+ type === "~=" ?
 1972+ (" " + value + " ").indexOf(check) >= 0 :
 1973+ !match[4] ?
 1974+ result :
 1975+ type === "!=" ?
 1976+ value != check :
 1977+ type === "^=" ?
 1978+ value.indexOf(check) === 0 :
 1979+ type === "$=" ?
 1980+ value.substr(value.length - check.length) === check :
 1981+ type === "|=" ?
 1982+ value === check || value.substr(0, check.length + 1) === check + "-" :
 1983+ false;
 1984+ },
 1985+ POS: function(elem, match, i, array){
 1986+ var name = match[2], filter = Expr.setFilters[ name ];
 1987+
 1988+ if ( filter ) {
 1989+ return filter( elem, i, match, array );
 1990+ }
 1991+ }
 1992+ }
 1993+};
 1994+
 1995+var origPOS = Expr.match.POS;
 1996+
 1997+for ( var type in Expr.match ) {
 1998+ Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
 1999+}
 2000+
 2001+var makeArray = function(array, results) {
 2002+ array = Array.prototype.slice.call( array );
 2003+
 2004+ if ( results ) {
 2005+ results.push.apply( results, array );
 2006+ return results;
 2007+ }
 2008+
 2009+ return array;
 2010+};
 2011+
 2012+// Perform a simple check to determine if the browser is capable of
 2013+// converting a NodeList to an array using builtin methods.
 2014+try {
 2015+ Array.prototype.slice.call( document.documentElement.childNodes );
 2016+
 2017+// Provide a fallback method if it does not work
 2018+} catch(e){
 2019+ makeArray = function(array, results) {
 2020+ var ret = results || [];
 2021+
 2022+ if ( toString.call(array) === "[object Array]" ) {
 2023+ Array.prototype.push.apply( ret, array );
 2024+ } else {
 2025+ if ( typeof array.length === "number" ) {
 2026+ for ( var i = 0, l = array.length; i < l; i++ ) {
 2027+ ret.push( array[i] );
 2028+ }
 2029+ } else {
 2030+ for ( var i = 0; array[i]; i++ ) {
 2031+ ret.push( array[i] );
 2032+ }
 2033+ }
 2034+ }
 2035+
 2036+ return ret;
 2037+ };
 2038+}
 2039+
 2040+// Check to see if the browser returns elements by name when
 2041+// querying by getElementById (and provide a workaround)
 2042+(function(){
 2043+ // We're going to inject a fake input element with a specified name
 2044+ var form = document.createElement("form"),
 2045+ id = "script" + (new Date).getTime();
 2046+ form.innerHTML = "<input name='" + id + "'/>";
 2047+
 2048+ // Inject it into the root element, check its status, and remove it quickly
 2049+ var root = document.documentElement;
 2050+ root.insertBefore( form, root.firstChild );
 2051+
 2052+ // The workaround has to do additional checks after a getElementById
 2053+ // Which slows things down for other browsers (hence the branching)
 2054+ if ( !!document.getElementById( id ) ) {
 2055+ Expr.find.ID = function(match, context, isXML){
 2056+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
 2057+ var m = context.getElementById(match[1]);
 2058+ return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
 2059+ }
 2060+ };
 2061+
 2062+ Expr.filter.ID = function(elem, match){
 2063+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
 2064+ return elem.nodeType === 1 && node && node.nodeValue === match;
 2065+ };
 2066+ }
 2067+
 2068+ root.removeChild( form );
 2069+})();
 2070+
 2071+(function(){
 2072+ // Check to see if the browser returns only elements
 2073+ // when doing getElementsByTagName("*")
 2074+
 2075+ // Create a fake element
 2076+ var div = document.createElement("div");
 2077+ div.appendChild( document.createComment("") );
 2078+
 2079+ // Make sure no comments are found
 2080+ if ( div.getElementsByTagName("*").length > 0 ) {
 2081+ Expr.find.TAG = function(match, context){
 2082+ var results = context.getElementsByTagName(match[1]);
 2083+
 2084+ // Filter out possible comments
 2085+ if ( match[1] === "*" ) {
 2086+ var tmp = [];
 2087+
 2088+ for ( var i = 0; results[i]; i++ ) {
 2089+ if ( results[i].nodeType === 1 ) {
 2090+ tmp.push( results[i] );
 2091+ }
 2092+ }
 2093+
 2094+ results = tmp;
 2095+ }
 2096+
 2097+ return results;
 2098+ };
 2099+ }
 2100+
 2101+ // Check to see if an attribute returns normalized href attributes
 2102+ div.innerHTML = "<a href='#'></a>";
 2103+ if ( div.firstChild && div.firstChild.getAttribute("href") !== "#" ) {
 2104+ Expr.attrHandle.href = function(elem){
 2105+ return elem.getAttribute("href", 2);
 2106+ };
 2107+ }
 2108+})();
 2109+
 2110+if ( document.querySelectorAll ) (function(){
 2111+ var oldSizzle = Sizzle, div = document.createElement("div");
 2112+ div.innerHTML = "<p class='TEST'></p>";
 2113+
 2114+ // Safari can't handle uppercase or unicode characters when
 2115+ // in quirks mode.
 2116+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
 2117+ return;
 2118+ }
 2119+
 2120+ Sizzle = function(query, context, extra, seed){
 2121+ context = context || document;
 2122+
 2123+ // Only use querySelectorAll on non-XML documents
 2124+ // (ID selectors don't work in non-HTML documents)
 2125+ if ( !seed && context.nodeType === 9 && !isXML(context) ) {
 2126+ try {
 2127+ return makeArray( context.querySelectorAll(query), extra );
 2128+ } catch(e){}
 2129+ }
 2130+
 2131+ return oldSizzle(query, context, extra, seed);
 2132+ };
 2133+
 2134+ Sizzle.find = oldSizzle.find;
 2135+ Sizzle.filter = oldSizzle.filter;
 2136+ Sizzle.selectors = oldSizzle.selectors;
 2137+ Sizzle.matches = oldSizzle.matches;
 2138+})();
 2139+
 2140+if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) {
 2141+ Expr.order.splice(1, 0, "CLASS");
 2142+ Expr.find.CLASS = function(match, context) {
 2143+ return context.getElementsByClassName(match[1]);
 2144+ };
 2145+}
 2146+
 2147+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
 2148+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
 2149+ var elem = checkSet[i];
 2150+ if ( elem ) {
 2151+ elem = elem[dir];
 2152+ var match = false;
 2153+
 2154+ while ( elem && elem.nodeType ) {
 2155+ var done = elem[doneName];
 2156+ if ( done ) {
 2157+ match = checkSet[ done ];
 2158+ break;
 2159+ }
 2160+
 2161+ if ( elem.nodeType === 1 && !isXML )
 2162+ elem[doneName] = i;
 2163+
 2164+ if ( elem.nodeName === cur ) {
 2165+ match = elem;
 2166+ break;
 2167+ }
 2168+
 2169+ elem = elem[dir];
 2170+ }
 2171+
 2172+ checkSet[i] = match;
 2173+ }
 2174+ }
 2175+}
 2176+
 2177+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
 2178+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
 2179+ var elem = checkSet[i];
 2180+ if ( elem ) {
 2181+ elem = elem[dir];
 2182+ var match = false;
 2183+
 2184+ while ( elem && elem.nodeType ) {
 2185+ if ( elem[doneName] ) {
 2186+ match = checkSet[ elem[doneName] ];
 2187+ break;
 2188+ }
 2189+
 2190+ if ( elem.nodeType === 1 ) {
 2191+ if ( !isXML )
 2192+ elem[doneName] = i;
 2193+
 2194+ if ( typeof cur !== "string" ) {
 2195+ if ( elem === cur ) {
 2196+ match = true;
 2197+ break;
 2198+ }
 2199+
 2200+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
 2201+ match = elem;
 2202+ break;
 2203+ }
 2204+ }
 2205+
 2206+ elem = elem[dir];
 2207+ }
 2208+
 2209+ checkSet[i] = match;
 2210+ }
 2211+ }
 2212+}
 2213+
 2214+var contains = document.compareDocumentPosition ? function(a, b){
 2215+ return a.compareDocumentPosition(b) & 16;
 2216+} : function(a, b){
 2217+ return a !== b && (a.contains ? a.contains(b) : true);
 2218+};
 2219+
 2220+var isXML = function(elem){
 2221+ return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
 2222+ !!elem.ownerDocument && isXML( elem.ownerDocument );
 2223+};
 2224+
 2225+var posProcess = function(selector, context){
 2226+ var tmpSet = [], later = "", match,
 2227+ root = context.nodeType ? [context] : context;
 2228+
 2229+ // Position selectors must be done after the filter
 2230+ // And so must :not(positional) so we move all PSEUDOs to the end
 2231+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
 2232+ later += match[0];
 2233+ selector = selector.replace( Expr.match.PSEUDO, "" );
 2234+ }
 2235+
 2236+ selector = Expr.relative[selector] ? selector + "*" : selector;
 2237+
 2238+ for ( var i = 0, l = root.length; i < l; i++ ) {
 2239+ Sizzle( selector, root[i], tmpSet );
 2240+ }
 2241+
 2242+ return Sizzle.filter( later, tmpSet );
 2243+};
 2244+
 2245+// EXPOSE
 2246+jQuery.find = Sizzle;
 2247+jQuery.filter = Sizzle.filter;
 2248+jQuery.expr = Sizzle.selectors;
 2249+jQuery.expr[":"] = jQuery.expr.filters;
 2250+
 2251+Sizzle.selectors.filters.hidden = function(elem){
 2252+ return "hidden" === elem.type ||
 2253+ jQuery.css(elem, "display") === "none" ||
 2254+ jQuery.css(elem, "visibility") === "hidden";
 2255+};
 2256+
 2257+Sizzle.selectors.filters.visible = function(elem){
 2258+ return "hidden" !== elem.type &&
 2259+ jQuery.css(elem, "display") !== "none" &&
 2260+ jQuery.css(elem, "visibility") !== "hidden";
 2261+};
 2262+
 2263+Sizzle.selectors.filters.animated = function(elem){
 2264+ return jQuery.grep(jQuery.timers, function(fn){
 2265+ return elem === fn.elem;
 2266+ }).length;
 2267+};
 2268+
 2269+jQuery.multiFilter = function( expr, elems, not ) {
 2270+ if ( not ) {
 2271+ expr = ":not(" + expr + ")";
 2272+ }
 2273+
 2274+ return Sizzle.matches(expr, elems);
 2275+};
 2276+
 2277+jQuery.dir = function( elem, dir ){
 2278+ var matched = [], cur = elem[dir];
 2279+ while ( cur && cur != document ) {
 2280+ if ( cur.nodeType == 1 )
 2281+ matched.push( cur );
 2282+ cur = cur[dir];
 2283+ }
 2284+ return matched;
 2285+};
 2286+
 2287+jQuery.nth = function(cur, result, dir, elem){
 2288+ result = result || 1;
 2289+ var num = 0;
 2290+
 2291+ for ( ; cur; cur = cur[dir] )
 2292+ if ( cur.nodeType == 1 && ++num == result )
 2293+ break;
 2294+
 2295+ return cur;
 2296+};
 2297+
 2298+jQuery.sibling = function(n, elem){
 2299+ var r = [];
 2300+
 2301+ for ( ; n; n = n.nextSibling ) {
 2302+ if ( n.nodeType == 1 && n != elem )
 2303+ r.push( n );
 2304+ }
 2305+
 2306+ return r;
 2307+};
 2308+
 2309+return;
 2310+
 2311+window.Sizzle = Sizzle;
 2312+
 2313+})();
 2314+/*
 2315+ * A number of helper functions used for managing events.
 2316+ * Many of the ideas behind this code originated from
 2317+ * Dean Edwards' addEvent library.
 2318+ */
 2319+jQuery.event = {
 2320+
 2321+ // Bind an event to an element
 2322+ // Original by Dean Edwards
 2323+ add: function(elem, types, handler, data) {
 2324+ if ( elem.nodeType == 3 || elem.nodeType == 8 )
 2325+ return;
 2326+
 2327+ // For whatever reason, IE has trouble passing the window object
 2328+ // around, causing it to be cloned in the process
 2329+ if ( elem.setInterval && elem != window )
 2330+ elem = window;
 2331+
 2332+ // Make sure that the function being executed has a unique ID
 2333+ if ( !handler.guid )
 2334+ handler.guid = this.guid++;
 2335+
 2336+ // if data is passed, bind to handler
 2337+ if ( data !== undefined ) {
 2338+ // Create temporary function pointer to original handler
 2339+ var fn = handler;
 2340+
 2341+ // Create unique handler function, wrapped around original handler
 2342+ handler = this.proxy( fn );
 2343+
 2344+ // Store data in unique handler
 2345+ handler.data = data;
 2346+ }
 2347+
 2348+ // Init the element's event structure
 2349+ var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
 2350+ handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
 2351+ // Handle the second event of a trigger and when
 2352+ // an event is called after a page has unloaded
 2353+ return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
 2354+ jQuery.event.handle.apply(arguments.callee.elem, arguments) :
 2355+ undefined;
 2356+ });
 2357+ // Add elem as a property of the handle function
 2358+ // This is to prevent a memory leak with non-native
 2359+ // event in IE.
 2360+ handle.elem = elem;
 2361+
 2362+ // Handle multiple events separated by a space
 2363+ // jQuery(...).bind("mouseover mouseout", fn);
 2364+ jQuery.each(types.split(/\s+/), function(index, type) {
 2365+ // Namespaced event handlers
 2366+ var namespaces = type.split(".");
 2367+ type = namespaces.shift();
 2368+ handler.type = namespaces.slice().sort().join(".");
 2369+
 2370+ // Get the current list of functions bound to this event
 2371+ var handlers = events[type];
 2372+
 2373+ if ( jQuery.event.specialAll[type] )
 2374+ jQuery.event.specialAll[type].setup.call(elem, data, namespaces);
 2375+
 2376+ // Init the event handler queue
 2377+ if (!handlers) {
 2378+ handlers = events[type] = {};
 2379+
 2380+ // Check for a special event handler
 2381+ // Only use addEventListener/attachEvent if the special
 2382+ // events handler returns false
 2383+ if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) {
 2384+ // Bind the global event handler to the element
 2385+ if (elem.addEventListener)
 2386+ elem.addEventListener(type, handle, false);
 2387+ else if (elem.attachEvent)
 2388+ elem.attachEvent("on" + type, handle);
 2389+ }
 2390+ }
 2391+
 2392+ // Add the function to the element's handler list
 2393+ handlers[handler.guid] = handler;
 2394+
 2395+ // Keep track of which events have been used, for global triggering
 2396+ jQuery.event.global[type] = true;
 2397+ });
 2398+
 2399+ // Nullify elem to prevent memory leaks in IE
 2400+ elem = null;
 2401+ },
 2402+
 2403+ guid: 1,
 2404+ global: {},
 2405+
 2406+ // Detach an event or set of events from an element
 2407+ remove: function(elem, types, handler) {
 2408+ // don't do events on text and comment nodes
 2409+ if ( elem.nodeType == 3 || elem.nodeType == 8 )
 2410+ return;
 2411+
 2412+ var events = jQuery.data(elem, "events"), ret, index;
 2413+
 2414+ if ( events ) {
 2415+ // Unbind all events for the element
 2416+ if ( types === undefined || (typeof types === "string" && types.charAt(0) == ".") )
 2417+ for ( var type in events )
 2418+ this.remove( elem, type + (types || "") );
 2419+ else {
 2420+ // types is actually an event object here
 2421+ if ( types.type ) {
 2422+ handler = types.handler;
 2423+ types = types.type;
 2424+ }
 2425+
 2426+ // Handle multiple events seperated by a space
 2427+ // jQuery(...).unbind("mouseover mouseout", fn);
 2428+ jQuery.each(types.split(/\s+/), function(index, type){
 2429+ // Namespaced event handlers
 2430+ var namespaces = type.split(".");
 2431+ type = namespaces.shift();
 2432+ var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
 2433+
 2434+ if ( events[type] ) {
 2435+ // remove the given handler for the given type
 2436+ if ( handler )
 2437+ delete events[type][handler.guid];
 2438+
 2439+ // remove all handlers for the given type
 2440+ else
 2441+ for ( var handle in events[type] )
 2442+ // Handle the removal of namespaced events
 2443+ if ( namespace.test(events[type][handle].type) )
 2444+ delete events[type][handle];
 2445+
 2446+ if ( jQuery.event.specialAll[type] )
 2447+ jQuery.event.specialAll[type].teardown.call(elem, namespaces);
 2448+
 2449+ // remove generic event handler if no more handlers exist
 2450+ for ( ret in events[type] ) break;
 2451+ if ( !ret ) {
 2452+ if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
 2453+ if (elem.removeEventListener)
 2454+ elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
 2455+ else if (elem.detachEvent)
 2456+ elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
 2457+ }
 2458+ ret = null;
 2459+ delete events[type];
 2460+ }
 2461+ }
 2462+ });
 2463+ }
 2464+
 2465+ // Remove the expando if it's no longer used
 2466+ for ( ret in events ) break;
 2467+ if ( !ret ) {
 2468+ var handle = jQuery.data( elem, "handle" );
 2469+ if ( handle ) handle.elem = null;
 2470+ jQuery.removeData( elem, "events" );
 2471+ jQuery.removeData( elem, "handle" );
 2472+ }
 2473+ }
 2474+ },
 2475+
 2476+ // bubbling is internal
 2477+ trigger: function( event, data, elem, bubbling ) {
 2478+ // Event object or event type
 2479+ var type = event.type || event;
 2480+
 2481+ if( !bubbling ){
 2482+ event = typeof event === "object" ?
 2483+ // jQuery.Event object
 2484+ event[expando] ? event :
 2485+ // Object literal
 2486+ jQuery.extend( jQuery.Event(type), event ) :
 2487+ // Just the event type (string)
 2488+ jQuery.Event(type);
 2489+
 2490+ if ( type.indexOf("!") >= 0 ) {
 2491+ event.type = type = type.slice(0, -1);
 2492+ event.exclusive = true;
 2493+ }
 2494+
 2495+ // Handle a global trigger
 2496+ if ( !elem ) {
 2497+ // Don't bubble custom events when global (to avoid too much overhead)
 2498+ event.stopPropagation();
 2499+ // Only trigger if we've ever bound an event for it
 2500+ if ( this.global[type] )
 2501+ jQuery.each( jQuery.cache, function(){
 2502+ if ( this.events && this.events[type] )
 2503+ jQuery.event.trigger( event, data, this.handle.elem );
 2504+ });
 2505+ }
 2506+
 2507+ // Handle triggering a single element
 2508+
 2509+ // don't do events on text and comment nodes
 2510+ if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
 2511+ return undefined;
 2512+
 2513+ // Clean up in case it is reused
 2514+ event.result = undefined;
 2515+ event.target = elem;
 2516+
 2517+ // Clone the incoming data, if any
 2518+ data = jQuery.makeArray(data);
 2519+ data.unshift( event );
 2520+ }
 2521+
 2522+ event.currentTarget = elem;
 2523+
 2524+ // Trigger the event, it is assumed that "handle" is a function
 2525+ var handle = jQuery.data(elem, "handle");
 2526+ if ( handle )
 2527+ handle.apply( elem, data );
 2528+
 2529+ // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
 2530+ if ( (!elem[type] || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
 2531+ event.result = false;
 2532+
 2533+ // Trigger the native events (except for clicks on links)
 2534+ if ( !bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
 2535+ this.triggered = true;
 2536+ try {
 2537+ elem[ type ]();
 2538+ // prevent IE from throwing an error for some hidden elements
 2539+ } catch (e) {}
 2540+ }
 2541+
 2542+ this.triggered = false;
 2543+
 2544+ if ( !event.isPropagationStopped() ) {
 2545+ var parent = elem.parentNode || elem.ownerDocument;
 2546+ if ( parent )
 2547+ jQuery.event.trigger(event, data, parent, true);
 2548+ }
 2549+ },
 2550+
 2551+ handle: function(event) {
 2552+ // returned undefined or false
 2553+ var all, handlers;
 2554+
 2555+ event = arguments[0] = jQuery.event.fix( event || window.event );
 2556+
 2557+ // Namespaced event handlers
 2558+ var namespaces = event.type.split(".");
 2559+ event.type = namespaces.shift();
 2560+
 2561+ // Cache this now, all = true means, any handler
 2562+ all = !namespaces.length && !event.exclusive;
 2563+
 2564+ var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
 2565+
 2566+ handlers = ( jQuery.data(this, "events") || {} )[event.type];
 2567+
 2568+ for ( var j in handlers ) {
 2569+ var handler = handlers[j];
 2570+
 2571+ // Filter the functions by class
 2572+ if ( all || namespace.test(handler.type) ) {
 2573+ // Pass in a reference to the handler function itself
 2574+ // So that we can later remove it
 2575+ event.handler = handler;
 2576+ event.data = handler.data;
 2577+
 2578+ var ret = handler.apply(this, arguments);
 2579+
 2580+ if( ret !== undefined ){
 2581+ event.result = ret;
 2582+ if ( ret === false ) {
 2583+ event.preventDefault();
 2584+ event.stopPropagation();
 2585+ }
 2586+ }
 2587+
 2588+ if( event.isImmediatePropagationStopped() )
 2589+ break;
 2590+
 2591+ }
 2592+ }
 2593+ },
 2594+
 2595+ props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
 2596+
 2597+ fix: function(event) {
 2598+ if ( event[expando] )
 2599+ return event;
 2600+
 2601+ // store a copy of the original event object
 2602+ // and "clone" to set read-only properties
 2603+ var originalEvent = event;
 2604+ event = jQuery.Event( originalEvent );
 2605+
 2606+ for ( var i = this.props.length, prop; i; ){
 2607+ prop = this.props[ --i ];
 2608+ event[ prop ] = originalEvent[ prop ];
 2609+ }
 2610+
 2611+ // Fix target property, if necessary
 2612+ if ( !event.target )
 2613+ event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
 2614+
 2615+ // check if target is a textnode (safari)
 2616+ if ( event.target.nodeType == 3 )
 2617+ event.target = event.target.parentNode;
 2618+
 2619+ // Add relatedTarget, if necessary
 2620+ if ( !event.relatedTarget && event.fromElement )
 2621+ event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
 2622+
 2623+ // Calculate pageX/Y if missing and clientX/Y available
 2624+ if ( event.pageX == null && event.clientX != null ) {
 2625+ var doc = document.documentElement, body = document.body;
 2626+ event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
 2627+ event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
 2628+ }
 2629+
 2630+ // Add which for key events
 2631+ if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
 2632+ event.which = event.charCode || event.keyCode;
 2633+
 2634+ // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
 2635+ if ( !event.metaKey && event.ctrlKey )
 2636+ event.metaKey = event.ctrlKey;
 2637+
 2638+ // Add which for click: 1 == left; 2 == middle; 3 == right
 2639+ // Note: button is not normalized, so don't use it
 2640+ if ( !event.which && event.button )
 2641+ event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
 2642+
 2643+ return event;
 2644+ },
 2645+
 2646+ proxy: function( fn, proxy ){
 2647+ proxy = proxy || function(){ return fn.apply(this, arguments); };
 2648+ // Set the guid of unique handler to the same of original handler, so it can be removed
 2649+ proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
 2650+ // So proxy can be declared as an argument
 2651+ return proxy;
 2652+ },
 2653+
 2654+ special: {
 2655+ ready: {
 2656+ // Make sure the ready event is setup
 2657+ setup: bindReady,
 2658+ teardown: function() {}
 2659+ }
 2660+ },
 2661+
 2662+ specialAll: {
 2663+ live: {
 2664+ setup: function( selector, namespaces ){
 2665+ jQuery.event.add( this, namespaces[0], liveHandler );
 2666+ },
 2667+ teardown: function( namespaces ){
 2668+ if ( namespaces.length ) {
 2669+ var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
 2670+
 2671+ jQuery.each( (jQuery.data(this, "events").live || {}), function(){
 2672+ if ( name.test(this.type) )
 2673+ remove++;
 2674+ });
 2675+
 2676+ if ( remove < 1 )
 2677+ jQuery.event.remove( this, namespaces[0], liveHandler );
 2678+ }
 2679+ }
 2680+ }
 2681+ }
 2682+};
 2683+
 2684+jQuery.Event = function( src ){
 2685+ // Allow instantiation without the 'new' keyword
 2686+ if( !this.preventDefault )
 2687+ return new jQuery.Event(src);
 2688+
 2689+ // Event object
 2690+ if( src && src.type ){
 2691+ this.originalEvent = src;
 2692+ this.type = src.type;
 2693+ // Event type
 2694+ }else
 2695+ this.type = src;
 2696+
 2697+ // timeStamp is buggy for some events on Firefox(#3843)
 2698+ // So we won't rely on the native value
 2699+ this.timeStamp = now();
 2700+
 2701+ // Mark it as fixed
 2702+ this[expando] = true;
 2703+};
 2704+
 2705+function returnFalse(){
 2706+ return false;
 2707+}
 2708+function returnTrue(){
 2709+ return true;
 2710+}
 2711+
 2712+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
 2713+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
 2714+jQuery.Event.prototype = {
 2715+ preventDefault: function() {
 2716+ this.isDefaultPrevented = returnTrue;
 2717+
 2718+ var e = this.originalEvent;
 2719+ if( !e )
 2720+ return;
 2721+ // if preventDefault exists run it on the original event
 2722+ if (e.preventDefault)
 2723+ e.preventDefault();
 2724+ // otherwise set the returnValue property of the original event to false (IE)
 2725+ e.returnValue = false;
 2726+ },
 2727+ stopPropagation: function() {
 2728+ this.isPropagationStopped = returnTrue;
 2729+
 2730+ var e = this.originalEvent;
 2731+ if( !e )
 2732+ return;
 2733+ // if stopPropagation exists run it on the original event
 2734+ if (e.stopPropagation)
 2735+ e.stopPropagation();
 2736+ // otherwise set the cancelBubble property of the original event to true (IE)
 2737+ e.cancelBubble = true;
 2738+ },
 2739+ stopImmediatePropagation:function(){
 2740+ this.isImmediatePropagationStopped = returnTrue;
 2741+ this.stopPropagation();
 2742+ },
 2743+ isDefaultPrevented: returnFalse,
 2744+ isPropagationStopped: returnFalse,
 2745+ isImmediatePropagationStopped: returnFalse
 2746+};
 2747+// Checks if an event happened on an element within another element
 2748+// Used in jQuery.event.special.mouseenter and mouseleave handlers
 2749+var withinElement = function(event) {
 2750+ // Check if mouse(over|out) are still within the same parent element
 2751+ var parent = event.relatedTarget;
 2752+ // Traverse up the tree
 2753+ while ( parent && parent != this )
 2754+ try { parent = parent.parentNode; }
 2755+ catch(e) { parent = this; }
 2756+
 2757+ if( parent != this ){
 2758+ // set the correct event type
 2759+ event.type = event.data;
 2760+ // handle event if we actually just moused on to a non sub-element
 2761+ jQuery.event.handle.apply( this, arguments );
 2762+ }
 2763+};
 2764+
 2765+jQuery.each({
 2766+ mouseover: 'mouseenter',
 2767+ mouseout: 'mouseleave'
 2768+}, function( orig, fix ){
 2769+ jQuery.event.special[ fix ] = {
 2770+ setup: function(){
 2771+ jQuery.event.add( this, orig, withinElement, fix );
 2772+ },
 2773+ teardown: function(){
 2774+ jQuery.event.remove( this, orig, withinElement );
 2775+ }
 2776+ };
 2777+});
 2778+
 2779+jQuery.fn.extend({
 2780+ bind: function( type, data, fn ) {
 2781+ return type == "unload" ? this.one(type, data, fn) : this.each(function(){
 2782+ jQuery.event.add( this, type, fn || data, fn && data );
 2783+ });
 2784+ },
 2785+
 2786+ one: function( type, data, fn ) {
 2787+ var one = jQuery.event.proxy( fn || data, function(event) {
 2788+ jQuery(this).unbind(event, one);
 2789+ return (fn || data).apply( this, arguments );
 2790+ });
 2791+ return this.each(function(){
 2792+ jQuery.event.add( this, type, one, fn && data);
 2793+ });
 2794+ },
 2795+
 2796+ unbind: function( type, fn ) {
 2797+ return this.each(function(){
 2798+ jQuery.event.remove( this, type, fn );
 2799+ });
 2800+ },
 2801+
 2802+ trigger: function( type, data ) {
 2803+ return this.each(function(){
 2804+ jQuery.event.trigger( type, data, this );
 2805+ });
 2806+ },
 2807+
 2808+ triggerHandler: function( type, data ) {
 2809+ if( this[0] ){
 2810+ var event = jQuery.Event(type);
 2811+ event.preventDefault();
 2812+ event.stopPropagation();
 2813+ jQuery.event.trigger( event, data, this[0] );
 2814+ return event.result;
 2815+ }
 2816+ },
 2817+
 2818+ toggle: function( fn ) {
 2819+ // Save reference to arguments for access in closure
 2820+ var args = arguments, i = 1;
 2821+
 2822+ // link all the functions, so any of them can unbind this click handler
 2823+ while( i < args.length )
 2824+ jQuery.event.proxy( fn, args[i++] );
 2825+
 2826+ return this.click( jQuery.event.proxy( fn, function(event) {
 2827+ // Figure out which function to execute
 2828+ this.lastToggle = ( this.lastToggle || 0 ) % i;
 2829+
 2830+ // Make sure that clicks stop
 2831+ event.preventDefault();
 2832+
 2833+ // and execute the function
 2834+ return args[ this.lastToggle++ ].apply( this, arguments ) || false;
 2835+ }));
 2836+ },
 2837+
 2838+ hover: function(fnOver, fnOut) {
 2839+ return this.mouseenter(fnOver).mouseleave(fnOut);
 2840+ },
 2841+
 2842+ ready: function(fn) {
 2843+ // Attach the listeners
 2844+ bindReady();
 2845+
 2846+ // If the DOM is already ready
 2847+ if ( jQuery.isReady )
 2848+ // Execute the function immediately
 2849+ fn.call( document, jQuery );
 2850+
 2851+ // Otherwise, remember the function for later
 2852+ else
 2853+ // Add the function to the wait list
 2854+ jQuery.readyList.push( fn );
 2855+
 2856+ return this;
 2857+ },
 2858+
 2859+ live: function( type, fn ){
 2860+ var proxy = jQuery.event.proxy( fn );
 2861+ proxy.guid += this.selector + type;
 2862+
 2863+ jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );
 2864+
 2865+ return this;
 2866+ },
 2867+
 2868+ die: function( type, fn ){
 2869+ jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
 2870+ return this;
 2871+ }
 2872+});
 2873+
 2874+function liveHandler( event ){
 2875+ var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
 2876+ stop = true,
 2877+ elems = [];
 2878+
 2879+ jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
 2880+ if ( check.test(fn.type) ) {
 2881+ var elem = jQuery(event.target).closest(fn.data)[0];
 2882+ if ( elem )
 2883+ elems.push({ elem: elem, fn: fn });
 2884+ }
 2885+ });
 2886+
 2887+ jQuery.each(elems, function(){
 2888+ if ( this.fn.call(this.elem, event, this.fn.data) === false )
 2889+ stop = false;
 2890+ });
 2891+
 2892+ return stop;
 2893+}
 2894+
 2895+function liveConvert(type, selector){
 2896+ return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".");
 2897+}
 2898+
 2899+jQuery.extend({
 2900+ isReady: false,
 2901+ readyList: [],
 2902+ // Handle when the DOM is ready
 2903+ ready: function() {
 2904+ // Make sure that the DOM is not already loaded
 2905+ if ( !jQuery.isReady ) {
 2906+ // Remember that the DOM is ready
 2907+ jQuery.isReady = true;
 2908+
 2909+ // If there are functions bound, to execute
 2910+ if ( jQuery.readyList ) {
 2911+ // Execute all of them
 2912+ jQuery.each( jQuery.readyList, function(){
 2913+ this.call( document, jQuery );
 2914+ });
 2915+
 2916+ // Reset the list of functions
 2917+ jQuery.readyList = null;
 2918+ }
 2919+
 2920+ // Trigger any bound ready events
 2921+ jQuery(document).triggerHandler("ready");
 2922+ }
 2923+ }
 2924+});
 2925+
 2926+var readyBound = false;
 2927+
 2928+function bindReady(){
 2929+ if ( readyBound ) return;
 2930+ readyBound = true;
 2931+
 2932+ // Mozilla, Opera and webkit nightlies currently support this event
 2933+ if ( document.addEventListener ) {
 2934+ // Use the handy event callback
 2935+ document.addEventListener( "DOMContentLoaded", function(){
 2936+ document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
 2937+ jQuery.ready();
 2938+ }, false );
 2939+
 2940+ // If IE event model is used
 2941+ } else if ( document.attachEvent ) {
 2942+ // ensure firing before onload,
 2943+ // maybe late but safe also for iframes
 2944+ document.attachEvent("onreadystatechange", function(){
 2945+ if ( document.readyState === "complete" ) {
 2946+ document.detachEvent( "onreadystatechange", arguments.callee );
 2947+ jQuery.ready();
 2948+ }
 2949+ });
 2950+
 2951+ // If IE and not an iframe
 2952+ // continually check to see if the document is ready
 2953+ if ( document.documentElement.doScroll && typeof window.frameElement === "undefined" ) (function(){
 2954+ if ( jQuery.isReady ) return;
 2955+
 2956+ try {
 2957+ // If IE is used, use the trick by Diego Perini
 2958+ // http://javascript.nwbox.com/IEContentLoaded/
 2959+ document.documentElement.doScroll("left");
 2960+ } catch( error ) {
 2961+ setTimeout( arguments.callee, 0 );
 2962+ return;
 2963+ }
 2964+
 2965+ // and execute any waiting functions
 2966+ jQuery.ready();
 2967+ })();
 2968+ }
 2969+
 2970+ // A fallback to window.onload, that will always work
 2971+ jQuery.event.add( window, "load", jQuery.ready );
 2972+}
 2973+
 2974+jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
 2975+ "mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
 2976+ "change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){
 2977+
 2978+ // Handle event binding
 2979+ jQuery.fn[name] = function(fn){
 2980+ return fn ? this.bind(name, fn) : this.trigger(name);
 2981+ };
 2982+});
 2983+
 2984+// Prevent memory leaks in IE
 2985+// And prevent errors on refresh with events like mouseover in other browsers
 2986+// Window isn't included so as not to unbind existing unload events
 2987+jQuery( window ).bind( 'unload', function(){
 2988+ for ( var id in jQuery.cache )
 2989+ // Skip the window
 2990+ if ( id != 1 && jQuery.cache[ id ].handle )
 2991+ jQuery.event.remove( jQuery.cache[ id ].handle.elem );
 2992+});
 2993+(function(){
 2994+
 2995+ jQuery.support = {};
 2996+
 2997+ var root = document.documentElement,
 2998+ script = document.createElement("script"),
 2999+ div = document.createElement("div"),
 3000+ id = "script" + (new Date).getTime();
 3001+
 3002+ div.style.display = "none";
 3003+ div.innerHTML = ' <link/><table></table><a href="https://www.mediawiki.org/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
 3004+
 3005+ var all = div.getElementsByTagName("*"),
 3006+ a = div.getElementsByTagName("a")[0];
 3007+
 3008+ // Can't get basic test support
 3009+ if ( !all || !all.length || !a ) {
 3010+ return;
 3011+ }
 3012+
 3013+ jQuery.support = {
 3014+ // IE strips leading whitespace when .innerHTML is used
 3015+ leadingWhitespace: div.firstChild.nodeType == 3,
 3016+
 3017+ // Make sure that tbody elements aren't automatically inserted
 3018+ // IE will insert them into empty tables
 3019+ tbody: !div.getElementsByTagName("tbody").length,
 3020+
 3021+ // Make sure that you can get all elements in an <object> element
 3022+ // IE 7 always returns no results
 3023+ objectAll: !!div.getElementsByTagName("object")[0]
 3024+ .getElementsByTagName("*").length,
 3025+
 3026+ // Make sure that link elements get serialized correctly by innerHTML
 3027+ // This requires a wrapper element in IE
 3028+ htmlSerialize: !!div.getElementsByTagName("link").length,
 3029+
 3030+ // Get the style information from getAttribute
 3031+ // (IE uses .cssText insted)
 3032+ style: /red/.test( a.getAttribute("style") ),
 3033+
 3034+ // Make sure that URLs aren't manipulated
 3035+ // (IE normalizes it by default)
 3036+ hrefNormalized: a.getAttribute("href") === "/a",
 3037+
 3038+ // Make sure that element opacity exists
 3039+ // (IE uses filter instead)
 3040+ opacity: a.style.opacity === "0.5",
 3041+
 3042+ // Verify style float existence
 3043+ // (IE uses styleFloat instead of cssFloat)
 3044+ cssFloat: !!a.style.cssFloat,
 3045+
 3046+ // Will be defined later
 3047+ scriptEval: false,
 3048+ noCloneEvent: true,
 3049+ boxModel: null
 3050+ };
 3051+
 3052+ script.type = "text/javascript";
 3053+ try {
 3054+ script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
 3055+ } catch(e){}
 3056+
 3057+ root.insertBefore( script, root.firstChild );
 3058+
 3059+ // Make sure that the execution of code works by injecting a script
 3060+ // tag with appendChild/createTextNode
 3061+ // (IE doesn't support this, fails, and uses .text instead)
 3062+ if ( window[ id ] ) {
 3063+ jQuery.support.scriptEval = true;
 3064+ delete window[ id ];
 3065+ }
 3066+
 3067+ root.removeChild( script );
 3068+
 3069+ if ( div.attachEvent && div.fireEvent ) {
 3070+ div.attachEvent("onclick", function(){
 3071+ // Cloning a node shouldn't copy over any
 3072+ // bound event handlers (IE does this)
 3073+ jQuery.support.noCloneEvent = false;
 3074+ div.detachEvent("onclick", arguments.callee);
 3075+ });
 3076+ div.cloneNode(true).fireEvent("onclick");
 3077+ }
 3078+
 3079+ // Figure out if the W3C box model works as expected
 3080+ // document.body must exist before we can do this
 3081+ jQuery(function(){
 3082+ var div = document.createElement("div");
 3083+ div.style.width = "1px";
 3084+ div.style.paddingLeft = "1px";
 3085+
 3086+ document.body.appendChild( div );
 3087+ jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
 3088+ document.body.removeChild( div );
 3089+ });
 3090+})();
 3091+
 3092+var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";
 3093+
 3094+jQuery.props = {
 3095+ "for": "htmlFor",
 3096+ "class": "className",
 3097+ "float": styleFloat,
 3098+ cssFloat: styleFloat,
 3099+ styleFloat: styleFloat,
 3100+ readonly: "readOnly",
 3101+ maxlength: "maxLength",
 3102+ cellspacing: "cellSpacing",
 3103+ rowspan: "rowSpan",
 3104+ tabindex: "tabIndex"
 3105+};
 3106+jQuery.fn.extend({
 3107+ // Keep a copy of the old load
 3108+ _load: jQuery.fn.load,
 3109+
 3110+ load: function( url, params, callback ) {
 3111+ if ( typeof url !== "string" )
 3112+ return this._load( url );
 3113+
 3114+ var off = url.indexOf(" ");
 3115+ if ( off >= 0 ) {
 3116+ var selector = url.slice(off, url.length);
 3117+ url = url.slice(0, off);
 3118+ }
 3119+
 3120+ // Default to a GET request
 3121+ var type = "GET";
 3122+
 3123+ // If the second parameter was provided
 3124+ if ( params )
 3125+ // If it's a function
 3126+ if ( jQuery.isFunction( params ) ) {
 3127+ // We assume that it's the callback
 3128+ callback = params;
 3129+ params = null;
 3130+
 3131+ // Otherwise, build a param string
 3132+ } else if( typeof params === "object" ) {
 3133+ params = jQuery.param( params );
 3134+ type = "POST";
 3135+ }
 3136+
 3137+ var self = this;
 3138+
 3139+ // Request the remote document
 3140+ jQuery.ajax({
 3141+ url: url,
 3142+ type: type,
 3143+ dataType: "html",
 3144+ data: params,
 3145+ complete: function(res, status){
 3146+ // If successful, inject the HTML into all the matched elements
 3147+ if ( status == "success" || status == "notmodified" )
 3148+ // See if a selector was specified
 3149+ self.html( selector ?
 3150+ // Create a dummy div to hold the results
 3151+ jQuery("<div/>")
 3152+ // inject the contents of the document in, removing the scripts
 3153+ // to avoid any 'Permission Denied' errors in IE
 3154+ .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
 3155+
 3156+ // Locate the specified elements
 3157+ .find(selector) :
 3158+
 3159+ // If not, just inject the full result
 3160+ res.responseText );
 3161+
 3162+ if( callback )
 3163+ self.each( callback, [res.responseText, status, res] );
 3164+ }
 3165+ });
 3166+ return this;
 3167+ },
 3168+
 3169+ serialize: function() {
 3170+ return jQuery.param(this.serializeArray());
 3171+ },
 3172+ serializeArray: function() {
 3173+ return this.map(function(){
 3174+ return this.elements ? jQuery.makeArray(this.elements) : this;
 3175+ })
 3176+ .filter(function(){
 3177+ return this.name && !this.disabled &&
 3178+ (this.checked || /select|textarea/i.test(this.nodeName) ||
 3179+ /text|hidden|password/i.test(this.type));
 3180+ })
 3181+ .map(function(i, elem){
 3182+ var val = jQuery(this).val();
 3183+ return val == null ? null :
 3184+ jQuery.isArray(val) ?
 3185+ jQuery.map( val, function(val, i){
 3186+ return {name: elem.name, value: val};
 3187+ }) :
 3188+ {name: elem.name, value: val};
 3189+ }).get();
 3190+ }
 3191+});
 3192+
 3193+// Attach a bunch of functions for handling common AJAX events
 3194+jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
 3195+ jQuery.fn[o] = function(f){
 3196+ return this.bind(o, f);
 3197+ };
 3198+});
 3199+
 3200+var jsc = now();
 3201+
 3202+jQuery.extend({
 3203+
 3204+ get: function( url, data, callback, type ) {
 3205+ // shift arguments if data argument was ommited
 3206+ if ( jQuery.isFunction( data ) ) {
 3207+ callback = data;
 3208+ data = null;
 3209+ }
 3210+
 3211+ return jQuery.ajax({
 3212+ type: "GET",
 3213+ url: url,
 3214+ data: data,
 3215+ success: callback,
 3216+ dataType: type
 3217+ });
 3218+ },
 3219+
 3220+ getScript: function( url, callback ) {
 3221+ return jQuery.get(url, null, callback, "script");
 3222+ },
 3223+
 3224+ getJSON: function( url, data, callback ) {
 3225+ return jQuery.get(url, data, callback, "json");
 3226+ },
 3227+
 3228+ post: function( url, data, callback, type ) {
 3229+ if ( jQuery.isFunction( data ) ) {
 3230+ callback = data;
 3231+ data = {};
 3232+ }
 3233+
 3234+ return jQuery.ajax({
 3235+ type: "POST",
 3236+ url: url,
 3237+ data: data,
 3238+ success: callback,
 3239+ dataType: type
 3240+ });
 3241+ },
 3242+
 3243+ ajaxSetup: function( settings ) {
 3244+ jQuery.extend( jQuery.ajaxSettings, settings );
 3245+ },
 3246+
 3247+ ajaxSettings: {
 3248+ url: location.href,
 3249+ global: true,
 3250+ type: "GET",
 3251+ contentType: "application/x-www-form-urlencoded",
 3252+ processData: true,
 3253+ async: true,
 3254+ /*
 3255+ timeout: 0,
 3256+ data: null,
 3257+ username: null,
 3258+ password: null,
 3259+ */
 3260+ // Create the request object; Microsoft failed to properly
 3261+ // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
 3262+ // This function can be overriden by calling jQuery.ajaxSetup
 3263+ xhr:function(){
 3264+ return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
 3265+ },
 3266+ accepts: {
 3267+ xml: "application/xml, text/xml",
 3268+ html: "text/html",
 3269+ script: "text/javascript, application/javascript",
 3270+ json: "application/json, text/javascript",
 3271+ text: "text/plain",
 3272+ _default: "*/*"
 3273+ }
 3274+ },
 3275+
 3276+ // Last-Modified header cache for next request
 3277+ lastModified: {},
 3278+
 3279+ ajax: function( s ) {
 3280+ // Extend the settings, but re-extend 's' so that it can be
 3281+ // checked again later (in the test suite, specifically)
 3282+ s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
 3283+
 3284+ var jsonp, jsre = /=\?(&|$)/g, status, data,
 3285+ type = s.type.toUpperCase();
 3286+
 3287+ // convert data if not already a string
 3288+ if ( s.data && s.processData && typeof s.data !== "string" )
 3289+ s.data = jQuery.param(s.data);
 3290+
 3291+ // Handle JSONP Parameter Callbacks
 3292+ if ( s.dataType == "jsonp" ) {
 3293+ if ( type == "GET" ) {
 3294+ if ( !s.url.match(jsre) )
 3295+ s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
 3296+ } else if ( !s.data || !s.data.match(jsre) )
 3297+ s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
 3298+ s.dataType = "json";
 3299+ }
 3300+
 3301+ // Build temporary JSONP function
 3302+ if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
 3303+ jsonp = "jsonp" + jsc++;
 3304+
 3305+ // Replace the =? sequence both in the query string and the data
 3306+ if ( s.data )
 3307+ s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
 3308+ s.url = s.url.replace(jsre, "=" + jsonp + "$1");
 3309+
 3310+ // We need to make sure
 3311+ // that a JSONP style response is executed properly
 3312+ s.dataType = "script";
 3313+
 3314+ // Handle JSONP-style loading
 3315+ window[ jsonp ] = function(tmp){
 3316+ data = tmp;
 3317+ success();
 3318+ complete();
 3319+ // Garbage collect
 3320+ window[ jsonp ] = undefined;
 3321+ try{ delete window[ jsonp ]; } catch(e){}
 3322+ if ( head )
 3323+ head.removeChild( script );
 3324+ };
 3325+ }
 3326+
 3327+ if ( s.dataType == "script" && s.cache == null )
 3328+ s.cache = false;
 3329+
 3330+ if ( s.cache === false && type == "GET" ) {
 3331+ var ts = now();
 3332+ // try replacing _= if it is there
 3333+ var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
 3334+ // if nothing was replaced, add timestamp to the end
 3335+ s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
 3336+ }
 3337+
 3338+ // If data is available, append data to url for get requests
 3339+ if ( s.data && type == "GET" ) {
 3340+ s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
 3341+
 3342+ // IE likes to send both get and post data, prevent this
 3343+ s.data = null;
 3344+ }
 3345+
 3346+ // Watch for a new set of requests
 3347+ if ( s.global && ! jQuery.active++ )
 3348+ jQuery.event.trigger( "ajaxStart" );
 3349+
 3350+ // Matches an absolute URL, and saves the domain
 3351+ var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );
 3352+
 3353+ // If we're requesting a remote document
 3354+ // and trying to load JSON or Script with a GET
 3355+ if ( s.dataType == "script" && type == "GET" && parts
 3356+ && ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){
 3357+
 3358+ var head = document.getElementsByTagName("head")[0];
 3359+ var script = document.createElement("script");
 3360+ script.src = s.url;
 3361+ if (s.scriptCharset)
 3362+ script.charset = s.scriptCharset;
 3363+
 3364+ // Handle Script loading
 3365+ if ( !jsonp ) {
 3366+ var done = false;
 3367+
 3368+ // Attach handlers for all browsers
 3369+ script.onload = script.onreadystatechange = function(){
 3370+ if ( !done && (!this.readyState ||
 3371+ this.readyState == "loaded" || this.readyState == "complete") ) {
 3372+ done = true;
 3373+ success();
 3374+ complete();
 3375+ head.removeChild( script );
 3376+ }
 3377+ };
 3378+ }
 3379+
 3380+ head.appendChild(script);
 3381+
 3382+ // We handle everything using the script element injection
 3383+ return undefined;
 3384+ }
 3385+
 3386+ var requestDone = false;
 3387+
 3388+ // Create the request object
 3389+ var xhr = s.xhr();
 3390+
 3391+ // Open the socket
 3392+ // Passing null username, generates a login popup on Opera (#2865)
 3393+ if( s.username )
 3394+ xhr.open(type, s.url, s.async, s.username, s.password);
 3395+ else
 3396+ xhr.open(type, s.url, s.async);
 3397+
 3398+ // Need an extra try/catch for cross domain requests in Firefox 3
 3399+ try {
 3400+ // Set the correct header, if data is being sent
 3401+ if ( s.data )
 3402+ xhr.setRequestHeader("Content-Type", s.contentType);
 3403+
 3404+ // Set the If-Modified-Since header, if ifModified mode.
 3405+ if ( s.ifModified )
 3406+ xhr.setRequestHeader("If-Modified-Since",
 3407+ jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
 3408+
 3409+ // Set header so the called script knows that it's an XMLHttpRequest
 3410+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
 3411+
 3412+ // Set the Accepts header for the server, depending on the dataType
 3413+ xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
 3414+ s.accepts[ s.dataType ] + ", */*" :
 3415+ s.accepts._default );
 3416+ } catch(e){}
 3417+
 3418+ // Allow custom headers/mimetypes and early abort
 3419+ if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
 3420+ // Handle the global AJAX counter
 3421+ if ( s.global && ! --jQuery.active )
 3422+ jQuery.event.trigger( "ajaxStop" );
 3423+ // close opended socket
 3424+ xhr.abort();
 3425+ return false;
 3426+ }
 3427+
 3428+ if ( s.global )
 3429+ jQuery.event.trigger("ajaxSend", [xhr, s]);
 3430+
 3431+ // Wait for a response to come back
 3432+ var onreadystatechange = function(isTimeout){
 3433+ // The request was aborted, clear the interval and decrement jQuery.active
 3434+ if (xhr.readyState == 0) {
 3435+ if (ival) {
 3436+ // clear poll interval
 3437+ clearInterval(ival);
 3438+ ival = null;
 3439+ // Handle the global AJAX counter
 3440+ if ( s.global && ! --jQuery.active )
 3441+ jQuery.event.trigger( "ajaxStop" );
 3442+ }
 3443+ // The transfer is complete and the data is available, or the request timed out
 3444+ } else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
 3445+ requestDone = true;
 3446+
 3447+ // clear poll interval
 3448+ if (ival) {
 3449+ clearInterval(ival);
 3450+ ival = null;
 3451+ }
 3452+
 3453+ status = isTimeout == "timeout" ? "timeout" :
 3454+ !jQuery.httpSuccess( xhr ) ? "error" :
 3455+ s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
 3456+ "success";
 3457+
 3458+ if ( status == "success" ) {
 3459+ // Watch for, and catch, XML document parse errors
 3460+ try {
 3461+ // process the data (runs the xml through httpData regardless of callback)
 3462+ data = jQuery.httpData( xhr, s.dataType, s );
 3463+ } catch(e) {
 3464+ status = "parsererror";
 3465+ }
 3466+ }
 3467+
 3468+ // Make sure that the request was successful or notmodified
 3469+ if ( status == "success" ) {
 3470+ // Cache Last-Modified header, if ifModified mode.
 3471+ var modRes;
 3472+ try {
 3473+ modRes = xhr.getResponseHeader("Last-Modified");
 3474+ } catch(e) {} // swallow exception thrown by FF if header is not available
 3475+
 3476+ if ( s.ifModified && modRes )
 3477+ jQuery.lastModified[s.url] = modRes;
 3478+
 3479+ // JSONP handles its own success callback
 3480+ if ( !jsonp )
 3481+ success();
 3482+ } else
 3483+ jQuery.handleError(s, xhr, status);
 3484+
 3485+ // Fire the complete handlers
 3486+ complete();
 3487+
 3488+ if ( isTimeout )
 3489+ xhr.abort();
 3490+
 3491+ // Stop memory leaks
 3492+ if ( s.async )
 3493+ xhr = null;
 3494+ }
 3495+ };
 3496+
 3497+ if ( s.async ) {
 3498+ // don't attach the handler to the request, just poll it instead
 3499+ var ival = setInterval(onreadystatechange, 13);
 3500+
 3501+ // Timeout checker
 3502+ if ( s.timeout > 0 )
 3503+ setTimeout(function(){
 3504+ // Check to see if the request is still happening
 3505+ if ( xhr && !requestDone )
 3506+ onreadystatechange( "timeout" );
 3507+ }, s.timeout);
 3508+ }
 3509+
 3510+ // Send the data
 3511+ try {
 3512+ xhr.send(s.data);
 3513+ } catch(e) {
 3514+ jQuery.handleError(s, xhr, null, e);
 3515+ }
 3516+
 3517+ // firefox 1.5 doesn't fire statechange for sync requests
 3518+ if ( !s.async )
 3519+ onreadystatechange();
 3520+
 3521+ function success(){
 3522+ // If a local callback was specified, fire it and pass it the data
 3523+ if ( s.success )
 3524+ s.success( data, status );
 3525+
 3526+ // Fire the global callback
 3527+ if ( s.global )
 3528+ jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
 3529+ }
 3530+
 3531+ function complete(){
 3532+ // Process result
 3533+ if ( s.complete )
 3534+ s.complete(xhr, status);
 3535+
 3536+ // The request was completed
 3537+ if ( s.global )
 3538+ jQuery.event.trigger( "ajaxComplete", [xhr, s] );
 3539+
 3540+ // Handle the global AJAX counter
 3541+ if ( s.global && ! --jQuery.active )
 3542+ jQuery.event.trigger( "ajaxStop" );
 3543+ }
 3544+
 3545+ // return XMLHttpRequest to allow aborting the request etc.
 3546+ return xhr;
 3547+ },
 3548+
 3549+ handleError: function( s, xhr, status, e ) {
 3550+ // If a local callback was specified, fire it
 3551+ if ( s.error ) s.error( xhr, status, e );
 3552+
 3553+ // Fire the global callback
 3554+ if ( s.global )
 3555+ jQuery.event.trigger( "ajaxError", [xhr, s, e] );
 3556+ },
 3557+
 3558+ // Counter for holding the number of active queries
 3559+ active: 0,
 3560+
 3561+ // Determines if an XMLHttpRequest was successful or not
 3562+ httpSuccess: function( xhr ) {
 3563+ try {
 3564+ // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
 3565+ return !xhr.status && location.protocol == "file:" ||
 3566+ ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223;
 3567+ } catch(e){}
 3568+ return false;
 3569+ },
 3570+
 3571+ // Determines if an XMLHttpRequest returns NotModified
 3572+ httpNotModified: function( xhr, url ) {
 3573+ try {
 3574+ var xhrRes = xhr.getResponseHeader("Last-Modified");
 3575+
 3576+ // Firefox always returns 200. check Last-Modified date
 3577+ return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
 3578+ } catch(e){}
 3579+ return false;
 3580+ },
 3581+
 3582+ httpData: function( xhr, type, s ) {
 3583+ var ct = xhr.getResponseHeader("content-type"),
 3584+ xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
 3585+ data = xml ? xhr.responseXML : xhr.responseText;
 3586+
 3587+ if ( xml && data.documentElement.tagName == "parsererror" )
 3588+ throw "parsererror";
 3589+
 3590+ // Allow a pre-filtering function to sanitize the response
 3591+ // s != null is checked to keep backwards compatibility
 3592+ if( s && s.dataFilter )
 3593+ data = s.dataFilter( data, type );
 3594+
 3595+ // The filter can actually parse the response
 3596+ if( typeof data === "string" ){
 3597+
 3598+ // If the type is "script", eval it in global context
 3599+ if ( type == "script" )
 3600+ jQuery.globalEval( data );
 3601+
 3602+ // Get the JavaScript object, if JSON is used.
 3603+ if ( type == "json" )
 3604+ data = window["eval"]("(" + data + ")");
 3605+ }
 3606+
 3607+ return data;
 3608+ },
 3609+
 3610+ // Serialize an array of form elements or a set of
 3611+ // key/values into a query string
 3612+ param: function( a ) {
 3613+ var s = [ ];
 3614+
 3615+ function add( key, value ){
 3616+ s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
 3617+ };
 3618+
 3619+ // If an array was passed in, assume that it is an array
 3620+ // of form elements
 3621+ if ( jQuery.isArray(a) || a.jquery )
 3622+ // Serialize the form elements
 3623+ jQuery.each( a, function(){
 3624+ add( this.name, this.value );
 3625+ });
 3626+
 3627+ // Otherwise, assume that it's an object of key/value pairs
 3628+ else
 3629+ // Serialize the key/values
 3630+ for ( var j in a )
 3631+ // If the value is an array then the key names need to be repeated
 3632+ if ( jQuery.isArray(a[j]) )
 3633+ jQuery.each( a[j], function(){
 3634+ add( j, this );
 3635+ });
 3636+ else
 3637+ add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );
 3638+
 3639+ // Return the resulting serialization
 3640+ return s.join("&").replace(/%20/g, "+");
 3641+ }
 3642+
 3643+});
 3644+var elemdisplay = {},
 3645+ timerId,
 3646+ fxAttrs = [
 3647+ // height animations
 3648+ [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
 3649+ // width animations
 3650+ [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
 3651+ // opacity animations
 3652+ [ "opacity" ]
 3653+ ];
 3654+
 3655+function genFx( type, num ){
 3656+ var obj = {};
 3657+ jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){
 3658+ obj[ this ] = type;
 3659+ });
 3660+ return obj;
 3661+}
 3662+
 3663+jQuery.fn.extend({
 3664+ show: function(speed,callback){
 3665+ if ( speed ) {
 3666+ return this.animate( genFx("show", 3), speed, callback);
 3667+ } else {
 3668+ for ( var i = 0, l = this.length; i < l; i++ ){
 3669+ var old = jQuery.data(this[i], "olddisplay");
 3670+
 3671+ this[i].style.display = old || "";
 3672+
 3673+ if ( jQuery.css(this[i], "display") === "none" ) {
 3674+ var tagName = this[i].tagName, display;
 3675+
 3676+ if ( elemdisplay[ tagName ] ) {
 3677+ display = elemdisplay[ tagName ];
 3678+ } else {
 3679+ var elem = jQuery("<" + tagName + " />").appendTo("body");
 3680+
 3681+ display = elem.css("display");
 3682+ if ( display === "none" )
 3683+ display = "block";
 3684+
 3685+ elem.remove();
 3686+
 3687+ elemdisplay[ tagName ] = display;
 3688+ }
 3689+
 3690+ this[i].style.display = jQuery.data(this[i], "olddisplay", display);
 3691+ }
 3692+ }
 3693+
 3694+ return this;
 3695+ }
 3696+ },
 3697+
 3698+ hide: function(speed,callback){
 3699+ if ( speed ) {
 3700+ return this.animate( genFx("hide", 3), speed, callback);
 3701+ } else {
 3702+ for ( var i = 0, l = this.length; i < l; i++ ){
 3703+ var old = jQuery.data(this[i], "olddisplay");
 3704+ if ( !old && old !== "none" )
 3705+ jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
 3706+ this[i].style.display = "none";
 3707+ }
 3708+ return this;
 3709+ }
 3710+ },
 3711+
 3712+ // Save the old toggle function
 3713+ _toggle: jQuery.fn.toggle,
 3714+
 3715+ toggle: function( fn, fn2 ){
 3716+ var bool = typeof fn === "boolean";
 3717+
 3718+ return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
 3719+ this._toggle.apply( this, arguments ) :
 3720+ fn == null || bool ?
 3721+ this.each(function(){
 3722+ var state = bool ? fn : jQuery(this).is(":hidden");
 3723+ jQuery(this)[ state ? "show" : "hide" ]();
 3724+ }) :
 3725+ this.animate(genFx("toggle", 3), fn, fn2);
 3726+ },
 3727+
 3728+ fadeTo: function(speed,to,callback){
 3729+ return this.animate({opacity: to}, speed, callback);
 3730+ },
 3731+
 3732+ animate: function( prop, speed, easing, callback ) {
 3733+ var optall = jQuery.speed(speed, easing, callback);
 3734+
 3735+ return this[ optall.queue === false ? "each" : "queue" ](function(){
 3736+
 3737+ var opt = jQuery.extend({}, optall), p,
 3738+ hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
 3739+ self = this;
 3740+
 3741+ for ( p in prop ) {
 3742+ if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
 3743+ return opt.complete.call(this);
 3744+
 3745+ if ( ( p == "height" || p == "width" ) && this.style ) {
 3746+ // Store display property
 3747+ opt.display = jQuery.css(this, "display");
 3748+
 3749+ // Make sure that nothing sneaks out
 3750+ opt.overflow = this.style.overflow;
 3751+ }
 3752+ }
 3753+
 3754+ if ( opt.overflow != null )
 3755+ this.style.overflow = "hidden";
 3756+
 3757+ opt.curAnim = jQuery.extend({}, prop);
 3758+
 3759+ jQuery.each( prop, function(name, val){
 3760+ var e = new jQuery.fx( self, opt, name );
 3761+
 3762+ if ( /toggle|show|hide/.test(val) )
 3763+ e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
 3764+ else {
 3765+ var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
 3766+ start = e.cur(true) || 0;
 3767+
 3768+ if ( parts ) {
 3769+ var end = parseFloat(parts[2]),
 3770+ unit = parts[3] || "px";
 3771+
 3772+ // We need to compute starting value
 3773+ if ( unit != "px" ) {
 3774+ self.style[ name ] = (end || 1) + unit;
 3775+ start = ((end || 1) / e.cur(true)) * start;
 3776+ self.style[ name ] = start + unit;
 3777+ }
 3778+
 3779+ // If a +=/-= token was provided, we're doing a relative animation
 3780+ if ( parts[1] )
 3781+ end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
 3782+
 3783+ e.custom( start, end, unit );
 3784+ } else
 3785+ e.custom( start, val, "" );
 3786+ }
 3787+ });
 3788+
 3789+ // For JS strict compliance
 3790+ return true;
 3791+ });
 3792+ },
 3793+
 3794+ stop: function(clearQueue, gotoEnd){
 3795+ var timers = jQuery.timers;
 3796+
 3797+ if (clearQueue)
 3798+ this.queue([]);
 3799+
 3800+ this.each(function(){
 3801+ // go in reverse order so anything added to the queue during the loop is ignored
 3802+ for ( var i = timers.length - 1; i >= 0; i-- )
 3803+ if ( timers[i].elem == this ) {
 3804+ if (gotoEnd)
 3805+ // force the next step to be the last
 3806+ timers[i](true);
 3807+ timers.splice(i, 1);
 3808+ }
 3809+ });
 3810+
 3811+ // start the next in the queue if the last step wasn't forced
 3812+ if (!gotoEnd)
 3813+ this.dequeue();
 3814+
 3815+ return this;
 3816+ }
 3817+
 3818+});
 3819+
 3820+// Generate shortcuts for custom animations
 3821+jQuery.each({
 3822+ slideDown: genFx("show", 1),
 3823+ slideUp: genFx("hide", 1),
 3824+ slideToggle: genFx("toggle", 1),
 3825+ fadeIn: { opacity: "show" },
 3826+ fadeOut: { opacity: "hide" }
 3827+}, function( name, props ){
 3828+ jQuery.fn[ name ] = function( speed, callback ){
 3829+ return this.animate( props, speed, callback );
 3830+ };
 3831+});
 3832+
 3833+jQuery.extend({
 3834+
 3835+ speed: function(speed, easing, fn) {
 3836+ var opt = typeof speed === "object" ? speed : {
 3837+ complete: fn || !fn && easing ||
 3838+ jQuery.isFunction( speed ) && speed,
 3839+ duration: speed,
 3840+ easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
 3841+ };
 3842+
 3843+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
 3844+ jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
 3845+
 3846+ // Queueing
 3847+ opt.old = opt.complete;
 3848+ opt.complete = function(){
 3849+ if ( opt.queue !== false )
 3850+ jQuery(this).dequeue();
 3851+ if ( jQuery.isFunction( opt.old ) )
 3852+ opt.old.call( this );
 3853+ };
 3854+
 3855+ return opt;
 3856+ },
 3857+
 3858+ easing: {
 3859+ linear: function( p, n, firstNum, diff ) {
 3860+ return firstNum + diff * p;
 3861+ },
 3862+ swing: function( p, n, firstNum, diff ) {
 3863+ return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
 3864+ }
 3865+ },
 3866+
 3867+ timers: [],
 3868+
 3869+ fx: function( elem, options, prop ){
 3870+ this.options = options;
 3871+ this.elem = elem;
 3872+ this.prop = prop;
 3873+
 3874+ if ( !options.orig )
 3875+ options.orig = {};
 3876+ }
 3877+
 3878+});
 3879+
 3880+jQuery.fx.prototype = {
 3881+
 3882+ // Simple function for setting a style value
 3883+ update: function(){
 3884+ if ( this.options.step )
 3885+ this.options.step.call( this.elem, this.now, this );
 3886+
 3887+ (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
 3888+
 3889+ // Set display property to block for height/width animations
 3890+ if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style )
 3891+ this.elem.style.display = "block";
 3892+ },
 3893+
 3894+ // Get the current size
 3895+ cur: function(force){
 3896+ if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) )
 3897+ return this.elem[ this.prop ];
 3898+
 3899+ var r = parseFloat(jQuery.css(this.elem, this.prop, force));
 3900+ return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
 3901+ },
 3902+
 3903+ // Start an animation from one number to another
 3904+ custom: function(from, to, unit){
 3905+ this.startTime = now();
 3906+ this.start = from;
 3907+ this.end = to;
 3908+ this.unit = unit || this.unit || "px";
 3909+ this.now = this.start;
 3910+ this.pos = this.state = 0;
 3911+
 3912+ var self = this;
 3913+ function t(gotoEnd){
 3914+ return self.step(gotoEnd);
 3915+ }
 3916+
 3917+ t.elem = this.elem;
 3918+
 3919+ if ( t() && jQuery.timers.push(t) == 1 ) {
 3920+ timerId = setInterval(function(){
 3921+ var timers = jQuery.timers;
 3922+
 3923+ for ( var i = 0; i < timers.length; i++ )
 3924+ if ( !timers[i]() )
 3925+ timers.splice(i--, 1);
 3926+
 3927+ if ( !timers.length ) {
 3928+ clearInterval( timerId );
 3929+ }
 3930+ }, 13);
 3931+ }
 3932+ },
 3933+
 3934+ // Simple 'show' function
 3935+ show: function(){
 3936+ // Remember where we started, so that we can go back to it later
 3937+ this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
 3938+ this.options.show = true;
 3939+
 3940+ // Begin the animation
 3941+ // Make sure that we start at a small width/height to avoid any
 3942+ // flash of content
 3943+ this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());
 3944+
 3945+ // Start by showing the element
 3946+ jQuery(this.elem).show();
 3947+ },
 3948+
 3949+ // Simple 'hide' function
 3950+ hide: function(){
 3951+ // Remember where we started, so that we can go back to it later
 3952+ this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
 3953+ this.options.hide = true;
 3954+
 3955+ // Begin the animation
 3956+ this.custom(this.cur(), 0);
 3957+ },
 3958+
 3959+ // Each step of an animation
 3960+ step: function(gotoEnd){
 3961+ var t = now();
 3962+
 3963+ if ( gotoEnd || t >= this.options.duration + this.startTime ) {
 3964+ this.now = this.end;
 3965+ this.pos = this.state = 1;
 3966+ this.update();
 3967+
 3968+ this.options.curAnim[ this.prop ] = true;
 3969+
 3970+ var done = true;
 3971+ for ( var i in this.options.curAnim )
 3972+ if ( this.options.curAnim[i] !== true )
 3973+ done = false;
 3974+
 3975+ if ( done ) {
 3976+ if ( this.options.display != null ) {
 3977+ // Reset the overflow
 3978+ this.elem.style.overflow = this.options.overflow;
 3979+
 3980+ // Reset the display
 3981+ this.elem.style.display = this.options.display;
 3982+ if ( jQuery.css(this.elem, "display") == "none" )
 3983+ this.elem.style.display = "block";
 3984+ }
 3985+
 3986+ // Hide the element if the "hide" operation was done
 3987+ if ( this.options.hide )
 3988+ jQuery(this.elem).hide();
 3989+
 3990+ // Reset the properties, if the item has been hidden or shown
 3991+ if ( this.options.hide || this.options.show )
 3992+ for ( var p in this.options.curAnim )
 3993+ jQuery.attr(this.elem.style, p, this.options.orig[p]);
 3994+
 3995+ // Execute the complete function
 3996+ this.options.complete.call( this.elem );
 3997+ }
 3998+
 3999+ return false;
 4000+ } else {
 4001+ var n = t - this.startTime;
 4002+ this.state = n / this.options.duration;
 4003+
 4004+ // Perform the easing function, defaults to swing
 4005+ this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
 4006+ this.now = this.start + ((this.end - this.start) * this.pos);
 4007+
 4008+ // Perform the next step of the animation
 4009+ this.update();
 4010+ }
 4011+
 4012+ return true;
 4013+ }
 4014+
 4015+};
 4016+
 4017+jQuery.extend( jQuery.fx, {
 4018+ speeds:{
 4019+ slow: 600,
 4020+ fast: 200,
 4021+ // Default speed
 4022+ _default: 400
 4023+ },
 4024+ step: {
 4025+
 4026+ opacity: function(fx){
 4027+ jQuery.attr(fx.elem.style, "opacity", fx.now);
 4028+ },
 4029+
 4030+ _default: function(fx){
 4031+ if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
 4032+ fx.elem.style[ fx.prop ] = fx.now + fx.unit;
 4033+ else
 4034+ fx.elem[ fx.prop ] = fx.now;
 4035+ }
 4036+ }
 4037+});
 4038+if ( document.documentElement["getBoundingClientRect"] )
 4039+ jQuery.fn.offset = function() {
 4040+ if ( !this[0] ) return { top: 0, left: 0 };
 4041+ if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
 4042+ var box = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
 4043+ clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
 4044+ top = box.top + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop,
 4045+ left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
 4046+ return { top: top, left: left };
 4047+ };
 4048+else
 4049+ jQuery.fn.offset = function() {
 4050+ if ( !this[0] ) return { top: 0, left: 0 };
 4051+ if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
 4052+ jQuery.offset.initialized || jQuery.offset.initialize();
 4053+
 4054+ var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem,
 4055+ doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
 4056+ body = doc.body, defaultView = doc.defaultView,
 4057+ prevComputedStyle = defaultView.getComputedStyle(elem, null),
 4058+ top = elem.offsetTop, left = elem.offsetLeft;
 4059+
 4060+ while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
 4061+ computedStyle = defaultView.getComputedStyle(elem, null);
 4062+ top -= elem.scrollTop, left -= elem.scrollLeft;
 4063+ if ( elem === offsetParent ) {
 4064+ top += elem.offsetTop, left += elem.offsetLeft;
 4065+ if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) )
 4066+ top += parseInt( computedStyle.borderTopWidth, 10) || 0,
 4067+ left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
 4068+ prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
 4069+ }
 4070+ if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" )
 4071+ top += parseInt( computedStyle.borderTopWidth, 10) || 0,
 4072+ left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
 4073+ prevComputedStyle = computedStyle;
 4074+ }
 4075+
 4076+ if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
 4077+ top += body.offsetTop,
 4078+ left += body.offsetLeft;
 4079+
 4080+ if ( prevComputedStyle.position === "fixed" )
 4081+ top += Math.max(docElem.scrollTop, body.scrollTop),
 4082+ left += Math.max(docElem.scrollLeft, body.scrollLeft);
 4083+
 4084+ return { top: top, left: left };
 4085+ };
 4086+
 4087+jQuery.offset = {
 4088+ initialize: function() {
 4089+ if ( this.initialized ) return;
 4090+ var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
 4091+ 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>';
 4092+
 4093+ rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
 4094+ for ( prop in rules ) container.style[prop] = rules[prop];
 4095+
 4096+ container.innerHTML = html;
 4097+ body.insertBefore(container, body.firstChild);
 4098+ innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;
 4099+
 4100+ this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
 4101+ this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
 4102+
 4103+ innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative';
 4104+ this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
 4105+
 4106+ body.style.marginTop = '1px';
 4107+ this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
 4108+ body.style.marginTop = bodyMarginTop;
 4109+
 4110+ body.removeChild(container);
 4111+ this.initialized = true;
 4112+ },
 4113+
 4114+ bodyOffset: function(body) {
 4115+ jQuery.offset.initialized || jQuery.offset.initialize();
 4116+ var top = body.offsetTop, left = body.offsetLeft;
 4117+ if ( jQuery.offset.doesNotIncludeMarginInBodyOffset )
 4118+ top += parseInt( jQuery.curCSS(body, 'marginTop', true), 10 ) || 0,
 4119+ left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0;
 4120+ return { top: top, left: left };
 4121+ }
 4122+};
 4123+
 4124+
 4125+jQuery.fn.extend({
 4126+ position: function() {
 4127+ var left = 0, top = 0, results;
 4128+
 4129+ if ( this[0] ) {
 4130+ // Get *real* offsetParent
 4131+ var offsetParent = this.offsetParent(),
 4132+
 4133+ // Get correct offsets
 4134+ offset = this.offset(),
 4135+ parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
 4136+
 4137+ // Subtract element margins
 4138+ // note: when an element has margin: auto the offsetLeft and marginLeft
 4139+ // are the same in Safari causing offset.left to incorrectly be 0
 4140+ offset.top -= num( this, 'marginTop' );
 4141+ offset.left -= num( this, 'marginLeft' );
 4142+
 4143+ // Add offsetParent borders
 4144+ parentOffset.top += num( offsetParent, 'borderTopWidth' );
 4145+ parentOffset.left += num( offsetParent, 'borderLeftWidth' );
 4146+
 4147+ // Subtract the two offsets
 4148+ results = {
 4149+ top: offset.top - parentOffset.top,
 4150+ left: offset.left - parentOffset.left
 4151+ };
 4152+ }
 4153+
 4154+ return results;
 4155+ },
 4156+
 4157+ offsetParent: function() {
 4158+ var offsetParent = this[0].offsetParent || document.body;
 4159+ while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
 4160+ offsetParent = offsetParent.offsetParent;
 4161+ return jQuery(offsetParent);
 4162+ }
 4163+});
 4164+
 4165+
 4166+// Create scrollLeft and scrollTop methods
 4167+jQuery.each( ['Left', 'Top'], function(i, name) {
 4168+ var method = 'scroll' + name;
 4169+
 4170+ jQuery.fn[ method ] = function(val) {
 4171+ if (!this[0]) return null;
 4172+
 4173+ return val !== undefined ?
 4174+
 4175+ // Set the scroll offset
 4176+ this.each(function() {
 4177+ this == window || this == document ?
 4178+ window.scrollTo(
 4179+ !i ? val : jQuery(window).scrollLeft(),
 4180+ i ? val : jQuery(window).scrollTop()
 4181+ ) :
 4182+ this[ method ] = val;
 4183+ }) :
 4184+
 4185+ // Return the scroll offset
 4186+ this[0] == window || this[0] == document ?
 4187+ self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
 4188+ jQuery.boxModel && document.documentElement[ method ] ||
 4189+ document.body[ method ] :
 4190+ this[0][ method ];
 4191+ };
 4192+});
 4193+// Create innerHeight, innerWidth, outerHeight and outerWidth methods
 4194+jQuery.each([ "Height", "Width" ], function(i, name){
 4195+
 4196+ var tl = i ? "Left" : "Top", // top or left
 4197+ br = i ? "Right" : "Bottom"; // bottom or right
 4198+
 4199+ // innerHeight and innerWidth
 4200+ jQuery.fn["inner" + name] = function(){
 4201+ return this[ name.toLowerCase() ]() +
 4202+ num(this, "padding" + tl) +
 4203+ num(this, "padding" + br);
 4204+ };
 4205+
 4206+ // outerHeight and outerWidth
 4207+ jQuery.fn["outer" + name] = function(margin) {
 4208+ return this["inner" + name]() +
 4209+ num(this, "border" + tl + "Width") +
 4210+ num(this, "border" + br + "Width") +
 4211+ (margin ?
 4212+ num(this, "margin" + tl) + num(this, "margin" + br) : 0);
 4213+ };
 4214+
 4215+ var type = name.toLowerCase();
 4216+
 4217+ jQuery.fn[ type ] = function( size ) {
 4218+ // Get window width or height
 4219+ return this[0] == window ?
 4220+ // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
 4221+ document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] ||
 4222+ document.body[ "client" + name ] :
 4223+
 4224+ // Get document width or height
 4225+ this[0] == document ?
 4226+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
 4227+ Math.max(
 4228+ document.documentElement["client" + name],
 4229+ document.body["scroll" + name], document.documentElement["scroll" + name],
 4230+ document.body["offset" + name], document.documentElement["offset" + name]
 4231+ ) :
 4232+
 4233+ // Get or set width or height on the element
 4234+ size === undefined ?
 4235+ // Get width or height on the element
 4236+ (this.length ? jQuery.css( this[0], type ) : null) :
 4237+
 4238+ // Set the width or height on the element (default to pixels if value is unitless)
 4239+ this.css( type, typeof size === "string" ? size : size + "px" );
 4240+ };
 4241+
 4242+});})();
Property changes on: branches/REL1_16/extensions/WikiTweet/jquery.js
___________________________________________________________________
Added: svn:eol-style
14243 + native
Index: branches/REL1_16/extensions/WikiTweet/unsubscribe.php
@@ -0,0 +1,3 @@
 2+<?php
 3+
 4+?>
Property changes on: branches/REL1_16/extensions/WikiTweet/unsubscribe.php
___________________________________________________________________
Added: svn:eol-style
15 + native
Index: branches/REL1_16/extensions/WikiTweet/create_tables.sql
@@ -0,0 +1,59 @@
 2+-- phpMyAdmin SQL Dump
 3+-- version 2.11.4
 4+-- http://www.phpmyadmin.net
 5+--
 6+-- Serveur: localhost
 7+-- G�n�r� le : Lun 15 Mars 2010 � 16:41
 8+-- Version du serveur: 3.23.32
 9+-- Version de PHP: 5.2.5
 10+
 11+
 12+--
 13+-- Base de donn�es: `wikidb`
 14+--
 15+
 16+-- --------------------------------------------------------
 17+
 18+--
 19+-- Structure de la table `wikitweet`
 20+--
 21+
 22+CREATE TABLE IF NOT EXISTS `wikitweet` (
 23+ `id` int(11) NOT NULL auto_increment,
 24+ `text` varchar(160) NOT NULL,
 25+ `user` varchar(100) NOT NULL,
 26+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
 27+ `room` varchar(50) NOT NULL default 'main',
 28+ `show` int(11) NOT NULL default '1',
 29+ PRIMARY KEY (`id`)
 30+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=130 ;
 31+
 32+
 33+-- --------------------------------------------------------
 34+
 35+--
 36+-- Structure de la table `wikitweet_avatar`
 37+--
 38+
 39+CREATE TABLE IF NOT EXISTS `wikitweet_avatar` (
 40+ `id` int(11) NOT NULL auto_increment,
 41+ `user` varchar(200) NOT NULL,
 42+ `avatar` varchar(1000) NOT NULL,
 43+ PRIMARY KEY (`id`)
 44+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ;
 45+
 46+
 47+-- --------------------------------------------------------
 48+
 49+--
 50+-- Structure de la table `wikitweet_subscription`
 51+--
 52+
 53+CREATE TABLE IF NOT EXISTS `wikitweet_subscription` (
 54+ `id` int(11) NOT NULL auto_increment,
 55+ `user` varchar(50) NOT NULL,
 56+ `link` varchar(50) NOT NULL,
 57+ `type` varchar(10) NOT NULL,
 58+ PRIMARY KEY (`id`)
 59+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=80 ;
 60+
Property changes on: branches/REL1_16/extensions/WikiTweet/create_tables.sql
___________________________________________________________________
Added: svn:eol-style
161 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r87531create wikitweet extension in trunkfaurethomas09:41, 6 May 2011

Comments

#Comment by Siebrand (talk | contribs)   21:31, 5 May 2011

Can you please clarify why you add new code to the 1.16 branch, instead of adding it to trunk, and then branching it?

#Comment by Faure.thomas (talk | contribs)   09:51, 6 May 2011

I moved WikiTweet into trunk and branched it in REL1_16. Thanks for your advices.

Status & tagging log