diff --git a/convpath.tgz b/convpath.tgz
new file mode 100644
index 000000000..2c43d3d38
Binary files /dev/null and b/convpath.tgz differ
diff --git a/facebook.tgz b/facebook.tgz
index 2b643e70c..e3709ec48 100644
Binary files a/facebook.tgz and b/facebook.tgz differ
diff --git a/facebook/README b/facebook/README
index b68ba3da8..5f74d2d4f 100755
--- a/facebook/README
+++ b/facebook/README
@@ -1,43 +1,7 @@
Installing the Friendica/Facebook connector
-1. Visit https://developers.facebook.com/apps to register an app.
- a) Click "Create a new app"
- b) We'd be very happy if you include "Friendica" in the application name
- to increase name recognition.
- c) Edit your app settings on the setup page. The Friendica icons are present
- in the images directory and may be uploaded as a Facebook app icon. Use
- images/friendica-16.jpg for the Icon and images/Friendica-128.jpg for the logo.
- d) In the App Display name enter the name of your app (this should default to the
- name you chose in part a).
- e) Enter YourDomain.com in the App Domain field and hit return.
- f) In "Select how your app connects with Facebook select "Website" and enter the
- full URL to your Friendica install including HTTPS and a trailing slash.
-
-2. Enable the Facebook plugin by clicking on the icon next to it's name on the plugin
- page of your admin panel.
- b) return to the Facebook plugin page in your admin panel, and fill in the App-ID
- and Application Secret settings you got from Facebook.
- c) Click save.
- d) Finally, return to the Facebook settings page, and activate real-time updates.
-
- i. If you for any reason prefer to use a configuration file instead of the admin panels,
- Activate the plugin by including it in .htconfig.php, e.g.
-
- $a->config['system']['addon'] = 'plugin1,plugin2,facebook';
-
- and set the following values:
- $a->config['facebook']['appid'] = 'xxxxxxxxxxx';
- $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx';
-
- Replace with the settings Facebook gives you.
-
-
-3. To use the Facebook plugin, visit the "connector settings" area of your settings
- page. Click "Install Facebook Connector".
-4. This will ask you to login to Facebook and allow the plugin to do it's stuff.
- Allow it to do so.
-5. You're done. To turn it off visit the Plugin Settings page again and
- 'Remove Facebook posting'.
+Detailed instructions how to use this plugin can be found at
+https://github.com/friendica/friendica/wiki/How-to:-Friendica%E2%80%99s-Facebook-connector
Vidoes and embeds will not be posted if there is no other content. Links
and images will be converted to a format suitable for the Facebook API and
diff --git a/facebook/facebook.php b/facebook/facebook.php
old mode 100755
new mode 100644
index b6e40654c..4f534a0b9
--- a/facebook/facebook.php
+++ b/facebook/facebook.php
@@ -1,7 +1,7 @@
* Tobias Hößl
*/
@@ -9,33 +9,8 @@
/**
* Installing the Friendica/Facebook connector
*
- * 1. register an API key for your site from developer.facebook.com
- * a. We'd be very happy if you include "Friendica" in the application name
- * to increase name recognition. The Friendica icons are also present
- * in the images directory and may be uploaded as a Facebook app icon.
- * Use images/friendica-16.jpg for the Icon and images/friendica-128.jpg for the Logo.
- * b. The url should be your site URL with a trailing slash.
- * Friendica is a software application and does not require a Privacy Policy
- * or Terms of Service, though your installation of it might. Facebook may require
- * that you provide a Privacy Policy, which we find ironic.
- * c. Set the following values in your .htconfig.php file
- * $a->config['facebook']['appid'] = 'xxxxxxxxxxx';
- * $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx';
- * Replace with the settings Facebook gives you.
- * d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set
- * Site URL to yoursubdomain.yourdomain.com. Set Site Domain to your
- * yourdomain.com.
- * 2. Visit the Facebook Settings section of the "Settings->Plugin Settings" page.
- * and click 'Install Facebook Connector'.
- * 3. Visit the Facebook Settings section of the "Settings->Plugin Settings" page.
- * and click 'Install Facebook Connector'.
- * 4. This will ask you to login to Facebook and grant permission to the
- * plugin to do its stuff. Allow it to do so.
- * 5. Optional step: If you want to use Facebook Real Time Updates (so new messages
- * and new contacts are added ~1min after they are postet / added on FB), go to
- * Settings -> plugins -> facebook and press the "Activate Real-Time Updates"-button.
- * 6. You're done. To turn it off visit the Plugin Settings page again and
- * 'Remove Facebook posting'.
+ * Detailed instructions how to use this plugin can be found at
+ * https://github.com/friendica/friendica/wiki/How-to:-Friendica%E2%80%99s-Facebook-connector
*
* Vidoes and embeds will not be posted if there is no other content. Links
* and images will be converted to a format suitable for the Facebook API and
@@ -96,8 +71,11 @@ function facebook_module() {}
// If a->argv[1] is a nickname, this is a callback from Facebook oauth requests.
// If $_REQUEST["realtime_cb"] is set, this is a callback from the Real-Time Updates API
+/**
+ * @param App $a
+ */
function facebook_init(&$a) {
-
+
if (x($_REQUEST, "realtime_cb") && x($_REQUEST, "realtime_cb")) {
logger("facebook_init: Facebook Real-Time callback called", LOGGER_DEBUG);
@@ -191,7 +169,7 @@ function facebook_init(&$a) {
$r = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1",
dbesc($nick)
);
- if(! count($r))
+ if(!(isset($r) && count($r)))
return;
$uid = $r[0]['uid'];
@@ -233,6 +211,9 @@ function facebook_init(&$a) {
}
+/**
+ * @param int $uid
+ */
function fb_get_self($uid) {
$access_token = get_pconfig($uid,'facebook','access_token');
if(! $access_token)
@@ -244,133 +225,165 @@ function fb_get_self($uid) {
}
}
-function fb_get_friends_sync_new($uid, $access_token, $person) {
- $link = 'http://facebook.com/profile.php?id=' . $person->id;
-
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1",
- intval($uid),
- dbesc($link)
- );
-
- if (count($r) == 0) {
- logger('fb_get_friends: new contact found: ' . $link, LOGGER_DEBUG);
-
- fb_get_friends_sync_full($uid, $access_token, $person);
- }
+/**
+ * @param int $uid
+ * @param string $access_token
+ * @param array $persons
+ */
+function fb_get_friends_sync_new($uid, $access_token, $persons) {
+ $persons_todo = array();
+ foreach ($persons as $person) {
+ $link = 'http://facebook.com/profile.php?id=' . $person->id;
+
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1",
+ intval($uid),
+ dbesc($link)
+ );
+
+ if (count($r) == 0) {
+ logger('fb_get_friends: new contact found: ' . $link, LOGGER_DEBUG);
+ $persons_todo[] = $person;
+ }
+
+ if (count($persons_todo) > 0) fb_get_friends_sync_full($uid, $access_token, $persons_todo);
+ }
}
-function fb_get_friends_sync_full($uid, $access_token, $person) {
- $s = fetch_url('https://graph.facebook.com/' . $person->id . '?access_token=' . $access_token);
- if($s) {
- $jp = json_decode($s);
- logger('fb_get_friends: info: ' . print_r($jp,true), LOGGER_DATA);
+/**
+ * @param int $uid
+ * @param object $contact
+ */
+function fb_get_friends_sync_parsecontact($uid, $contact) {
+ $contact->link = 'http://facebook.com/profile.php?id=' . $contact->id;
- // always use numeric link for consistency
+ // If its a page then set the first name from the username
+ if (!$contact->first_name and $contact->username)
+ $contact->first_name = $contact->username;
- $jp->link = 'http://facebook.com/profile.php?id=' . $person->id;
+ // check if we already have a contact
- // If its a page then set the first name from the username
- if (!$jp->first_name and $jp->username)
- $jp->first_name = $jp->username;
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1",
+ intval($uid),
+ dbesc($contact->link)
+ );
- // check if we already have a contact
+ if(count($r)) {
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1",
- intval($uid),
- dbesc($jp->link)
- );
+ // check that we have all the photos, this has been known to fail on occasion
- if(count($r)) {
+ if((! $r[0]['photo']) || (! $r[0]['thumb']) || (! $r[0]['micro'])) {
+ require_once("Photo.php");
- // check that we have all the photos, this has been known to fail on occasion
+ $photos = import_profile_photo('https://graph.facebook.com/' . $contact->id . '/picture', $uid, $r[0]['id']);
- if((! $r[0]['photo']) || (! $r[0]['thumb']) || (! $r[0]['micro'])) {
- require_once("Photo.php");
+ q("UPDATE `contact` SET `photo` = '%s',
+ `thumb` = '%s',
+ `micro` = '%s',
+ `name-date` = '%s',
+ `uri-date` = '%s',
+ `avatar-date` = '%s'
+ WHERE `id` = %d LIMIT 1
+ ",
+ dbesc($photos[0]),
+ dbesc($photos[1]),
+ dbesc($photos[2]),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ intval($r[0]['id'])
+ );
+ }
+ return;
+ }
+ else {
- $photos = import_profile_photo('https://graph.facebook.com/' . $jp->id . '/picture', $uid, $r[0]['id']);
+ // create contact record
+ q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`,
+ `name`, `nick`, `photo`, `network`, `rel`, `priority`,
+ `writable`, `blocked`, `readonly`, `pending` )
+ VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, 0, 0, 0 ) ",
+ intval($uid),
+ dbesc(datetime_convert()),
+ dbesc($contact->link),
+ dbesc(normalise_link($contact->link)),
+ dbesc(''),
+ dbesc(''),
+ dbesc($contact->id),
+ dbesc('facebook ' . $contact->id),
+ dbesc($contact->name),
+ dbesc(($contact->nickname) ? $contact->nickname : strtolower($contact->first_name)),
+ dbesc('https://graph.facebook.com/' . $contact->id . '/picture'),
+ dbesc(NETWORK_FACEBOOK),
+ intval(CONTACT_IS_FRIEND),
+ intval(1),
+ intval(1)
+ );
+ }
- $r = q("UPDATE `contact` SET `photo` = '%s',
- `thumb` = '%s',
- `micro` = '%s',
- `name-date` = '%s',
- `uri-date` = '%s',
- `avatar-date` = '%s'
- WHERE `id` = %d LIMIT 1
- ",
- dbesc($photos[0]),
- dbesc($photos[1]),
- dbesc($photos[2]),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- intval($r[0]['id'])
- );
- }
- return;
- }
- else {
+ $r = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1",
+ dbesc($contact->link),
+ intval($uid)
+ );
- // create contact record
- $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`,
- `name`, `nick`, `photo`, `network`, `rel`, `priority`,
- `writable`, `blocked`, `readonly`, `pending` )
- VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, 0, 0, 0 ) ",
- intval($uid),
- dbesc(datetime_convert()),
- dbesc($jp->link),
- dbesc(normalise_link($jp->link)),
- dbesc(''),
- dbesc(''),
- dbesc($jp->id),
- dbesc('facebook ' . $jp->id),
- dbesc($jp->name),
- dbesc(($jp->nickname) ? $jp->nickname : strtolower($jp->first_name)),
- dbesc('https://graph.facebook.com/' . $jp->id . '/picture'),
- dbesc(NETWORK_FACEBOOK),
- intval(CONTACT_IS_FRIEND),
- intval(1),
- intval(1)
- );
- }
+ if(! count($r)) {
+ return;
+ }
- $r = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1",
- dbesc($jp->link),
- intval($uid)
- );
+ $contact_id = $r[0]['id'];
- if(! count($r)) {
- return;
- }
+ require_once("Photo.php");
- $contact = $r[0];
- $contact_id = $r[0]['id'];
+ $photos = import_profile_photo($r[0]['photo'],$uid,$contact_id);
- require_once("Photo.php");
-
- $photos = import_profile_photo($r[0]['photo'],$uid,$contact_id);
-
- $r = q("UPDATE `contact` SET `photo` = '%s',
- `thumb` = '%s',
- `micro` = '%s',
- `name-date` = '%s',
- `uri-date` = '%s',
- `avatar-date` = '%s'
- WHERE `id` = %d LIMIT 1
- ",
- dbesc($photos[0]),
- dbesc($photos[1]),
- dbesc($photos[2]),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- intval($contact_id)
- );
-
- }
+ q("UPDATE `contact` SET `photo` = '%s',
+ `thumb` = '%s',
+ `micro` = '%s',
+ `name-date` = '%s',
+ `uri-date` = '%s',
+ `avatar-date` = '%s'
+ WHERE `id` = %d LIMIT 1
+ ",
+ dbesc($photos[0]),
+ dbesc($photos[1]),
+ dbesc($photos[2]),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ intval($contact_id)
+ );
}
+/**
+ * @param int $uid
+ * @param string $access_token
+ * @param array $persons
+ */
+function fb_get_friends_sync_full($uid, $access_token, $persons) {
+ if (count($persons) == 0) return;
+ $nums = Ceil(count($persons) / 50);
+ for ($i = 0; $i < $nums; $i++) {
+ $batch_request = array();
+ for ($j = $i * 50; $j < ($i+1) * 50 && $j < count($persons); $j++) $batch_request[] = array('method'=>'GET', 'relative_url'=>$persons[$j]->id);
+ $s = post_url('https://graph.facebook.com/', array('access_token' => $access_token, 'batch' => json_encode($batch_request)));
+ if($s) {
+ $results = json_decode($s);
+ logger('fb_get_friends: info: ' . print_r($results,true), LOGGER_DATA);
+ foreach ($results as $contact) {
+ if ($contact->code != 200) logger('fb_get_friends: not found: ' . print_r($contact,true), LOGGER_DEBUG);
+ else fb_get_friends_sync_parsecontact($uid, json_decode($contact->body));
+ }
+ }
+ }
+}
+
+
+
// if $fullsync is true, only new contacts are searched for
+/**
+ * @param int $uid
+ * @param bool $fullsync
+ */
function fb_get_friends($uid, $fullsync = true) {
$r = q("SELECT `uid` FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1",
@@ -394,17 +407,23 @@ function fb_get_friends($uid, $fullsync = true) {
logger('facebook: fb_get_friends: json: ' . print_r($j,true), LOGGER_DATA);
if(! $j->data)
return;
- foreach($j->data as $person)
- if ($fullsync)
- fb_get_friends_sync_full($uid, $access_token, $person);
- else
- fb_get_friends_sync_new($uid, $access_token, $person);
+
+ $persons_todo = array();
+ foreach($j->data as $person) $persons_todo[] = $person;
+
+ if ($fullsync)
+ fb_get_friends_sync_full($uid, $access_token, $persons_todo);
+ else
+ fb_get_friends_sync_new($uid, $access_token, $persons_todo);
}
}
// This is the POST method to the facebook settings page
// Content is posted to Facebook in the function facebook_post_hook()
+/**
+ * @param App $a
+ */
function facebook_post(&$a) {
$uid = local_user();
@@ -455,6 +474,10 @@ function facebook_post(&$a) {
// Facebook settings form
+/**
+ * @param App $a
+ * @return string
+ */
function facebook_content(&$a) {
if(! local_user()) {
@@ -478,7 +501,6 @@ function facebook_content(&$a) {
if (get_pconfig(local_user(),'facebook','post')) {
$access_token = get_pconfig(local_user(),'facebook','access_token');
if ($access_token) {
- $private_wall = intval(get_pconfig($uid,'facebook','private_wall'));
$s = fetch_url('https://graph.facebook.com/me/feed?access_token=' . $access_token);
if($s) {
$j = json_decode($s);
@@ -556,7 +578,11 @@ function facebook_content(&$a) {
}
-
+/**
+ * @param App $a
+ * @param null|object $b
+ * @return mixed
+ */
function facebook_cron($a,$b) {
$last = get_config('facebook','last_poll');
@@ -597,6 +623,8 @@ function facebook_cron($a,$b) {
$last_friend_check = get_pconfig($rr['uid'],'facebook','friend_check');
if($last_friend_check)
$next_friend_check = $last_friend_check + 86400;
+ else
+ $next_friend_check = 0;
if($next_friend_check <= time()) {
fb_get_friends($rr['uid'], true);
set_pconfig($rr['uid'],'facebook','friend_check',time());
@@ -617,7 +645,7 @@ function facebook_cron($a,$b) {
logger('facebook_cron: Failed', LOGGER_NORMAL);
if(strlen($a->config['admin_email']) && !get_config('facebook', 'realtime_err_mailsent')) {
- $res = mail($a->config['admin_email'], t('Problems with Facebook Real-Time Updates'),
+ mail($a->config['admin_email'], t('Problems with Facebook Real-Time Updates'),
"Hi!\n\nThere's a problem with the Facebook Real-Time Updates that cannot be solved automatically. Maybe a permission issue?\n\nPlease try to re-activate it on " . $a->config["system"]["url"] . "/admin/plugins/facebook\n\nThis e-mail will only be sent once.",
'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
@@ -637,7 +665,10 @@ function facebook_cron($a,$b) {
}
-
+/**
+ * @param App $a
+ * @param null|object $b
+ */
function facebook_plugin_settings(&$a,&$b) {
$b .= '
';
@@ -648,6 +679,10 @@ function facebook_plugin_settings(&$a,&$b) {
}
+/**
+ * @param App $a
+ * @param null|object $o
+ */
function facebook_plugin_admin(&$a, &$o){
@@ -692,6 +727,10 @@ function facebook_plugin_admin(&$a, &$o){
}
}
+/**
+ * @param App $a
+ * @param null|object $o
+ */
function facebook_plugin_admin_post(&$a, &$o){
check_form_security_token_redirectOnErr('/admin/plugins/facebook', 'fbsave');
@@ -711,6 +750,11 @@ function facebook_plugin_admin_post(&$a, &$o){
}
}
+/**
+ * @param App $a
+ * @param object $b
+ * @return mixed
+ */
function facebook_jot_nets(&$a,&$b) {
if(! local_user())
return;
@@ -725,6 +769,11 @@ function facebook_jot_nets(&$a,&$b) {
}
+/**
+ * @param App $a
+ * @param object $b
+ * @return mixed
+ */
function facebook_post_hook(&$a,&$b) {
@@ -743,6 +792,9 @@ function facebook_post_hook(&$a,&$b) {
$reply = false;
$likes = false;
+ $deny_arr = array();
+ $allow_arr = array();
+
$toplevel = (($b['id'] == $b['parent']) ? true : false);
@@ -789,8 +841,7 @@ function facebook_post_hook(&$a,&$b) {
$allow_str = dbesc(implode(', ',$recipients));
if($allow_str) {
$r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $allow_str ) AND `network` = 'face'");
- $allow_arr = array();
- if(count($r))
+ if(count($r))
foreach($r as $rr)
$allow_arr[] = $rr['notify'];
}
@@ -798,8 +849,7 @@ function facebook_post_hook(&$a,&$b) {
$deny_str = dbesc(implode(', ',$deny));
if($deny_str) {
$r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $deny_str ) AND `network` = 'face'");
- $deny_arr = array();
- if(count($r))
+ if(count($r))
foreach($r as $rr)
$deny_arr[] = $rr['notify'];
}
@@ -854,8 +904,8 @@ function facebook_post_hook(&$a,&$b) {
// unless it's a dislike - just send the text as a comment
- if($b['verb'] == ACTIVITY_DISLIKE)
- $msg = trim(strip_tags(bbcode($msg)));
+ // if($b['verb'] == ACTIVITY_DISLIKE)
+ // $msg = trim(strip_tags(bbcode($msg)));
// Old code
/*$search_str = $a->get_baseurl() . '/search';
@@ -896,7 +946,7 @@ function facebook_post_hook(&$a,&$b) {
if(preg_match("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/is",$b['body'],$matches))
$image = $matches[3];
- if ($image != '')
+ if ($image == '')
if(preg_match("/\[img\](.*?)\[\/img\]/is",$b['body'],$matches))
$image = $matches[1];
@@ -965,7 +1015,6 @@ function facebook_post_hook(&$a,&$b) {
// Since facebook increased the maxpostlen massively this never should happen again :)
if (strlen($msg) > FACEBOOK_MAXPOSTLEN) {
- $shortlink = "";
require_once('library/slinky.php');
$display_url = $b['plink'];
@@ -1006,10 +1055,14 @@ function facebook_post_hook(&$a,&$b) {
'access_token' => $fb_token,
'message' => $msg
);
- if(isset($image))
+ if(isset($image)) {
$postvars['picture'] = $image;
- if(isset($link))
+ //$postvars['type'] = "photo";
+ }
+ if(isset($link)) {
$postvars['link'] = $link;
+ //$postvars['type'] = "link";
+ }
if(isset($linkname))
$postvars['name'] = $linkname;
}
@@ -1026,11 +1079,18 @@ function facebook_post_hook(&$a,&$b) {
if($reply) {
$url = 'https://graph.facebook.com/' . $reply . '/' . (($likes) ? 'likes' : 'comments');
- }
- else {
+ } else if (($link != "") or ($image != "") or ($b['title'] == '') or (strlen($msg) < 500)) {
$url = 'https://graph.facebook.com/me/feed';
if($b['plink'])
$postvars['actions'] = '{"name": "' . t('View on Friendica') . '", "link": "' . $b['plink'] . '"}';
+ } else {
+ // if its only a message and a subject and the message is larger than 500 characters then post it as note
+ $postvars = array(
+ 'access_token' => $fb_token,
+ 'message' => bbcode($b['body']),
+ 'subject' => $b['title'],
+ );
+ $url = 'https://graph.facebook.com/me/notes';
}
logger('facebook: post to ' . $url);
@@ -1088,6 +1148,10 @@ function facebook_post_hook(&$a,&$b) {
}
}
+/**
+ * @param App $app
+ * @param object $data
+ */
function facebook_enotify(&$app, &$data) {
if (x($data, 'params') && $data['params']['type'] == NOTIFY_SYSTEM && x($data['params'], 'system_type') && $data['params']['system_type'] == 'facebook_connection_invalid') {
$data['itemlink'] = '/facebook';
@@ -1097,6 +1161,10 @@ function facebook_enotify(&$app, &$data) {
}
}
+/**
+ * @param App $a
+ * @param object $b
+ */
function facebook_post_local(&$a,&$b) {
// Figure out if Facebook posting is enabled for this post and file it in 'postopts'
@@ -1123,6 +1191,10 @@ function facebook_post_local(&$a,&$b) {
}
+/**
+ * @param App $a
+ * @param object $b
+ */
function fb_queue_hook(&$a,&$b) {
$qi = q("SELECT * FROM `queue` WHERE `network` = '%s'",
@@ -1181,8 +1253,14 @@ function fb_queue_hook(&$a,&$b) {
}
}
+/**
+ * @param string $access_token
+ * @param int $since
+ * @return object
+ */
function fb_get_timeline($access_token, &$since) {
+ $entries = new stdClass();
$entries->data = array();
$newest = 0;
@@ -1211,7 +1289,7 @@ function fb_get_timeline($access_token, &$since) {
else
break;
- $url = $j->paging->next;
+ $url = (isset($j->paging) && isset($j->paging->next) ? $j->paging->next : '');
} while (($oldestdate > $since) and ($since != 0) and ($url != ''));
@@ -1221,6 +1299,9 @@ function fb_get_timeline($access_token, &$since) {
return($entries);
}
+/**
+ * @param int $uid
+ */
function fb_consume_all($uid) {
require_once('include/items.php');
@@ -1245,7 +1326,7 @@ function fb_consume_all($uid) {
// Get the last date
$lastdate = get_pconfig($uid,'facebook','lastdate');
// fetch all items since the last date
- $j = fb_get_timeline($access_token, &$lastdate);
+ $j = fb_get_timeline($access_token, $lastdate);
if (isset($j->data)) {
logger('fb_consume_stream: feed: ' . print_r($j,true), LOGGER_DATA);
fb_consume_stream($uid,$j,false);
@@ -1256,6 +1337,11 @@ function fb_consume_all($uid) {
logger('fb_consume_stream: feed: got no data from Facebook: ' . print_r($j,true), LOGGER_NORMAL);
}
+/**
+ * @param int $uid
+ * @param string $link
+ * @return string
+ */
function fb_get_photo($uid,$link) {
$access_token = get_pconfig($uid,'facebook','access_token');
if(! $access_token || (! stristr($link,'facebook.com/photo.php')))
@@ -1264,14 +1350,22 @@ function fb_get_photo($uid,$link) {
$ret = preg_match('/fbid=([0-9]*)/',$link,$match);
if($ret)
$photo_id = $match[1];
+ else
+ return "";
$x = fetch_url('https://graph.facebook.com/' . $photo_id . '?access_token=' . $access_token);
$j = json_decode($x);
if($j->picture)
return "\n\n" . '[url=' . $link . '][img]' . $j->picture . '[/img][/url]';
//else
// return "\n" . '[url=' . $link . ']' . t('link') . '[/url]';
+ return "";
}
+/**
+ * @param int $uid
+ * @param object $j
+ * @param bool $wall
+ */
function fb_consume_stream($uid,$j,$wall = false) {
$a = get_app();
@@ -1283,7 +1377,7 @@ function fb_consume_stream($uid,$j,$wall = false) {
if(! count($user))
return;
- $my_local_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
+ // $my_local_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
$no_linking = get_pconfig($uid,'facebook','no_linking');
if($no_linking)
@@ -1300,7 +1394,9 @@ function fb_consume_stream($uid,$j,$wall = false) {
if(! count($j->data) || (! strlen($self_id)))
return;
- foreach($j->data as $entry) {
+ $top_item = 0;
+
+ foreach($j->data as $entry) {
logger('fb_consume: entry: ' . print_r($entry,true), LOGGER_DATA);
$datarray = array();
@@ -1310,12 +1406,10 @@ function fb_consume_stream($uid,$j,$wall = false) {
intval($uid)
);
if(count($r)) {
- $post_exists = true;
$orig_post = $r[0];
$top_item = $r[0]['id'];
}
else {
- $post_exists = false;
$orig_post = null;
}
@@ -1330,7 +1424,7 @@ function fb_consume_stream($uid,$j,$wall = false) {
else {
// Looking if user is known - if not he is added
$access_token = get_pconfig($uid, 'facebook', 'access_token');
- fb_get_friends_sync_new($uid, $access_token, $from);
+ fb_get_friends_sync_new($uid, $access_token, array($from));
$r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1",
dbesc($from->id),
@@ -1379,32 +1473,32 @@ function fb_consume_stream($uid,$j,$wall = false) {
logger('facebook: post '.$entry->id.' from '.$from->name);
- $datarray['body'] = escape_tags($entry->message);
+ $datarray['body'] = (isset($entry->message) ? escape_tags($entry->message) : '');
- if($entry->name and $entry->link)
+ if(isset($entry->name) and isset($entry->link))
$datarray['body'] .= "\n\n[bookmark=".$entry->link."]".$entry->name."[/bookmark]";
- elseif ($entry->name)
+ elseif (isset($entry->name))
$datarray['body'] .= "\n\n[b]" . $entry->name."[/b]";
- if($entry->caption) {
- if(!$entry->name and $entry->link)
+ if(isset($entry->caption)) {
+ if(!isset($entry->name) and isset($entry->link))
$datarray['body'] .= "\n\n[bookmark=".$entry->link."]".$entry->caption."[/bookmark]";
else
$datarray['body'] .= "[i]" . $entry->caption."[/i]\n";
}
- if(!$entry->caption and !$entry->name) {
- if ($entry->link)
+ if(!isset($entry->caption) and !isset($entry->name)) {
+ if (isset($entry->link))
$datarray['body'] .= "\n[url]".$entry->link."[/url]\n";
else
$datarray['body'] .= "\n";
}
$quote = "";
- if($entry->description)
+ if(isset($entry->description))
$quote = $entry->description;
- if ($entry->properties)
+ if (isset($entry->properties))
foreach ($entry->properties as $property)
$quote .= "\n".$property->name.": [url=".$property->href."]".$property->text."[/url]";
@@ -1414,19 +1508,19 @@ function fb_consume_stream($uid,$j,$wall = false) {
// Only import the picture when the message is no video
// oembed display a picture of the video as well
if ($entry->type != "video") {
- if($entry->picture && $entry->link) {
+ if(isset($entry->picture) && isset($entry->link)) {
$datarray['body'] .= "\n" . '[url=' . $entry->link . '][img]'.$entry->picture.'[/img][/url]';
}
else {
- if($entry->picture)
+ if(isset($entry->picture))
$datarray['body'] .= "\n" . '[img]' . $entry->picture . '[/img]';
// if just a link, it may be a wall photo - check
- if($entry->link)
+ if(isset($entry->link))
$datarray['body'] .= fb_get_photo($uid,$entry->link);
}
}
- if (($datarray['app'] == "Events") and $entry->actions)
+ if (($datarray['app'] == "Events") and isset($entry->actions))
foreach ($entry->actions as $action)
if ($action->name == "View")
$datarray['body'] .= " [url=".$action->link."]".$entry->story."[/url]";
@@ -1446,10 +1540,10 @@ function fb_consume_stream($uid,$j,$wall = false) {
$datarray['body'] .= "\n";
- if ($entry->icon)
+ if (isset($entry->icon))
$datarray['body'] .= "[img]".$entry->icon."[/img] ";
- if ($entry->actions)
+ if (isset($entry->actions))
foreach ($entry->actions as $action)
if (($action->name != "Comment") and ($action->name != "Like"))
$datarray['body'] .= "[url=".$action->link."]".$action->name."[/url] ";
@@ -1459,28 +1553,29 @@ function fb_consume_stream($uid,$j,$wall = false) {
//if(($datarray['body'] != '') and ($uid == 1))
// $datarray['body'] .= "[noparse]".print_r($entry, true)."[/noparse]";
- if ($entry->place->name or $entry->place->location->street or
- $entry->place->location->city or $entry->place->location->Denmark) {
- $datarray['coord'] = '';
- if ($entry->place->name)
- $datarray['coord'] .= $entry->place->name;
- if ($entry->place->location->street)
- $datarray['coord'] .= $entry->place->location->street;
- if ($entry->place->location->city)
- $datarray['coord'] .= " ".$entry->place->location->city;
- if ($entry->place->location->country)
- $datarray['coord'] .= " ".$entry->place->location->country;
- } else if ($entry->place->location->latitude and $entry->place->location->longitude)
- $datarray['coord'] = substr($entry->place->location->latitude, 0, 8)
+ if (isset($entry->place)) {
+ if ($entry->place->name or $entry->place->location->street or
+ $entry->place->location->city or $entry->place->location->Denmark) {
+ $datarray['coord'] = '';
+ if ($entry->place->name)
+ $datarray['coord'] .= $entry->place->name;
+ if ($entry->place->location->street)
+ $datarray['coord'] .= $entry->place->location->street;
+ if ($entry->place->location->city)
+ $datarray['coord'] .= " ".$entry->place->location->city;
+ if ($entry->place->location->country)
+ $datarray['coord'] .= " ".$entry->place->location->country;
+ } else if ($entry->place->location->latitude and $entry->place->location->longitude)
+ $datarray['coord'] = substr($entry->place->location->latitude, 0, 8)
.' '.substr($entry->place->location->longitude, 0, 8);
-
+ }
$datarray['created'] = datetime_convert('UTC','UTC',$entry->created_time);
$datarray['edited'] = datetime_convert('UTC','UTC',$entry->updated_time);
// If the entry has a privacy policy, we cannot assume who can or cannot see it,
// as the identities are from a foreign system. Mark it as private to the owner.
- if($entry->privacy && $entry->privacy->value !== 'EVERYONE') {
+ if(isset($entry->privacy) && $entry->privacy->value !== 'EVERYONE') {
$datarray['private'] = 1;
$datarray['allow_cid'] = '<' . $self[0]['id'] . '>';
}
@@ -1565,7 +1660,7 @@ function fb_consume_stream($uid,$j,$wall = false) {
$likedata['object'] = '';
- $item = item_store($likedata);
+ item_store($likedata);
}
}
if(is_array($comments)) {
@@ -1644,7 +1739,7 @@ function fb_consume_stream($uid,$j,$wall = false) {
'to_email' => $user[0]['email'],
'uid' => $user[0]['uid'],
'item' => $cmntdata,
- 'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $item,
+ 'link' => $a->get_baseurl() . '/display/' . $user[0]['nickname'] . '/' . $item,
'source_name' => $cmntdata['author-name'],
'source_link' => $cmntdata['author-link'],
'source_photo' => $cmntdata['author-avatar'],
@@ -1663,6 +1758,9 @@ function fb_consume_stream($uid,$j,$wall = false) {
}
+/**
+ * @return bool|string
+ */
function fb_get_app_access_token() {
$acc_token = get_config('facebook','app_access_token');
@@ -1708,6 +1806,9 @@ function facebook_subscription_del_users() {
if (!facebook_check_realtime_active()) del_config('facebook', 'realtime_active');
}
+/**
+ * @param bool $second_try
+ */
function facebook_subscription_add_users($second_try = false) {
$a = get_app();
$access_token = fb_get_app_access_token();
@@ -1744,6 +1845,9 @@ function facebook_subscription_add_users($second_try = false) {
};
}
+/**
+ * @return null|array
+ */
function facebook_subscriptions_get() {
$access_token = fb_get_app_access_token();
@@ -1760,6 +1864,9 @@ function facebook_subscriptions_get() {
}
+/**
+ * @return bool
+ */
function facebook_check_realtime_active() {
$ret = facebook_subscriptions_get();
if (is_null($ret)) return false;
@@ -1773,7 +1880,14 @@ function facebook_check_realtime_active() {
// DELETE-request to $url
if(! function_exists('facebook_delete_url')) {
-function facebook_delete_url($url,$headers = null, &$redirects = 0, $timeout = 0) {
+ /**
+ * @param string $url
+ * @param null|array $headers
+ * @param int $redirects
+ * @param int $timeout
+ * @return bool|string
+ */
+ function facebook_delete_url($url,$headers = null, &$redirects = 0, $timeout = 0) {
$a = get_app();
$ch = curl_init($url);
if(($redirects > 8) || (! $ch))
@@ -1844,7 +1958,7 @@ function facebook_delete_url($url,$headers = null, &$redirects = 0, $timeout = 0
$url_parsed = @parse_url($url);
if (isset($url_parsed)) {
$redirects++;
- return delete_url($url,$headers,$redirects,$timeout);
+ return facebook_delete_url($url,$headers,$redirects,$timeout);
}
}
$a->set_curl_code($http_code);
diff --git a/fromgplus/README b/fromgplus/README
new file mode 100644
index 000000000..cecbb2b9d
--- /dev/null
+++ b/fromgplus/README
@@ -0,0 +1 @@
+This extension is a preparation of the upcoming import of items via Google+
diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php
old mode 100755
new mode 100644
index 09b6c6057..88d2622ff
--- a/fromgplus/fromgplus.php
+++ b/fromgplus/fromgplus.php
@@ -1,8 +1,8 @@
*
*/
@@ -36,7 +36,8 @@ function fromgplus_addon_settings(&$a,&$s) {
$s .= '';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
return;
@@ -124,7 +125,8 @@ function handleattachments($item) {
return($post);
}
-$result = file_get_contents("https://www.googleapis.com/plus/v1/people/".$google["id"]."/activities/public?alt=json&pp=1&key=".$google["key"]."&maxResults=".$google["maxfetch"]);
+$result =
+file_get_contents("https://www.googleapis.com/plus/v1/people/".$google["id"]."/activities/public?alt=json&pp=1&key=".$google["key"]."&maxResults=".$google["maxfetch"]);
$activities = json_decode($result);
$state = array("lastid"=>'');
diff --git a/fromgplus/tofriendica.php b/fromgplus/tofriendica.php
deleted file mode 100644
index b185ecc15..000000000
--- a/fromgplus/tofriendica.php
+++ /dev/null
@@ -1,128 +0,0 @@
-", ""), array("[b]", "[/b]"), $bbcode);
- $bbcode = str_replace(array("", ""), array("[i]", "[/i]"), $bbcode);
- $bbcode = str_replace(array("", ""), array("[s]", "[/s]"), $bbcode);
- $bbcode = str_replace(array(" "), array("\n"), $bbcode);
-
- $bbcode = trim(strip_tags($bbcode));
- return($bbcode);
-}
-
-function friendicapost($post) {
- global $friendica;
-
- $api = new Statusnet($friendica["user"], $friendica["pw"], "GooglePlus", $friendica["server"]);
- $ret = $api->updateStatus($post);
- $api->endSession();
-}
-
-function handleattachments($item) {
- $post = "";
-
- foreach ($item->object->attachments as $attachment) {
- switch($attachment->objectType) {
- case "video":
- //$post .= "\n\n[url=".$attachment->url."]".
- // "[size=large][b]".html2bbcode($attachment->displayName)."[/b][/size][/url]\n";
- $post .= "\n\n[bookmark=".$attachment->url."]".html2bbcode($attachment->displayName)."[/bookmark]\n";
-
- //if (strpos($attachment->embed->url, "youtube.com"))
- // $post .= "[youtube]".$attachment->url."[/youtube]\n";
- //else
- /// $post .= "[url=".$attachment->url."][img]".$attachment->image->url."[/img][/url]\n";
-
- ///$post .= "[quote]".trim(html2bbcode($attachment->content))."[/quote]";
- break;
-
- case "article":
- //$post .= "\n\n[url=".$attachment->url."]".
- // "[size=large][b]".html2bbcode($attachment->displayName)."[/b][/size][/url]\n";
- $post .= "\n\n[bookmark=".$attachment->url."]".html2bbcode($attachment->displayName)."[/bookmark]\n";
- $post .= "[quote]".trim(html2bbcode($attachment->content))."[/quote]";
- break;
-
- case "photo":
- //$post .= "\n\n[url=".$attachment->fullImage->url."]".
- // "[img]".$attachment->fullImage->url."[/img][/url]\n";
- $post .= "\n\n[img]".$attachment->fullImage->url."[/img]\n";
- if ($attachment->displayName != "")
- $post .= html2bbcode($attachment->displayName)."\n";
- break;
-
- case "photo-album":
- $post .= "\n\n[url=".$attachment->url."]".
- "[size=large][b]".html2bbcode($attachment->displayName)."[/b][/size][/url]\n";
- break;
-
- default:
- print_r($attachment);
- die();
- break;
- }
- }
- return($post);
-}
-
-$result = file_get_contents("https://www.googleapis.com/plus/v1/people/".$google["id"]."/activities/public?alt=json&pp=1&key=".$google["key"]."&maxResults=".$google["maxfetch"]);
-$activities = json_decode($result);
-
-$state = array("lastid"=>'');
-if (file_exists($statefile))
- $state = unserialize(file_get_contents($statefile));
-
-$lastid = "";
-
-foreach($activities->items as $item) {
- if ($item->id == $state["lastid"])
- break;
-
- if ($lastid == "")
- $lastid = $item->id;
-
- switch($item->object->objectType) {
- case "note":
- $post = html2bbcode($item->object->content);
-
- if (is_array($item->object->attachments))
- $post .= handleattachments($item);
- friendicapost($post);
- break;
-
- case "activity":
- $post = html2bbcode($item->annotation)."\n";
- //$post .= html2bbcode("♲ ");
- $post .= html2bbcode("♻ ");
- $post .= "[url=".$item->object->actor->url."]".$item->object->actor->displayName."[/url]";
- $post .= " \n";
- //$post .= "[quote]";
-
- $post .= html2bbcode($item->object->content);
-
- if (is_array($item->object->attachments))
- $post .= "\n".trim(handleattachments($item));
-
- //$post .= "[/quote]";
-
- friendicapost($post);
- break;
-
- default:
- print_r($item);
- die();
- break;
- }
-}
-
-if ($lastid != "") {
- $state['lastid'] = $lastid;
- file_put_contents($statefile, serialize($state));
-}
-?>
diff --git a/jappixmini.tgz b/jappixmini.tgz
new file mode 100644
index 000000000..e936f4e8f
Binary files /dev/null and b/jappixmini.tgz differ
diff --git a/jappixmini/MIT.txt b/jappixmini/MIT.txt
new file mode 100644
index 000000000..2517727f4
--- /dev/null
+++ b/jappixmini/MIT.txt
@@ -0,0 +1,7 @@
+You may distribute all files which are not within the jappix/ folder under the following conditions:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/jappixmini/README b/jappixmini/README
new file mode 100644
index 000000000..f21649be7
--- /dev/null
+++ b/jappixmini/README
@@ -0,0 +1,31 @@
+Jappix Mini Plugin
+==================
+
+This quick-and-dirty addon allows you to add a Jabber-based, Facebook-like chat
+to Friendica. It uses Jappix Mini.
+
+It is necessary to use a BOSH host - so to use this plugin, each users need to
+know the address of a BOSH host that works with his account. The BOSH server of
+the Jappix project (https://bind.jappix.com/) is not locked to a specific XMPP
+provider, but keep in mind that only personal usage is approved according to
+http://codingteam.net/project/jappix/doc/BoshServer.
+If you have a larger server, it is recommended that you install your own BOSH
+server and recommend it using the configuration help field. If it is on the
+same server, you can also deactivate the BOSH proxy. This should improve the
+performance.
+
+The addon has an experimental autosubscribe and autosuggest functionality which
+tries to add your Friendica contacts to your roster automatically.
+
+Limitations:
+ - Jabber passwords can only be encrypted if they are at most 39 characters
+ long.
+
+Notes on the license
+--------------------
+
+The license of this addon is AGPL, as required by Jappix Mini. If you make
+modifications to the addon, you are responsible for providing a proper facility
+for downloading the changed source code.
+Moreover, it may be necessary that you publish the source code of the Friendica
+application and all other used addons if you do not use standard versions.
diff --git a/jappixmini/jappix/AUTHORS b/jappixmini/jappix/AUTHORS
new file mode 100644
index 000000000..0086eb6a4
--- /dev/null
+++ b/jappixmini/jappix/AUTHORS
@@ -0,0 +1,54 @@
+Jappix - An open social platform
+These are the authors of Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 15/01/12
+
+-------------------------------------------------
+
+Here are the Jappix contributors, who coded or translated the application (Codingteam.net nicknames):
+
+# DEVELOPERS
+ - am0ur3ux
+ - LinkMauve
+ - Maranda
+ - Mathieui
+ - Olivier
+ - sim6
+ - Vanaryon
+
+# TRANSLATORS
+ - allan
+ - Arsimael
+ - Belzeneph
+ - Catdarko
+ - Cerritus
+ - chunzu
+ - ebraminio
+ - Finkregh
+ - hamano
+ - JanCBorchardt
+ - jarda
+ - joeka
+ - kr2ysiek
+ - krohn
+ - Lenwe
+ - LinkMauve
+ - Liverbool
+ - lwj
+ - m1st
+ - Maime
+ - Maranda
+ - mbajur
+ - mentalo
+ - mkwm
+ - Otourly
+ - pocamon
+ - quimi
+ - sahwar
+ - Vanaryon
+ - vitalyster
+ - Zash
diff --git a/jappixmini/jappix/COPYING b/jappixmini/jappix/COPYING
new file mode 100644
index 000000000..84ae389fa
--- /dev/null
+++ b/jappixmini/jappix/COPYING
@@ -0,0 +1,662 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license
+for software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are
+designed to take away your freedom to share and change the works. By
+contrast, our General Public Licenses are intended to guarantee your
+freedom to share and change all versions of a program--to make sure it
+remains free software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public
+License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds
+of works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further restriction,
+you may remove that term. If a license document contains a further
+restriction but permits relicensing or conveying under this License, you
+may add to a covered work material governed by the terms of that license
+document, provided that the further restriction does not survive such
+relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have permission
+to link or combine any covered work with a work licensed under version 3
+of the GNU General Public License into a single combined work, and to
+convey the resulting work. The terms of this License will continue to
+apply to the part which is the covered work, but the work with which it is
+combined will remain governed by version 3 of the GNU General Public
+License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may differ
+in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero
+General Public License "or any later version" applies to it, you have
+the option of following the terms and conditions either of that
+numbered version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number
+of the GNU Affero General Public License, you may choose any version
+ever published by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that
+proxy's public statement of acceptance of a version permanently
+authorizes you to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+.
\ No newline at end of file
diff --git a/jappixmini/jappix/INSTALL b/jappixmini/jappix/INSTALL
new file mode 100644
index 000000000..652c1be7d
--- /dev/null
+++ b/jappixmini/jappix/INSTALL
@@ -0,0 +1,23 @@
+Jappix - An open social platform
+These are the installation instructions for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 15/09/10
+
+-------------------------------------------------
+
+It's very simple to install Jappix on your webserver, you just have to follow these things:
+
+# INSTALLATION
+ - The HTTP server : http://codingteam.net/project/jappix/doc/HttpServer
+ - The XMPP server : http://codingteam.net/project/jappix/doc/XmppServer
+ - The BOSH server : http://codingteam.net/project/jappix/doc/BoshServer
+ - The Jappix app. : http://codingteam.net/project/jappix/doc/JappixApp
+
+# MORE
+ - The whole documentation is available at : http://codingteam.net/project/jappix/doc
+
+Now, you can use Jappix. Happy socializing!
diff --git a/jappixmini/jappix/README b/jappixmini/jappix/README
new file mode 100644
index 000000000..49cbf9747
--- /dev/null
+++ b/jappixmini/jappix/README
@@ -0,0 +1,20 @@
+Jappix - An open social platform
+This is the readme file for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 18/02/11
+
+-------------------------------------------------
+
+Please refer to the installation instructions that are located in the INSTALL file to process the Jappix installation.
+
+The Jappix Project official service: https://www.jappix.com/
+The Jappix Project website: https://project.jappix.com/
+The Jappix Project panel: http://codingteam.net/project/jappix
+
+Jappix is released under the terms of the AGPL license. See COPYING for details.
+
+Have fun with Jappix!
diff --git a/jappixmini/jappix/THANKS b/jappixmini/jappix/THANKS
new file mode 100644
index 000000000..a5b122276
--- /dev/null
+++ b/jappixmini/jappix/THANKS
@@ -0,0 +1,27 @@
+Jappix - An open social platform
+These are the special thanks for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 16/02/11
+
+-------------------------------------------------
+
+We would like to thanks the authors of these tools, coming from other projects:
+
+# PROJECTS
+ - Base64 http://rumkin.com
+ - DrawSVGChart http://codingteam.net/project/codingteam
+ - idzXHR http://www.iadvize.com/plugin_strophe_xmpp.html
+ - JSJaC http://blog.jwchat.org/jsjac/
+ - jQuery http://jquery.com/
+ - jQuery Form http://jquery.malsup.com/form/
+ - jQuery Timers http://plugins.jquery.com/project/timers
+ - jXHR http://mulletxhr.com/
+ - Mobile Detect http://code.google.com/p/php-mobile-detect/
+ - JSMin http://github.com/rgrove/jsmin-php/
+ - PHP-gettext https://launchpad.net/php-gettext
+ - Silk icons http://www.famfamfam.com/lab/icons/silk/
+ - Smileys http://www.gajim.org/
diff --git a/jappixmini/jappix/VERSION b/jappixmini/jappix/VERSION
new file mode 100644
index 000000000..76892598e
--- /dev/null
+++ b/jappixmini/jappix/VERSION
@@ -0,0 +1 @@
+Spaco [0.9]
diff --git a/jappixmini/jappix/css/adhoc.css b/jappixmini/jappix/css/adhoc.css
new file mode 100644
index 000000000..68d0383fd
--- /dev/null
+++ b/jappixmini/jappix/css/adhoc.css
@@ -0,0 +1,26 @@
+/*
+
+Jappix - An open social platform
+This is the Ad-Hoc CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 20/12/10
+
+*/
+
+#adhoc .content {
+ padding: 10px 0 10px 0;
+}
+
+#adhoc .adhoc-head {
+ background-color: #f1f6fd;
+ border: 1px #9dc4fc solid;
+ width: 598px;
+ height: 18px;
+ font-size: 0.9em;
+ margin: 0 10px 12px 10px;
+ padding: 6px 10px;
+}
diff --git a/jappixmini/jappix/css/anonymous.css b/jappixmini/jappix/css/anonymous.css
new file mode 100644
index 000000000..f61a79c60
--- /dev/null
+++ b/jappixmini/jappix/css/anonymous.css
@@ -0,0 +1,29 @@
+/*
+
+Jappix - An open social platform
+This is the anonymous mode CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 06/11/10
+
+*/
+
+#top-content {
+ min-width: 500px !important;
+}
+
+#main-content {
+ min-width: 490px !important;
+ min-height: 450px !important;
+}
+
+#left-content {
+ display: none;
+}
+
+#right-content {
+ left: 0;
+}
diff --git a/jappixmini/jappix/css/archives.css b/jappixmini/jappix/css/archives.css
new file mode 100644
index 000000000..5e60a8beb
--- /dev/null
+++ b/jappixmini/jappix/css/archives.css
@@ -0,0 +1,93 @@
+/*
+
+Jappix - An open social platform
+This is the archives CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 19/12/10
+
+*/
+
+#archives .content {
+ padding: 10px 0 10px 0;
+}
+
+#archives .filter {
+ background-color: #e9f1fd;
+ border-right: 1px solid #9dc4fc;
+ width: 180px;
+ padding: 12px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ float: left;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+}
+
+#archives .filter .friend {
+ margin-bottom: 12px;
+}
+
+#archives .filter .friend {
+ height: 210px;
+ width: 180px;
+ float: none;
+}
+
+#archives .current,
+#archives .logs {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ left: 204px;
+}
+
+#archives .current {
+ background-color: #e4eef9;
+ border-bottom: 1px solid #9dc4fc;
+ font-size: 0.9em;
+ height: 16px;
+ padding: 6px;
+ top: 0;
+}
+
+#archives .current span {
+ height: 16px;
+ overflow: hidden;
+}
+
+#archives .current .name {
+ max-width: 160px;
+ font-weight: bold;
+ float: left;
+}
+
+#archives .current .time {
+ color: #47646a;
+ font-size: 0.95em;
+ float: right;
+}
+
+#archives .logs {
+ color: black;
+ font-size: 0.9em;
+ overflow: auto;
+ padding: 8px 10px 0;
+ float: left;
+ position: absolute;
+ top: 29px;
+}
+
+#archives .logs a {
+ color: black;
+ text-decoration: underline;
+}
diff --git a/jappixmini/jappix/css/board.css b/jappixmini/jappix/css/board.css
new file mode 100644
index 000000000..91e6dcf93
--- /dev/null
+++ b/jappixmini/jappix/css/board.css
@@ -0,0 +1,47 @@
+/*
+
+Jappix - An open social platform
+This is the board CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 26/08/11
+
+*/
+
+#board .one-board {
+ display: none;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 18px;
+ z-index: 10000;
+ font-size: 0.92em;
+ padding: 6px 8px;
+ box-shadow: 0 0 8px #5c5c5c;
+ -moz-box-shadow: 0 0 8px #5c5c5c;
+ -webkit-box-shadow: 0 0 8px #5c5c5c;
+}
+
+#board .one-board:hover {
+ cursor: pointer;
+}
+
+#board .one-board.visible {
+ display: block;
+}
+
+#board .one-board.error {
+ background-color: rgb(241,160,160);
+ background-color: rgba(241,160,160,0.9);
+ color: #420c0c;
+}
+
+#board .one-board.info {
+ background-color: rgb(248,246,186);
+ background-color: rgba(248,246,186,0.9);
+ color: #2f2a02;
+}
diff --git a/jappixmini/jappix/css/buddylist.css b/jappixmini/jappix/css/buddylist.css
new file mode 100644
index 000000000..3bfa70cbd
--- /dev/null
+++ b/jappixmini/jappix/css/buddylist.css
@@ -0,0 +1,530 @@
+/*
+
+Jappix - An open social platform
+This is the buddy-list CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 31/08/11
+
+*/
+
+#buddy-list {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.85);
+ color: #919191;
+ padding: 15px 6px 4px 6px;
+ border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ box-shadow: 0 0 6px #5c5c5c;
+ -moz-box-shadow: 0 0 6px #5c5c5c;
+ -webkit-box-shadow: 0 0 6px #5c5c5c;
+}
+
+#buddy-list .content {
+ background: #e8f1f3;
+ background: -moz-linear-gradient(top, #e8f1f3, #e4edef);
+ background: -webkit-gradient(linear, left top, left bottom, from(#e8f1f3), to(#e4edef));
+ color: #666666;
+ height: 207px;
+ padding: 4px 4px 0 4px;
+ overflow-x: hidden;
+ overflow-y: auto;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ -moz-border-radius-topleft: 3px;
+ -moz-border-radius-topright: 3px;
+ -webkit-border-top-left-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+}
+
+#buddy-list .one-group {
+ margin-bottom: 10px;
+}
+
+#buddy-list .one-group a.group {
+ color: #202c2f;
+ font-size: 0.8em;
+ margin: 3px 6px;
+ padding-left: 12px;
+ max-height: 15px;
+ text-decoration: none;
+ overflow: hidden;
+ display: block;
+}
+
+#buddy-list .one-group a.group.plus {
+ background-position: -4px -1143px;
+}
+
+#buddy-list .one-group a.group.minus {
+ background-position: -4px -1162px;
+}
+
+#buddy-list .one-group a.group:hover {
+ cursor: pointer;
+}
+
+#buddy-list .hidden-buddy,
+#buddy-list .foot-edit-finish,
+.buddy-conf-more-display-available {
+ display: none;
+}
+
+#buddy-list .buddy {
+ width: 100%;
+ height: 50px;
+ margin-bottom: 4px;
+}
+
+#buddy-list .buddy-click {
+ background: #d9e7ea;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+#buddy-list .buddy-click:hover,
+#buddy-list .buddy-click:focus {
+ background: #cedee1;
+ cursor: pointer;
+}
+
+#buddy-list .buddy-click:active {
+ background: #c3d3d7;
+}
+
+#buddy-list .gateway {
+ height: 27px;
+}
+
+#buddy-list .gateway .name {
+ margin-left: 0;
+}
+
+#buddy-list .gateway .buddy-presence {
+ float: left;
+ overflow: hidden;
+ width: 0;
+ margin: 0 4px;
+}
+
+#buddy-list .avatar-container {
+ float: left;
+ text-align: center;
+ margin: 3px;
+ width: 46px;
+ height: 46px;
+}
+
+#buddy-list .avatar {
+ max-width: 44px;
+ max-height: 44px;
+}
+
+#buddy-list .name {
+ margin: 4px 3px 5px 56px;
+}
+
+#buddy-list .buddy-name {
+ height: 17px;
+ font-weight: bold;
+ font-size: 0.8em;
+ color: #264249;
+ margin: 5px 0 5px 2px;
+ overflow: hidden;
+}
+
+#buddy-list .buddy.blocked p.buddy-name {
+ text-decoration: line-through;
+}
+
+#buddy-list .buddy-presence {
+ height: 14px;
+ font-size: 0.7em;
+ color: #3a585e;
+ padding: 2px 0 0 16px;
+ margin-top: -3px;
+}
+
+#buddy-list .unavailable,
+#page-switch .unavailable,
+#page-engine p.bc-infos span.show.unavailable {
+ background-position: 0 -153px;
+}
+
+#buddy-list .available,
+#page-engine p.bc-infos span.show.available,
+#page-engine .list .available,
+#page-engine .list .chat,
+#page-switch .available,
+#my-infos .f-presence a[data-value=available] span {
+ background-position: 0 -169px;
+}
+
+#buddy-list .away,
+#page-engine p.bc-infos span.show.away,
+#page-engine .list .away,
+#page-switch .away,
+#my-infos .f-presence a[data-value=away] span {
+ background-position: 0 -185px;
+}
+
+#buddy-list .busy,
+#page-engine p.bc-infos span.show.busy,
+#page-engine .list .xa,
+#page-engine .list .dnd,
+#page-switch .busy,
+#my-infos .f-presence a[data-value=xa] span {
+ background-position: 0 -201px;
+}
+
+#buddy-list .error,
+#page-switch .error,
+#page-engine p.bc-infos span.show.error {
+ background-position: 0 -217px;
+}
+
+#buddy-list .buddy-infos {
+ position: absolute;
+ z-index: 100;
+ width: 337px;
+ color: white;
+ font-size: 0.8em;
+}
+
+.buddy-infos-subarrow {
+ background-position: 0 -241px;
+ opacity: 0.8;
+ width: 9px;
+ height: 20px;
+ margin-top: 12px;
+ float: left;
+}
+
+.buddy-infos-subitem {
+ background-color: rgb(0,0,0);
+ background-color: rgba(0,0,0,0.8);
+ padding: 8px 10px;
+ width: 308px;
+ text-shadow: 0 1px 1px black;
+ float: left;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+.manage-infos p.bm-authorize,
+#rosterx .oneresult span.action.add {
+ background-position: 0 -1181px;
+}
+
+.manage-infos p.bm-remove,
+#rosterx .oneresult span.action.delete,
+#attach div.one-file a.remove {
+ background-position: 0 -1200px;
+}
+
+.manage-infos p.bm-remove {
+ margin-bottom: 18px;
+}
+
+.manage-infos p.bm-rename {
+ background-position: 0 -1216px;
+}
+
+.manage-infos p.bm-group {
+ background-position: 0 -1241px;
+}
+
+.manage-infos div.bm-choose {
+ max-height: 95px;
+ margin: 0 0 8px 102px;
+ overflow: auto;
+}
+
+.manage-infos div.bm-choose label {
+ float: left;
+ clear: both;
+ margin-bottom: 1px;
+}
+
+.manage-infos div.bm-choose input {
+ float: left;
+}
+
+.manage-infos div.bm-choose input[type=checkbox] {
+ margin: 0 6px 0 0;
+}
+
+.manage-infos div.bm-choose div {
+ clear: both;
+}
+
+.manage-infos p.bm-rename,
+.manage-infos p.bm-group {
+ height: 26px;
+}
+
+.manage-infos p.bm-rename label,
+.manage-infos p.bm-group label {
+ width: 80px;
+ padding-top: 3px;
+ float: left;
+}
+
+.manage-infos p.bm-rename input,
+.manage-infos p.bm-group input {
+ float: left;
+ width: 155px;
+}
+
+.manage-infos a.save {
+ float: right;
+ margin: 4px;
+}
+
+.buddy-infos-subitem p {
+ margin: 6px 0;
+ padding-left: 22px;
+ height: 16px;
+ overflow: hidden;
+}
+
+.buddy-infos-subitem a {
+ color: white;
+ text-decoration: underline;
+}
+
+.tune-note {
+ background-position: 0 -676px;
+}
+
+.location-world {
+ background-position: 0 -658px;
+}
+
+.view-individual {
+ background-position: 0 -34px;
+}
+
+.edit-buddy {
+ background-position: 0 -1008px;
+}
+
+#buddy-list .filter {
+ background-color: white;
+ border-top: 1px solid #b8c2c4;
+ height: 15px;
+ padding: 2px 4px;
+ font-size: 0.8em;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px;
+ -moz-border-radius-bottomleft: 3px;
+ -moz-border-radius-bottomright: 3px;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+}
+
+#buddy-list .filter input {
+ border: none;
+ color: #273a3f;
+ width: 211px;
+ padding: 0;
+ box-shadow: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+}
+
+#buddy-list .filter a {
+ display: none;
+ background-color: #9a2d2d;
+ color: white;
+ height: 13px;
+ width: 13px;
+ margin-top: 1px;
+ font-size: 0.8em;
+ text-align: center;
+ text-decoration: none;
+ float: right;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+#buddy-list .filter a:hover,
+#buddy-list .filter a:focus {
+ background-color: #8c2121;
+}
+
+#buddy-list .filter a:active {
+ background-color: #7e1919;
+}
+
+#buddy-list .foot {
+ padding: 9px 1px 3px;
+}
+
+#buddy-list .buddy-list-icon {
+ height: 16px;
+ width: 16px;
+ margin: -3px 5px 0 0;
+ float: left;
+}
+
+#buddy-list .buddy-list-icon a.talk-images {
+ height: 16px;
+ width: 16px;
+ display: block;
+}
+
+#buddy-list .add,
+#page-engine .text .tools-add {
+ background-position: 0 -1047px;
+}
+
+#buddy-list .join {
+ background-position: 0 -1065px;
+}
+
+#buddy-list .groupchat,
+#page-switch .groupchat-default {
+ background-position: 0 -1082px;
+}
+
+#buddy-list .more {
+ background-position: 0 -1100px;
+}
+
+#buddy-list .foot-edit-finish a {
+ color: white;
+ font-size: 0.8em;
+ margin: -3px 4px 0 0;
+ float: right;
+ display: block;
+}
+
+#buddy-list .foot-edit-finish a:hover,
+#buddy-list .foot-edit-finish a:focus {
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+.buddy-conf-item {
+ position: absolute;
+ width: 263px;
+ color: white;
+ z-index: 9998;
+ text-align: left;
+ font-size: 0.8em;
+ margin-left: -10px;
+}
+
+.buddy-conf-item:hover {
+ cursor: default;
+}
+
+.buddy-conf-subarrow {
+ background-position: 0 -241px;
+ opacity: 0.8;
+ height: 10px;
+ width: 18px;
+ margin-left: 9px;
+}
+
+.buddy-conf-subitem {
+ background-color: rgb(0,0,0);
+ background-color: rgba(0,0,0,0.8);
+ padding: 10px;
+ text-shadow: 0 1px 1px black;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+.buddy-conf-p {
+ margin-bottom: 4px;
+ width: 220px;
+ font-weight: bold;
+ float: left;
+}
+
+.buddy-conf-input {
+ padding-top: 2px;
+}
+
+.buddy-conf-text {
+ font-size: 11px;
+ clear: both;
+ margin-bottom: 3px;
+}
+
+.buddy-conf-text a {
+ color: white;
+}
+
+.buddy-conf-text a:hover,
+.buddy-conf-text a:focus {
+ cursor: pointer;
+ text-decoration: underline;
+}
+
+.buddy-conf-text a.buddy-conf-add-search {
+ text-decoration: underline;
+ margin-top: 6px;
+ display: block;
+}
+
+.buddy-conf-select {
+ font-size: 1.1em;
+ clear: both;
+ margin-bottom: 8px;
+ width: 180px;
+ height: 23px;
+}
+
+.join-jid {
+ width: 220px;
+ margin-top: 5px;
+}
+
+.add-contact-jid,
+.add-contact-name,
+.add-contact-gateway {
+ width: 156px;
+ margin-bottom: 4px;
+}
+
+.add-contact-name-get {
+ font-size: 0.8em;
+ display: none;
+}
+
+.buddy-conf-subitem label {
+ clear: both;
+}
+
+.buddy-conf-subitem label span {
+ width: 76px;
+ height: 14px;
+ margin-top: 3px;
+ overflow: hidden;
+ float: left;
+}
+
+#buddy-conf-join ul {
+ width: 224px;
+ max-height: 160px;
+ left: 10px;
+ top: 51px;
+}
+
+.buddy-conf-join-select {
+ margin: 8px 0 0 0;
+}
diff --git a/jappixmini/jappix/css/channel.css b/jappixmini/jappix/css/channel.css
new file mode 100644
index 000000000..671d25ea9
--- /dev/null
+++ b/jappixmini/jappix/css/channel.css
@@ -0,0 +1,545 @@
+/*
+
+Jappix - An open social platform
+This is the channel CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 26/08/11
+
+*/
+
+#channel .top div.update {
+ position: absolute;
+ top: 12px;
+ left: 115px;
+ right: 15px;
+ bottom: 15px;
+ border-radius: 20px;
+ -moz-border-radius: 20px;
+ -webkit-border-radius: 20px;
+}
+
+#channel .top p {
+ font-size: 0.9em;
+ margin-bottom: 10px;
+}
+
+#channel .top h2 {
+ font-size: 1.6em;
+ margin-bottom: 10px;
+ color: #232323;
+}
+
+#channel .top a {
+ font-size: 0.9em;
+ color: #232323;
+}
+
+#channel .top.individual div.update {
+ right: 36px;
+}
+
+#channel .top.individual div.shortcuts,
+#userinfos .main-infos div.shortcuts {
+ width: 16px;
+ float: right;
+}
+
+#channel .top.individual div.shortcuts {
+ margin: 2px 5px 0 0;
+}
+
+#channel .top.individual div.shortcuts a,
+#userinfos .main-infos div.shortcuts a {
+ height: 16px;
+ width: 16px;
+ margin-bottom: 4px;
+ display: block;
+}
+
+#channel .top.individual div.shortcuts a.message,
+#userinfos .main-infos a.message {
+ background-position: 0 -1717px;
+}
+
+#channel .top.individual div.shortcuts a.chat,
+#userinfos .main-infos a.chat {
+ background-position: 0 -1737px;
+}
+
+#channel .top.individual div.shortcuts a.command,
+#userinfos .main-infos a.command {
+ background-position: 0 -1758px;
+}
+
+#channel .microblog-body {
+ height: 20px;
+ margin-right: 50px;
+}
+
+#channel .microblog-body input {
+ width: 100%;
+ height: 100%;
+ padding: 8px;
+}
+
+#channel .one-microblog-icon {
+ position: absolute;
+ top: 38px;
+ right: 0;
+}
+
+#channel div.update .one-microblog-icon,
+#channel div.update .postit {
+ width: 16px;
+ height: 16px;
+ display: block;
+}
+
+#channel div.update .attach {
+ background-position: 0 -79px;
+ display: none;
+}
+
+#attach {
+ position: absolute;
+ width: 263px;
+ margin-left: -227px;
+ color: white;
+ font-size: 0.85em;
+ z-index: 9998;
+ text-align: left;
+ display: none;
+}
+
+#attach p {
+ margin-bottom: 6px !important;
+}
+
+#attach input[type=submit] {
+ margin: 8px 0 6px 0;
+}
+
+#attach .wait {
+ float: right;
+ margin: 7px 5px;
+}
+
+#attach div.one-file {
+ height: 16px;
+ margin-top: 2px;
+}
+
+#attach div.one-file a.link {
+ color: white;
+ width: 215px;
+ height: 14px;
+ margin-left: 2px;
+ overflow: hidden;
+ float: left;
+}
+
+#attach div.one-file a.remove {
+ width: 16px;
+ height: 16px;
+ float: left;
+}
+
+.attach-subarrow {
+ background-position: 0 -241px;
+ opacity: 0.8;
+ height: 10px;
+ width: 18px;
+ margin-left: 226px;
+}
+
+.attach-subitem {
+ background-color: rgb(0,0,0);
+ background-color: rgba(0,0,0,0.8);
+ padding: 10px;
+ text-shadow: 0 1px 1px black;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+.attach-p {
+ font-weight: bold;
+ float: left;
+}
+
+#channel .one-update {
+ margin-bottom: 12px;
+ padding: 6px 6px 8px 6px;
+ border-bottom: 1px dotted #d0d0d0;
+ min-height: 50px;
+ color: black;
+ position: relative;
+ display: none;
+}
+
+#channel .one-update .avatar-container {
+ text-align: center;
+ margin-right: 16px;
+ float: left;
+ height: 50px;
+ width: 50px;
+}
+
+#channel .one-update .avatar-container:hover {
+ cursor: pointer;
+}
+
+#channel .one-update img.avatar {
+ max-height: 50px;
+ max-width: 50px;
+}
+
+#channel .one-update div.body {
+ margin-left: 65px;
+ opacity: 0.8;
+}
+
+#channel .one-update:hover div.body {
+ opacity: 1;
+}
+
+#channel .one-update a.repeat {
+ background-position: 0 -1681px;
+ height: 16px;
+ width: 16px;
+ margin-right: 4px;
+ float: left;
+}
+
+#channel .one-update span a {
+ text-decoration: underline;
+}
+
+#channel .one-update p {
+ display: block;
+ margin: 0 12px 5px 0;
+}
+
+#channel .one-update p b.name:hover {
+ cursor: pointer;
+ text-decoration: underline;
+}
+
+#channel .one-update p.infos {
+ font-size: 0.9em;
+}
+
+#channel .one-update p.infos a.geoloc {
+ background-position: 0 -1778px;
+ color: #363636;
+ margin-left: 18px;
+ padding-left: 14px;
+}
+
+#channel .one-update p.infos a.geoloc:hover,
+#channel .one-update p.infos a.geoloc:focus,
+#channel .one-update p.infos a.geoloc:active {
+ color: #141414;
+}
+
+#channel .one-update p.file {
+ font-size: 0.9em;
+ margin: 6px 0 5px 10px;
+}
+
+#channel .one-update p.file a.link,
+#inbox .inbox-new-file a.file {
+ min-height: 16px;
+ padding-left: 22px;
+ text-decoration: underline;
+ display: block;
+}
+
+#channel .one-update p.file a.link {
+ margin-top: 4px;
+}
+
+#channel p.file a,
+#inbox .inbox-new-file a.file {
+ background-position: 0 -988px;
+}
+
+#channel p.file a.audio,
+#inbox .inbox-new-file a.file.audio {
+ background-position: 0 -899px;
+}
+
+#channel p.file a.image,
+#inbox .inbox-new-file a.file.image {
+ background-position: 0 -917px;
+}
+
+#channel p.file a.video,
+#inbox .inbox-new-file a.file.video {
+ background-position: 0 -935px;
+}
+
+#channel p.file a.document,
+#inbox .inbox-new-file a.file.document {
+ background-position: 0 -953px;
+}
+
+#channel p.file a.package,
+#inbox .inbox-new-file a.file.package {
+ background-position: 0 -971px;
+}
+
+#channel .one-update p.file a.thumb img {
+ border: 1px solid #a2a2a2;
+ max-width: 140px;
+ max-height: 105px;
+ margin: 4px 10px 2px 0;
+ padding: 1px;
+}
+
+#channel .one-update p.file a.thumb img:hover {
+ border-color: #464646;
+}
+
+#channel .one-update div.comments,
+.popup.large div.comments {
+ width: 410px;
+ margin: 2px 0 2px 76px;
+}
+
+#channel .one-update div.comments div.arrow,
+.popup.large div.comments div.arrow {
+ background-position: 0 -1702px;
+ width: 20px;
+ height: 8px;
+ margin-left: 20px;
+ display: block;
+}
+
+#channel .one-update div.comments div.comments-content,
+.popup.large div.comments div.comments-content {
+ background-color: #e5ebec;
+ color: black;
+ font-size: 0.9em;
+ text-shadow: 0 1px 0 white;
+}
+
+#channel .one-update div.comments input,
+.popup.large div.comments input {
+ width: 356px;
+ margin: 6px 0;
+ padding: 4px 5px;
+}
+
+#channel .one-update div.comments span.icon,
+.popup.large div.comments span.icon {
+ background-position: 0 -1082px;
+ height: 16px;
+ width: 16px;
+ margin: 10px;
+ float: left;
+}
+
+#channel .one-update div.comments .one-comment.loading span.icon,
+.popup.large div.comments .one-comment.loading span.icon {
+ margin: 0 10px 0 0;
+}
+
+#channel .one-update div.comments .one-comment,
+.popup.large div.comments .one-comment {
+ border-bottom: 1px solid #f4f4f4;
+ padding: 4px 8px 0px 8px;
+ position: relative;
+ display: block;
+}
+
+#channel .one-update div.comments .one-comment.compose,
+.popup.large div.comments .one-comment.compose {
+ border-bottom: 2px solid #f4f4f4;
+ height: 36px;
+ padding: 0;
+}
+
+#channel .one-update div.comments .one-comment.new,
+.popup.large div.comments .one-comment.new {
+ display: none;
+}
+
+#channel .one-update div.comments a.one-comment,
+.popup.large div.comments a.one-comment {
+ text-decoration: none;
+}
+
+#channel .one-update div.comments a.one-comment:hover,
+#channel .one-update div.comments a.one-comment:focus,
+.popup.large div.comments a.one-comment:hover,
+.popup.large div.comments a.one-comment:focus {
+ text-decoration: underline;
+}
+
+#channel .one-update div.comments .one-comment.loading,
+.popup.large div.comments .one-comment.loading {
+ padding-bottom: 5px;
+}
+
+#channel .one-update div.comments .one-comment div.marker,
+.popup.large div.comments .one-comment div.marker {
+ background-color: #6d8387;
+ width: 2px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+}
+
+#channel .one-update div.comments .one-comment .avatar-container,
+.popup.large div.comments .one-comment .avatar-container {
+ text-align: center;
+ width: 30px;
+ height: 30px;
+ margin: 2px 8px 0 0;
+ float: left;
+}
+
+#channel .one-update div.comments .one-comment .avatar-container:hover,
+.popup.large div.comments .one-comment .avatar-container:hover {
+ cursor: pointer;
+}
+
+#channel .one-update div.comments .one-comment img.avatar,
+.popup.large div.comments .one-comment img.avatar {
+ max-height: 30px;
+ max-width: 30px;
+}
+
+#channel .one-update div.comments .one-comment .comment-container,
+.popup.large div.comments .one-comment .comment-container {
+ float: left;
+}
+
+#channel .one-update div.comments .one-comment a.name,
+.popup.large div.comments .one-comment a.name {
+ font-weight: bold;
+ text-decoration: none;
+ font-size: 0.95em;
+ padding-bottom: 2px;
+ float: left;
+}
+
+#channel .one-update div.comments .one-comment a.name:hover,
+#channel .one-update div.comments .one-comment a.name:focus,
+.popup.large div.comments .one-comment a.name:hover,
+.popup.large div.comments .one-comment a.name:focus {
+ text-decoration: underline;
+}
+
+#channel .one-update div.comments .one-comment span.date,
+#channel .one-update div.comments .one-comment a.remove,
+.popup.large div.comments .one-comment span.date,
+.popup.large div.comments .one-comment a.remove {
+ font-size: 0.85em;
+ float: right;
+}
+
+#channel .one-update div.comments .one-comment.me:hover span.date,
+.popup.large div.comments .one-comment.me:hover span.date {
+ display: none;
+}
+
+#channel .one-update div.comments .one-comment.me a.remove,
+.popup.large div.comments .one-comment.me a.remove {
+ display: none;
+}
+
+#channel .one-update div.comments .one-comment.me:hover a.remove,
+.popup.large div.comments .one-comment.me:hover a.remove {
+ display: block;
+}
+
+#channel .one-update div.comments .one-comment p.body,
+.popup.large div.comments .one-comment p.body {
+ clear: both;
+}
+
+#channel a.more {
+ background-position: 0 -334px;
+ color: black;
+ height: 16px;
+ text-decoration: none;
+ margin: -2px 0 0 4px;
+ padding: 0 0 14px 20px;
+ display: block;
+ visibility: hidden;
+}
+
+#channel a.more:hover,
+#channel a.more:focus {
+ text-decoration: underline;
+}
+
+#channel a.mbtool {
+ width: 11px;
+ height: 11px;
+ display: none;
+ position: absolute;
+ right: 0;
+}
+
+#channel .one-update:hover a.mbtool {
+ display: block;
+}
+
+#channel a.mbtool:hover,
+#channel a.mbtool:focus {
+ text-decoration: none;
+}
+
+#channel a.mbtool.profile {
+ background-position: -1px -1333px;
+ top: 24px;
+}
+
+#channel a.mbtool.repost {
+ background-position: -1px -1354px;
+}
+
+#channel a.mbtool.remove {
+ background-position: -1px -1312px;
+}
+
+#channel a.mbtool.repost,
+#channel a.mbtool.remove {
+ top: 6px;
+}
+
+#channel .footer {
+ bottom: 0;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
+
+#channel .footer div {
+ margin-left: 5px;
+ padding-left: 24px;
+ min-height: 16px;
+ font-size: 0.85em;
+ width: auto !important;
+}
+
+#channel .footer .sync {
+ background-position: 0 -804px;
+ display: none;
+}
+
+#channel .footer .unsync {
+ background-position: 0 -830px;
+ display: none;
+}
diff --git a/jappixmini/jappix/css/directory.css b/jappixmini/jappix/css/directory.css
new file mode 100644
index 000000000..34b323124
--- /dev/null
+++ b/jappixmini/jappix/css/directory.css
@@ -0,0 +1,16 @@
+/*
+
+Jappix - An open social platform
+This is the directory tool CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 13/02/11
+
+*/
+
+#directory .content {
+ padding: 10px 0 10px 0;
+}
diff --git a/jappixmini/jappix/css/discovery.css b/jappixmini/jappix/css/discovery.css
new file mode 100644
index 000000000..f66456b65
--- /dev/null
+++ b/jappixmini/jappix/css/discovery.css
@@ -0,0 +1,61 @@
+/*
+
+Jappix - An open social platform
+This is the discovery CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 13/02/11
+
+*/
+
+#discovery .content {
+ padding: 10px 0 10px 0;
+}
+
+#discovery .content p {
+ margin: 5px 10px 5px 10px;
+ text-align: justify;
+ font-size: 0.85em;
+}
+
+#discovery .discovery-head,
+#directory .directory-head,
+#rosterx .rosterx-head,
+#privacy .privacy-head {
+ width: 606px;
+ height: 24px;
+ margin: 0 10px 10px 10px;
+ padding: 6px;
+ background: #f1f6fd;
+ border: 1px #9dc4fc solid;
+}
+
+#discovery .disco-server-text,
+#directory .directory-server-text {
+ float: left;
+ font-size: 0.9em;
+ margin: 3px;
+}
+
+#discovery .disco-server-input,
+#directory .directory-server-input {
+ float: right;
+ width: 200px;
+ padding: 2px;
+ height: 18px;
+ float: right;
+ margin-right: 10px;
+ padding: 2px;
+}
+
+#discovery .disco-category {
+ display: none;
+ margin-bottom: 22px;
+}
+
+#discovery .disco-category-title {
+ font-weight: bold;
+}
diff --git a/jappixmini/jappix/css/favorites.css b/jappixmini/jappix/css/favorites.css
new file mode 100644
index 000000000..5d3fd51df
--- /dev/null
+++ b/jappixmini/jappix/css/favorites.css
@@ -0,0 +1,179 @@
+/*
+
+Jappix - An open social platform
+This is the favorites CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 28/12/10
+
+*/
+
+#favorites .content {
+ padding: 10px 0 10px 0;
+}
+
+#favorites .fedit-head-select {
+ min-width: 190px;
+ max-width: 210px;
+}
+
+#favorites .switch-fav {
+ margin: 0 10px 0 10px;
+ width: 200px;
+ height: 355px;
+ border-right: 1px #c0c0c0 dotted;
+ float: left;
+}
+
+#favorites .room-switcher {
+ width: 188px;
+ height: 18px;
+ border-bottom: 1px #9dc4fc solid;
+ float: left;
+ padding: 10px 6px;
+ font-size: 0.9em;
+}
+
+#favorites .room-switcher:hover {
+ background-color: #e9f1fd;
+ cursor: pointer;
+}
+
+#favorites .room-switcher:active {
+ background-color: #f1f6fd;
+}
+
+#favorites .switch-fav .icon {
+ float: left;
+ height: 16px;
+ width: 16px;
+ margin: 0 8px 0 0;
+}
+
+#favorites .switch-fav .room-list .list-icon {
+ background-position: 0 -855px;
+}
+
+#favorites .switch-fav .room-search .search-icon {
+ background-position: 0 -876px;
+}
+
+#favorites .static-fav {
+ width: 385px;
+ height: 335px;
+ margin: 0 10px 0 0;
+ padding: 10px;
+ float: right;
+}
+
+#favorites .favorites-search {
+ display: none;
+}
+
+#favorites .static-fav-head {
+ width: 393px;
+ margin: -10px;
+}
+
+#favorites .static-fav-results {
+ width: 406px;
+ height: 314px;
+ margin: 10px -10px -10px -10px;
+ padding: 6px 0 0 0;
+}
+
+#favorites .fedit-line {
+ height: 30px;
+ font-size: 0.9em;
+ padding: 10px 0 4px 4px;
+ border-bottom: 1px #9dc4fc solid;
+}
+
+#favorites .fedit-line:hover {
+ background: #e9f1fd;
+}
+
+#favorites label {
+ width: 140px;
+ margin-top: 3px;
+}
+
+#favorites input {
+ height: 18px;
+ width: 186px;
+ margin-top: 0;
+ padding: 2px;
+}
+
+#favorites .fedit-select {
+ min-width: 160px;
+}
+
+#favorites .fedit-actions {
+ margin: 10px 0 0;
+ font-size: 0.9em;
+ float: right;
+}
+
+#favorites input[type=checkbox] {
+ margin-top: 5px;
+}
+
+#favorites .fedit-terminate {
+ float: right;
+}
+
+#favorites .fedit-add {
+ display: block;
+}
+
+#favorites .fedit-edit {
+ background-position: 2px -1240px;
+}
+
+#favorites .fedit-remove {
+ margin: 0 8px 0 0;
+}
+
+#favorites .add,
+.popup .results .one-button.one-add {
+ background-position: 3px -1177px;
+}
+
+#favorites .remove,
+#inbox .remove {
+ background-position: 3px -1196px;
+}
+
+#favorites .join,
+#inbox .reply,
+#inbox .send,
+.popup .results .one-button.one-chat {
+ background-position: 3px -124px;
+}
+
+#favorites .one-button,
+#inbox .one-button,
+.popup .results .one-button {
+ padding-left: 20px !important;
+ font-size: 0.98em;
+}
+
+#favorites .fsearch-results {
+ overflow: auto;
+}
+
+#favorites .room-name {
+ margin: 4px 2px 5px;
+ max-width: 210px;
+ float: left;
+}
+
+#favorites .fsearch-noresults {
+ display: none;
+ font-size: 0.9em;
+ font-weight: bold;
+}
diff --git a/jappixmini/jappix/css/home.css b/jappixmini/jappix/css/home.css
new file mode 100644
index 000000000..789ea4d95
--- /dev/null
+++ b/jappixmini/jappix/css/home.css
@@ -0,0 +1,579 @@
+/*
+
+Jappix - An open social platform
+This is the home CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 15/01/12
+
+*/
+
+#home {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ min-height: 550px;
+ min-width: 875px;
+}
+
+#home .corporation,
+#home .corporation .corp_network,
+#home .locale,
+#home .obsolete {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.70);
+ color: white;
+ position: absolute;
+ top: 0;
+ text-shadow: 0 0 1px black;
+ z-index: 100;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px;
+ -moz-border-radius-bottomleft: 3px;
+ -moz-border-radius-bottomright: 3px;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+}
+
+#home .corporation {
+ background-position: 9px -357px;
+ left: 12px;
+ height: 26px;
+ width: 34px;
+}
+
+#home .corporation.hovered {
+ height: 28px;
+ border-radius: 0;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+}
+
+#home .corporation .corp_network {
+ width: 180px;
+ padding: 10px 12px;
+ top: 28px;
+ display: none;
+ border-top-right-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -webkit-border-top-right-radius: 3px;
+}
+
+#home .corporation.hovered .corp_network {
+ display: block;
+}
+
+#home .corporation .corp_network h2 {
+ font-size: 1.1em;
+ margin: 14px 0 4px 0;
+}
+
+#home .corporation .corp_network h2.nomargin {
+ margin-top: 0;
+}
+
+#home .corporation .corp_network a {
+ font-size: 0.8em;
+ margin: 2px 0;
+ padding: 2px 6px;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+#home .corporation .corp_network a span {
+ margin: 2px 0;
+ display: block;
+}
+
+#home .corporation .corp_network a span.name {
+ font-weight: bold;
+}
+
+#home .corporation .corp_network a span.desc {
+ font-size: 0.9em;
+ margin-left: 2px;
+}
+
+#home .locale {
+ left: 52px;
+ font-size: 0.8em;
+}
+
+#home .locale .current {
+ height: 19px;
+ padding: 3px 12px 4px 12px;
+ font-weight: bold;
+}
+
+#home .locale .current:hover {
+ cursor: default;
+}
+
+#home .locale .current .current_align {
+ height: 19px;
+ vertical-align: middle;
+ display: table-cell;
+}
+
+#home .locale .list {
+ margin: 2px 0 2px;
+}
+
+#home .locale .list a,
+#home .corporation .corp_network a {
+ color: white;
+ text-decoration: none;
+ display: block;
+}
+
+#home .locale .list a {
+ padding: 3px 10px;
+}
+
+#home .locale .list a:hover,
+#home .locale .list a:focus,
+#home .corporation .corp_network a:hover,
+#home .corporation .corp_network a:focus {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.1);
+ cursor: pointer;
+}
+
+#home .locale .list a:active,
+#home .corporation .corp_network a:active {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.14);
+}
+
+#home .obsolete {
+ height: 60px;
+ padding: 4px 10px;
+ right: 12px;
+ font-size: 0.9em;
+ font-weight: bold;
+ display: none;
+}
+
+#home .obsolete a {
+ height: 33px;
+ width: 33px;
+ margin: 5px 2px 0 0;
+ float: left;
+}
+
+#home .obsolete a:hover,
+#home .obsolete a:focus {
+ opacity: 0.8;
+}
+
+#home .obsolete a:active {
+ opacity: 0.6;
+}
+
+#home .obsolete a.firefox {
+ background-position: 1px 0;
+}
+
+#home .obsolete a.chrome {
+ background-position: -34px 0;
+}
+
+#home .obsolete a.safari {
+ background-position: -68px 0;
+}
+
+#home .obsolete a.opera {
+ background-position: -101px 0;
+}
+
+#home .obsolete a.ie {
+ background-position: -135px 0;
+}
+
+#home .plane {
+ background-position: 0 -384px;
+ width: 507px;
+ height: 328px;
+ position: absolute;
+ left: 0;
+ top: 60px;
+}
+
+#home .main {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.85);
+ position: absolute;
+ top: 50%;
+ margin-top: -200px;
+ width: 800px;
+ height: 400px;
+ left: 50%;
+ margin-left: -400px;
+ z-index: 50;
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ box-shadow: 0 0 35px #5c5c5c;
+ -moz-box-shadow: 0 0 35px #5c5c5c;
+ -webkit-box-shadow: 0 0 35px #5c5c5c;
+}
+
+#home .left {
+ float: left;
+ width: 350px;
+ height: 370px;
+ margin: 15px 0 15px 15px;
+ color: white;
+ text-align: center;
+ text-shadow: 0 1px 1px black;
+}
+
+#home .left .logo {
+ background-position: 0 0;
+ float: left;
+ margin: 30px 20px;
+ width: 311px;
+ height: 113px;
+}
+
+#home .left p.upper {
+ margin: 12px 0 20px 0;
+}
+
+#home .left p.secondary {
+ margin: 8px 0 0 16px;
+ font-size: 0.9em;
+ width: 320px;
+}
+
+#home .right {
+ background: #e4eef9;
+ background: -moz-linear-gradient(top, #e4eef9, #C5E1FF);
+ background: -webkit-gradient(linear, left top, left bottom, from(#e4eef9), to(#C5E1FF));
+ float: right;
+ width: 385px;
+ height: 350px;
+ margin: 15px 15px 15px 0;
+ padding: 10px;
+ font-size: 13px;
+ text-align: justify;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ box-shadow: 0 0 20px black;
+ -moz-box-shadow: 0 0 20px black;
+ -webkit-box-shadow: 0 0 20px black;
+}
+
+#home .right h1 {
+ font-size: 16px;
+ padding-bottom: 4px;
+ border-bottom: 1px black dotted;
+}
+
+#home .right p {
+ margin-bottom: 4px;
+}
+
+#home .right p a {
+ border-width: 0 0 1px 0;
+ border-style: dotted;
+ border-color: black;
+}
+
+#home .right p a:hover,
+#home .right p a:focus {
+ border-style: solid;
+ text-decoration: none;
+}
+
+#home .right button {
+ display: block;
+ margin-left: 22px;
+ width: 342px;
+ height: 64px;
+ text-decoration: none;
+ font-weight: bold;
+ border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+}
+
+#home .right button:hover {
+ cursor: pointer;
+}
+
+#home .right button span {
+ float: left;
+}
+
+#home .right button span.home-images {
+ height: 16px;
+ width: 16px;
+ margin: 5px 7px 7px 24px;
+}
+
+#home .right button span.text {
+ padding-left: 20px;
+ font-size: 1.5em;
+}
+
+#home .right .login {
+ background-color: #72d071;
+ background-position: 0 0;
+ border: 1px solid #5cb55c;
+ margin-top: 22px;
+ box-shadow: 0 0 10px #89e389;
+ -moz-box-shadow: 0 0 10px #89e389;
+ -webkit-box-shadow: 0 0 10px #89e389;
+}
+
+#home .right .login:hover,
+#home .right .login:focus {
+ border: 1px solid #419141;
+ box-shadow: 0 0 15px #72d071;
+ -moz-box-shadow: 0 0 15px #72d071;
+ -webkit-box-shadow: 0 0 15px #72d071;
+}
+
+#home .right .login:active {
+ background-color: #97e896;
+ background-position: 0 -80px;
+}
+
+#home .right .login span.text {
+ color: #2d612d;
+ text-shadow: 1px 1px 1px #5cb55c;
+}
+
+#home .right .login span.home-images {
+ background-position: 0 -230px;
+}
+
+#home .right .register {
+ background-color: #f6ef82;
+ background-position: 0 -160px;
+ border: 1px solid #e3db56;
+ margin-top: 15px;
+ box-shadow: 0 0 15px #f1e968;
+ -moz-box-shadow: 0 0 15px #f1e968;
+ -webkit-box-shadow: 0 0 15px #f1e968;
+}
+
+#home .right .register:hover,
+#home .right .register:focus {
+ border: 1px solid #d2c93f;
+ box-shadow: 0 0 15px #e0d743;
+ -moz-box-shadow: 0 0 15px #e0d743;
+ -webkit-box-shadow: 0 0 15px #e0d743;
+}
+
+#home .right .register:active {
+ background-color: #fdf7af;
+ background-position: 0 -240px;
+}
+
+#home .right .register span.text {
+ color: #6d6813;
+ text-shadow: 1px 1px 1px #dbd56e;
+}
+
+#home .right .register span.home-images {
+ background-position: 0 -204px;
+}
+
+#home .right p.notice {
+ margin-top: 24px;
+ font-size: 0.9em;
+}
+
+#home .right .navigation {
+ clear: both;
+ width: 385px;
+ border-top: 1px black dotted;
+ position: absolute;
+ text-align: right;
+ bottom: 25px;
+ right: 25px;
+ padding-top: 6px;
+}
+
+#home .right .navigation a {
+ margin-left: 9px;
+ color: black;
+ text-decoration: none;
+ font-size: 0.9em;
+ height: 12px;
+ padding: 0 0 4px 20px;
+ float: right;
+}
+
+#home .right .navigation a:hover,
+#home .right .navigation a:focus {
+ text-decoration: underline;
+}
+
+#home .right .navigation a.unencrypted {
+ background-position: 0 -256px;
+}
+
+#home .right .navigation a.encrypted {
+ background-position: 0 -282px;
+}
+
+#home .right .navigation a.project {
+ background-position: 0 -126px;
+}
+
+#home .right .navigation a.manager {
+ background-position: 0 -152px;
+}
+
+#home .right .navigation a.mobile {
+ background-position: 0 -178px;
+}
+
+#home a.advanced {
+ background-position: 0 -334px;
+ font-size: 0.9em;
+ height: 16px;
+ margin-bottom: 10px;
+ padding-left: 16px;
+ display: block;
+}
+
+#home fieldset.advanced {
+ display: none;
+}
+
+#home .anonymouser input[type=text] {
+ width: 160px;
+}
+
+#home .homediv.registerer .success a {
+ font-weight: bold;
+ text-decoration: underline;
+}
+
+#home fieldset {
+ border: 1px solid black;
+ margin: 12px 0 12px 0;
+ padding: 5px 0 4px 0;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+#home legend {
+ font-size: 0.9em;
+ margin: 0 0 0 15px;
+ padding: 0 2px;
+ text-transform: uppercase;
+}
+
+#home label {
+ width: 110px;
+ display: block;
+ float: left;
+ clear: both;
+ margin: 0 0 5px 12px;
+}
+
+#home input,
+#home select {
+ float: left;
+ margin-bottom: 5px;
+}
+
+#home input[type=text],
+#home input[type=password],
+#home select {
+ width: 140px;
+ margin-top: -2px;
+}
+
+#home input[type=submit] {
+ min-width: 120px;
+ float: right;
+}
+
+#home span.jid {
+ display: block;
+ float: left;
+ margin: 0 4px;
+}
+
+#home input.nick, #home input.server {
+ width: 110px;
+}
+
+#home .info {
+ padding: 6px;
+ position: absolute;
+ bottom: 62px;
+ right: 35px;
+ border-width: 1px;
+ border-style: dotted;
+ clear: both;
+ width: 350px;
+}
+
+#home .info.success {
+ background-color: #aee578;
+ border-color: #85b05c;
+ display: none;
+}
+
+#home .info.fail {
+ background-color: #f19d9d;
+ border-color: #b34f4f;
+}
+
+#home .info.report {
+ background-color: #f3f48b;
+ border-color: #c9c66b;
+ display: none;
+}
+
+#home .info.report span {
+ text-decoration: underline;
+}
+
+#home .notice.simple {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.7);
+ color: white;
+ font-size: 0.9em;
+ text-decoration: none;
+ text-shadow: 0 1px 0 black;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ padding: 8px 20px;
+ z-index: 100;
+ box-shadow: 0 0 25px #ababab;
+ -moz-box-shadow: 0 0 25px #ababab;
+ -webkit-box-shadow: 0 0 25px #ababab;
+}
+
+#home .notice.simple .title {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.4);
+ background-position: 8px -299px;
+ border-width: 0 1px 1px 1px;
+ border-style: solid;
+ border-color: #141414;
+ font-weight: bold;
+ padding: 8px 8px 8px 30px;
+}
+
+#home .notice.simple .text {
+ margin-left: 20px;
+}
diff --git a/jappixmini/jappix/css/ie.css b/jappixmini/jappix/css/ie.css
new file mode 100644
index 000000000..8808b50b6
--- /dev/null
+++ b/jappixmini/jappix/css/ie.css
@@ -0,0 +1,146 @@
+/*
+
+Jappix - An open social platform
+These are all the IE compliant CSS classes
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 22/04/11
+
+*/
+
+/* rgba(255,255,255,0.9) */
+.search ul {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#edffffff,endColorstr=#edffffff);
+}
+
+/* rgba(255,255,255,0.3) */
+a.finish:active,
+#manager-buttons input:active,
+#install-buttons input:active {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#49ffffff,endColorstr=#49ffffff);
+}
+
+/* rgba(255,255,255,0.2) */
+a.finish:hover,
+a.finish:focus,
+#manager-buttons input:hover,
+#manager-buttons input:focus,
+#install-buttons input:hover,
+#install-buttons input:focus,
+.notifications-content .one-notification:active {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff,endColorstr=#33ffffff);
+}
+
+/* rgba(255,255,255,0.14) */
+#home .locale .list a:active {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#2fffffff,endColorstr=#2fffffff);
+}
+
+/* rgba(255,255,255,0.1) */
+#home .locale .list a:hover,
+#home .locale .list a:focus,
+a.finish,
+a.finish.disabled:hover,
+a.finish.disabled:focus,
+a.finish.disabled:active,
+#manager-buttons input,
+#install-buttons input,
+.notifications-content .one-notification:hover,
+.notifications-content .one-notification:focus {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#20ffffff,endColorstr=#20ffffff);
+}
+
+/* rgba(255,239,104,0.8) */
+.popup .infos {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#deffef68,endColorstr=#deffef68);
+}
+
+/* rgba(225,160,20,0.3) */
+.search ul li.hovered {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#46e1a014,endColorstr=#46e1a014);
+}
+
+/* rgba(248,246,186,0.9) */
+#board .one-board.info {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#edf8f6ba,endColorstr=#edf8f6ba);
+}
+
+/* rgba(241,160,160,0.9) */
+#board .one-board.error {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#edf1a0a0,endColorstr=#edf1a0a0);
+}
+
+/* rgba(234,234,234,0.8) */
+#page-engine .chatstate {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#deeaeaea,endColorstr=#deeaeaea);
+}
+
+/* rgba(20,20,20,0.6) */
+#home .locale,
+#home .obsolete,
+#home .notice.simple {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#a0141414,endColorstr=#a0141414);
+}
+
+/* rgba(20,20,20,0.8) */
+#home .main,
+#reconnect .pane,
+#my-infos,
+#right-content,
+#buddy-list,
+#manager,
+#install {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#de141414,endColorstr=#de141414);
+}
+
+/* rgba(20,20,20,0.9) */
+.popup {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ed141414,endColorstr=#ed141414);
+}
+
+/* rgba(0,0,0,0.2) */
+#install-top .step {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#33000000,endColorstr=#33000000);
+}
+
+/* rgba(0,0,0,0.6) */
+.lock {
+ background: url(../img/others/lock.png) repeat !important;
+}
+
+/* rgba(0,0,0,0.8) */
+#page-engine .tooltip-subitem,
+.attach-subitem,
+.buddy-infos-subitem,
+.buddy-conf-subitem,
+.tools-content-subitem {
+ background: transparent;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#de000000,endColorstr=#de000000);
+}
+
+/* Fix a fieldset padding bug */
+legend {
+ margin-bottom: 5px !important;
+}
+
+/* Fix an opacity bug */
+a.finish.disabled {
+ filter: alpha(opacity = 20) !important;
+}
diff --git a/jappixmini/jappix/css/images.css b/jappixmini/jappix/css/images.css
new file mode 100644
index 000000000..2dfb756f6
--- /dev/null
+++ b/jappixmini/jappix/css/images.css
@@ -0,0 +1,89 @@
+/*
+
+Jappix - An open social platform
+This is the images CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 16/01/12
+
+*/
+
+.body-images {
+ background-image: url(../img/sprites/background.png);
+ background-repeat: repeat;
+ background-color: #93c5fa;
+}
+
+.install-images {
+ background-image: url(../img/sprites/install.png);
+ background-repeat: no-repeat;
+}
+
+.home-images {
+ background-image: url(../img/sprites/home.png);
+ background-repeat: no-repeat;
+}
+
+.browsers-images {
+ background-image: url(../img/sprites/browsers.png);
+ background-repeat: no-repeat;
+}
+
+.buttons-images {
+ background-image: url(../img/sprites/buttons.png);
+ background-repeat: repeat-x;
+}
+
+.talk-images {
+ background-image: url(../img/sprites/talk.png);
+ background-repeat: no-repeat;
+}
+
+.smileys-images {
+ background-image: url(../img/sprites/smileys.png);
+ background-repeat: no-repeat;
+}
+
+.welcome-images {
+ background-image: url(../img/sprites/welcome.png);
+ background-repeat: no-repeat;
+}
+
+.me-images {
+ background-image: url(../img/sprites/me.png);
+ background-repeat: no-repeat;
+}
+
+.manager-images {
+ background-image: url(../img/sprites/manager.png);
+ background-repeat: no-repeat;
+}
+
+.mobile-images {
+ background-image: url(../img/sprites/mobile.png);
+ background-repeat: no-repeat;
+}
+
+.wait-small {
+ background-image: url(../img/wait/wait-small.gif);
+ background-repeat: no-repeat;
+ height: 16px;
+ width: 16px;
+}
+
+.wait-medium {
+ background-image: url(../img/wait/wait-medium.png);
+ background-repeat: no-repeat;
+ height: 24px;
+ width: 24px;
+}
+
+.wait-big {
+ background-image: url(../img/wait/wait-big.gif);
+ background-repeat: no-repeat;
+ height: 30px;
+ width: 30px;
+}
diff --git a/jappixmini/jappix/css/inbox.css b/jappixmini/jappix/css/inbox.css
new file mode 100644
index 000000000..1ef058862
--- /dev/null
+++ b/jappixmini/jappix/css/inbox.css
@@ -0,0 +1,202 @@
+/*
+
+Jappix - An open social platform
+This is the inbox CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 28/12/10
+
+*/
+
+#inbox .content {
+ padding: 10px 0 10px 0;
+}
+
+#inbox .content p {
+ margin: 3px 10px;
+ text-align: justify;
+ font-size: 0.9em;
+}
+
+#inbox .inbox-results {
+ height: 310px;
+ width: 620px;
+ margin: -5px 0 0 10px;
+ padding: 6px 0 0 0;
+ overflow: auto;
+}
+
+#inbox .message-unread {
+ background-color: #E9F1FD;
+}
+
+#inbox .one-message {
+ font-size: 0.9em;
+ border-bottom: 1px #b2c7cb solid;
+}
+
+#inbox .message-head {
+ padding: 6px 0 7px 4px;
+ overflow: hidden;
+}
+
+#inbox .message-head:hover {
+ background-color: #e9f1fd;
+ cursor: pointer;
+}
+
+#inbox .message-head:active {
+ background-color: #f1f6fd;
+}
+
+#inbox .one-message.message-reading,
+#inbox .one-message.message-reading .message-head {
+ background-color: #f1f6fd;
+}
+
+#inbox .avatar-container {
+ float: left;
+ width: 40px;
+ height: 40px;
+ margin-right: 7px;
+ text-align: center;
+ background-repeat: no-repeat;
+}
+
+#inbox .avatar {
+ max-width: 40px;
+ max-height: 40px;
+}
+
+#inbox .message-jid,
+#inbox .message-subject {
+ float: left;
+ margin: 0 2px;
+ overflow: hidden;
+}
+
+#inbox .message-jid {
+ width: 165px;
+ font-weight: bold;
+}
+
+#inbox .message-subject {
+ width: 355px;
+}
+
+#inbox .message-truncated {
+ color: #42646b;
+ font-size: 0.8em;
+ margin: 23px 0 0 49px;
+}
+
+#inbox .message-body {
+ padding: 8px 5px 5px 5px;
+}
+
+#inbox .message-body a {
+ text-decoration: underline;
+}
+
+#inbox .message-meta {
+ margin-top: 6px;
+ padding: 3px 4px;
+ border-top: 1px #b2c7cb dotted;
+}
+
+#inbox .message-meta span.date {
+ color: #28474e;
+ font-size: 0.8em;
+ margin: 10px 0 0 4px;
+ float: left;
+}
+
+#inbox .message-meta a {
+ font-size: 0.98em;
+ margin: 5px;
+ float: right;
+ display: block;
+}
+
+#inbox .inbox-noresults {
+ font-weight: bold;
+ display: none;
+}
+
+#inbox .a-show-messages {
+ display: none;
+}
+
+#inbox .inbox-new {
+ display: none;
+ height: 300px;
+ width: 620px;
+ margin: -5px 0 0 10px;
+ padding: 16px 0 0 0;
+}
+
+#inbox .inbox-new-block {
+ border-top: 1px #686868 dotted;
+ padding-top: 9px;
+ min-height: 32px;
+ clear: both;
+}
+
+#inbox .inbox-new-text {
+ float: left;
+ width: 100px;
+}
+
+#inbox .inbox-new-textarea {
+ width: 460px;
+ height: 109px;
+ margin-bottom: 10px;
+ float: left;
+}
+
+#inbox .inbox-new input {
+ float: left;
+}
+
+#inbox .inbox-new-to ul {
+ width: 264px;
+ max-height: 168px;
+ font-size: 0.9em;
+ left: 120px;
+ top: 31px;
+}
+
+#inbox .inbox-new-to-input {
+ width: 260px;
+}
+
+#inbox .inbox-new-subject-input {
+ width: 380px;
+}
+
+#inbox .inbox-new-file a {
+ display: block;
+ float: left;
+}
+
+#inbox .inbox-new-file a.file {
+ font-size: 0.85em;
+ height: 16px;
+ max-width: 320px;
+ margin: 3px 0 15px 013px;
+ overflow: hidden;
+}
+
+#inbox .inbox-new-file a.one-button {
+ font-size: 0.85em;
+ margin: -2px 0 0 25px;
+}
+
+#inbox .inbox-new-send a {
+ font-size: 0.85em;
+ float: right;
+ display: block;
+}
diff --git a/jappixmini/jappix/css/install.css b/jappixmini/jappix/css/install.css
new file mode 100644
index 000000000..9dbde3fca
--- /dev/null
+++ b/jappixmini/jappix/css/install.css
@@ -0,0 +1,285 @@
+/*
+
+Jappix - An open social platform
+This is the install CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 08/06/11
+
+*/
+
+body {
+ color: white;
+}
+
+#install {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.85);
+ width: 800px;
+ margin: 35px auto;
+ padding-bottom: 17px;
+ border-radius: 6px;
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ box-shadow: 0 0 35px #5c5c5c;
+ -moz-box-shadow: 0 0 35px #5c5c5c;
+ -webkit-box-shadow: 0 0 35px #5c5c5c;
+}
+
+#install a {
+ color: black;
+ text-decoration: underline;
+}
+
+#install .clear {
+ clear: both;
+}
+
+#install fieldset {
+ border: 1px solid black;
+ margin: 22px 0 15px 0;
+ padding: 7px 2px 5px 2px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+#install legend {
+ font-size: 0.9em;
+ margin: 0 0 0 15px;
+ padding: 0 2px;
+ text-transform: uppercase;
+}
+
+#install label {
+ width: 200px;
+ display: block;
+ float: left;
+ clear: both;
+ margin: 0 0 9px 12px;
+}
+
+#install input {
+ float: left;
+ margin-bottom: 5px;
+}
+
+#install input[type=text],
+#install input[type=url],
+#install input[type=password] {
+ margin-top: -2px;
+ padding: 3px;
+ font-size: 0.95em;
+ min-width: 220px;
+}
+
+#install input.icon {
+ padding-left: 24px;
+ min-width: 199px;
+ max-height: 18px;
+}
+
+#install input.icon#user_name {
+ background-position: 4px -204px;
+}
+
+#install input.icon#user_password {
+ background-position: 4px -226px;
+}
+
+#install input.icon#user_repassword {
+ background-position: 4px -248px;
+}
+
+#install-top {
+ padding: 30px 45px;
+}
+
+#install-top .logo {
+ background-position: 0 0;
+ min-width: 88px;
+ height: 36px;
+ padding: 32px 0 0 66px;
+ font-size: 32px;
+ color: white;
+ text-transform: lowercase;
+ float: left;
+ text-shadow: 0 1px 1px black;
+}
+
+#install-top .step {
+ background-color: rgb(0,0,0);
+ background-color: rgba(0,0,0,0.2);
+ border: 2px solid white;
+ padding: 6px 21px;
+ font-size: 2.7em;
+ text-shadow: 0 1px 1px black;
+ float: right;
+ border-radius: 40px;
+ -moz-border-radius: 40px;
+ -webkit-border-radius: 40px;
+ box-shadow: 0 0 10px #202020;
+ -moz-box-shadow: 0 0 10px #202020;
+ -webkit-box-shadow: 0 0 10px #202020;
+}
+
+#install-top .step span {
+ font-size: 0.6em;
+}
+
+#install-content {
+ background: #e4eef9;
+ background: -moz-linear-gradient(top, #e4eef9, #d0e5fa);
+ background: -webkit-gradient(linear, left top, left bottom, from(#e4eef9), to(#d0e5fa));
+ color: black;
+ font-size: 0.9em;
+ margin: 0 10px;
+ padding: 20px 24px;
+ min-height: 260px;
+ clear: both;
+ right: 10px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ box-shadow: 0 0 20px #202020;
+ -moz-box-shadow: 0 0 20px #202020;
+ -webkit-box-shadow: 0 0 20px #202020;
+}
+
+#install-content h3 {
+ padding-left: 24px;
+ margin-bottom: 15px;
+}
+
+#install-content h3.start {
+ background-position: 0 -73px;
+}
+
+#install-content h3.storage {
+ background-position: 0 -95px;
+}
+
+#install-content h3.account {
+ background-position: 0 -117px;
+}
+
+#install-content h3.main {
+ background-position: 0 -139px;
+}
+
+#install-content h3.hosts {
+ background-position: 0 -161px;
+}
+
+#install-content h3.services {
+ background-position: 0 -183px;
+}
+
+#install-content p {
+ margin-bottom: 10px;
+}
+
+#install-content .info {
+ color: black;
+ border-width: 1px;
+ border-style: dashed;
+ padding: 6px 8px;
+ display: block;
+ text-decoration: none;
+}
+
+#install-content .info.smallspace {
+ margin: 14px 0 10px 0;
+}
+
+#install-content .info.bigspace {
+ margin: 35px 0 20px 0;
+}
+
+#install-content .info.first {
+ margin-top: 28px;
+}
+
+#install-content .info.last {
+ margin-bottom: 28px;
+}
+
+#install-content .info.neutral {
+ background-color: #f0f19d;
+ border-color: #b3ad4f;
+}
+
+#install-content a.info.neutral:hover,
+#install-content a.info.neutral:focus {
+ background-color: #eced96;
+}
+
+#install-content a.info.neutral:active {
+ background-color: #e9ea93;
+}
+
+#install-content .info.success {
+ background-color: #a8dca9;
+ border-color: #5e9f5f;
+}
+
+#install-content a.info.success:hover,
+#install-content a.info.success:focus {
+ background-color: #a0d5a1;
+}
+
+#install-content a.info.success:active {
+ background-color: #9ad09b;
+}
+
+#install-content .info.fail {
+ background-color: #f19d9d;
+ border-color: #b34f4f;
+}
+
+#install-content ol {
+ margin: 20px 30px;
+}
+
+#install-content ol li {
+ margin-bottom: 1px;
+}
+
+#install-buttons {
+ margin-top: 22px;
+}
+
+#install-buttons input {
+ border: 1px solid white;
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.1);
+ color: white;
+ padding: 4px 8px;
+ margin-right: 20px;
+ text-shadow: 0 1px 1px black;
+ float: right;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ box-shadow: 0 0 5px #202020;
+ -moz-box-shadow: 0 0 5px #202020;
+ -webkit-box-shadow: 0 0 5px #202020;
+}
+
+#install-buttons input:hover,
+#install-buttons input:focus {
+ cursor: pointer;
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.2);
+ box-shadow: 0 0 15px #202020;
+ -moz-box-shadow: 0 0 15px #202020;
+ -webkit-box-shadow: 0 0 15px #202020;
+}
+
+#install-buttons input:active {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.3);
+}
diff --git a/jappixmini/jappix/css/integratebox.css b/jappixmini/jappix/css/integratebox.css
new file mode 100644
index 000000000..b5cb9c9f8
--- /dev/null
+++ b/jappixmini/jappix/css/integratebox.css
@@ -0,0 +1,34 @@
+/*
+
+Jappix - An open social platform
+This is the integratebox CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 06/11/10
+
+*/
+
+#integratebox .top {
+ height: 40px;
+}
+
+#integratebox .content {
+ text-align: center;
+ height: 385px;
+}
+
+#integratebox .one-media img {
+ max-height: 385px;
+ max-width: 640px;
+}
+
+#integratebox .one-media a img {
+ border: none;
+}
+
+#integratebox .one-media audio {
+ margin-top: 170px;
+}
diff --git a/jappixmini/jappix/css/jquery.datepicker.css b/jappixmini/jappix/css/jquery.datepicker.css
new file mode 100644
index 000000000..264cd544c
--- /dev/null
+++ b/jappixmini/jappix/css/jquery.datepicker.css
@@ -0,0 +1,148 @@
+/*
+
+Jappix - An open social platform
+This is the datepicker CSS stylesheet
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 28/12/10
+
+*/
+
+div.datepicker {
+ position: relative;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ width: 196px;
+ height: 147px;
+ position: absolute;
+ cursor: default;
+ top: 0;
+ left: 0;
+ display: none;
+}
+
+.datepickerHidden {
+ display: none;
+}
+
+div.datepicker table {
+ border-collapse:collapse;
+}
+
+div.datepicker a {
+ text-decoration: none;
+ cursor: default;
+ outline: none;
+}
+
+div.datepicker table td {
+ text-align: right;
+ padding: 0;
+ margin: 0;
+}
+
+div.datepicker th {
+ text-align: center;
+ color: #47646a;
+ font-weight: normal;
+}
+
+div.datepicker tbody th {
+ text-align: left;
+}
+
+div.datepicker tbody a {
+ display: block;
+}
+
+.datepickerDays a {
+ width: 20px;
+ line-height: 16px;
+ height: 16px;
+ padding-right: 2px;
+}
+
+.datepickerYears a,
+.datepickerMonths a {
+ width: 44px;
+ line-height: 36px;
+ height: 36px;
+ text-align: center;
+}
+
+td.datepickerNotInMonth {
+ background: #c7d1d4;
+}
+
+tbody.datepickerDays td.datepickerSelected {
+ background: #b0bdc1;
+}
+
+tbody.datepickerYears td.datepickerSelected,
+tbody.datepickerMonths td.datepickerSelected {
+ background: #9daaae;
+}
+
+div.datepicker a:hover,
+div.datepicker a:focus {
+ color: #3d7682;
+}
+
+div.datepicker tbody th {
+ text-align: left;
+}
+
+.datepickerSpace div {
+ width: 20px;
+}
+
+.datepickerGoNext a,
+.datepickerGoPrev a,
+.datepickerMonth a {
+ text-align: center;
+ height: 20px;
+ line-height: 20px;
+}
+
+.datepickerGoNext a {
+ float: right;
+ width: 20px;
+}
+
+.datepickerGoPrev a {
+ float: left;
+ width: 20px;
+}
+
+table.datepickerViewDays tbody.datepickerMonths,
+table.datepickerViewDays tbody.datepickerYears {
+ display: none;
+}
+
+table.datepickerViewMonths tbody.datepickerDays,
+table.datepickerViewMonths tbody.datepickerYears,
+table.datepickerViewMonths tr.datepickerDoW {
+ display: none;
+}
+
+table.datepickerViewYears tbody.datepickerDays,
+table.datepickerViewYears tbody.datepickerMonths,
+table.datepickerViewYears tr.datepickerDoW {
+ display: none;
+}
+
+td.datepickerDisabled a,
+td.datepickerDisabled.datepickerNotInMonth a {
+ color: #333;
+}
+
+td.datepickerSpecial a {
+ background: #700;
+}
+
+td.datepickerSpecial.datepickerSelected a {
+ background: #a00;
+}
diff --git a/jappixmini/jappix/css/main.css b/jappixmini/jappix/css/main.css
new file mode 100644
index 000000000..682548147
--- /dev/null
+++ b/jappixmini/jappix/css/main.css
@@ -0,0 +1,131 @@
+/*
+
+Jappix - An open social platform
+This is the main CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 05/10/11
+
+*/
+
+* {
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ font: normal 14.4px Helvetica, Verdana, sans-serif;
+ text-shadow: 0 0 5px white;
+}
+
+h1 {
+ margin-bottom: 15px;
+}
+
+a {
+ text-decoration: none;
+ color: black;
+ outline-style: none;
+}
+
+a:hover,
+a:focus {
+ cursor: pointer;
+ text-decoration: underline;
+}
+
+legend {
+ color: black;
+}
+
+input,
+textarea {
+ background-color: white;
+ border: 1px solid #636363;
+ font-size: 0.95em;
+ padding: 2px;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ box-shadow: inset 0 3px 10px #dcdcdc;
+ -moz-box-shadow: inset 0 3px 10px #dcdcdc;
+ -webkit-box-shadow: inset 0 3px 10px #dcdcdc;
+}
+
+textarea {
+ font-size: 1.1em;
+}
+
+input:focus,
+input[type=submit]:hover,
+input[type=reset]:hover,
+textarea:focus {
+ border: 1px solid #e1a014;
+ box-shadow: inset 0 3px 10px #edd9bc;
+ -moz-box-shadow: inset 0 3px 10px #edd9bc;
+ -webkit-box-shadow: inset 0 3px 10px #edd9bc;
+}
+
+input[type=submit],
+input[type=reset] {
+ cursor: pointer;
+}
+
+input[type=submit]:active,
+input[type=reset]:active {
+ box-shadow: inset 0 3px 15px #e1a753;
+ -moz-box-shadow: inset 0 3px 15px #e1a753;
+ -webkit-box-shadow: inset 0 3px 15px #e1a753;
+}
+
+input[disabled],
+textarea[disabled] {
+ background-color: #f3f3f3;
+ border: 1px solid #989898;
+}
+
+input:placeholder {
+ color: #67787c !important;
+}
+
+input:-moz-placeholder {
+ color: #67787c !important;
+}
+
+input::-webkit-input-placeholder {
+ color: #67787c !important;
+}
+
+input.placeholder {
+ color: #67787c !important;
+}
+
+input[type=checkbox] {
+ margin-top: 2px;
+}
+
+input[type=checkbox],
+input[type=radio] {
+ background: transparent none !important;
+ border: 0 none !important;
+}
+
+.please-complete,
+.please-complete:hover,
+.please-complete:focus {
+ border: 1px #ac2525 solid !important;
+ box-shadow: inset 0 3px 10px #f39c9c !important;
+ -moz-box-shadow: inset 0 3px 10px #f39c9c !important;
+ -webkit-box-shadow: inset 0 3px 10px #f39c9c !important;
+}
+
+.hidden {
+ display: none !important;
+}
+
+.clear {
+ clear: both !important;
+}
diff --git a/jappixmini/jappix/css/manager.css b/jappixmini/jappix/css/manager.css
new file mode 100644
index 000000000..c1dd358ca
--- /dev/null
+++ b/jappixmini/jappix/css/manager.css
@@ -0,0 +1,543 @@
+/*
+
+Jappix - An open social platform
+This is the manager CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 31/08/11
+
+*/
+
+#manager {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.85);
+ width: 945px;
+ margin: 0 auto 25px;
+ padding-bottom: 17px;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ box-shadow: 0 0 35px #5c5c5c;
+ -moz-box-shadow: 0 0 35px #5c5c5c;
+ -webkit-box-shadow: 0 0 35px #5c5c5c;
+}
+
+#manager a {
+ color: black;
+ text-decoration: underline;
+}
+
+#manager .clear {
+ clear: both;
+}
+
+#manager fieldset {
+ border: 1px solid black;
+ margin: 22px 0 15px 0;
+ padding: 7px 2px 5px 2px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+#manager legend {
+ font-size: 0.9em;
+ margin: 0 0 0 15px;
+ padding: 0 2px;
+ text-transform: uppercase;
+}
+
+#manager label {
+ width: 200px;
+ display: block;
+ float: left;
+ clear: both;
+ margin: 0 0 9px 12px;
+}
+
+#manager label.master {
+ text-decoration: underline;
+}
+
+#manager input,
+#manager select {
+ float: left;
+ margin-bottom: 5px;
+}
+
+#manager input[type=radio] {
+ margin: 2px 8px 5px 0;
+}
+
+#manager input[type=text],
+#manager input[type=url],
+#manager input[type=password],
+#manager select {
+ margin-top: -2px;
+ font-size: 0.95em;
+}
+
+#manager input[type=text],
+#manager input[type=url],
+#manager input[type=password] {
+ padding: 3px;
+ min-width: 220px;
+}
+
+#manager input.icon {
+ padding-left: 24px;
+ min-width: 199px;
+ max-height: 18px;
+}
+
+#manager input.icon#admin_name {
+ background-position: 4px -510px;
+}
+
+#manager input.icon#admin_password,
+#manager input.icon#user_repassword {
+ background-position: 4px -532px;
+}
+
+#manager input.icon#user_name,
+#manager input.icon#music_artist {
+ background-position: 4px -554px;
+}
+
+#manager input.icon#user_password {
+ background-position: 4px -576px;
+}
+
+#manager input.icon#music_title {
+ background-position: 4px -598px;
+}
+
+#manager input.icon#music_album {
+ background-position: 4px -620px;
+}
+
+#manager input.icon#background_image_color,
+#manager input.icon#background_color_color {
+ background-position: 4px -641px;
+}
+
+#manager select {
+ min-width: 160px;
+ max-width: 230px;
+}
+
+#manager-top {
+ padding: 25px 45px 30px;
+}
+
+#manager-top .logo {
+ background-position: 0 0;
+ min-width: 89px;
+ height: 40px;
+ padding: 28px 0 0 65px;
+ font-size: 32px;
+ color: white;
+ text-transform: lowercase;
+ float: left;
+ text-shadow: 0 1px 1px black;
+}
+
+#manager-top .meta {
+ background-color: #e0eaec;
+ font-size: 0.9em;
+ padding: 12px 7px 12px 14px;
+ float: right;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ box-shadow: 0 0 10px #202020;
+ -moz-box-shadow: 0 0 10px #202020;
+ -webkit-box-shadow: 0 0 10px #202020;
+}
+
+#manager-top .meta span {
+ margin-right: 10px;
+ color: black;
+}
+
+#manager-top .meta a {
+ background-color: #f1f6fd;
+ border: 1px solid #b9cbcf;
+ color: #224249;
+ padding: 4px 8px 4px 21px;
+ margin-left: 2px;
+ text-decoration: none;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+#manager-top .meta a:hover,
+#manager-top .meta a:focus {
+ border: 1px solid #95b1b7;
+}
+
+#manager-top .meta a:active {
+ border: 1px solid #77989f;
+}
+
+#manager-top .meta a.logout {
+ background-position: 3px -69px;
+}
+
+#manager-top .meta a.close {
+ background-position: 3px -90px;
+}
+
+#manager-tabs {
+ margin-left: 12px;
+}
+
+#manager-tabs a {
+ background-color: #d9e7ea;
+ color: #204249;
+ width: 107px;
+ height: 17px;
+ padding: 4px 4px 4px 16px;
+ margin-left: 4px;
+ font-size: 0.94em;
+ text-decoration: none;
+ overflow: hidden;
+ float: left;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -moz-border-radius-topleft: 3px;
+ -webkit-border-top-right-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+}
+
+#manager-tabs a:hover,
+#manager-tabs a:focus {
+ background-color: #cedee1;
+ text-decoration: none;
+}
+
+#manager-tabs a:active {
+ background-color: #c3d3d7;
+ text-decoration: none;
+}
+
+#manager-tabs a.tab-active {
+ background-color: #e4eef9 !important;
+}
+
+#manager-content {
+ background: #e4eef9;
+ background: -moz-linear-gradient(top, #e4eef9, #d0e5fa);
+ background: -webkit-gradient(linear, left top, left bottom, from(#e4eef9), to(#d0e5fa));
+ color: black;
+ font-size: 0.9em;
+ margin: 0 10px;
+ padding: 20px 24px;
+ min-height: 260px;
+ clear: both;
+ right: 10px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ box-shadow: 0 0 20px #202020;
+ -moz-box-shadow: 0 0 20px #202020;
+ -webkit-box-shadow: 0 0 20px #202020;
+}
+
+#manager-content h3 {
+ padding-left: 24px;
+ margin-bottom: 15px;
+}
+
+#manager-content h3.login {
+ background-position: 0 -466px;
+}
+
+#manager-content h3.statistics {
+ background-position: 0 -203px;
+}
+
+#manager-content h3.configuration {
+ background-position: 0 -224px;
+}
+
+#manager-content h3.hosts {
+ background-position: 0 -246px;
+}
+
+#manager-content h3.storage {
+ background-position: 0 -268px;
+}
+
+#manager-content h3.design {
+ background-position: 0 -290px;
+}
+
+#manager-content h3.users {
+ background-position: 0 -312px;
+}
+
+#manager-content h3.updates {
+ background-position: 0 -334px;
+}
+
+#manager-content h4 {
+ border-top: 1px dotted black;
+ padding-top: 5px;
+ margin: 20px 0 14px;
+ clear: both;
+}
+
+#manager-content ul,
+#manager-content ol {
+ width: 380px;
+ margin: 8px 0 20px 18px;
+}
+
+#manager-content li {
+ margin-bottom: 3px;
+}
+
+#manager-content li.total {
+ margin-bottom: 14px;
+}
+
+#manager-content li b {
+ width: 190px;
+ float: left;
+}
+
+#manager-content li span {
+ margin-left: 10px;
+ float: left;
+}
+
+#manager-content ul.stats,
+#manager-content ol.stats {
+ float: left;
+}
+
+#manager-content object.stats {
+ border: 1px dotted #bed4d9;
+ width: 450px;
+ height: 270px;
+ margin-bottom: 20px;
+ float: right;
+}
+
+#manager-content p,
+#manager-content div {
+ margin-bottom: 10px;
+}
+
+#manager-content .info {
+ color: black;
+ border-width: 1px;
+ border-style: dashed;
+ padding: 6px 8px;
+ display: block;
+ text-decoration: none;
+}
+
+#manager-content .info.bottomspace {
+ margin-bottom: 16px;
+}
+
+#manager-content .info.smallspace {
+ margin: 14px 0 10px 0;
+}
+
+#manager-content .info.bigspace {
+ margin: 35px 0 20px 0;
+}
+
+#manager-content .info.neutral {
+ background-color: #f0f19d;
+ border-color: #b3ad4f;
+}
+
+#manager-content a.info.neutral:hover,
+#manager-content a.info.neutral:focus {
+ background-color: #eced96;
+}
+
+#manager-content a.info.neutral:active {
+ background-color: #e9ea93;
+}
+
+#manager-content .info.success {
+ background-color: #a8dca9;
+ border-color: #5e9f5f;
+}
+
+#manager-content a.info.success:hover,
+#manager-content a.info.success:focus {
+ background-color: #a0d5a1;
+}
+
+#manager-content a.info.success:active {
+ background-color: #9ad09b;
+}
+
+#manager-content .info.fail {
+ background-color: #f19d9d;
+ border-color: #b34f4f;
+}
+
+#manager-content a.info.fail:hover,
+#manager-content a.info.fail:focus {
+ background-color: #ea9595;
+}
+
+#manager-content a.info.fail:active {
+ background-color: #e59090;
+}
+
+#manager-content .browse {
+ margin: 2px 0 6px;
+ max-height: 243px;
+ overflow: auto;
+}
+
+#manager-content .browse .one-browse {
+ padding: 5px 10px 5px 34px;
+ height: 17px;
+}
+
+#manager-content .browse .user {
+ background-position: 9px -111px;
+}
+
+#manager-content .browse .other {
+ background-position: 9px -133px;
+}
+
+#manager-content .browse .folder {
+ background-position: 9px -178px;
+}
+
+#manager-content .browse .audio {
+ background-position: 9px -154px;
+}
+
+#manager-content .browse .alert {
+ background-position: 9px -353px;
+}
+
+#manager-content .browse .image {
+ background-position: 9px -374px;
+}
+
+#manager-content .browse .video {
+ background-position: 9px -397px;
+}
+
+#manager-content .browse .document {
+ background-position: 9px -418px;
+}
+
+#manager-content .browse .package {
+ background-position: 9px -441px;
+}
+
+#manager-content .browse .previous {
+ background-position: 9px -485px;
+ margin-bottom: 4px;
+}
+
+#manager-content .browse div {
+ margin: 0;
+}
+
+#manager-content .browse input {
+ float: right;
+ margin: 1px 0;
+}
+
+#manager-content .browse .odd {
+ background-color: #e9f1fd;
+}
+
+#manager-content .browse .even {
+ background-color: #f1f6fd;
+}
+
+#manager-content .sub {
+ border-left: 1px solid black;
+ margin: 5px 0 20px 22px;
+ padding-left: 12px;
+ clear: both;
+}
+
+#manager span.logo_links a {
+ width: 16px;
+ height: 16px;
+ margin-right: 6px;
+ float: left;
+}
+
+#manager span.logo_links a.remove {
+ background-position: 0 -688px;
+}
+
+#manager span.logo_links a.view {
+ background-position: 0 -666px;
+}
+
+#manager-content .clear {
+ margin: 0;
+}
+
+#manager-content textarea.notice-text {
+ height: 70px;
+ width: 600px;
+ margin-left: 4px;
+ padding: 5px;
+ font-size: 1.2em;
+}
+
+#manager-buttons {
+ margin-top: 22px;
+}
+
+#manager-buttons input {
+ border: 1px solid white;
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.1);
+ color: white;
+ padding: 4px 8px;
+ margin-left: -12px;
+ margin-right: 20px;
+ font-size: 1em;
+ text-shadow: 0 1px 1px black;
+ float: right;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ box-shadow: 0 0 5px #202020;
+ -moz-box-shadow: 0 0 5px #202020;
+ -webkit-box-shadow: 0 0 5px #202020;
+}
+
+#manager-buttons input:hover,
+#manager-buttons input:focus {
+ cursor: pointer;
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.2);
+ box-shadow: 0 0 15px #202020;
+ -moz-box-shadow: 0 0 15px #202020;
+ -webkit-box-shadow: 0 0 15px #202020;
+}
+
+#manager-buttons input:active {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.3);
+}
diff --git a/jappixmini/jappix/css/me.css b/jappixmini/jappix/css/me.css
new file mode 100644
index 000000000..2ff74fbdf
--- /dev/null
+++ b/jappixmini/jappix/css/me.css
@@ -0,0 +1,49 @@
+/*
+
+Jappix - An open social platform
+This is the Jappix Me tool CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 16/01/12
+
+*/
+
+#me .content {
+ padding: 10px 0;
+}
+
+#me .logo {
+ background-position: 0 0;
+ width: 300px;
+ height: 61px;
+ margin: 20px auto 0 auto;
+ display: block;
+}
+
+#me .infos {
+ margin-top: 30px;
+}
+
+#me .infos p {
+ margin-top: 8px;
+}
+
+#me .infos p.infos-title {
+ margin-top: 0;
+}
+
+#me .infos a {
+ text-decoration: underline;
+}
+
+#me a.go {
+ text-align: center;
+ font-weight: bold;
+ width: 300px;
+ margin: 30px auto 0 auto;
+ padding: 8px 12px;
+ display: block;
+}
\ No newline at end of file
diff --git a/jappixmini/jappix/css/mini-ie.css b/jappixmini/jappix/css/mini-ie.css
new file mode 100644
index 000000000..d8f4b908c
--- /dev/null
+++ b/jappixmini/jappix/css/mini-ie.css
@@ -0,0 +1,73 @@
+/*
+
+Jappix - An open social platform
+This is the Jappix Mini legacy IE CSS stylesheet
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 20/03/11
+
+*/
+
+#jappix_mini {
+ width: expression(document.documentElement.clientWidth - 150 + 'px') !important;
+ position: absolute !important;
+ bottom: auto !important;
+ right: auto !important;
+ top: expression(((document.documentElement.clientHeight - this.offsetHeight) + (ignoreMiniTop = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)) + 'px') !important;
+ left: expression((150 + this.offsetWidth - (document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth) + (ignoreMiniLeft = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft)) + 'px') !important;
+}
+
+#jappix_mini .jm_images {
+ background-image: url(../img/sprites/mini.gif) !important;
+}
+
+#jappix_mini .jm_images_animate {
+ background-image: url(../img/sprites/animate.gif) !important;
+}
+
+#jappix_mini a.jm_button {
+ width: 1px !important;
+}
+
+#jappix_mini div.jm_roster {
+ right: -1px !important;
+ bottom: 23px !important;
+}
+
+#jappix_mini div.jm_roster div.jm_buddies {
+ height: expression(this.scrollHeight > (document.documentElement.clientHeight - 70) ? (document.documentElement.clientHeight - 70) + 'px' : 'auto') !important;
+}
+
+#jappix_mini a.jm_pane {
+ height: 12px !important;
+ overflow-y: hidden !important;
+}
+
+#jappix_mini a.jm_button.jm_clicked {
+ background-image: none !important;
+}
+
+#jappix_mini div.jm_conversations a.jm_clicked {
+ border-right: none !important;
+ padding: 7px 6px 6px 6px !important;
+}
+
+#jappix_mini div.jm_chat-content {
+ bottom: 23px !important;
+ right: -2px !important;
+}
+
+#jappix_popup {
+ height: expression(document.documentElement.clientHeight + 'px') !important;
+ width: expression(document.documentElement.clientWidth + 'px') !important;
+ position: absolute !important;
+ top: expression(((ignorePopupTop = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)) + 'px') !important;
+ left: expression(((ignorePopupLeft = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft)) + 'px') !important;
+}
+
+#jappix_popup div.jm_prompt {
+ position: absolute !important;
+}
diff --git a/jappixmini/jappix/css/mini.css b/jappixmini/jappix/css/mini.css
new file mode 100644
index 000000000..6d77540d2
--- /dev/null
+++ b/jappixmini/jappix/css/mini.css
@@ -0,0 +1,540 @@
+/*
+
+Jappix - An open social platform
+This is the Jappix Mini CSS stylesheet
+
+-------------------------------------------------
+
+License: AGPL
+Authors: Vanaryon, Julien
+Last revision: 16/01/12
+
+*/
+
+#jappix_mini,
+#jappix_popup {
+ font: normal 11px helvetica, "Lucida Grande", "Lucida Sans", "Lucida Sans Unicode", Arial, sans-serif;
+}
+
+#jappix_mini {
+ margin-left: 130px;
+ position: fixed;
+ bottom: 0;
+ right: 20px;
+ z-index: 999;
+}
+
+#jappix_mini *,
+#jappix_popup * {
+ border: none;
+ color: black;
+ width: auto;
+ height: auto;
+ margin: 0;
+ padding: 0;
+ overflow: visible;
+ font-size: 11px;
+ text-align: left;
+ text-transform: none;
+ text-shadow: none;
+ opacity: 1.0;
+ border-radius: 0;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ box-shadow: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+}
+
+#jappix_mini .jm_images {
+ background-image: url(../img/sprites/mini.png);
+ background-repeat: no-repeat;
+}
+
+#jappix_mini .jm_images_animate {
+ background-image: url(../img/sprites/animate.png);
+ background-repeat: no-repeat;
+}
+
+#jappix_mini a {
+ text-decoration: none;
+ cursor: pointer;
+}
+
+#jappix_mini a:hover {
+ cursor: pointer;
+}
+
+#jappix_mini div.jm_position {
+ float: right;
+}
+
+#jappix_mini a.jm_pane {
+ background-color: #f4f4f4;
+ background-position: 0 -100px;
+ background-repeat: repeat-x;
+ border-color: #999999;
+ border-style: solid;
+ border-width: 1px 1px 0 1px;
+ font-weight: bold;
+ outline-style: none;
+ display: block;
+ padding: 6px;
+ height: 13px;
+}
+
+#jappix_mini a.jm_pane:hover {
+ background: white;
+}
+
+#jappix_mini a.jm_pane:hover,
+#jappix_mini a.jm_pane:focus {
+ border-color: #666666;
+}
+
+#jappix_mini div.jm_starter,
+#jappix_mini div.jm_conversations,
+#jappix_mini div.jm_conversation {
+ float: left;
+ position: relative;
+}
+
+#jappix_mini div.jm_conversation {
+ width: 153px;
+}
+
+#jappix_mini a.jm_chat-tab {
+ border-width: 1px 0 0 1px;
+ width: 140px;
+ float: right;
+ overflow: hidden;
+}
+
+#jappix_mini a.jm_chat-tab.jm_clicked {
+ background: white;
+ position: relative;
+ border-top: none;
+ border-left: 1px solid #999999;
+ padding-top: 7px;
+}
+
+#jappix_mini a.jm_chat-tab span.jm_notify {
+ position: absolute;
+ top: 6px;
+ right: 9px;
+}
+
+#jappix_mini a.jm_chat-tab span.jm_notify span {
+ float: left;
+}
+
+#jappix_mini a.jm_chat-tab span.jm_notify span.jm_notify_left {
+ background-position: 0 -360px;
+}
+
+#jappix_mini a.jm_chat-tab span.jm_notify span.jm_notify_right {
+ background-position: -7px -360px;
+}
+
+#jappix_mini a.jm_chat-tab span.jm_notify span.jm_notify_left,
+#jappix_mini a.jm_chat-tab span.jm_notify span.jm_notify_right {
+ height: 16px;
+ width: 7px;
+}
+
+#jappix_mini a.jm_chat-tab span.jm_notify span.jm_notify_middle {
+ background-color: #c60505;
+ color: white;
+ font-size: 0.85em;
+ height: 14px;
+ padding-top: 2px;
+}
+
+#jappix_mini div.jm_conversation.jm_type_groupchat span.jm_name {
+ margin-left: 4px;
+}
+
+#jappix_mini div.jm_chat-content {
+ background-color: white;
+ border: 1px solid #999999;
+ height: 300px;
+ width: 260px;
+ position: absolute;
+ right: -1px;
+ bottom: 25px;
+ display: none;
+}
+
+#jappix_mini div.jm_actions {
+ background-color: #565d5e;
+ border-bottom: 1px solid #3a3a3a;
+ height: 14px;
+ padding: 4px 6px;
+ font-weight: bold;
+ overflow: hidden;
+}
+
+#jappix_mini div.jm_actions span.jm_nick {
+ color: white;
+ height: 16px;
+ width: 225px;
+ overflow: hidden;
+ float: left;
+}
+
+#jappix_mini div.jm_actions a.jm_one-action {
+ background-color: #727879;
+ margin: 0 -2px 0 5px;
+ height: 15px;
+ width: 15px;
+ outline-style: none;
+ float: right;
+}
+
+#jappix_mini div.jm_actions a.jm_one-action:hover,
+#jappix_mini div.jm_actions a.jm_one-action:focus {
+ background-color: #7f8788;
+}
+
+#jappix_mini div.jm_actions a.jm_one-action:active {
+ background-color: #8c9293;
+}
+
+#jappix_mini div.jm_actions a.jm_logo {
+ background-position: 7px 2px;
+ width: 81px;
+ height: 22px;
+ margin: -4px 0 0 -2px;
+ outline-style: none;
+ float: left;
+}
+
+#jappix_mini div.jm_actions a.jm_logo:hover,
+#jappix_mini div.jm_actions a.jm_logo:focus {
+ background-color: #636a6b;
+}
+
+#jappix_mini div.jm_actions a.jm_logo:active {
+ background-color: #707677;
+}
+
+#jappix_mini div.jm_actions a.jm_close {
+ background-position: 1px -341px;
+}
+
+#jappix_mini div.jm_actions a.jm_join {
+ background-position: 0 -327px;
+}
+
+#jappix_mini div.jm_received-messages {
+ background-color: white;
+ padding: 5px 0 4px;
+ height: 242px;
+ overflow: auto;
+}
+
+#jappix_mini div.jm_received-messages p {
+ margin: 3px 0;
+ word-wrap: break-word;
+}
+
+#jappix_mini div.jm_received-messages p,
+#jappix_mini div.jm_received-messages a {
+ color: black !important;
+}
+
+#jappix_mini div.jm_received-messages div.jm_group {
+ margin: 2px 6px 9px 6px;
+ padding-bottom: 8px;
+ border-bottom: 1px solid #eaeaea;
+}
+
+#jappix_mini div.jm_received-messages div.jm_system-message p,
+#jappix_mini div.jm_received-messages div.jm_system-message a {
+ color: #053805 !important;
+ font-style: italic !important;
+}
+
+#jappix_mini div.jm_received-messages p a {
+ text-decoration: underline;
+}
+
+#jappix_mini div.jm_received-messages b {
+ margin-bottom: 3px;
+ display: block;
+}
+
+#jappix_mini div.jm_received-messages b.jm_me {
+ color: #123a5c;
+}
+
+#jappix_mini div.jm_received-messages b.jm_him {
+ color: #801e1e;
+}
+
+#jappix_mini div.jm_received-messages span.jm_date {
+ font-size: 0.8em;
+ float: right;
+ display: none;
+}
+
+#jappix_mini div.jm_received-messages div.jm_group:hover span.jm_date {
+ display: block;
+}
+
+#jappix_mini input.jm_send-messages {
+ background-color: white;
+ border-color: #999999;
+ border-style: solid;
+ border-width: 1px 0 0 0;
+ padding: 5px;
+ width: 250px;
+ min-height: 14px;
+}
+
+#jappix_mini div.jm_disabled div.jm_chat-content,
+#jappix_mini div.jm_disabled input.jm_send-messages,
+#jappix_mini div.jm_disabled a.jm_pane {
+ background: #f3f3f3 !important;
+}
+
+#jappix_mini div.jm_disabled input.jm_send-messages {
+ color: #9d9d9d;
+}
+
+#jappix_mini div.jm_roster {
+ background-color: white;
+ border: 1px solid #999999;
+ width: 160px;
+ position: absolute;
+ right: 0;
+ bottom: 25px;
+ display: none;
+}
+
+#jappix_mini div.jm_roster div.jm_buddies {
+ width: 100%;
+ max-height: 300px;
+ padding: 5px 0;
+ overflow: auto;
+}
+
+#jappix_mini div.jm_roster div.jm_grouped {
+ margin: 2px 0;
+}
+
+#jappix_mini div.jm_roster div.jm_grouped div.jm_name {
+ margin-bottom: 2px;
+ padding: 4px 8px 0;
+ font-weight: bold;
+}
+
+#jappix_mini a.jm_friend {
+ border-color: white;
+ border-style: solid;
+ border-width: 1px 0;
+ outline-style: none;
+ padding: 6px;
+ display: block;
+}
+
+#jappix_mini a.jm_friend.jm_offline {
+ display: none;
+}
+
+#jappix_mini a.jm_friend:hover,
+#jappix_mini a.jm_friend:focus {
+ background-color: #888888;
+ border-color: #494949;
+ color: white;
+}
+
+#jappix_mini a.jm_friend:hover span.jm_presence,
+#jappix_mini a.jm_friend:focus span.jm_presence {
+ background-position: 0 -84px;
+}
+
+#jappix_mini a.jm_button {
+ padding: 6px 10px;
+ position: relative;
+ z-index: 1;
+}
+
+#jappix_mini a.jm_button.jm_clicked {
+ background: white;
+ border-top: none;
+ border-left: 1px solid #999999;
+ border-right: 1px solid #999999;
+ padding: 7px 10px 6px 10px;
+}
+
+#jappix_mini span.jm_animate {
+ background-position: 0 0;
+ width: 111px;
+ height: 102px;
+ position: absolute;
+ top: -100px;
+ left: -74px;
+ z-index: 1;
+ display: block;
+}
+
+#jappix_mini span.jm_counter {
+ background-position: 0 -288px;
+ color: #333333;
+ height: 16px;
+ padding-left: 25px;
+ display: block;
+}
+
+#jappix_mini span.jm_counter.jm_error {
+ background-position: 0 -305px;
+}
+
+#jappix_mini span.jm_presence {
+ display: block;
+ height: 16px;
+ width: 16px;
+ margin-right: 4px;
+ float: left;
+}
+
+#jappix_mini span.jm_name {
+ color: #272727;
+ height: 14px;
+ width: 105px;
+ overflow: hidden;
+ float: left;
+}
+
+#jappix_mini .jm_available,
+#jappix_mini .jm_chat {
+ background-position: 0 -20px;
+}
+
+#jappix_mini .jm_away {
+ background-position: 0 -36px;
+}
+
+#jappix_mini .jm_xa,
+#jappix_mini .jm_dnd {
+ background-position: 0 -52px;
+}
+
+#jappix_mini .jm_unavailable {
+ background-position: 0 -68px;
+}
+
+#jappix_mini .jm_smiley {
+ border: 0 none;
+ height: 16px;
+ width: 16px;
+ vertical-align: bottom;
+}
+
+#jappix_mini .jm_smiley-wink {
+ background-position: 0 -148px;
+}
+
+#jappix_mini .jm_smiley-waii {
+ background-position: 0 -164px;
+}
+
+#jappix_mini .jm_smiley-unhappy {
+ background-position: 0 -180px;
+}
+
+#jappix_mini .jm_smiley-tongue {
+ background-position: 0 -196px;
+}
+
+#jappix_mini .jm_smiley-surprised {
+ background-position: 0 -212px;
+}
+
+#jappix_mini .jm_smiley-smile {
+ background-position: 0 -228px;
+}
+
+#jappix_mini .jm_smiley-happy {
+ background-position: 0 -244px;
+}
+
+#jappix_mini .jm_smiley-grin {
+ background-position: 0 -260px;
+}
+
+#jappix_popup {
+ background: url(../img/others/blank.gif) repeat;
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ z-index: 999;
+}
+
+#jappix_popup div.jm_prompt {
+ background-color: #565d5e;
+ border: 1px solid #3a3a3a;
+ width: 346px;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ margin-left: -175px;
+ padding: 16px 2px 2px 2px;
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -webkit-border-top-left-radius: 4px;
+ box-shadow: 0 0 35px #232323;
+ -moz-box-shadow: 0 0 35px #232323;
+ -webkit-box-shadow: 0 0 35px #232323;
+}
+
+#jappix_popup div.jm_prompt form {
+ background-color: white;
+ border: 1px solid #3a3a3a;
+ width: 332px;
+ padding: 6px;
+}
+
+#jappix_popup div.jm_prompt form input {
+ background-color: #f9f9f9;
+ border: 1px solid #666666;
+ font-size: 1.1em;
+ padding: 1px 2px;
+}
+
+#jappix_popup div.jm_prompt form input:hover,
+#jappix_popup div.jm_prompt form input:focus {
+ border: 1px solid #202020;
+}
+
+#jappix_popup div.jm_prompt form input.jm_text {
+ width: 326px;
+ margin: 6px 0;
+ display: block;
+}
+
+#jappix_popup div.jm_prompt form input.jm_submit {
+ text-align: center;
+ margin-left: 3px;
+ float: right;
+}
+
+#jappix_popup div.jm_prompt form input.jm_submit:hover,
+#jappix_popup div.jm_prompt form input.jm_submit:focus {
+ background-color: #f3f3f3;
+ cursor: pointer;
+}
+
+#jappix_popup div.jm_prompt form input.jm_submit:active {
+ background-color: #e8e8e8;
+}
+
+#jappix_popup div.jm_prompt div.jm_clear {
+ clear: both;
+}
diff --git a/jappixmini/jappix/css/mobile.css b/jappixmini/jappix/css/mobile.css
new file mode 100644
index 000000000..ed44cc03e
--- /dev/null
+++ b/jappixmini/jappix/css/mobile.css
@@ -0,0 +1,288 @@
+/*
+
+Jappix - An open social platform
+This is the Jappix Mobile CSS stylesheet
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 05/10/11
+
+*/
+
+/* BEGIN GENERAL STYLE */
+
+* {
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ font: normal 14.4px Helvetica, Verdana, sans-serif;
+ background-color: #dcdcdc;
+ margin: 0 auto;
+ text-align: center;
+ min-width: 200px;
+ min-height: 260px;
+}
+
+a {
+ color: black;
+}
+
+/* END GENERAL STYLE */
+
+/* BEGIN HEADER STYLE */
+
+.header {
+ background-color: #2d2d2d;
+ border-bottom: 1px solid #6d6d6d;
+ color: #405964;
+ padding: 6px 0;
+ height: 30px;
+}
+
+.header div {
+ background-position: 0 0;
+ width: 83px;
+ height: 30px;
+}
+
+/* END HEADER STYLE */
+
+/* BEGIN HOME STYLE */
+
+#home .header div {
+ margin: 0 auto;
+}
+
+#home .notification {
+ padding: 2px;
+ margin-top: -1px;
+}
+
+#noscript {
+ background: #86a2ff;
+ border-bottom: 1px solid #5890d6;
+ color: #1e4b82;
+}
+
+#error {
+ background: #ff8686;
+ border-bottom: 1px solid #d65858;
+ color: #821e1e;
+ display: none;
+}
+
+#info {
+ background: #f3eba7;
+ border-bottom: 1px solid #d9d085;
+ color: #5e5616;
+ display: none;
+}
+
+#home .login {
+ padding: 8px 0;
+ margin: 30px 0 30px 0;
+}
+
+#home .login input {
+ margin-top: 5px;
+ padding: 2px;
+}
+
+#home .login input.xid,
+#home .login input.password {
+ display: block;
+ margin: 4px auto;
+ font-size: 0.85em;
+ padding: 4px;
+ background-color: white;
+ border: 1px solid #636363;
+ width: 150px;
+ padding-left: 24px;
+}
+
+#home .login input.xid {
+ background-position: 4px -30px;
+}
+
+#home .login input.password {
+ background-position: 4px -53px;
+}
+
+#home .login label {
+ margin-bottom: 12px;
+ display: block;
+}
+
+#home .login label input {
+ margin-right: 4px;
+}
+
+#home a {
+ font-size: 0.8em;
+}
+
+/* END HOME STYLE */
+
+/* BEGIN TALK STYLE */
+
+#talk .header div,
+#chat .header div {
+ float: left;
+ margin-left: 7px;
+}
+
+#talk .header button,
+#chat .header button {
+ float: right;
+ margin-right: 7px;
+ padding: 2px;
+}
+
+#talk a.one-buddy {
+ display: none;
+ background-color: #87a5ab;
+ border-bottom: 1px solid #5b8088;
+ text-shadow: 1px 1px 1px #5b8088;
+ text-decoration: none;
+ color: white;
+ outline-style: none;
+ padding: 10px 0;
+}
+
+#talk a.one-buddy:hover {
+ cursor: pointer;
+}
+
+#talk a.available,
+#talk a.chat {
+ background-color: #83b187;
+ border-bottom: 1px solid #4d8252;
+ text-shadow: 1px 1px 1px #4d8252;
+}
+
+#talk a.available:hover,
+#talk a.chat:hover,
+#talk a.available:focus,
+#talk a.chat:focus {
+ background-color: #89c68e;
+}
+
+#talk a.available:active,
+#talk a.chat:active {
+ background-color: #90d496;
+}
+
+#talk a.away {
+ background-color: #e0be7b;
+ border-bottom: 1px solid #ae8941;
+ text-shadow: 1px 1px 1px #ae8941;
+}
+
+#talk a.away:hover,
+#talk a.away:focus {
+ background-color: #eac784;
+}
+
+#talk a.away:active {
+ background-color: #f3d294;
+}
+
+#talk a.xa,
+#talk a.dnd {
+ background-color: #db8989;
+ border-bottom: 1px solid #a24343;
+ text-shadow: 1px 1px 1px #a24343;
+}
+
+#talk a.xa:hover,
+#talk a.dnd:hover,
+#talk a.xa:focus,
+#talk a.dnd:focus {
+ background-color: #e89797;
+}
+
+#talk a.xa:active,
+#talk a.dnd:active {
+ background-color: #ef9f9f;
+}
+
+/* END TALK STYLE */
+
+/* BEGIN CHAT STYLE */
+
+#chat {
+ display: none;
+}
+
+#chat .one-chat,
+#chat .one-chat p,
+#chat .one-chat div,
+#chat .one-chat input {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+}
+
+#chat .one-chat {
+ top: 43px;
+ left: 0;
+}
+
+#chat .one-chat p {
+ background-color: #87a5ab;
+ border-bottom: 1px solid #5b8088;
+ text-shadow: 1px 1px 1px #5b8088;
+ color: white;
+ top: 0;
+ left: 0;
+ height: 18px;
+ padding: 2px 0;
+ font-size: 0.9em;
+}
+
+#chat .one-chat div {
+ border-bottom: 1px solid #cbcbcb;
+ top: 23px;
+ left: 0;
+ bottom: 25px;
+ overflow: auto;
+ text-align: left;
+}
+
+#chat .one-chat span {
+ display: block;
+ font-size: 0.85em;
+ margin: 4px 6px;
+ word-wrap: break-word;
+}
+
+#chat .one-chat b {
+ margin-right: 3px;
+}
+
+#chat .one-chat b.me {
+ color: #123a5c;
+}
+
+#chat .one-chat b.him {
+ color: #801e1e;
+}
+
+#chat .one-chat input {
+ background-color: white;
+ bottom: 0;
+ height: 25px;
+ width: 100%;
+ border: none;
+}
+
+#chat .one-chat input.submit {
+ right: 0;
+ width: 35px;
+}
+
+/* END CHAT STYLE */
diff --git a/jappixmini/jappix/css/mucadmin.css b/jappixmini/jappix/css/mucadmin.css
new file mode 100644
index 000000000..3fe1c7540
--- /dev/null
+++ b/jappixmini/jappix/css/mucadmin.css
@@ -0,0 +1,91 @@
+/*
+
+Jappix - An open social platform
+This is the mucadmin CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 11/05/11
+
+*/
+
+#mucadmin .content {
+ padding: 10px 0 10px 0;
+}
+
+#mucadmin .content p {
+ margin: 5px 10px 5px 10px;
+ text-align: justify;
+}
+
+#mucadmin .mucadmin-head-jid {
+ text-decoration: underline;
+ font-size: 0.9em;
+ float: right;
+ margin: 1px 4px 1px 1px;
+}
+
+#mucadmin .mucadmin-forms {
+ height: 310px;
+ width: 620px;
+ margin: -5px 0 0 10px;
+ padding: 6px 0 0 0;
+ overflow: auto;
+}
+
+#mucadmin .mucadmin-forms label {
+ width: 260px;
+}
+
+#mucadmin .mucadmin-topic label,
+#mucadmin .mucadmin-aut label,
+#mucadmin .mucadmin-others label {
+ font-size: 0.9em;
+}
+
+#mucadmin .mucadmin-forms textarea {
+ height: 60px;
+ width: 300px;
+ margin: 5px 12px 10px 0;
+}
+
+#mucadmin .results {
+ height: auto;
+ width: auto;
+ overflow: visible;
+ margin: 5px;
+}
+
+#mucadmin .aut-group {
+ float: left;
+ padding-bottom: 4px;
+}
+
+#mucadmin .one-aut {
+ clear: both;
+ margin: 0 10px 5px 0;
+}
+
+#mucadmin .aut-add {
+ clear: both;
+ float: left;
+ margin-bottom: 5px;
+ font-size: 0.9em;
+}
+
+#mucadmin .aut-remove {
+ float: left;
+}
+
+#mucadmin .aut-remove:hover,
+#mucadmin .aut-remove:focus {
+ font-weight: bold;
+ text-decoration: none;
+}
+
+#mucadmin .mucadmin-others a {
+ float: left;
+ font-size: 0.9em;
+}
diff --git a/jappixmini/jappix/css/myinfos.css b/jappixmini/jappix/css/myinfos.css
new file mode 100644
index 000000000..832622681
--- /dev/null
+++ b/jappixmini/jappix/css/myinfos.css
@@ -0,0 +1,330 @@
+/*
+
+Jappix - An open social platform
+This is the my-infos CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 31/08/11
+
+*/
+
+#my-infos {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.85);
+ color: #919191;
+ margin-top: 8px;
+ padding: 15px 6px 6px 6px;
+ border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ box-shadow: 0 0 6px #5c5c5c;
+ -moz-box-shadow: 0 0 6px #5c5c5c;
+ -webkit-box-shadow: 0 0 6px #5c5c5c;
+}
+
+#my-infos .content {
+ background: #e8f1f3;
+ background: -moz-linear-gradient(top, #e4edef, #e8f1f3);
+ background: -webkit-gradient(linear, left top, left bottom, from(#e4edef), to(#e8f1f3));
+ color: #919191;
+ max-height: 140px;
+ padding: 1px 0;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+#my-infos .element {
+ height: 24px;
+ margin: 6px 0;
+ position: relative;
+}
+
+#my-infos .element .icon {
+ background-color: white;
+ border-color: #636363;
+ border-width: 1px;
+ border-style: solid;
+ margin-left: 6px;
+ height: 22px;
+ width: 25px;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+#my-infos .element div.bubble a {
+ width: 100%;
+ height: 20px;
+}
+
+#my-infos .element .icon:hover,
+#my-infos .element div.bubble a:hover {
+ background-color: #f4f4f4;
+}
+
+#my-infos .element .icon:active,
+#my-infos .element div.bubble a:active {
+ background-color: #ededed;
+}
+
+#my-infos .f-presence div.bubble a[data-value=available] {
+ background-position: 4px -167px;
+}
+
+#my-infos .f-presence div.bubble a[data-value=away] {
+ background-position: 4px -183px;
+}
+
+#my-infos .f-presence div.bubble a[data-value=xa] {
+ background-position: 4px -199px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=crazy] {
+ background-position: 4px -296px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=excited] {
+ background-position: 4px -314px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=playful] {
+ background-position: 4px -332px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=happy] {
+ background-position: 4px -350px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=shocked] {
+ background-position: 4px -368px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=hot] {
+ background-position: 4px -386px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=sad] {
+ background-position: 4px -404px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=amorous] {
+ background-position: 4px -422px;
+}
+
+#my-infos .f-mood div.bubble a[data-value=confident] {
+ background-position: 4px -440px;
+}
+
+#my-infos .f-mood a[data-value] span {
+ background-position: 0 -352px;
+}
+
+#my-infos .f-mood a[data-value=crazy] span,
+.mood-one {
+ background-position: 0 -298px;
+}
+
+#my-infos .f-mood a[data-value=excited] span,
+.mood-two {
+ background-position: 0 -316px;
+}
+
+#my-infos .f-mood a[data-value=playful] span,
+.mood-three {
+ background-position: 0 -334px;
+}
+
+#my-infos .f-mood a[data-value=happy] span,
+.mood-four {
+ background-position: 0 -352px;
+}
+
+#my-infos .f-mood a[data-value=shocked] span,
+.mood-five {
+ background-position: 0 -370px;
+}
+
+#my-infos .f-mood a[data-value=hot] span,
+.mood-six {
+ background-position: 0 -388px;
+}
+
+#my-infos .f-mood a[data-value=sad] span,
+.mood-seven {
+ background-position: 0 -406px;
+}
+
+#my-infos .f-mood a[data-value=amorous] span,
+.mood-eight {
+ background-position: 0 -424px;
+}
+
+#my-infos .f-mood a[data-value=confident] span,
+.mood-nine {
+ background-position: 0 -442px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=doing_chores] {
+ background-position: 4px -458px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=drinking] {
+ background-position: 4px -476px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=eating] {
+ background-position: 4px -494px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=exercising] {
+ background-position: 4px -512px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=grooming] {
+ background-position: 4px -548px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=having_appointment] {
+ background-position: 4px -566px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=inactive] {
+ background-position: 4px -530px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=relaxing] {
+ background-position: 4px -620px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=talking] {
+ background-position: 4px -602px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=traveling] {
+ background-position: 4px -584px;
+}
+
+#my-infos .f-activity div.bubble a[data-value=working] {
+ background-position: 4px -638px;
+}
+
+#my-infos .f-activity a[data-value] span {
+ background-position: 0 -514px;
+}
+
+#my-infos .f-activity a[data-value=doing_chores] span,
+.activity-doing_chores {
+ background-position: 0 -460px;
+}
+
+#my-infos .f-activity a[data-value=drinking] span,
+.activity-drinking {
+ background-position: 0 -478px;
+}
+
+#my-infos .f-activity a[data-value=eating] span,
+.activity-eating {
+ background-position: 0 -496px;
+}
+
+#my-infos .f-activity a[data-value=exercising] span,
+.activity-exercising {
+ background-position: 0 -514px;
+}
+
+#my-infos .f-activity a[data-value=grooming] span,
+.activity-grooming {
+ background-position: 0 -550px;
+}
+
+#my-infos .f-activity a[data-value=having_appointment] span,
+.activity-having_appointment {
+ background-position: 0 -568px;
+}
+
+#my-infos .f-activity a[data-value=inactive] span,
+.activity-inactive {
+ background-position: 0 -532px;
+}
+
+#my-infos .f-activity a[data-value=relaxing] span,
+.activity-relaxing {
+ background-position: 0 -622px;
+}
+
+#my-infos .f-activity a[data-value=talking] span,
+.activity-talking {
+ background-position: 0 -604px;
+}
+
+#my-infos .f-activity a[data-value=traveling] span,
+.activity-traveling {
+ background-position: 0 -586px;
+}
+
+#my-infos .f-activity a[data-value=working] span,
+.activity-working {
+ background-position: 0 -640px;
+}
+
+#my-infos .element .icon.picker {
+ border-width: 1px 0 1px 1px;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ -moz-border-radius-topright: 0;
+ -moz-border-radius-bottomright: 0;
+ -webkit-border-top-right-radius: 0;
+ -webkit-border-bottom-right-radius: 0;
+}
+
+#my-infos .element .icon.disabled {
+ background-color: #f3f3f3;
+ border-color: #989898;
+ cursor: default;
+}
+
+#my-infos .element div.bubble {
+ background-color: white;
+ border-color: #636363;
+ border-width: 1px 1px 0 1px;
+ border-style: solid;
+ width: 25px;
+ padding: 1px 0;
+ position: absolute;
+ bottom: 21px;
+ left: 6px;
+ border-top-left-radius: 2px;
+ border-top-right-radius: 2px;
+ -moz-border-radius-topleft: 2px;
+ -moz-border-radius-topright: 2px;
+ -webkit-border-top-left-radius: 2px;
+ -webkit-border-top-right-radius: 2px;
+}
+
+#my-infos .element a {
+ float: left;
+}
+
+#my-infos .element .icon span {
+ height: 16px;
+ width: 16px;
+ margin: 3px 4px;
+ display: block;
+}
+
+#my-infos .element input {
+ height: 18px;
+ width: 190px;
+ font-size: 0.85em;
+ padding-left: 4px;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ -moz-border-radius-topleft: 0;
+ -moz-border-radius-bottomleft: 0;
+ -webkit-border-top-left-radius: 0;
+ -webkit-border-top-bottom-radius: 0;
+}
diff --git a/jappixmini/jappix/css/options.css b/jappixmini/jappix/css/options.css
new file mode 100644
index 000000000..6dc4ecdba
--- /dev/null
+++ b/jappixmini/jappix/css/options.css
@@ -0,0 +1,97 @@
+/*
+
+Jappix - An open social platform
+This is the options CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 26/04/11
+
+*/
+
+#options label {
+ width: 190px;
+ font-size: 0.94em;
+}
+
+#options .forms {
+ width: 610px;
+ height: 328px;
+ margin: 15px 15px 15px 15px;
+ float: left;
+}
+
+#options .forms select {
+ margin-top: -3px;
+ min-width: 120px;
+ float: left;
+}
+
+#options .forms a.linked {
+ font-size: 0.9em;
+ float: left;
+}
+
+#options fieldset.privacy {
+ display: none;
+}
+
+#options .sub-ask-delete, #options .sub-ask-pass, #options .sub-ask-pass-success {
+ display: none;
+}
+
+#options .sub-ask {
+ display: none;
+ width: 592px;
+ padding: 8px;
+ float: left;
+ border: 1px #879da2 dotted;
+ background: #cbdde1;
+}
+
+#options .sub-ask-top {
+ font-size: 0.9em;
+ margin-top: -3px;
+}
+
+#options .sub-ask-title {
+ margin-bottom: 4px;
+ float: left;
+}
+
+#options .sub-ask-close {
+ float: right;
+}
+
+#options .sub-ask-close:hover {
+ cursor: pointer;
+}
+
+#options .sub-ask-content {
+ clear: both;
+ height: 25px;
+ font-size: 0.9em;
+ border-top: 1px #416972 solid;
+ padding: 12px 0;
+}
+
+#options .sub-ask-content label {
+ width: 125px;
+}
+
+#options .sub-ask-content input {
+ width: 125px;
+}
+
+#options .sub-ask-bottom {
+ clear: both;
+ font-size: 0.9em;
+ float: right;
+ text-decoration: underline;
+}
+
+#options .sub-ask-bottom:hover {
+ cursor: pointer;
+}
diff --git a/jappixmini/jappix/css/others.css b/jappixmini/jappix/css/others.css
new file mode 100644
index 000000000..f3e2461f6
--- /dev/null
+++ b/jappixmini/jappix/css/others.css
@@ -0,0 +1,118 @@
+/*
+
+Jappix - An open social platform
+This is the others CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 31/08/11
+
+*/
+
+#audio {
+ display: none;
+}
+
+#top-content {
+ position: absolute;
+ right: 5px;
+ left: 5px;
+ top: 0;
+ min-width: 860px;
+ z-index: 50;
+}
+
+#main-content {
+ position: absolute;
+ top: 34px;
+ left: 5px;
+ right: 5px;
+ bottom: 5px;
+ min-width: 850px;
+ min-height: 450px;
+}
+
+#left-content {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ width: 248px;
+}
+
+#right-content {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.85);
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 260px;
+ z-index: 10;
+ border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ box-shadow: 0 0 6px #5c5c5c;
+ -moz-box-shadow: 0 0 6px #5c5c5c;
+ -webkit-box-shadow: 0 0 6px #5c5c5c;
+}
+
+#general-wait {
+ background: url(../img/others/blank.gif) repeat;
+ z-index: 10000;
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
+
+.general-wait-content {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.9);
+ background-position: 8px 8px;
+ padding: 8px;
+ position: absolute;
+ right: 5px;
+ bottom: 5px;
+ border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ box-shadow: 0 0 2px #000;
+ -moz-box-shadow: 0 0 2px #000;
+ -webkit-box-shadow: 0 0 2px #000;
+}
+
+.inbox-hidable,
+.options-hidable,
+.pep-hidable,
+.pubsub-hidable,
+.archives-hidable,
+.commands-hidable,
+.privacy-hidable,
+.xmpplinks-hidable {
+ display: none;
+}
+
+#reconnect .pane {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.85);
+ color: white;
+ padding: 25px;
+ z-index: 10000;
+ text-shadow: 0 1px 1px black;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ box-shadow: 0 0 35px #232323;
+ -moz-box-shadow: 0 0 35px #232323;
+ -webkit-box-shadow: 0 0 35px #232323;
+}
+
+#reconnect .pane a {
+ margin-top: -4px;
+ float: right;
+}
diff --git a/jappixmini/jappix/css/pageengine.css b/jappixmini/jappix/css/pageengine.css
new file mode 100644
index 000000000..75038b6cd
--- /dev/null
+++ b/jappixmini/jappix/css/pageengine.css
@@ -0,0 +1,601 @@
+/*
+
+Jappix - An open social platform
+This is the page-engine CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 31/08/11
+
+*/
+
+#page-engine {
+ background-color: #f4f4f4;
+ position: absolute;
+ top: 40px;
+ bottom: 6px;
+ right: 6px;
+ left: 6px;
+ z-index: 8;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+#page-engine .top {
+ background: #e8f1f3;
+ background: -moz-linear-gradient(top, #e8f1f3, #dee8ea);
+ background: -webkit-gradient(linear, left top, left bottom, from(#e8f1f3), to(#dee8ea));
+ border-bottom: 1px solid #d0d0d0;
+ color: black;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ padding: 6px;
+ height: 80px;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -moz-border-radius-topleft: 3px;
+ -webkit-border-top-right-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+}
+
+#page-engine .top .avatar-container {
+ text-align: center;
+ margin: 2px 0 0 10px;
+ height: 76px;
+ width: 76px;
+ float: left;
+}
+
+#page-engine .top .avatar {
+ max-height: 76px;
+ max-width: 76px;
+}
+
+#page-engine .top .name {
+ text-align: right;
+ padding: 7px;
+}
+
+#page-engine p.bc-name {
+ font-size: 2.3em;
+ margin-bottom: 5px;
+}
+
+#page-engine p.bc-infos {
+ font-size: 0.85em;
+ height: 16px;
+ overflow: hidden;
+ position: absolute;
+ left: 115px;
+ right: 12px;
+}
+
+#page-engine .page-engine-chan[data-type=groupchat] p.bc-infos {
+ left: 12px;
+}
+
+#page-engine p.bc-infos span.show {
+ padding-left: 18px;
+}
+
+#page-engine p.bc-infos a {
+ text-decoration: underline;
+}
+
+#page-engine div.bc-pep {
+ float: right;
+}
+
+#page-engine div.bc-pep a {
+ height: 16px;
+ width: 16px;
+ margin-left: 4px;
+ float: left;
+}
+
+#page-engine div.bc-pep a:hover {
+ cursor: default;
+}
+
+#page-engine div.bc-pep a[href]:hover {
+ cursor: pointer;
+}
+
+#page-engine .content,
+#page-engine .list {
+ font-size: 0.9em;
+ position: absolute;
+ top: 93px;
+ right: 0;
+ bottom: 29px;
+ overflow: auto;
+ box-shadow: inset 0 3px 10px #e8e8e8;
+ -moz-box-shadow: inset 0 3px 10px #e8e8e8;
+ -webkit-box-shadow: inset 0 3px 10px #e8e8e8;
+}
+
+#page-engine .content {
+ left: 0;
+ padding: 12px 14px 0;
+}
+
+#page-engine .content a {
+ text-decoration: underline;
+}
+
+#page-engine .page-engine-chan {
+ display: none;
+}
+
+#page-engine .chat .content,
+#page-engine .chat .list {
+ bottom: 93px;
+}
+
+#page-engine .chat .content {
+ padding-bottom: 24px;
+}
+
+#page-engine .groupchat-content {
+ padding-bottom: 16px !important;
+ right: 191px !important;
+}
+
+#page-engine .list {
+ border-left: 1px solid #c8c8c8;
+ padding: 8px 0 0;
+ width: 190px;
+ right: 0;
+}
+
+#page-engine .list .role {
+ display: none;
+ margin-bottom: 10px;
+}
+
+#page-engine .list .title {
+ font-weight: bold;
+ color: #383838;
+ margin-left: 8px;
+}
+
+#page-engine .list .user {
+ background: #eff2f2;
+ background: -moz-linear-gradient(top, #eff2f2, #ecefef);
+ background: -webkit-gradient(linear, left top, left bottom, from(#eff2f2), to(#ecefef));
+ border-color: #c8c8c8;
+ border-width: 1px 0;
+ border-style: solid;
+ color: #383838;
+ margin-bottom: 3px;
+ height: 32px;
+ overflow: hidden;
+}
+
+#page-engine .list .user:hover {
+ background: #e9ecec;
+ cursor: pointer;
+}
+
+#page-engine .list .user:active {
+ background: #e3e7e7;
+}
+
+#page-engine .list .user.myself {
+ background-color: #eff2f2;
+ cursor: default;
+}
+
+#page-engine .list .user .name {
+ float: left;
+ height: 18px;
+ overflow: hidden;
+ margin: 7px 0 7px 3px;
+ padding-left: 18px;
+}
+
+#page-engine .list .user .avatar-container {
+ text-align: center;
+ float: right;
+ height: 32px;
+ width: 32px;
+}
+
+#page-engine .list .user .avatar {
+ max-height: 32px;
+ max-width: 32px;
+}
+
+#page-engine .one-group,
+#archives .one-group {
+ border-bottom: 1px dotted #d0d0d0;
+ padding-bottom: 8px;
+ margin-bottom: 10px;
+}
+
+#page-engine .one-line,
+#archives .one-line,
+#page-engine .one-group b.name,
+#archives .one-group b.name {
+ padding-left: 50px;
+ word-wrap: break-word;
+}
+
+#page-engine .one-group b.name,
+#archives .one-group b.name {
+ display: block;
+ margin-bottom: 4px;
+}
+
+#page-engine .one-group b.name.me,
+#archives .one-group b.name.me {
+ color: #123a5c;
+}
+
+#page-engine .one-group b.name.him,
+#archives .one-group b.name.him {
+ color: #801e1e;
+}
+
+#page-engine .one-group span.date,
+#archives .one-group span.date {
+ float: right;
+ font-size: 0.9em;
+}
+
+#page-engine .one-group .avatar-container,
+#archives .one-group .avatar-container {
+ text-align: center;
+ margin: 4px 0 0 6px;
+ height: 30px;
+ width: 30px;
+ float: left;
+}
+
+#page-engine .one-group .avatar,
+#archives .one-group .avatar {
+ max-height: 30px;
+ max-width: 30px;
+}
+
+#page-engine b.name.talk-images {
+ background-position: 50px -99px;
+ padding-left: 68px;
+}
+
+#page-engine .user-message,
+#archives .user-message {
+ margin-bottom: 3px;
+}
+
+#page-engine .system-message {
+ color: #053805 !important;
+ margin-bottom: 3px !important;
+ padding-left: 0 !important;
+}
+
+#page-engine .system-message a {
+ color: #053805 !important;
+}
+
+#page-engine .system-message p.help b {
+ margin-bottom: 5px;
+ text-decoration: underline;
+ display: block;
+}
+
+#page-engine .system-message p.help em {
+ width: 240px;
+ text-decoration: underline;
+ margin-left: 5px;
+ float: left;
+}
+
+#page-engine .my-nick {
+ font-weight: bold;
+}
+
+#page-engine .old-message {
+ font-size: 11px !important;
+ margin-bottom: 1px !important;
+}
+
+#page-engine .chatstate {
+ background-color: rgb(234,234,234);
+ background-color: rgba(234,234,234,0.8);
+ color: #2c2c2c;
+ padding: 3px 10px 2px 8px;
+ position: absolute;
+ bottom: 93px;
+ left: 0;
+ font-size: 0.75em;
+ border-top-right-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -webkit-border-top-right-radius: 3px;
+}
+
+#page-engine .text {
+ height: 93px;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
+
+#page-engine .footer {
+ background: #e8f1f3;
+ background: -moz-linear-gradient(top, #dee8ea, #e8f1f3);
+ background: -webkit-gradient(linear, left top, left bottom, from(#dee8ea), to(#e8f1f3));
+ border-color: #d0d0d0;
+ border-width: 1px 0 0;
+ border-style: solid;
+ color: black;
+ position: absolute;
+ left: 0;
+ right: 0;
+ padding: 6px;
+ height: 16px;
+}
+
+#page-engine .chat .footer {
+ border-width: 1px 0;
+ position: static;
+}
+
+#page-engine .chat-tools-content {
+ height: 16px;
+ width: 16px;
+ margin-right: 8px;
+ float: left;
+}
+
+#page-engine .tools-tooltip {
+ display: block;
+ height: 16px;
+ width: 16px;
+ overflow: hidden;
+ float: left;
+}
+
+#page-engine .text .chat-tools-smileys {
+ margin-left: 4px;
+}
+
+#page-engine .text .chat-tools-file {
+ display: none;
+}
+
+#page-engine .text .chat-tools-file.mini .bubble-file {
+ z-index: 39;
+}
+
+#page-engine .text .chat-tools-file.mini .tooltip-subitem {
+ width: 22px;
+ height: 20px;
+}
+
+#page-engine .text .chat-tools-file.mini .wait {
+ margin: -2px 0 0 -1px;
+}
+
+#page-engine .text .tools-smileys {
+ background-position: 0 -388px;
+}
+
+#page-engine .text .tools-style {
+ background-position: 0 -700px;
+}
+
+#page-engine .text .tools-file {
+ background-position: 0 -1956px;
+}
+
+#page-engine .text .tools-save {
+ background-position: 0 -719px;
+}
+
+#page-engine .text .tools-clear {
+ background-position: 0 -739px;
+}
+
+#page-engine .text .tools-infos,
+#channel .top div.shortcuts a.profile {
+ background-position: 0 -758px;
+}
+
+#page-engine .text .tools-add,
+#page-engine .text .tools-archives,
+#page-engine .text .tools-mucadmin {
+ display: none;
+}
+
+#page-engine .text .tools-mucadmin {
+ background-position: 0 -777px;
+}
+
+#page-engine .bubble-style label.bold {
+ font-weight: bold;
+}
+
+#page-engine .bubble-style label.italic {
+ font-style: italic;
+}
+
+#page-engine .bubble-style label.underline {
+ text-decoration: underline;
+}
+
+#page-engine .bubble-style a.color {
+ height: 18px;
+ width: 18px;
+ border-color: white;
+ border-width: 1px;
+ border-style: solid;
+ margin: 6px 5px 0 0;
+ float: left;
+ opacity: 0.6;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ box-shadow: 0 0 5px black;
+ -moz-box-shadow: 0 0 5px black;
+ -webkit-box-shadow: 0 0 5px black;
+}
+
+#page-engine .bubble-style a.color:hover,
+#page-engine .bubble-style a.color:focus {
+ opacity: 0.7;
+}
+
+#page-engine .bubble-style a.color.selected {
+ opacity: 1;
+ border-color: #ffb20d;
+}
+
+#page-engine .bubble-file .tooltip-subitem {
+ width: 240px;
+}
+
+#page-engine .bubble-file input[type=file] {
+ width: 220px;
+}
+
+#page-engine .bubble-file input[type=submit],
+#page-engine .bubble-file input[type=reset] {
+ margin: 4px 4px 0 0;
+}
+
+#page-engine .text .compose,
+#page-engine .muc-ask {
+ position: absolute;
+ left: 0;
+}
+
+#page-engine .text .compose {
+ top: 29px;
+ right: 12px;
+ bottom: 12px;
+}
+
+#page-engine .muc-ask {
+ right: 0;
+ bottom: 0;
+}
+
+#page-engine .text textarea {
+ border: 1px solid #c8c8c8;
+ padding: 5px;
+ height: 100%;
+ width: 100%;
+ font-size: 1.1em;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+ -moz-border-radius-topright: 0;
+ -moz-border-radius-topleft: 0;
+ -webkit-border-top-right-radius: 0;
+ -webkit-border-top-left-radius: 0;
+}
+
+#page-engine .muc-ask {
+ background-color: #e8f1f3;
+ height: 64px;
+ font-size: 0.9em;
+ right: 0;
+ z-index: 2;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px;
+ -moz-border-radius-bottomleft: 3px;
+ -moz-border-radius-bottomright: 3px;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+}
+
+#page-engine .muc-ask label {
+ color: #224249;
+ margin: 23px 10px 0 16px;
+ font-weight: bold;
+}
+
+#page-engine .muc-ask input {
+ width: 200px;
+ margin: 19px 10px 0 10px;
+ padding: 3px;
+}
+
+#page-engine .tooltip {
+ position: absolute;
+ bottom: 84px;
+ margin-left: -13px;
+ z-index: 40;
+ font-size: 0.8em;
+ color: white;
+}
+
+#page-engine .tooltip a {
+ color: white;
+ text-decoration: underline;
+}
+
+#page-engine .tooltip-subitem {
+ background-color: rgb(0,0,0);
+ background-color: rgba(0,0,0,0.8);
+ padding: 10px;
+ width: 200px;
+ height: 110px;
+ text-shadow: 0 1px 1px black;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+#page-engine .tooltip-subarrow {
+ background-position: 0 -251px;
+ opacity: 0.8;
+ height: 10px;
+ width: 18px;
+ margin-left: 12px;
+}
+
+#page-engine .tooltip .tooltip-top {
+ margin-bottom: 8px;
+ font-weight: bold;
+}
+
+#page-engine .tooltip label {
+ margin-bottom: 4px;
+ float: left;
+ clear: both;
+}
+
+#page-engine .tooltip label input[type=checkbox] {
+ margin: 0 6px 0 0;
+ float: left;
+}
+
+#page-engine .tooltip label.select {
+ margin-top: 5px;
+}
+
+#page-engine .tooltip input,
+#page-engine .tooltip select {
+ float: left;
+}
+
+#page-engine .tooltip select {
+ width: 100px;
+}
+
+#page-engine .tooltip .tooltip-actionlog:hover,
+#page-engine .tooltip .tooltip-actionlog:focus {
+ cursor: pointer;
+ text-decoration: underline;
+}
diff --git a/jappixmini/jappix/css/pageswitch.css b/jappixmini/jappix/css/pageswitch.css
new file mode 100644
index 000000000..59830049b
--- /dev/null
+++ b/jappixmini/jappix/css/pageswitch.css
@@ -0,0 +1,209 @@
+/*
+
+Jappix - An open social platform
+This is the page-switch CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 22/05/11
+
+*/
+
+#page-switch {
+ position: absolute;
+ top: 15px;
+ left: 10px;
+ right: 10px;
+ z-index: 9;
+}
+
+#page-switch .chans {
+ position: absolute;
+ left: 0;
+ right: 40px;
+ top: 0;
+ height: 25px;
+ overflow: hidden;
+}
+
+#page-switch .more {
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+#page-switch .more-button {
+ background-position: 6px -1372px;
+ background-color: #d9e7ea;
+ width: 7px;
+ height: 17px;
+ padding: 1px 6px;
+ font-size: 0.9em;
+ text-decoration: none;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+#page-switch .more-content {
+ background-color: #d9e7ea;
+ width: 200px;
+ max-height: 400px;
+ overflow: auto;
+ position: absolute;
+ margin: -2px 0 0 -181px;
+ padding: 4px 0;
+ font-size: 0.95em;
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px;
+ -moz-border-radius-topleft: 3px;
+ -moz-border-radius-bottomleft: 3px;
+ -moz-border-radius-bottomright: 3px;
+ -webkit-border-top-left-radius: 3px;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+}
+
+#page-switch .switcher {
+ background-color: #d9e7ea;
+ color: #17353b;
+ height: 15px;
+ padding: 5px 10px 5px 5px;
+ margin: 0 2px;
+ font-size: 0.85em;
+ float: left;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -moz-border-radius-topleft: 3px;
+ -webkit-border-top-right-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+}
+
+#page-switch .more-content .switcher {
+ background-color: #d9e7ea;
+ float: none;
+ margin: 0;
+ font-size: 0.9em;
+ border-radius: 0;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+}
+
+#page-switch .more-content .switcher .exit {
+ display: block;
+}
+
+#page-switch .more-button:hover,
+#page-switch .more-button:focus,
+#page-switch .switcher:hover,
+#page-switch .switcher:focus,
+#page-switch .more-content .switcher:hover,
+#page-switch .more-content .switcher:focus {
+ background-color: #cedee1;
+ cursor: pointer;
+}
+
+#page-switch .more-button:active,
+#page-switch .switcher:active,
+#page-switch .more-content .switcher:active {
+ background-color: #c3d3d7;
+}
+
+#page-switch .switcher.activechan {
+ background-color: #e8f1f3;
+}
+
+#page-switch .more-content .switcher.activechan {
+ background-color: #d1e0e3;
+}
+
+#page-switch .icon {
+ height: 16px;
+ width: 16px;
+ float: left;
+}
+
+#page-switch .name {
+ float: left;
+ margin-left: 4px;
+ max-height: 16px;
+ max-width: 140px;
+ overflow: hidden;
+}
+
+#page-switch .exit {
+ display: none;
+ background-color: #bdd9dc;
+ border: 1px solid #80aab0;
+ color: #355e64;
+ height: 14px;
+ width: 13px;
+ margin-left: 10px;
+ font-size: 0.85em;
+ text-align: center;
+ text-decoration: none;
+ float: right;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+#page-switch .exit:hover,
+#page-switch .exit:focus {
+ background-color: #aac7cb;
+}
+
+#page-switch .exit:active {
+ background-color: #9bbdc1;
+}
+
+#page-switch .activechan .exit {
+ display: block;
+ float: right;
+}
+
+#page-switch .chan-newmessage {
+ background-color: #f6edc3 !important;
+}
+
+#page-switch .chan-newmessage:hover,
+#page-switch .chan-newmessage:focus {
+ background-color: #f1eac0 !important;
+}
+
+#page-switch .chan-newmessage:active {
+ background-color: #ede4b8 !important;
+}
+
+#page-switch .composing,
+#page-engine .list .user.composing {
+ color: #217021 !important;
+}
+
+#page-switch .paused,
+#page-switch .chan-unread .name,
+#page-engine .list .user.paused {
+ color: #2431ac !important;
+}
+
+#page-switch .active,
+#page-engine .list .user.active {
+ color: #353535 !important;
+}
+
+#page-switch .inactive,
+#page-engine .list .user.inactive {
+ color: #585858 !important;
+}
+
+#page-switch .gone {
+ color: #851313 !important;
+}
+
+#page-switch .channel .icon {
+ background-position: 0 -55px;
+}
diff --git a/jappixmini/jappix/css/popup.css b/jappixmini/jappix/css/popup.css
new file mode 100644
index 000000000..e5b3eb921
--- /dev/null
+++ b/jappixmini/jappix/css/popup.css
@@ -0,0 +1,612 @@
+/*
+
+Jappix - An open social platform
+This is the popup CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 02/05/11
+
+*/
+
+.lock {
+ background-color: rgb(0,0,0);
+ background-color: rgba(0,0,0,0.6);
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ position: fixed;
+ z-index: 9999;
+}
+
+.popup {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.95);
+ margin-top: -250px;
+ margin-left: -330px;
+ width: 640px;
+ height: 500px;
+ padding: 0 10px;
+ position: absolute;
+ z-index: 10000;
+ left: 50%;
+ top: 50%;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ box-shadow: 0 0 35px #232323;
+ -moz-box-shadow: 0 0 35px #232323;
+ -webkit-box-shadow: 0 0 35px #232323;
+}
+
+.popup.large {
+ margin-left: -460px;
+ width: 920px;
+}
+
+.popup .top {
+ width: 600px;
+ height: 45px;
+ font-size: 1.2em;
+ padding-top: 9px;
+ color: white;
+ margin: 14px 0 0 40px;
+ text-transform: uppercase;
+ text-decoration: none;
+ font-weight: bold;
+ text-shadow: 0 2px 2px black;
+}
+
+.popup .tab {
+ width: 620px;
+ height: 25px;
+ margin: -5px 10px 0 10px;
+ position: relative;
+ z-index: 1;
+}
+
+.popup .tab a {
+ background-color: #d9e7ea;
+ color: #204249;
+ width: 180px;
+ height: 17px;
+ padding: 4px 4px 4px 16px;
+ margin-left: 5px;
+ font-size: 0.94em;
+ overflow: hidden;
+ float: left;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -moz-border-radius-topleft: 3px;
+ -webkit-border-top-right-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+}
+
+.popup .tab a:hover,
+.popup .tab a:focus {
+ background-color: #cedee1;
+ text-decoration: none;
+}
+
+.popup .tab a:active {
+ background-color: #c3d3d7;
+ text-decoration: none;
+}
+
+.popup .tab a.tab-active {
+ background-color: #e4eef9 !important;
+}
+
+.popup .one-lap {
+ display: none;
+}
+
+.popup .one-lap.lap-active {
+ display: block;
+}
+
+.popup .content {
+ background: #e4eef9;
+ background: -moz-linear-gradient(top, #e4eef9, #D0E5FA);
+ background: -webkit-gradient(linear, left top, left bottom, from(#e4eef9), to(#D0E5FA));
+ height: 358px;
+ width: 640px;
+ position: absolute;
+ left: 10px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ box-shadow: 0 0 20px black;
+ -moz-box-shadow: 0 0 20px black;
+ -webkit-box-shadow: 0 0 20px black;
+}
+
+.popup .content,
+.popup .content a {
+ color: #112a2f;
+}
+
+.popup.large div.comments {
+ background-color: #f4f4f4;
+ width: 272px;
+ margin: 0;
+ position: absolute;
+ right: 10px;
+ top: 63px;
+ bottom: 10px;
+ overflow-x: hidden;
+ overflow-y: auto;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+.popup.large div.comments div.comments-content {
+ font-size: 0.8em;
+}
+
+.popup.large div.comments input {
+ width: 185px;
+ min-width: 0;
+}
+
+.popup.large div.comments .one-comment {
+ padding-bottom: 4px;
+}
+
+.popup.large div.comments .one-comment a {
+ text-decoration: underline;
+}
+
+.popup.large div.comments div.comments-content {
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ -moz-border-radius-topleft: 3px;
+ -webkit-border-top-right-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+}
+
+.popup .head {
+ background: #f1f6fd;
+ border: 1px #9dc4fc solid;
+ width: 606px;
+ height: 24px;
+ margin: 0 10px 10px 10px;
+ padding: 6px;
+}
+
+.popup .head-text {
+ float: left;
+ font-size: 0.9em;
+ margin: 3px;
+}
+
+.popup .head-actions {
+ float: right;
+ margin-top: 2px;
+}
+
+.popup .head-actions a {
+ font-size: 0.9em;
+ margin: 0 4px;
+}
+
+.popup .actions a {
+ color: #30575f;
+ font-size: 0.9em;
+ margin-left: 5px;
+}
+
+.popup .head .head-input {
+ float: right;
+ width: 200px;
+ padding: 2px;
+}
+
+.popup .head .head-select {
+ float: right;
+ height: 24px;
+}
+
+.popup .forms {
+ width: 390px;
+ height: 328px;
+ margin: 15px;
+ float: left;
+}
+
+.popup fieldset {
+ border: 1px #547177 solid;
+ margin: 0 0 15px 0;
+ padding: 8px 2px 3px 2px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+.popup legend {
+ font-size: 0.9em;
+ margin: 0 0 0 15px;
+ padding: 0 2px;
+ text-transform: uppercase;
+}
+
+.popup label {
+ color: #1b1b1b;
+ width: 150px;
+ margin: 0 0 10px 12px;
+ clear: both;
+ float: left;
+}
+
+.popup input,
+.popup select {
+ margin: 0 10px 10px 0;
+ float: left;
+}
+
+.popup input[type=text] {
+ min-width: 174px;
+}
+
+.popup select {
+ min-height: 20px;
+}
+
+.popup .results {
+ height: 310px;
+ width: 620px;
+ margin: -5px 0 0 10px;
+ padding: 6px 0 0 0;
+ overflow: auto;
+}
+
+.popup .results .no-results {
+ margin: 6px 0;
+ font-size: 0.85em;
+ font-weight: bold;
+}
+
+.popup .results label {
+ width: 180px;
+ margin: 6px 4px 4px 4px;
+}
+
+.popup .results input,
+.popup .results textarea,
+.popup .results select {
+ margin: 4px;
+}
+
+.popup .results input,
+.popup .results select {
+ min-width: 180px;
+}
+
+.popup .results input[type=checkbox],
+.popup .results input[type=radio] {
+ margin-top: 7px;
+}
+
+.popup .results textarea {
+ width: 380px;
+}
+
+.popup .results .avatar-container {
+ float: left;
+ width: 60px;
+ height: 60px;
+ margin: 5px 12px 5px 9px;
+ text-align: center;
+ background-repeat: no-repeat;
+}
+
+.popup .results img.avatar {
+ max-width: 60px;
+ max-height: 60px;
+}
+
+.popup .results .one-icon {
+ height: 16px;
+ width: 16px;
+ margin: 10px 3px 0 8px;
+ float: left;
+}
+
+.popup .results .one-icon.account,
+.popup .results .one-icon.auth {
+ background-position: 0 -777px;
+}
+
+.popup .results .one-icon.automation,
+.popup .results .one-icon.client {
+ background-position: 0 -1500px;
+}
+
+.popup .results .one-icon.collaboration {
+ background-position: 0 -1520px;
+}
+
+.popup .results .one-icon.proxy,
+.popup .results .one-icon.server,
+.popup .results .one-icon.others {
+ background-position: 0 -1540px;
+}
+
+.popup .results .one-icon.component,
+.popup .results .one-icon.gateway {
+ background-position: 0 -1560px;
+}
+
+.popup .results .one-icon.conference {
+ background-position: 0 -1082px;
+}
+
+.popup .results .one-icon.directory {
+ background-position: 0 -876px;
+}
+
+.popup .results .one-icon.headline,
+.popup .results .one-icon.hierarchy {
+ background-position: 0 -1580px;
+}
+
+.popup .results .one-icon.pubsub,
+.popup .results .one-icon.store {
+ background-position: 0 -1600px;
+}
+
+.popup .results .one-icon.loading {
+ background-position: 0 -1620px;
+}
+
+.popup .results .one-icon.down {
+ background-position: 0 -1640px;
+}
+
+.popup .results .one-host {
+ font-weight: bold;
+ width: 170px;
+}
+
+.popup .results .one-type {
+ width: 210px;
+}
+
+.popup .results .one-type,
+.popup .results .one-host {
+ float: left;
+ overflow: hidden;
+ margin: 9px 8px;
+}
+
+.popup .results .one-jid,
+.popup .results .one-ctry,
+.popup .results .one-fn {
+ margin: 4px;
+ width: 400px;
+}
+
+.popup .results .one-fn {
+ font-weight: bold;
+}
+
+.popup .results .one-jid {
+ margin-top: 8px;
+ font-size: 0.9em;
+}
+
+.popup .results .one-name {
+ float: left;
+ margin: 4px;
+}
+
+.popup a.one-button {
+ display: none;
+ background-color: #f1f6fd;
+ border: 1px solid #b9cbcf;
+ margin-top: 1px;
+ padding: 4px 8px;
+ text-decoration: none;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+.popup a.one-button:hover,
+.popup a.one-button:focus {
+ border: 1px solid #95b1b7;
+}
+
+.popup a.one-button:active {
+ border: 1px solid #77989f;
+}
+
+.popup .results .oneresult:hover a.one-button {
+ display: block;
+}
+
+.popup .results a.one-button,
+#inbox .one-message a.one-button {
+ float: right;
+ padding: 3px 6px;
+ margin-right: 4px;
+}
+
+.popup .results a.one-vjud {
+ position: absolute;
+ right: 4px;
+}
+
+.popup .results a.one-add {
+ top: 8px;
+}
+
+.popup .results a.one-chat {
+ top: 42px;
+}
+
+.popup .results .one-next {
+ float: right;
+ margin: 4px 8px 4px 4px;
+ font-weight: bold;
+}
+
+.popup .results .one-actions {
+ width: 148px;
+ margin: 4px;
+ float: left;
+}
+
+.popup .results .one-actions a {
+ width: 16px;
+ height: 16px;
+ padding: 2px 2px 4px 5px !important;
+ margin-top: 2px;
+}
+
+.popup .results .one-actions a.browse {
+ background-position: 3px -1396px;
+}
+
+.popup .results .one-actions a.command {
+ background-position: 3px -1415px;
+}
+
+.popup .results .one-actions a.subscribe {
+ background-position: 4px -1435px;
+}
+
+.popup .results .one-actions a.join {
+ background-position: 3px -1455px;
+}
+
+.popup .results .one-actions a.search {
+ background-position: 4px -1475px;
+}
+
+.popup .results a.submit,
+.popup .results a.cancel,
+.popup .results a.back {
+ margin-right: 8px;
+ float: right;
+}
+
+.popup .onetitle {
+ font-size: 0.9em;
+ padding: 4px;
+ font-weight: bold;
+}
+
+.popup .oneinstructions {
+ font-size: 0.9em;
+ padding: 4px;
+ margin: 8px 0;
+}
+
+.popup .oneresult {
+ font-size: 0.9em;
+ padding: 3px 0 4px 4px;
+ border-bottom: 1px #9dc4fc solid;
+ overflow: hidden;
+ position: relative;
+}
+
+.popup .oneresult:hover {
+ background: #e9f1fd;
+}
+
+.popup .oneresult[onclick]:hover {
+ cursor: pointer;
+}
+
+.popup .oneresult[onclick]:active {
+ background: #f1f6fd;
+}
+
+.popup .infos {
+ background-color: rgb(255,239,104);
+ background-color: rgba(255,239,104,0.8);
+ border: 1px #decb2f solid;
+ color: #3f3f3f;
+ padding: 8px;
+ margin: 10px;
+ font-size: 0.8em;
+}
+
+.popup .infos p {
+ margin-top: 10px;
+}
+
+.popup .infos p.infos-title {
+ font-weight: bold;
+}
+
+.popup .bottom {
+ width: 640px;
+ height: 40px;
+ position: absolute;
+ bottom: 8px;
+}
+
+.popup .wait {
+ display: none;
+ margin: 8px 0 0 3px;
+ float: left;
+}
+
+a.finish {
+ border: 1px solid white;
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.1);
+ color: white;
+ padding: 4px 8px;
+ margin-right: 7px;
+ font-size: 0.95em;
+ text-align: center;
+ text-decoration: none;
+ text-shadow: 0 1px 1px black;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ box-shadow: 0 0 5px black;
+ -moz-box-shadow: 0 0 5px black;
+ -webkit-box-shadow: 0 0 5px black;
+}
+
+a.finish:hover,
+a.finish:focus {
+ cursor: pointer;
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.2);
+ box-shadow: 0 0 15px black;
+ -moz-box-shadow: 0 0 15px black;
+ -webkit-box-shadow: 0 0 15px black;
+}
+
+a.finish:active {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.3);
+}
+
+a.finish.disabled {
+ opacity: 0.2;
+}
+
+a.finish.disabled:hover,
+a.finish.disabled:focus,
+a.finish.disabled:active {
+ cursor: default;
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.1);
+}
+
+.popup a.finish {
+ margin-top: 6px;
+ float: right;
+}
diff --git a/jappixmini/jappix/css/privacy.css b/jappixmini/jappix/css/privacy.css
new file mode 100644
index 000000000..521be322f
--- /dev/null
+++ b/jappixmini/jappix/css/privacy.css
@@ -0,0 +1,197 @@
+/*
+
+Jappix - An open social platform
+This is the privacy CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 16/02/11
+
+*/
+
+#privacy .content {
+ padding: 10px 0 10px 0;
+}
+
+#privacy .privacy-head div.list-left,
+#privacy .privacy-head div.list-center,
+#privacy .privacy-head div.list-right,
+#privacy .privacy-first {
+ float: left;
+}
+
+#privacy .privacy-head div.list-left {
+ margin-left: 5px;
+}
+
+#privacy .privacy-head div.list-center {
+ border-right: 1px dotted #1b393f;
+ height: 24px;
+ width: 1px;
+ margin-right: 15px;
+ padding-left: 18px;
+}
+
+#privacy .privacy-head span,
+#privacy .privacy-head a,
+#privacy .privacy-item span,
+#privacy .privacy-item a {
+ float: left;
+}
+
+#privacy .privacy-head span {
+ font-size: 0.9em;
+ font-weight: bold;
+ margin: 3px 10px 0 0;
+}
+
+#privacy .privacy-head input,
+#privacy .privacy-head select {
+ width: 180px;
+}
+
+#privacy .privacy-head input {
+ margin-top: 1px;
+}
+
+#privacy .privacy-head select,
+#privacy .privacy-item select {
+ margin-top: -2px;
+}
+
+#privacy .privacy-head span.left-space {
+ margin-left: 16px;
+}
+
+#privacy .privacy-head a,
+#privacy .privacy-item a {
+ width: 20px;
+ height: 20px;
+ padding: 0;
+ display: block;
+}
+
+#privacy .privacy-item a.item-add {
+ background-position: 2px -1178px;
+}
+
+#privacy .privacy-head a.list-remove,
+#privacy .privacy-item a.item-remove {
+ background-position: 2px -1197px;
+}
+
+#privacy .privacy-item a.item-save {
+ background-position: 3px -126px;
+ width: auto;
+ height: 19px;
+ padding: 1px 7px 0 21px;
+}
+
+#privacy .privacy-item,
+#privacy form,
+#privacy .privacy-active {
+ clear: both;
+}
+
+#privacy .privacy-item {
+ margin: 17px 12px;
+ font-size: 0.9em;
+}
+
+#privacy .privacy-item span {
+ font-weight: bold;
+}
+
+#privacy .privacy-item select {
+ width: 300px;
+ margin: -4px 30px 0 10px;
+}
+
+#privacy .privacy-item a {
+ margin: -2px 6px 0 0;
+}
+
+#privacy .privacy-first,
+#privacy .privacy-second,
+#privacy .privacy-third {
+ height: 195px;
+ font-size: 0.9em;
+ margin: 10px 0 0 10px;
+ float: left;
+}
+
+#privacy .privacy-first,
+#privacy .privacy-second {
+ border-right: 1px dotted #1b393f;
+ padding-right: 14px;
+}
+
+#privacy .privacy-first {
+ width: 125px;
+}
+
+#privacy .privacy-first label {
+ margin: 50px 0 0 15px;
+}
+
+#privacy .privacy-first label input {
+ margin-top: 2px;
+}
+
+#privacy .privacy-second {
+ width: 205px;
+}
+
+#privacy .privacy-second label {
+ margin: 2px 0 0 12px;
+}
+
+#privacy .privacy-second input[type=radio],
+#privacy .privacy-third input[type=checkbox] {
+ margin-top: 2px;
+ margin-bottom: 2px;
+}
+
+#privacy .privacy-second input[type=text],
+#privacy .privacy-second select {
+ width: 170px;
+ margin: 2px 0 11px 12px;
+ float: none;
+}
+
+#privacy .privacy-third label {
+ width: auto;
+ margin-top: 11px;
+}
+
+#privacy .privacy-third {
+ width: 240px;
+}
+
+#privacy .privacy-active {
+ margin: 34px 16px 0 16px;
+ font-size: 0.9em;
+}
+
+#privacy .privacy-active-elements {
+ float: right;
+}
+
+#privacy .privacy-active input[type=text] {
+ width: 30px;
+ margin: 0 0 0 8px;
+ float: none;
+}
+
+#privacy .privacy-active input[type=checkbox] {
+ margin: 2px 8px 0 0;
+ float: left;
+}
+
+#privacy .privacy-active label {
+ width: auto;
+ margin: 0 15px 0 0;
+ clear: none;
+}
diff --git a/jappixmini/jappix/css/rosterx.css b/jappixmini/jappix/css/rosterx.css
new file mode 100644
index 000000000..4f159ac89
--- /dev/null
+++ b/jappixmini/jappix/css/rosterx.css
@@ -0,0 +1,53 @@
+/*
+
+Jappix - An open social platform
+This is the Roster Item Exchange tool CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 05/02/11
+
+*/
+
+#rosterx .content {
+ padding: 10px 0 10px 0;
+}
+
+#rosterx .rosterx-head a {
+ font-size: 0.9em;
+ margin: 3px 4px;
+ float: left;
+}
+
+#rosterx .oneresult:hover {
+ cursor: pointer;
+}
+
+#rosterx .oneresult span {
+ margin: 2px 5px 0 5px;
+ overflow: hidden;
+ float: left;
+}
+
+#rosterx .oneresult span.name {
+ width: 230px;
+ font-weight: bold;
+}
+
+#rosterx .oneresult span.xid {
+ width: 270px;
+ font-size: 0.9em;
+}
+
+#rosterx .oneresult span.action {
+ width: 16px;
+ height: 16px;
+ margin-top: 4px;
+ float: right;
+}
+
+#rosterx .oneresult span.action.modify {
+ background-position: 0 -1244px;
+}
diff --git a/jappixmini/jappix/css/search.css b/jappixmini/jappix/css/search.css
new file mode 100644
index 000000000..505b17d96
--- /dev/null
+++ b/jappixmini/jappix/css/search.css
@@ -0,0 +1,60 @@
+/*
+
+Jappix - An open social platform
+This is the search tool CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 23/01/11
+
+*/
+
+.search {
+ position: relative;
+}
+
+.search input.suggested {
+ border-bottom: 1px solid white;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ -moz-border-radius-bottomright: 0;
+ -moz-border-radius-bottomleft: 0;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+}
+
+.search ul {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.9);
+ border-color: #e1a014;
+ border-style: solid;
+ border-width: 0 1px 1px 1px;
+ position: absolute;
+ z-index: 1;
+ padding: 3px 0;
+ list-style: none;
+ overflow: auto;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+ -moz-border-radius-bottomright: 3px;
+ -moz-border-radius-bottomleft: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-bottom-left-radius: 3px;
+}
+
+.search ul li {
+ padding: 2px 6px;
+ color: #3d3d3d;
+ text-shadow: none;
+}
+
+.search ul li:hover {
+ cursor: pointer;
+}
+
+.search ul li.hovered {
+ background-color: rgb(225,160,20);
+ background-color: rgba(225,160,20,0.3);
+}
diff --git a/jappixmini/jappix/css/smileys.css b/jappixmini/jappix/css/smileys.css
new file mode 100644
index 000000000..faad478be
--- /dev/null
+++ b/jappixmini/jappix/css/smileys.css
@@ -0,0 +1,196 @@
+/*
+
+Jappix - An open social platform
+This is the smileys CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 16/02/11
+
+*/
+
+.emoticon {
+ width: 16px;
+ height: 16px;
+}
+
+a.emoticon {
+ margin: 2px;
+ float: left;
+}
+
+a.emoticon:hover,
+a.emoticon:focus {
+ opacity: 0.8;
+}
+
+a.emoticon:active {
+ opacity: 0.7;
+}
+
+img.emoticon {
+ border: 0 none;
+ vertical-align: bottom;
+}
+
+.emoticon-biggrin {
+ background-position: 0 0;
+}
+
+.emoticon-devil {
+ background-position: -16px 0;
+}
+
+.emoticon-coolglasses {
+ background-position: -32px 0;
+}
+
+.emoticon-tongue {
+ background-position: -48px 0;
+}
+
+.emoticon-smile {
+ background-position: -64px 0;
+}
+
+.emoticon-wink {
+ background-position: -80px 0;
+}
+
+.emoticon-blush {
+ background-position: -96px 0;
+}
+
+.emoticon-stare {
+ background-position: -112px 0;
+}
+
+.emoticon-frowning {
+ background-position: -128px 0;
+}
+
+.emoticon-oh {
+ background-position: -144px 0;
+}
+
+.emoticon-unhappy {
+ background-position: -160px 0;
+}
+
+.emoticon-cry {
+ background-position: -176px 0;
+}
+
+.emoticon-angry {
+ background-position: -192px 0;
+}
+
+.emoticon-puke {
+ background-position: -208px 0;
+}
+
+.emoticon-hugright {
+ background-position: -224px 0;
+}
+
+.emoticon-hugleft {
+ background-position: -240px 0;
+}
+
+.emoticon-lion {
+ background-position: -256px 0;
+}
+
+.emoticon-pussy {
+ background-position: -272px 0;
+}
+
+.emoticon-bat {
+ background-position: -288px 0;
+}
+
+.emoticon-kiss {
+ background-position: -304px 0;
+}
+
+.emoticon-heart {
+ background-position: -320px 0;
+}
+
+.emoticon-brheart {
+ background-position: -336px 0;
+}
+
+.emoticon-flower {
+ background-position: -352px 0;
+}
+
+.emoticon-brflower {
+ background-position: -368px 0;
+}
+
+.emoticon-thumbup {
+ background-position: -384px 0;
+}
+
+.emoticon-thumbdown {
+ background-position: -400px 0;
+}
+
+.emoticon-lamp {
+ background-position: -416px 0;
+}
+
+.emoticon-coffee {
+ background-position: -432px 0;
+}
+
+.emoticon-drink {
+ background-position: -448px 0;
+}
+
+.emoticon-beer {
+ background-position: -464px 0;
+}
+
+.emoticon-boy {
+ background-position: -480px 0;
+}
+
+.emoticon-girl {
+ background-position: -496px 0;
+}
+
+.emoticon-phone {
+ background-position: -512px 0;
+}
+
+.emoticon-photo {
+ background-position: -528px 0;
+}
+
+.emoticon-music {
+ background-position: -544px 0;
+}
+
+.emoticon-cuffs {
+ background-position: -560px 0;
+}
+
+.emoticon-mail {
+ background-position: -576px 0;
+}
+
+.emoticon-rainbow {
+ background-position: -592px 0;
+}
+
+.emoticon-star {
+ background-position: -608px 0;
+}
+
+.emoticon-moon {
+ background-position: -624px 0;
+}
diff --git a/jappixmini/jappix/css/stats-svg.css b/jappixmini/jappix/css/stats-svg.css
new file mode 100644
index 000000000..f512a9399
--- /dev/null
+++ b/jappixmini/jappix/css/stats-svg.css
@@ -0,0 +1,71 @@
+/*
+
+Jappix - An open social platform
+This is the SVG stats CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Erwan Briand, Vanaryon
+Last revision: 20/11/10
+
+*/
+
+svg {
+ background-color: #e8f1f3;
+}
+
+.refline {
+ stroke: #596171;
+ stroke-width: 2px;
+}
+
+.refleft {
+ fill: #000000;
+ font-family: "Inconsolata", "DejaVu Serif sans", Verdana, sans-serif;
+ font-size: 8px;
+}
+
+.reftext {
+ fill: #586070;
+ font-family: "Inconsolata", "DejaVu Serif sans", Verdana, sans-serif;
+ font-size: 10px;
+}
+
+.bubbletextblue,
+.bubbletextred {
+ fill: none;
+ font-family: "Inconsolata", "DejaVu Serif sans", Verdana, sans-serif;
+ font-size: 8px;
+ text-anchor: end;
+}
+
+.bluebar {
+ fill: "#6C84C0";
+ fill-opacity: "0.6";
+}
+
+.gbar:hover .bluebar {
+ fill: #2A3F73;
+}
+
+.gbar:hover .redbar {
+ fill: #C70705;
+}
+
+.gbar:hover #bubble {
+ fill: white;
+ stroke: grey;
+}
+
+.gbar:hover .bubbletextblue {
+ fill: #2A3F73;
+}
+
+.gbar:hover .bubbletextred {
+ fill: #C70705;
+}
+
+.gbar:hover .reftext {
+ fill: #000000;
+}
diff --git a/jappixmini/jappix/css/tools.css b/jappixmini/jappix/css/tools.css
new file mode 100644
index 000000000..8b689f54f
--- /dev/null
+++ b/jappixmini/jappix/css/tools.css
@@ -0,0 +1,346 @@
+/*
+
+Jappix - An open social platform
+This is the tools CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 27/08/11
+
+*/
+
+#top-content .tools {
+ background-color: rgb(232,241,243);
+ background-color: rgba(232,241,243,0.6);
+ padding: 3px 8px 5px 8px;
+ min-width: 10px;
+ height: 17px;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
+
+#top-content .tools a {
+ color: black;
+ padding: 0 3px;
+ margin: 0 1.5px;
+}
+
+#top-content .tools a:hover,
+#top-content .tools a:focus {
+ cursor: pointer;
+ text-decoration: underline;
+}
+
+#top-content .tools-logo {
+ background-position: 9px 2px;
+ width: 74px;
+ float: left;
+}
+
+#top-content .tools-all {
+ float: right;
+ text-align: right;
+ margin-left: 8px;
+ font-size: 0.9em;
+ color: black;
+}
+
+#top-content .notifications {
+ background-position: 7px -1264px;
+}
+
+#top-content .music {
+ background-position: 6px -1286px;
+}
+
+#top-content .notifications:hover,
+#top-content .music:hover {
+ cursor: pointer;
+}
+
+#top-content .music:hover,
+#top-content .notifications:hover,
+#top-content .music:focus,
+#top-content .notifications:focus {
+ background-color: rgb(232,241,243);
+ background-color: rgba(232,241,243,0.7);
+}
+
+#top-content .music:active,
+#top-content .notifications:active {
+ background-color: rgb(232,241,243);
+ background-color: rgba(232,241,243,0.8);
+}
+
+#top-content .actived,
+#top-content .actived:hover,
+#top-content .actived:focus,
+#top-content .actived:active {
+ background-color: rgb(232,241,243) !important;
+ background-color: rgba(232,241,243,0.9) !important;
+}
+
+#top-content .notify {
+ background-color: #c60505;
+ color: white;
+ font-size: 0.7em;
+ font-weight: bold;
+ margin-left: -10px;
+ padding: 1px 4px;
+ position: absolute;
+ bottom: -2px;
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+}
+
+#top-content .tools-content {
+ display: none;
+ position: absolute;
+ top: 25px;
+ margin-left: -8px;
+}
+
+.tools-content-subarrow {
+ background-position: 0 -241px;
+ opacity: 0.8;
+ height: 10px;
+ width: 18px;
+ margin-left: 12px;
+}
+
+.tools-content-subitem {
+ background-color: rgb(0,0,0);
+ background-color: rgba(0,0,0,0.8);
+ padding: 14px 6px 6px 6px;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+.notifications-content {
+ width: 240px;
+}
+
+.notifications-content .tools-content-subitem {
+ max-height: 250px;
+ color: white;
+ text-shadow: 0 1px 1px black;
+ text-align: left;
+ overflow-x: none;
+ overflow-y: auto;
+}
+
+.notifications-content .empty {
+ color: white;
+ font-size: 0.9em;
+ text-decoration: underline;
+ margin: -8px 4px 2px 0;
+ display: none;
+ float: right;
+}
+
+.notifications-content .nothing {
+ font-size: 0.9em;
+ margin: 5px;
+}
+
+.notifications-content .one-notification {
+ padding: 6px 4px;
+ font-size: 0.85em;
+ clear: both;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+.notifications-content .one-notification:hover,
+.notifications-content .one-notification:focus {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.1);
+}
+
+.notifications-content .one-notification:active {
+ background-color: rgb(255,255,255);
+ background-color: rgba(255,255,255,0.2);
+}
+
+.notifications-content .avatar-container {
+ float: left;
+ width: 40px;
+ height: 40px;
+ margin: 0 8px 8px 0;
+ text-align: center;
+ background-repeat: no-repeat;
+}
+
+.notifications-content .avatar {
+ max-width: 40px;
+ max-height: 40px;
+}
+
+.notifications-content .notification-text,
+.notifications-content .notification-actions {
+ margin-left: 48px;
+ overflow: hidden;
+}
+
+.notifications-content .notification-actions {
+ margin-top: 3px;
+}
+
+.notifications-content .notification-actions a {
+ color: white;
+ font-weight: bold;
+ font-size: 0.9em;
+ text-decoration: underline;
+ margin-right: 8px;
+}
+
+.notifications-content .one-notification .notification-actions span.talk-images {
+ background-position: 0 -1828px;
+ width: 16px;
+ height: 16px;
+ margin: -1px 6px 0 0;
+ float: left;
+}
+
+.notifications-content .one-notification[data-type=subscribe] .notification-actions span.talk-images {
+ background-position: 0 -1796px;
+}
+
+.notifications-content .one-notification[data-type=invite_room] .notification-actions span.talk-images {
+ background-position: 0 -1812px;
+}
+
+.notifications-content .one-notification[data-type=send] .notification-actions span.talk-images,
+.notifications-content .one-notification[data-type=send_accept] .notification-actions span.talk-images,
+.notifications-content .one-notification[data-type=send_reject] .notification-actions span.talk-images,
+.notifications-content .one-notification[data-type=send_fail] .notification-actions span.talk-images {
+ background-position: 0 -1956px;
+}
+
+.notifications-content .one-notification[data-type=rosterx] .notification-actions span.talk-images {
+ background-position: 0 -1844px;
+}
+
+.notifications-content .one-notification[data-type=comment] .notification-actions span.talk-images {
+ background-position: 0 -1860px;
+}
+
+.notifications-content .one-notification[data-type=like] .notification-actions span.talk-images {
+ background-position: 0 -1876px;
+}
+
+.notifications-content .one-notification[data-type=quote] .notification-actions span.talk-images {
+ background-position: 0 -1892px;
+}
+
+.notifications-content .one-notification[data-type=wall] .notification-actions span.talk-images {
+ background-position: 0 -1908px;
+}
+
+.notifications-content .one-notification[data-type=photo] .notification-actions span.talk-images {
+ background-position: 0 -1924px;
+}
+
+.notifications-content .one-notification[data-type=video] .notification-actions span.talk-images {
+ background-position: 0 -1940px;
+}
+
+.music-content {
+ width: 220px;
+}
+
+.music-content .tools-content-subitem {
+ height: 247px;
+}
+
+.music-content .player {
+ background: #b5d5db;
+ background: -moz-linear-gradient(top, #b5d5db, #adced4);
+ background: -webkit-gradient(linear, left top, left bottom, from(#b5d5db), to(#adced4));
+ height: 20px;
+ padding: 2px 5px;
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+.music-content .player a {
+ margin: 2px;
+ height: 16px;
+ width: 16px;
+ float: left;
+}
+
+.music-content .player a:hover,
+.music-content .player a:focus {
+ opacity: 0.8;
+}
+
+.music-content .player a:active {
+ opacity: 0.6;
+}
+
+.music-content .stop {
+ display: none;
+ background-position: 0 -270px;
+}
+
+.music-content .list {
+ background-color: #e8f1f3;
+ height: 188px;
+ padding: 5px;
+ text-align: left;
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+
+.music-content p.no-results {
+ display: none;
+ color: black;
+ font-size: 0.9em;
+}
+
+.music-content div.special {
+ padding-bottom: 2px;
+ margin-bottom: 6px;
+ border-bottom: 1px solid #c3d4d7;
+}
+
+.music-content .song {
+ display: block;
+ margin: 3px 0;
+ font-size: 0.8em;
+}
+
+.music-content .playing {
+ font-weight: bold;
+}
+
+.music-content .search {
+ background-color: #e8f1f3;
+ height: 25px;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
+
+.music-content .search input {
+ margin: 2px;
+ width: 198px;
+ height: 15px;
+}
diff --git a/jappixmini/jappix/css/userinfos.css b/jappixmini/jappix/css/userinfos.css
new file mode 100644
index 000000000..59bab6551
--- /dev/null
+++ b/jappixmini/jappix/css/userinfos.css
@@ -0,0 +1,100 @@
+/*
+
+Jappix - An open social platform
+This is the user-infos CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 27/03/11
+
+*/
+
+#userinfos .content {
+ overflow: auto;
+}
+
+#userinfos .one-lap a {
+ text-decoration: underline;
+}
+
+#userinfos .main-infos {
+ margin: 20px 20px 8px 20px;
+ height: 120px;
+ background: white;
+ position: relative;
+ border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+}
+
+#userinfos .avatar-container {
+ float: left;
+ text-align: center;
+ margin: 20px 35px;
+ width: 80px;
+ height: 80px;
+}
+
+#userinfos .avatar {
+ max-width: 80px;
+ max-height: 80px;
+}
+
+#userinfos h1,
+#userinfos h2,
+#userinfos h3 {
+ width: 410px;
+ overflow: hidden;
+}
+
+#userinfos h1 {
+ font-size: 2em;
+ padding-top: 12px;
+ margin-bottom: 4px;
+}
+
+#userinfos h2 {
+ color: #447079;
+ font-size: 1.1em;
+ margin-bottom: 10px;
+}
+
+#userinfos h3 {
+ color: #6e8388;
+ font-size: 0.8em;
+}
+
+#userinfos .main-infos div.shortcuts {
+ position: absolute;
+ top: 10px;
+ right: 12px;
+}
+
+#userinfos .block-infos {
+ margin: 7px 20px;
+ float: left;
+}
+
+#userinfos .one-line {
+ margin: 4px 0;
+ font-size: 0.9em;
+ float: left;
+}
+
+#userinfos .one-line b {
+ width: 120px;
+ float: left;
+}
+
+#userinfos .one-line span.reset-info {
+ float: left;
+ width: 460px;
+}
+
+#userinfos textarea {
+ margin: 30px 0 0 30px;
+ width: 572px;
+ height: 292px;
+}
diff --git a/jappixmini/jappix/css/vcard.css b/jappixmini/jappix/css/vcard.css
new file mode 100644
index 000000000..59dfc486c
--- /dev/null
+++ b/jappixmini/jappix/css/vcard.css
@@ -0,0 +1,106 @@
+/*
+
+Jappix - An open social platform
+This is the vCard CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 16/01/12
+
+*/
+
+#vcard label {
+ font-size: 0.94em;
+ margin-top: 2px;
+}
+
+#vcard #vcard-avatar input[type=file] {
+ margin-left: 15px;
+}
+
+#vcard .avatar-container {
+ float: left;
+ text-align: center;
+ margin: 20px 0 35px 35px;
+ max-width: 96px;
+ max-height: 96px;
+}
+
+#vcard .avatar {
+ max-width: 96px;
+ max-height: 96px;
+}
+
+#vcard .avatar-delete {
+ background-position: 3px -1195px;
+ margin: 12px 25px 0 025px;
+ padding-left: 20px;
+ font-size: 0.9em;
+ float: right;
+}
+
+#vcard .no-avatar {
+ width: 300px;
+ color: #7c2222;
+ padding: 10px;
+ margin: 15px 0 20px 40px;
+ background: #f8cece;
+ border: 1px #ba6d6d solid;
+ font-size: 0.8em;
+}
+
+#vcard .forms textarea {
+ height: 111px;
+ width: 358px;
+ margin: 5px 12px 10px 12px;
+}
+
+#vcard .forms .avatar-info {
+ border-width: 1px;
+ border-style: solid;
+ display: none;
+ width: 370px;
+ height: 15px;
+ font-size: 0.85em;
+ padding: 10px;
+}
+
+#vcard .forms .avatar-wait {
+ background-color: #9bcbed;
+ color: #0a3858;
+ border-color: #306780;
+}
+
+#vcard .forms .avatar-ok {
+ background-color: #c4ed9b;
+ color: #325213;
+ border-color: #578030;
+}
+
+#vcard .forms .avatar-error {
+ background-color: #e79595;
+ color: #6a0b0b;
+ border-color: #7c1010;
+}
+
+#vcard .infos {
+ width: 179px;
+ height: 328px;
+ margin: 15px 15px 15px 0;
+ padding: 0 8px;
+ float: right;
+}
+
+#vcard .infos a {
+ text-decoration: underline;
+}
+
+#vcard .send {
+ float: right;
+}
+
+#vcard .send:hover {
+ cursor: pointer;
+}
diff --git a/jappixmini/jappix/css/welcome.css b/jappixmini/jappix/css/welcome.css
new file mode 100644
index 000000000..71b31ef2b
--- /dev/null
+++ b/jappixmini/jappix/css/welcome.css
@@ -0,0 +1,170 @@
+/*
+
+Jappix - An open social platform
+This is the welcome tool CSS stylesheet for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 26/04/11
+
+*/
+
+#welcome .infos {
+ margin: 15px;
+}
+
+#welcome .infos p {
+ margin-top: 6px;
+}
+
+#welcome .infos p.infos-title {
+ margin-top: 0;
+}
+
+#welcome a.box {
+ background-color: #e4eef9;
+ border: 1px solid #ccdbde;
+ margin: 12px 11px 4px 15px;
+ padding: 10px;
+ width: 270px;
+ text-decoration: none;
+ float: left;
+ border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+}
+
+#welcome a.box.share {
+ width: 350px;
+ margin: 4px 130px;
+ padding: 4px 10px;
+ clear: both;
+}
+
+#welcome a.box.share.first {
+ margin-top: 0;
+}
+
+#welcome a.box.share:hover span.go {
+ display: block;
+}
+
+#welcome a.box:hover,
+#welcome a.box:focus {
+ border: 1px solid #93c5fa;
+}
+
+#welcome a.box:active {
+ border: 1px solid #419afa;
+}
+
+#welcome a.box.enabled {
+ background-color: #f1f6fd;
+ border: 1px solid #9dc4fc;
+}
+
+#welcome a.box span {
+ margin: 3px 0;
+ display: block;
+}
+
+#welcome a.box span.logo {
+ height: 35px;
+ width: 35px;
+ margin-right: 15px;
+ float: left;
+}
+
+#welcome a.box span.logo.facebook {
+ background-position: 0 0;
+}
+
+#welcome a.box span.logo.twitter {
+ background-position: -35px 0;
+}
+
+#welcome a.box span.logo.buzz {
+ background-position: -70px 0;
+}
+
+#welcome a.box span.logo.identica {
+ background-position: -105px 0;
+}
+
+#welcome a.box span.option,
+#welcome a.box span.name {
+ font-size: 0.9em;
+ font-weight: bold;
+}
+
+#welcome a.box span.description {
+ font-size: 0.7em;
+ margin-top: 7px;
+}
+
+#welcome a.box.share span.description {
+ margin-top: 4px;
+}
+
+#welcome a.box span.image {
+ height: 16px;
+ width: 16px;
+ margin: -30px 12px 0 0;
+ float: right;
+}
+
+#welcome a.box span.image.sound {
+ background-position: 0 -900px;
+}
+
+#welcome a.box span.image.geolocation {
+ background-position: 0 -658px;
+}
+
+#welcome a.box span.image.xmpp {
+ background-position: 0 -990px;
+}
+
+#welcome a.box span.image.archives,
+#page-engine .text .tools-archives {
+ background-position: 0 -1025px;
+}
+
+#welcome a.box span.image.offline {
+ background-position: 0 -80px;
+}
+
+#welcome a.box span.tick,
+#welcome a.box span.go {
+ height: 16px;
+ width: 16px;
+ display: none;
+ float: right;
+}
+
+#welcome a.box span.tick {
+ background-position: 0 -1661px;
+ margin: -52px -15px 0 0;
+}
+
+#welcome a.box span.go {
+ background-position: 0 -1120px;
+ margin: -28px 5px 0 0;
+}
+
+#welcome a.box.enabled span.tick {
+ display: block;
+}
+
+#welcome div.results {
+ margin: -7px 15px;
+ padding: 0;
+ height: 272px;
+ overflow: auto;
+}
+
+#welcome .bottom .finish.save {
+ display: none;
+}
diff --git a/jappixmini/jappix/favicon.ico b/jappixmini/jappix/favicon.ico
new file mode 100644
index 000000000..dc2037760
Binary files /dev/null and b/jappixmini/jappix/favicon.ico differ
diff --git a/jappixmini/jappix/img/others/blank.gif b/jappixmini/jappix/img/others/blank.gif
new file mode 100644
index 000000000..35d42e808
Binary files /dev/null and b/jappixmini/jappix/img/others/blank.gif differ
diff --git a/jappixmini/jappix/img/others/default-avatar.png b/jappixmini/jappix/img/others/default-avatar.png
new file mode 100644
index 000000000..7cda4c64b
Binary files /dev/null and b/jappixmini/jappix/img/others/default-avatar.png differ
diff --git a/jappixmini/jappix/img/others/lock.png b/jappixmini/jappix/img/others/lock.png
new file mode 100644
index 000000000..cba6c0d3a
Binary files /dev/null and b/jappixmini/jappix/img/others/lock.png differ
diff --git a/jappixmini/jappix/img/sprites/animate.gif b/jappixmini/jappix/img/sprites/animate.gif
new file mode 100644
index 000000000..cbf55da59
Binary files /dev/null and b/jappixmini/jappix/img/sprites/animate.gif differ
diff --git a/jappixmini/jappix/img/sprites/animate.png b/jappixmini/jappix/img/sprites/animate.png
new file mode 100644
index 000000000..3d89e5dbd
Binary files /dev/null and b/jappixmini/jappix/img/sprites/animate.png differ
diff --git a/jappixmini/jappix/img/sprites/background.png b/jappixmini/jappix/img/sprites/background.png
new file mode 100644
index 000000000..4ae286d83
Binary files /dev/null and b/jappixmini/jappix/img/sprites/background.png differ
diff --git a/jappixmini/jappix/img/sprites/browsers.png b/jappixmini/jappix/img/sprites/browsers.png
new file mode 100644
index 000000000..8fadb7b38
Binary files /dev/null and b/jappixmini/jappix/img/sprites/browsers.png differ
diff --git a/jappixmini/jappix/img/sprites/buttons.png b/jappixmini/jappix/img/sprites/buttons.png
new file mode 100644
index 000000000..4c32b14dc
Binary files /dev/null and b/jappixmini/jappix/img/sprites/buttons.png differ
diff --git a/jappixmini/jappix/img/sprites/home.png b/jappixmini/jappix/img/sprites/home.png
new file mode 100644
index 000000000..cd3ca4a19
Binary files /dev/null and b/jappixmini/jappix/img/sprites/home.png differ
diff --git a/jappixmini/jappix/img/sprites/install.png b/jappixmini/jappix/img/sprites/install.png
new file mode 100644
index 000000000..e2f4cd267
Binary files /dev/null and b/jappixmini/jappix/img/sprites/install.png differ
diff --git a/jappixmini/jappix/img/sprites/logs.png b/jappixmini/jappix/img/sprites/logs.png
new file mode 100644
index 000000000..db99a2064
Binary files /dev/null and b/jappixmini/jappix/img/sprites/logs.png differ
diff --git a/jappixmini/jappix/img/sprites/manager.png b/jappixmini/jappix/img/sprites/manager.png
new file mode 100644
index 000000000..d63a3fec4
Binary files /dev/null and b/jappixmini/jappix/img/sprites/manager.png differ
diff --git a/jappixmini/jappix/img/sprites/me.png b/jappixmini/jappix/img/sprites/me.png
new file mode 100644
index 000000000..8a8bc0fb3
Binary files /dev/null and b/jappixmini/jappix/img/sprites/me.png differ
diff --git a/jappixmini/jappix/img/sprites/mini.gif b/jappixmini/jappix/img/sprites/mini.gif
new file mode 100644
index 000000000..661abafca
Binary files /dev/null and b/jappixmini/jappix/img/sprites/mini.gif differ
diff --git a/jappixmini/jappix/img/sprites/mini.png b/jappixmini/jappix/img/sprites/mini.png
new file mode 100644
index 000000000..83cedc46a
Binary files /dev/null and b/jappixmini/jappix/img/sprites/mini.png differ
diff --git a/jappixmini/jappix/img/sprites/mobile.png b/jappixmini/jappix/img/sprites/mobile.png
new file mode 100644
index 000000000..2e5a16ac6
Binary files /dev/null and b/jappixmini/jappix/img/sprites/mobile.png differ
diff --git a/jappixmini/jappix/img/sprites/smileys.png b/jappixmini/jappix/img/sprites/smileys.png
new file mode 100644
index 000000000..1c33243dc
Binary files /dev/null and b/jappixmini/jappix/img/sprites/smileys.png differ
diff --git a/jappixmini/jappix/img/sprites/talk.png b/jappixmini/jappix/img/sprites/talk.png
new file mode 100644
index 000000000..a307e19eb
Binary files /dev/null and b/jappixmini/jappix/img/sprites/talk.png differ
diff --git a/jappixmini/jappix/img/sprites/welcome.png b/jappixmini/jappix/img/sprites/welcome.png
new file mode 100644
index 000000000..9044bd9c8
Binary files /dev/null and b/jappixmini/jappix/img/sprites/welcome.png differ
diff --git a/jappixmini/jappix/img/wait/wait-big.gif b/jappixmini/jappix/img/wait/wait-big.gif
new file mode 100644
index 000000000..c65732076
Binary files /dev/null and b/jappixmini/jappix/img/wait/wait-big.gif differ
diff --git a/jappixmini/jappix/img/wait/wait-medium.png b/jappixmini/jappix/img/wait/wait-medium.png
new file mode 100644
index 000000000..4b9a780bd
Binary files /dev/null and b/jappixmini/jappix/img/wait/wait-medium.png differ
diff --git a/jappixmini/jappix/img/wait/wait-small.gif b/jappixmini/jappix/img/wait/wait-small.gif
new file mode 100644
index 000000000..c4b5787e4
Binary files /dev/null and b/jappixmini/jappix/img/wait/wait-small.gif differ
diff --git a/jappixmini/jappix/js/adhoc.js b/jappixmini/jappix/js/adhoc.js
new file mode 100644
index 000000000..d4e3bf4c2
--- /dev/null
+++ b/jappixmini/jappix/js/adhoc.js
@@ -0,0 +1,85 @@
+/*
+
+Jappix - An open social platform
+These are the Ad-Hoc JS scripts for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 11/07/11
+
+*/
+
+// Opens the adhoc popup
+function openAdHoc() {
+ // Popup HTML content
+ var html =
+ '
'
+ );
+
+ // Click event: chat cleaner
+ $(path + 'tools-clear').click(function() {
+ cleanChat(id);
+ });
+
+ // Click event: user-infos
+ $(path + 'tools-infos').click(function() {
+ openUserInfos(xid);
+ });
+}
+
+// Generates the chat switch elements
+function generateSwitch(type, id, xid, nick) {
+ // Path to the element
+ var chat_switch = '#page-switch .';
+
+ // Special code
+ var specialClass = ' unavailable';
+ var show_close = true;
+
+ // Groupchat
+ if(type == 'groupchat') {
+ specialClass = ' groupchat-default';
+
+ if(isAnonymous() && (xid == generateXID(ANONYMOUS_ROOM, 'groupchat')))
+ show_close = false;
+ }
+
+ // Generate the HTML code
+ var html = '
' +
+ '' +
+
+ '
' + nick.htmlEnc() + '
';
+
+ // Show the close button if not MUC and not anonymous
+ if(show_close)
+ html += '
x
';
+
+ // Close the HTML
+ html += '
';
+
+ // Append the HTML code
+ $(chat_switch + 'chans, ' + chat_switch + 'more-content').append(html);
+}
+
+// Cleans given the chat lines
+function cleanChat(chat) {
+ $('#page-engine #' + chat + ' .content .one-group').remove();
+
+ $(document).oneTime(10, function() {
+ $('#page-engine #' + chat + ' .text .message-area').focus();
+ });
+}
+
+// Creates a new chat
+function chatCreate(hash, xid, nick, type) {
+ logThis('New chat: ' + xid, 3);
+
+ // Create the chat content
+ generateChat(type, hash, xid, nick);
+
+ // Create the chat switcher
+ generateSwitch(type, hash, xid, nick);
+
+ // If the user is not in our buddy-list
+ if(type == 'chat') {
+ // Add button
+ if(!exists('#buddy-list .buddy[data-xid=' + escape(xid) + ']'))
+ $('#' + hash + ' .tools-add').click(function() {
+ // Hide the icon (to tell the user all is okay)
+ $(this).hide();
+
+ // Send the subscribe request
+ addThisContact(xid, nick);
+ }).show();
+
+ // Archives button
+ else if(enabledArchives() || enabledArchives('auto') || enabledArchives('manual') || enabledArchives('manage'))
+ $('#' + hash + ' .tools-archives').click(function() {
+ // Open the archives popup
+ openArchives();
+
+ // Get the archives for this user
+ $('#archives .filter .friend').val(xid);
+ updateArchives();
+ }).show();
+ }
+
+ // We catch the user's informations (like this avatar, vcard, and so on...)
+ getUserInfos(hash, xid, nick, type);
+
+ // The icons-hover functions
+ tooltipIcons(xid, hash);
+
+ // The event handlers
+ var inputDetect = $('#page-engine #' + hash + ' .message-area');
+
+ inputDetect.focus(function() {
+ chanCleanNotify(hash);
+ })
+
+ inputDetect.keypress(function(e) {
+ // Enter key
+ if(e.keyCode == 13) {
+ // Add a new line
+ if(e.shiftKey)
+ inputDetect.val(inputDetect.val() + '\n');
+
+ // Send the message
+ else {
+ // Send the message
+ sendMessage(hash, 'chat');
+
+ // Reset the composing database entry
+ setDB('chatstate', xid, 'off');
+ }
+
+ return false;
+ }
+ });
+
+ // Chatstate events
+ eventsChatState(inputDetect, xid, hash);
+}
diff --git a/jappixmini/jappix/js/chatstate.js b/jappixmini/jappix/js/chatstate.js
new file mode 100644
index 000000000..de7e7966f
--- /dev/null
+++ b/jappixmini/jappix/js/chatstate.js
@@ -0,0 +1,174 @@
+/*
+
+Jappix - An open social platform
+These are the chatstate JS script for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 25/08/11
+
+*/
+
+// Sends a given chatstate to a given entity
+function chatStateSend(state, xid, hash) {
+ var user_type = $('#' + hash).attr('data-type');
+
+ // If the friend client supports chatstates and is online
+ if((user_type == 'groupchat') || ((user_type == 'chat') && $('#' + hash + ' .message-area').attr('data-chatstates') && !exists('#page-switch .' + hash + ' .unavailable'))) {
+ // Already sent?
+ if(getDB('currentchatstate', xid) == state)
+ return;
+
+ // Write the state
+ setDB('currentchatstate', xid, state);
+
+ // New message stanza
+ var aMsg = new JSJaCMessage();
+ aMsg.setTo(xid);
+ aMsg.setType(user_type);
+
+ // Append the chatstate node
+ aMsg.appendNode(state, {'xmlns': NS_CHATSTATES});
+
+ // Send this!
+ con.send(aMsg);
+ }
+}
+
+// Displays a given chatstate in a given chat
+function displayChatState(state, hash, type) {
+ // Groupchat?
+ if(type == 'groupchat') {
+ resetChatState(hash, type);
+
+ // "gone" state not allowed
+ if(state != 'gone')
+ $('#page-engine .page-engine-chan .user.' + hash).addClass(state);
+ }
+
+ // Chat
+ else {
+ // We change the buddy name color in the page-switch
+ resetChatState(hash, type);
+ $('#page-switch .' + hash + ' .name').addClass(state);
+
+ // We generate the chatstate text
+ var text = '';
+
+ switch(state) {
+ // Active
+ case 'active':
+ text = _e("Your friend is paying attention to the conversation.");
+
+ break;
+
+ // Composing
+ case 'composing':
+ text = _e("Your friend is writing a message...");
+
+ break;
+
+ // Paused
+ case 'paused':
+ text = _e("Your friend stopped writing a message.");
+
+ break;
+
+ // Inactive
+ case 'inactive':
+ text = _e("Your friend is doing something else.");
+
+ break;
+
+ // Gone
+ case 'gone':
+ text = _e("Your friend closed the chat.");
+
+ break;
+ }
+
+ // We reset the previous state
+ $('#' + hash + ' .chatstate').remove();
+
+ // We create the chatstate
+ $('#' + hash + ' .content').after('
' + text + '
');
+ }
+}
+
+// Resets the chatstate switcher marker
+function resetChatState(hash, type) {
+ // Define the selector
+ var selector;
+
+ if(type == 'groupchat')
+ selector = $('#page-engine .page-engine-chan .user.' + hash);
+ else
+ selector = $('#page-switch .' + hash + ' .name');
+
+ // Reset!
+ selector.removeClass('active')
+ selector.removeClass('composing')
+ selector.removeClass('paused')
+ selector.removeClass('inactive')
+ selector.removeClass('gone');
+}
+
+// Adds the chatstate events
+function eventsChatState(target, xid, hash) {
+ target.keyup(function(e) {
+ if(e.keyCode != 13) {
+ // Composing a message
+ if($(this).val() && (getDB('chatstate', xid) != 'on')) {
+ // We change the state detect input
+ setDB('chatstate', xid, 'on');
+
+ // We send the friend a "composing" chatstate
+ chatStateSend('composing', xid, hash);
+ }
+
+ // Stopped composing a message
+ else if(!$(this).val() && (getDB('chatstate', xid) == 'on')) {
+ // We change the state detect input
+ setDB('chatstate', xid, 'off');
+
+ // We send the friend an "active" chatstate
+ chatStateSend('active', xid, hash);
+ }
+ }
+ });
+
+ target.change(function() {
+ // Reset the composing database entry
+ setDB('chatstate', xid, 'off');
+ });
+
+ target.focus(function() {
+ // Not needed
+ if(target.is(':disabled'))
+ return;
+
+ // Nothing in the input, user is active
+ if(!$(this).val())
+ chatStateSend('active', xid, hash);
+
+ // Something was written, user started writing again
+ else
+ chatStateSend('composing', xid, hash);
+ });
+
+ target.blur(function() {
+ // Not needed
+ if(target.is(':disabled'))
+ return;
+
+ // Nothing in the input, user is inactive
+ if(!$(this).val())
+ chatStateSend('inactive', xid, hash);
+
+ // Something was written, user paused
+ else
+ chatStateSend('paused', xid, hash);
+ });
+}
diff --git a/jappixmini/jappix/js/common.js b/jappixmini/jappix/js/common.js
new file mode 100644
index 000000000..ab10d6e7a
--- /dev/null
+++ b/jappixmini/jappix/js/common.js
@@ -0,0 +1,311 @@
+/*
+
+Jappix - An open social platform
+These are the common JS script for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Authors: Vanaryon, olivierm
+Last revision: 24/06/11
+
+*/
+
+// Checks if an element exists in the DOM
+function exists(selector) {
+ if(jQuery(selector).size() > 0)
+ return true;
+ else
+ return false;
+}
+
+// Checks if Jappix is connected
+function isConnected() {
+ if((typeof con != 'undefined') && con && con.connected())
+ return true;
+
+ return false;
+}
+
+// Checks if Jappix has focus
+function isFocused() {
+ try {
+ if(document.hasFocus())
+ return true;
+
+ return false;
+ }
+
+ catch(e) {
+ return true;
+ }
+}
+
+// Generates the good XID
+function generateXID(xid, type) {
+ // XID needs to be transformed
+ if(xid && (xid.indexOf('@') == -1)) {
+ // Groupchat
+ if(type == 'groupchat')
+ return xid + '@' + HOST_MUC;
+
+ // One-to-one chat
+ if(xid.indexOf('.') == -1)
+ return xid + '@' + HOST_MAIN;
+
+ // It might be a gateway?
+ return xid;
+ }
+
+ // Nothing special (yet bare XID)
+ return xid;
+}
+
+// Gets the asked translated string
+function _e(string) {
+ return string;
+}
+
+// Replaces '%s' to a given value for a translated string
+function printf(string, value) {
+ return string.replace('%s', value);
+}
+
+// Properly explodes a string with a given character
+function explodeThis(toEx, toStr, i) {
+ // Get the index of our char to explode
+ var index = toStr.indexOf(toEx);
+
+ // We split if necessary the string
+ if(index != -1) {
+ if(i == 0)
+ toStr = toStr.substr(0, index);
+ else
+ toStr = toStr.substr(index + 1);
+ }
+
+ // We return the value
+ return toStr;
+}
+
+// Cuts the resource of a XID
+function cutResource(aXID) {
+ return explodeThis('/', aXID, 0);
+}
+
+// Gets the resource of a XID
+function thisResource(aXID) {
+ // Any resource?
+ if(aXID.indexOf('/') != -1)
+ return explodeThis('/', aXID, 1);
+
+ // No resource
+ return '';
+}
+
+// Does stringprep on a string
+function stringPrep(string) {
+ // Replacement arrays
+ var invalid = new Array('Š', 'š', 'Đ', 'đ', 'Ž', 'ž', 'Č', 'č', 'Ć', 'ć', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ý', 'þ', 'ÿ', 'Ŕ', 'ŕ');
+
+ var valid = new Array('S', 's', 'Dj', 'dj', 'Z', 'z', 'C', 'c', 'C', 'c', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 'B', 'Ss', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'o', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'y', 'b', 'y', 'R', 'r');
+
+ // Compute a new string
+ for(i in invalid)
+ string = string.replace(invalid[i], valid[i]);
+
+ return string;
+}
+
+// Encodes quotes in a string
+function encodeQuotes(str) {
+ return (str + '').replace(/"/g, '"');
+}
+
+// Gets the bare XID from a XID
+function bareXID(xid) {
+ // Cut the resource
+ xid = cutResource(xid);
+
+ // Launch the stringprep
+ xid = stringPrep(xid);
+
+ // Set the XID to lower case
+ xid = xid.toLowerCase();
+
+ return xid;
+}
+
+// Gets the full XID from a XID
+function fullXID(xid) {
+ // Normalizes the XID
+ var full = bareXID(xid);
+ var resource = thisResource(xid);
+
+ // Any resource?
+ if(resource)
+ full += '/' + resource;
+
+ return full;
+}
+
+// Gets the nick from a XID
+function getXIDNick(aXID) {
+ return explodeThis('@', aXID, 0);
+}
+
+// Gets the host from a XID
+function getXIDHost(aXID) {
+ return explodeThis('@', aXID, 1);
+}
+
+// Checks if we are in developer mode
+function isDeveloper() {
+ if(DEVELOPER == 'on')
+ return true;
+
+ return false;
+}
+
+// Checks if anonymous mode is allowed
+function allowedAnonymous() {
+ if(ANONYMOUS == 'on')
+ return true;
+
+ return false;
+}
+
+// Checks if host is locked
+function lockHost() {
+ if(LOCK_HOST == 'on')
+ return true;
+
+ return false;
+}
+
+// Gets the full XID of the user
+function getXID() {
+ // Return the XID of the user
+ if(con.username && con.domain)
+ return con.username + '@' + con.domain;
+
+ return '';
+}
+
+// Generates the colors for a given user XID
+function generateColor(xid) {
+ var colors = new Array(
+ 'ac0000',
+ 'a66200',
+ '007703',
+ '00705f',
+ '00236b',
+ '4e005c'
+ );
+
+ var number = 0;
+
+ for(var i = 0; i < xid.length; i++)
+ number += xid.charCodeAt(i);
+
+ var color = '#' + colors[number % (colors.length)];
+
+ return color;
+}
+
+// Checks if the XID is a gateway
+function isGateway(xid) {
+ if(xid.indexOf('@') != -1)
+ return false;
+
+ return true;
+}
+
+// Gets the from attribute of a stanza (overrides some servers like Prosody missing from attributes)
+function getStanzaFrom(stanza) {
+ var from = stanza.getFrom();
+
+ // No from, we assume this is our XID
+ if(!from)
+ from = getXID();
+
+ return from;
+}
+
+// Logs a given data in the console
+function logThis(data, level) {
+ // Console not available
+ if(!isDeveloper() || (typeof(console) == 'undefined'))
+ return false;
+
+ // Switch the log level
+ switch(level) {
+ // Debug
+ case 0:
+ console.debug(data);
+
+ break;
+
+ // Error
+ case 1:
+ console.error(data);
+
+ break;
+
+ // Warning
+ case 2:
+ console.warn(data);
+
+ break;
+
+ // Information
+ case 3:
+ console.info(data);
+
+ break;
+
+ // Default log level
+ default:
+ console.log(data);
+
+ break;
+ }
+
+ return true;
+}
+
+// Gets the current Jappix app. location
+function getJappixLocation() {
+ var url = window.location.href;
+
+ // If the URL has variables, remove them
+ if(url.indexOf('?') != -1)
+ url = url.split('?')[0];
+ if(url.indexOf('#') != -1)
+ url = url.split('#')[0];
+
+ // No "/" at the end
+ if(!url.match(/(.+)\/$/))
+ url += '/';
+
+ return url;
+}
+
+// Removes spaces at the beginning & the end of a string
+function trim(str) {
+ return str.replace(/^\s+/g,'').replace(/\s+$/g,'');
+}
+
+// Adds a zero to a date when needed
+function padZero(i) {
+ // Negative number (without first 0)
+ if(i > -10 && i < 0)
+ return '-0' + (i * -1);
+
+ // Positive number (without first 0)
+ if(i < 10 && i >= 0)
+ return '0' + i;
+
+ // All is okay
+ return i;
+}
diff --git a/jappixmini/jappix/js/connection.js b/jappixmini/jappix/js/connection.js
new file mode 100644
index 000000000..85a718c5f
--- /dev/null
+++ b/jappixmini/jappix/js/connection.js
@@ -0,0 +1,526 @@
+/*
+
+Jappix - An open social platform
+These are the connection JS script for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 29/08/11
+
+*/
+
+// Does the user login
+var CURRENT_SESSION = false;
+
+function doLogin(lNick, lServer, lPass, lResource, lPriority, lRemember) {
+ try {
+ // We remove the not completed class to avoid problems
+ $('#home .loginer input').removeClass('please-complete');
+
+ // We add the login wait div
+ showGeneralWait();
+
+ // We define the http binding parameters
+ oArgs = new Object();
+
+ if(HOST_BOSH_MAIN)
+ oArgs.httpbase = HOST_BOSH_MAIN;
+ else
+ oArgs.httpbase = HOST_BOSH;
+
+ // We create the new http-binding connection
+ con = new JSJaCHttpBindingConnection(oArgs);
+
+ // And we handle everything that happen
+ setupCon(con);
+
+ // Generate a resource
+ var random_resource = getDB('session', 'resource');
+
+ if(!random_resource)
+ random_resource = lResource + ' (' + (new Date()).getTime() + ')';
+
+ // We retrieve what the user typed in the login inputs
+ oArgs = new Object();
+ oArgs.domain = trim(lServer);
+ oArgs.username = trim(lNick);
+ oArgs.resource = random_resource;
+ oArgs.pass = lPass;
+ oArgs.secure = true;
+ oArgs.xmllang = XML_LANG;
+
+ // Store the resource (for reconnection)
+ setDB('session', 'resource', random_resource);
+
+ // Generate a session XML to be stored
+ session_xml = 'true' + lServer.htmlEnc() + '' + lNick.htmlEnc() + '' + lResource.htmlEnc() + '' + lPass.htmlEnc() + '' + lPriority.htmlEnc() + '';
+
+ // Save the session parameters (for reconnect if network issue)
+ CURRENT_SESSION = session_xml;
+
+ // Remember me?
+ if(lRemember)
+ setDB('remember', 'session', 1);
+
+ // We store the infos of the user into the data-base
+ setDB('priority', 1, lPriority);
+
+ // We connect !
+ con.connect(oArgs);
+
+ // Change the page title
+ pageTitle('wait');
+
+ logThis('Jappix is connecting...', 3);
+ }
+
+ catch(e) {
+ // Logs errors
+ logThis('Error while logging in: ' + e, 1);
+
+ // Reset Jappix
+ destroyTalkPage();
+
+ // Open an unknown error
+ openThisError(2);
+ }
+
+ finally {
+ return false;
+ }
+}
+
+// Handles the user registration
+function handleRegistered() {
+ logThis('A new account has been registered.', 3);
+
+ // We remove the waiting image
+ removeGeneralWait();
+
+ // Reset the title
+ pageTitle('home');
+
+ // We show the success information
+ $('#home .registerer .success').fadeIn('fast');
+
+ // We quit the session
+ logout();
+}
+
+// Does the user registration
+function doRegister(username, domain, pass) {
+ logThis('Trying to register an account...', 3);
+
+ try {
+ // We define the http binding parameters
+ oArgs = new Object();
+
+ if(HOST_BOSH_MAIN)
+ oArgs.httpbase = HOST_BOSH_MAIN;
+ else
+ oArgs.httpbase = HOST_BOSH;
+
+ // We create the new http-binding connection
+ con = new JSJaCHttpBindingConnection(oArgs);
+
+ // We setup the connection !
+ con.registerHandler('onconnect', handleRegistered);
+ con.registerHandler('onerror', handleError);
+
+ // We retrieve what the user typed in the register inputs
+ oArgs = new Object();
+ oArgs.domain = trim(domain);
+ oArgs.username = trim(username);
+ oArgs.resource = JAPPIX_RESOURCE + ' Register (' + (new Date()).getTime() + ')';
+ oArgs.pass = pass;
+ oArgs.register = true;
+ oArgs.secure = true;
+ oArgs.xmllang = XML_LANG;
+
+ con.connect(oArgs);
+
+ // We change the registered information text
+ $('#home .homediv.registerer').append(
+ '
' +
+ _e("You have been registered, here is your XMPP address:") + ' ' + con.username.htmlEnc() + '@' + con.domain.htmlEnc() + ' - ' + _e("Login") + '' +
+ '
'
+ );
+
+ // Login link
+ $('#home .homediv.registerer .success a').click(function() {
+ return doLogin(con.username, con.domain, con.pass, con.resource, '10', false);
+ });
+
+ // Show the waiting image
+ showGeneralWait();
+
+ // Change the page title
+ pageTitle('wait');
+ }
+
+ catch(e) {
+ // Logs errors
+ logThis(e, 1);
+ }
+
+ finally {
+ return false;
+ }
+}
+
+// Does the user anonymous login
+function doAnonymous() {
+ logThis('Trying to login anonymously...', 3);
+
+ var aPath = '#home .anonymouser ';
+ var room = $(aPath + '.room').val();
+ var nick = $(aPath + '.nick').val();
+
+ // If the form is correctly completed
+ if(room && nick) {
+ // We remove the not completed class to avoid problems
+ $('#home .anonymouser input').removeClass('please-complete');
+
+ // Redirect the user to the anonymous room
+ window.location.href = JAPPIX_LOCATION + '?r=' + room + '&n=' + nick;
+ }
+
+ // We check if the form is entirely completed
+ else {
+ $(aPath + 'input[type=text]').each(function() {
+ var select = $(this);
+
+ if(!select.val())
+ $(document).oneTime(10, function() {
+ select.addClass('please-complete').focus();
+ });
+ else
+ select.removeClass('please-complete');
+ });
+ }
+
+ return false;
+}
+
+// Handles the user connected event
+var CONNECTED = false;
+
+function handleConnected() {
+ logThis('Jappix is now connected.', 3);
+
+ // Connection markers
+ CONNECTED = true;
+ RECONNECT_TRY = 0;
+ RECONNECT_TIMER = 0;
+
+ // We hide the home page
+ $('#home').hide();
+
+ // Not resumed?
+ if(!RESUME) {
+ // Remember the session?
+ if(getDB('remember', 'session'))
+ setPersistent('session', 1, CURRENT_SESSION);
+
+ // We show the chatting app.
+ createTalkPage();
+
+ // We reset the homepage
+ switchHome('default');
+
+ // We get all the other things
+ getEverything();
+
+ // Set last activity stamp
+ LAST_ACTIVITY = getTimeStamp();
+ }
+
+ // Resumed
+ else {
+ // Send our presence
+ presenceSend();
+
+ // Change the title
+ updateTitle();
+ }
+
+ // Remove the waiting item
+ removeGeneralWait();
+}
+
+// Handles the user disconnected event
+function handleDisconnected() {
+ logThis('Jappix is now disconnected.', 3);
+
+ // Normal disconnection
+ if(!CURRENT_SESSION && !CONNECTED)
+ destroyTalkPage();
+}
+
+// Setups the normal connection
+function setupCon(con) {
+ // We setup all the necessary handlers for the connection
+ con.registerHandler('message', handleMessage);
+ con.registerHandler('presence', handlePresence);
+ con.registerHandler('iq', handleIQ);
+ con.registerHandler('onconnect', handleConnected);
+ con.registerHandler('onerror', handleError);
+ con.registerHandler('ondisconnect', handleDisconnected);
+}
+
+// Logouts from the server
+function logout() {
+ // We are not connected
+ if(!isConnected())
+ return false;
+
+ // Disconnect from the XMPP server
+ con.disconnect();
+
+ logThis('Jappix is disconnecting...', 3);
+}
+
+// Terminates a session
+function terminate() {
+ if(!isConnected())
+ return;
+
+ // Clear temporary session storage
+ resetConMarkers();
+
+ // Show the waiting item (useful if BOSH is sloooow)
+ showGeneralWait();
+
+ // Change the page title
+ pageTitle('wait');
+
+ // Disconnect from the XMPP server
+ logout();
+}
+
+// Quitss a session
+function quit() {
+ if(!isConnected())
+ return;
+
+ // We show the waiting image
+ showGeneralWait();
+
+ // Change the page title
+ pageTitle('wait');
+
+ // We disconnect from the XMPP server
+ logout();
+}
+
+// Creates the reconnect pane
+var RECONNECT_TRY = 0;
+var RECONNECT_TIMER = 0;
+
+function createReconnect(mode) {
+ logThis('This is not a normal disconnection, show the reconnect pane...', 1);
+
+ // Reconnect pane not yet displayed?
+ if(!exists('#reconnect')) {
+ // Blur the focused input/textarea/select
+ $('input, select, textarea').blur();
+
+ // Create the HTML code
+ var html = '
' +
+ '
' +
+ _e("Due to a network issue, you were disconnected. What do you want to do now?");
+
+ // Can we cancel reconnection?
+ if(mode == 'normal')
+ html += '' + _e("Cancel") + '';
+
+ html += '' + _e("Reconnect") + '' +
+ '
'
+ );
+ });
+ }
+
+ return false;
+ }
+
+ // Dataform?
+ selector.find('field').each(function() {
+ // We parse the received xml
+ var type = $(this).attr('type');
+ var label = $(this).attr('label');
+ var field = $(this).attr('var');
+ var value = $(this).find('value:first').text();
+ var required = '';
+
+ // No value?
+ if(!field)
+ return;
+
+ // Required input?
+ if($(this).find('required').size())
+ required = ' required=""';
+
+ // Compatibility fix
+ if(!label)
+ label = field;
+
+ if(!type)
+ type = '';
+
+ // Generate some values
+ var input;
+ var hideThis = '';
+
+ // Fixed field
+ if(type == 'fixed')
+ $(pathID).append('
' + value.htmlEnc() + '
');
+
+ else {
+ // Hidden field
+ if(type == 'hidden') {
+ hideThis = ' style="display: none;"';
+ input = '';
+ }
+
+ // Boolean field
+ else if(type == 'boolean') {
+ var checked;
+
+ if(value == '1')
+ checked = 'checked';
+ else
+ checked = '';
+
+ input = '';
+ }
+
+ // List-single/list-multi field
+ else if((type == 'list-single') || (type == 'list-multi')) {
+ var multiple = '';
+
+ // Multiple options?
+ if(type == 'list-multi')
+ multiple = ' multiple=""';
+
+ // Append the select field
+ input = '';
+ }
+
+ // Text-multi field
+ else if(type == 'text-multi')
+ input = '';
+
+ // JID-multi field
+ else if(type == 'jid-multi') {
+ // Put the XID into an array
+ var xid_arr = [];
+
+ $(this).find('value').each(function() {
+ var cValue = $(this).text();
+
+ if(!existArrayValue(xid_arr, cValue))
+ xid_arr.push(cValue);
+ });
+
+ // Sort the array
+ xid_arr.sort();
+
+ // Create the input
+ var xid_value = '';
+
+ if(xid_arr.length) {
+ for(i in xid_arr) {
+ // Any pre-value
+ if(xid_value)
+ xid_value += ', ';
+
+ // Add the current XID
+ xid_value += xid_arr[i];
+ }
+ }
+
+ input = '';
+ }
+
+ // Other stuffs that are similar
+ else {
+ // Text-single field
+ var iType = 'text';
+
+ // Text-private field
+ if(type == 'text-private')
+ iType = 'password';
+
+ // JID-single field
+ else if(type == 'jid-single')
+ iType = 'email';
+
+ input = '';
+ }
+
+ // Append the HTML markup for this field
+ $(pathID).append(
+ '
' +
+ '' +
+ input +
+ '
'
+ );
+ }
+ });
+
+ return false;
+}
+
+// Gets the dataform type
+function getDataFormType(host, node, id) {
+ var iq = new JSJaCIQ();
+ iq.setID(id + '-' + genID());
+ iq.setTo(host);
+ iq.setType('get');
+
+ var iqQuery = iq.setQuery(NS_DISCO_INFO);
+
+ if(node)
+ iqQuery.setAttribute('node', node);
+
+ con.send(iq, handleThisBrowse);
+}
+
+// Handles the browse stanza
+function handleThisBrowse(iq) {
+ /* REF: http://xmpp.org/registrar/disco-categories.html */
+
+ var id = iq.getID();
+ var splitted = id.split('-');
+ var target = splitted[0];
+ var sessionID = target + '-' + splitted[1];
+ var from = fullXID(getStanzaFrom(iq));
+ var hash = hex_md5(from);
+ var handleXML = iq.getQuery();
+ var pathID = '#' + target + ' .results[data-session=' + sessionID + ']';
+
+ // We first remove the waiting element
+ $(pathID + ' .disco-wait .' + hash).remove();
+
+ if($(handleXML).find('identity').attr('type')) {
+ var category = $(handleXML).find('identity').attr('category');
+ var type = $(handleXML).find('identity').attr('type');
+ var named = $(handleXML).find('identity').attr('name');
+
+ if(named)
+ gName = named;
+ else
+ gName = '';
+
+ var one, two, three, four, five;
+
+ // Get the features that this entity supports
+ var findFeature = $(handleXML).find('feature');
+
+ for(i in findFeature) {
+ var current = findFeature.eq(i).attr('var');
+
+ switch(current) {
+ case NS_SEARCH:
+ one = 1;
+ break;
+
+ case NS_MUC:
+ two = 1;
+ break;
+
+ case NS_REGISTER:
+ three = 1;
+ break;
+
+ case NS_COMMANDS:
+ four = 1;
+ break;
+
+ case NS_DISCO_ITEMS:
+ five = 1;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ var buttons = Array(one, two, three, four, five);
+
+ // We define the toolbox links depending on the supported features
+ var tools = '';
+ var aTools = Array('search', 'join', 'subscribe', 'command', 'browse');
+ var bTools = Array(_e("Search"), _e("Join"), _e("Subscribe"), _e("Command"), _e("Browse"));
+
+ for(i in buttons) {
+ if(buttons[i])
+ tools += '';
+ }
+
+ // As defined in the ref, we detect the type of each category to put an icon
+ switch(category) {
+ case 'account':
+ case 'auth':
+ case 'automation':
+ case 'client':
+ case 'collaboration':
+ case 'component':
+ case 'conference':
+ case 'directory':
+ case 'gateway':
+ case 'headline':
+ case 'hierarchy':
+ case 'proxy':
+ case 'pubsub':
+ case 'server':
+ case 'store':
+ break;
+
+ default:
+ category = 'others';
+ }
+
+ // We display the item we found
+ $(pathID + ' .disco-' + category + ' .disco-category-title').after(
+ '
',
+ ''
+ ]
+ },
+ defaults = {
+ flat: false,
+ starts: 1,
+ prev: '◀',
+ next: '▶',
+ lastSel: false,
+ mode: 'single',
+ view: 'days',
+ calendars: 1,
+ format: 'Y-m-d',
+ position: 'bottom',
+ eventName: 'click',
+ onRender: function(){return {};},
+ onChange: function(){return true;},
+ onShow: function(){return true;},
+ onBeforeShow: function(){return true;},
+ onHide: function(){return true;},
+ locale: {
+ days: [_e("Sunday"), _e("Monday"), _e("Tuesday"), _e("Wednesday"), _e("Thursday"), _e("Friday"), _e("Saturday"), _e("Sunday")],
+ daysShort: [cut(_e("Sunday"), 3), cut(_e("Monday"), 3), cut(_e("Tuesday"), 3), cut(_e("Wednesday"), 3), cut(_e("Thursday"), 3), cut(_e("Friday"), 3), cut(_e("Saturday"), 3), cut(_e("Sunday"), 3)],
+ daysMin: [cut(_e("Sunday"), 2), cut(_e("Monday"), 2), cut(_e("Tuesday"), 2), cut(_e("Wednesday"), 2), cut(_e("Thursday"), 2), cut(_e("Friday"), 2), cut(_e("Saturday"), 2), cut(_e("Sunday"), 2)],
+ months: [_e("January"), _e("February"), _e("March"), _e("April"), _e("May"), _e("June"), _e("July"), _e("August"), _e("September"), _e("October"), _e("November"), _e("December")],
+ monthsShort: [cut(_e("January"), 3), cut(_e("February"), 3), cut(_e("March"), 3), cut(_e("April"), 3), cut(_e("May"), 3), cut(_e("June"), 3), cut(_e("July"), 3), cut(_e("August"), 3), cut(_e("September"), 3), cut(_e("October"), 3), cut(_e("November"), 3), cut(_e("December"), 3)],
+ weekMin: ''
+ }
+ },
+ fill = function(el) {
+ var options = $(el).data('datepicker');
+ var cal = $(el);
+ var currentCal = Math.floor(options.calendars/2), date, data, dow, month, cnt = 0, week, days, indic, indic2, html, tblCal;
+ cal.find('td>table tbody').remove();
+ for (var i = 0; i < options.calendars; i++) {
+ date = new Date(options.current);
+ date.addMonths(-currentCal + i);
+ tblCal = cal.find('table').eq(i+1);
+ switch (tblCal[0].className) {
+ case 'datepickerViewDays':
+ dow = formatDate(date, 'B, Y');
+ break;
+ case 'datepickerViewMonths':
+ dow = date.getFullYear();
+ break;
+ case 'datepickerViewYears':
+ dow = (date.getFullYear()-6) + ' - ' + (date.getFullYear()+5);
+ break;
+ }
+ tblCal.find('thead tr:first th:eq(1) span').text(dow);
+ dow = date.getFullYear()-6;
+ data = {
+ data: [],
+ className: 'datepickerYears'
+ }
+ for ( var j = 0; j < 12; j++) {
+ data.data.push(dow + j);
+ }
+ html = tmpl(tpl.months.join(''), data);
+ date.setDate(1);
+ data = {weeks:[], test: 10};
+ month = date.getMonth();
+ var dow = (date.getDay() - options.starts) % 7;
+ date.addDays(-(dow + (dow < 0 ? 7 : 0)));
+ week = -1;
+ cnt = 0;
+ while (cnt < 42) {
+ indic = parseInt(cnt/7,10);
+ indic2 = cnt%7;
+ if (!data.weeks[indic]) {
+ week = date.getWeekNumber();
+ data.weeks[indic] = {
+ week: week,
+ days: []
+ };
+ }
+ data.weeks[indic].days[indic2] = {
+ text: date.getDate(),
+ classname: []
+ };
+ if (month != date.getMonth()) {
+ data.weeks[indic].days[indic2].classname.push('datepickerNotInMonth');
+ }
+ if (date.getDay() == 0) {
+ data.weeks[indic].days[indic2].classname.push('datepickerSunday');
+ }
+ if (date.getDay() == 6) {
+ data.weeks[indic].days[indic2].classname.push('datepickerSaturday');
+ }
+ var fromUser = options.onRender(date);
+ var val = date.valueOf();
+ if (fromUser.selected || options.date == val || $.inArray(val, options.date) > -1 || (options.mode == 'range' && val >= options.date[0] && val <= options.date[1])) {
+ data.weeks[indic].days[indic2].classname.push('datepickerSelected');
+ }
+ if (fromUser.disabled) {
+ data.weeks[indic].days[indic2].classname.push('datepickerDisabled');
+ }
+ if (fromUser.className) {
+ data.weeks[indic].days[indic2].classname.push(fromUser.className);
+ }
+ data.weeks[indic].days[indic2].classname = data.weeks[indic].days[indic2].classname.join(' ');
+ cnt++;
+ date.addDays(1);
+ }
+ html = tmpl(tpl.days.join(''), data) + html;
+ data = {
+ data: options.locale.monthsShort,
+ className: 'datepickerMonths'
+ };
+ html = tmpl(tpl.months.join(''), data) + html;
+ tblCal.append(html);
+ }
+ },
+ parseDate = function (date, format) {
+ if (date.constructor == Date) {
+ return new Date(date);
+ }
+ var parts = date.split(/\W+/);
+ var against = format.split(/\W+/), d, m, y, h, min, now = new Date();
+ for (var i = 0; i < parts.length; i++) {
+ switch (against[i]) {
+ case 'd':
+ case 'e':
+ d = parseInt(parts[i],10);
+ break;
+ case 'm':
+ m = parseInt(parts[i], 10)-1;
+ break;
+ case 'Y':
+ case 'y':
+ y = parseInt(parts[i], 10);
+ y += y > 100 ? 0 : (y < 29 ? 2000 : 1900);
+ break;
+ case 'H':
+ case 'I':
+ case 'k':
+ case 'l':
+ h = parseInt(parts[i], 10);
+ break;
+ case 'P':
+ case 'p':
+ if (/pm/i.test(parts[i]) && h < 12) {
+ h += 12;
+ } else if (/am/i.test(parts[i]) && h >= 12) {
+ h -= 12;
+ }
+ break;
+ case 'M':
+ min = parseInt(parts[i], 10);
+ break;
+ }
+ }
+ return new Date(
+ y === undefined ? now.getFullYear() : y,
+ m === undefined ? now.getMonth() : m,
+ d === undefined ? now.getDate() : d,
+ h === undefined ? now.getHours() : h,
+ min === undefined ? now.getMinutes() : min,
+ 0
+ );
+ },
+ formatDate = function(date, format) {
+ var m = date.getMonth();
+ var d = date.getDate();
+ var y = date.getFullYear();
+ var wn = date.getWeekNumber();
+ var w = date.getDay();
+ var s = {};
+ var hr = date.getHours();
+ var pm = (hr >= 12);
+ var ir = (pm) ? (hr - 12) : hr;
+ var dy = date.getDayOfYear();
+ if (ir == 0) {
+ ir = 12;
+ }
+ var min = date.getMinutes();
+ var sec = date.getSeconds();
+ var parts = format.split(''), part;
+ for ( var i = 0; i < parts.length; i++ ) {
+ part = parts[i];
+ switch (parts[i]) {
+ case 'a':
+ part = date.getDayName();
+ break;
+ case 'A':
+ part = date.getDayName(true);
+ break;
+ case 'b':
+ part = date.getMonthName();
+ break;
+ case 'B':
+ part = date.getMonthName(true);
+ break;
+ case 'C':
+ part = 1 + Math.floor(y / 100);
+ break;
+ case 'd':
+ part = (d < 10) ? ("0" + d) : d;
+ break;
+ case 'e':
+ part = d;
+ break;
+ case 'H':
+ part = (hr < 10) ? ("0" + hr) : hr;
+ break;
+ case 'I':
+ part = (ir < 10) ? ("0" + ir) : ir;
+ break;
+ case 'j':
+ part = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy;
+ break;
+ case 'k':
+ part = hr;
+ break;
+ case 'l':
+ part = ir;
+ break;
+ case 'm':
+ part = (m < 9) ? ("0" + (1+m)) : (1+m);
+ break;
+ case 'M':
+ part = (min < 10) ? ("0" + min) : min;
+ break;
+ case 'p':
+ case 'P':
+ part = pm ? "PM" : "AM";
+ break;
+ case 's':
+ part = Math.floor(date.getTime() / 1000);
+ break;
+ case 'S':
+ part = (sec < 10) ? ("0" + sec) : sec;
+ break;
+ case 'u':
+ part = w + 1;
+ break;
+ case 'w':
+ part = w;
+ break;
+ case 'y':
+ part = ('' + y).substr(2, 2);
+ break;
+ case 'Y':
+ part = y;
+ break;
+ }
+ parts[i] = part;
+ }
+ return parts.join('');
+ },
+ extendDate = function(options) {
+ if (Date.prototype.tempDate) {
+ return;
+ }
+ Date.prototype.tempDate = null;
+ Date.prototype.months = options.months;
+ Date.prototype.monthsShort = options.monthsShort;
+ Date.prototype.days = options.days;
+ Date.prototype.daysShort = options.daysShort;
+ Date.prototype.getMonthName = function(fullName) {
+ return this[fullName ? 'months' : 'monthsShort'][this.getMonth()];
+ };
+ Date.prototype.getDayName = function(fullName) {
+ return this[fullName ? 'days' : 'daysShort'][this.getDay()];
+ };
+ Date.prototype.addDays = function (n) {
+ this.setDate(this.getDate() + n);
+ this.tempDate = this.getDate();
+ };
+ Date.prototype.addMonths = function (n) {
+ if (this.tempDate == null) {
+ this.tempDate = this.getDate();
+ }
+ this.setDate(1);
+ this.setMonth(this.getMonth() + n);
+ this.setDate(Math.min(this.tempDate, this.getMaxDays()));
+ };
+ Date.prototype.addYears = function (n) {
+ if (this.tempDate == null) {
+ this.tempDate = this.getDate();
+ }
+ this.setDate(1);
+ this.setFullYear(this.getFullYear() + n);
+ this.setDate(Math.min(this.tempDate, this.getMaxDays()));
+ };
+ Date.prototype.getMaxDays = function() {
+ var tmpDate = new Date(Date.parse(this)),
+ d = 28, m;
+ m = tmpDate.getMonth();
+ d = 28;
+ while (tmpDate.getMonth() == m) {
+ d ++;
+ tmpDate.setDate(d);
+ }
+ return d - 1;
+ };
+ Date.prototype.getFirstDay = function() {
+ var tmpDate = new Date(Date.parse(this));
+ tmpDate.setDate(1);
+ return tmpDate.getDay();
+ };
+ Date.prototype.getWeekNumber = function() {
+ var tempDate = new Date(this);
+ tempDate.setDate(tempDate.getDate() - (tempDate.getDay() + 6) % 7 + 3);
+ var dms = tempDate.valueOf();
+ tempDate.setMonth(0);
+ tempDate.setDate(4);
+ return Math.round((dms - tempDate.valueOf()) / (604800000)) + 1;
+ };
+ Date.prototype.getDayOfYear = function() {
+ var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+ var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
+ var time = now - then;
+ return Math.floor(time / 24*60*60*1000);
+ };
+ },
+ layout = function (el) {
+ var options = $(el).data('datepicker');
+ var cal = $('#' + options.id);
+ if (!options.extraHeight) {
+ var divs = $(el).find('div');
+ options.extraHeight = divs.get(0).offsetHeight + divs.get(1).offsetHeight;
+ options.extraWidth = divs.get(2).offsetWidth + divs.get(3).offsetWidth;
+ }
+ var tbl = cal.find('table:first').get(0);
+ var width = tbl.offsetWidth;
+ var height = tbl.offsetHeight;
+ cal.css({
+ width: width + options.extraWidth + 'px',
+ height: height + options.extraHeight + 'px'
+ }).find('div.datepickerContainer').css({
+ width: width + 'px',
+ height: height + 'px'
+ });
+ },
+ click = function(ev) {
+ if ($(ev.target).is('span')) {
+ ev.target = ev.target.parentNode;
+ }
+ var el = $(ev.target);
+ if (el.is('a')) {
+ ev.target.blur();
+ if (el.hasClass('datepickerDisabled')) {
+ return false;
+ }
+ var options = $(this).data('datepicker');
+ var parentEl = el.parent();
+ var tblEl = parentEl.parent().parent().parent();
+ var tblIndex = $('table', this).index(tblEl.get(0)) - 1;
+ var tmp = new Date(options.current);
+ var changed = false;
+ var fillIt = false;
+ if (parentEl.is('th')) {
+ if (parentEl.hasClass('datepickerWeek') && options.mode == 'range' && !parentEl.next().hasClass('datepickerDisabled')) {
+ var val = parseInt(parentEl.next().text(), 10);
+ tmp.addMonths(tblIndex - Math.floor(options.calendars/2));
+ if (parentEl.next().hasClass('datepickerNotInMonth')) {
+ tmp.addMonths(val > 15 ? -1 : 1);
+ }
+ tmp.setDate(val);
+ options.date[0] = (tmp.setHours(0,0,0,0)).valueOf();
+ tmp.setHours(23,59,59,0);
+ tmp.addDays(6);
+ options.date[1] = tmp.valueOf();
+ fillIt = true;
+ changed = true;
+ options.lastSel = false;
+ } else if (parentEl.hasClass('datepickerMonth')) {
+ tmp.addMonths(tblIndex - Math.floor(options.calendars/2));
+ switch (tblEl.get(0).className) {
+ case 'datepickerViewDays':
+ tblEl.get(0).className = 'datepickerViewMonths';
+ el.find('span').text(tmp.getFullYear());
+ break;
+ case 'datepickerViewMonths':
+ tblEl.get(0).className = 'datepickerViewYears';
+ el.find('span').text((tmp.getFullYear()-6) + ' - ' + (tmp.getFullYear()+5));
+ break;
+ case 'datepickerViewYears':
+ tblEl.get(0).className = 'datepickerViewDays';
+ el.find('span').text(formatDate(tmp, 'B, Y'));
+ break;
+ }
+ } else if (parentEl.parent().parent().is('thead')) {
+ switch (tblEl.get(0).className) {
+ case 'datepickerViewDays':
+ options.current.addMonths(parentEl.hasClass('datepickerGoPrev') ? -1 : 1);
+ break;
+ case 'datepickerViewMonths':
+ options.current.addYears(parentEl.hasClass('datepickerGoPrev') ? -1 : 1);
+ break;
+ case 'datepickerViewYears':
+ options.current.addYears(parentEl.hasClass('datepickerGoPrev') ? -12 : 12);
+ break;
+ }
+ fillIt = true;
+ }
+ } else if (parentEl.is('td') && !parentEl.hasClass('datepickerDisabled')) {
+ switch (tblEl.get(0).className) {
+ case 'datepickerViewMonths':
+ options.current.setMonth(tblEl.find('tbody.datepickerMonths td').index(parentEl));
+ options.current.setFullYear(parseInt(tblEl.find('thead th.datepickerMonth span').text(), 10));
+ options.current.addMonths(Math.floor(options.calendars/2) - tblIndex);
+ tblEl.get(0).className = 'datepickerViewDays';
+ break;
+ case 'datepickerViewYears':
+ options.current.setFullYear(parseInt(el.text(), 10));
+ tblEl.get(0).className = 'datepickerViewMonths';
+ break;
+ default:
+ var val = parseInt(el.text(), 10);
+ tmp.addMonths(tblIndex - Math.floor(options.calendars/2));
+ if (parentEl.hasClass('datepickerNotInMonth')) {
+ tmp.addMonths(val > 15 ? -1 : 1);
+ }
+ tmp.setDate(val);
+ switch (options.mode) {
+ case 'multiple':
+ val = (tmp.setHours(0,0,0,0)).valueOf();
+ if ($.inArray(val, options.date) > -1) {
+ $.each(options.date, function(nr, dat){
+ if (dat == val) {
+ options.date.splice(nr,1);
+ return false;
+ }
+ });
+ } else {
+ options.date.push(val);
+ }
+ break;
+ case 'range':
+ if (!options.lastSel) {
+ options.date[0] = (tmp.setHours(0,0,0,0)).valueOf();
+ }
+ val = (tmp.setHours(23,59,59,0)).valueOf();
+ if (val < options.date[0]) {
+ options.date[1] = options.date[0] + 86399000;
+ options.date[0] = val - 86399000;
+ } else {
+ options.date[1] = val;
+ }
+ options.lastSel = !options.lastSel;
+ break;
+ default:
+ options.date = tmp.valueOf();
+ break;
+ }
+ break;
+ }
+ fillIt = true;
+ changed = true;
+ }
+ if (fillIt) {
+ fill(this);
+ }
+ if (changed) {
+ options.onChange.apply(this, prepareDate(options));
+ }
+ }
+ return false;
+ },
+ prepareDate = function (options) {
+ var tmp;
+ if (options.mode == 'single') {
+ tmp = new Date(options.date);
+ return [formatDate(tmp, options.format), tmp, options.el];
+ } else {
+ tmp = [[],[], options.el];
+ $.each(options.date, function(nr, val){
+ var date = new Date(val);
+ tmp[0].push(formatDate(date, options.format));
+ tmp[1].push(date);
+ });
+ return tmp;
+ }
+ },
+ getViewport = function () {
+ var m = document.compatMode == 'CSS1Compat';
+ return {
+ l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
+ t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
+ w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
+ h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
+ };
+ },
+ isChildOf = function(parentEl, el, container) {
+ if (parentEl == el) {
+ return true;
+ }
+ if (parentEl.contains) {
+ return parentEl.contains(el);
+ }
+ if ( parentEl.compareDocumentPosition ) {
+ return !!(parentEl.compareDocumentPosition(el) & 16);
+ }
+ var prEl = el.parentNode;
+ while(prEl && prEl != container) {
+ if (prEl == parentEl)
+ return true;
+ prEl = prEl.parentNode;
+ }
+ return false;
+ },
+ show = function (ev) {
+ var cal = $('#' + $(this).data('datepickerId'));
+ if (!cal.is(':visible')) {
+ var calEl = cal.get(0);
+ fill(calEl);
+ var options = cal.data('datepicker');
+ options.onBeforeShow.apply(this, [cal.get(0)]);
+ var pos = $(this).offset();
+ var viewPort = getViewport();
+ var top = pos.top;
+ var left = pos.left;
+ var oldDisplay = $.curCSS(calEl, 'display');
+ cal.css({
+ visibility: 'hidden',
+ display: 'block'
+ });
+ layout(calEl);
+ switch (options.position){
+ case 'top':
+ top -= calEl.offsetHeight;
+ break;
+ case 'left':
+ left -= calEl.offsetWidth;
+ break;
+ case 'right':
+ left += this.offsetWidth;
+ break;
+ case 'bottom':
+ top += this.offsetHeight;
+ break;
+ }
+ if (top + calEl.offsetHeight > viewPort.t + viewPort.h) {
+ top = pos.top - calEl.offsetHeight;
+ }
+ if (top < viewPort.t) {
+ top = pos.top + this.offsetHeight + calEl.offsetHeight;
+ }
+ if (left + calEl.offsetWidth > viewPort.l + viewPort.w) {
+ left = pos.left - calEl.offsetWidth;
+ }
+ if (left < viewPort.l) {
+ left = pos.left + this.offsetWidth
+ }
+ cal.css({
+ visibility: 'visible',
+ display: 'block',
+ top: top + 'px',
+ left: left + 'px'
+ });
+ if (options.onShow.apply(this, [cal.get(0)]) != false) {
+ cal.show();
+ }
+ $(document).bind('mousedown', {cal: cal, trigger: this}, hide);
+ }
+ return false;
+ },
+ hide = function (ev) {
+ if (ev.target != ev.data.trigger && !isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
+ if (ev.data.cal.data('datepicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
+ ev.data.cal.hide();
+ }
+ $(document).unbind('mousedown', hide);
+ }
+ };
+ return {
+ init: function(options){
+ options = $.extend({}, defaults, options||{});
+ extendDate(options.locale);
+ options.calendars = Math.max(1, parseInt(options.calendars,10)||1);
+ options.mode = /single|multiple|range/.test(options.mode) ? options.mode : 'single';
+ return this.each(function(){
+ if (!$(this).data('datepicker')) {
+ options.el = this;
+ if (options.date.constructor == String) {
+ options.date = parseDate(options.date, options.format);
+ options.date.setHours(0,0,0,0);
+ }
+ if (options.mode != 'single') {
+ if (options.date.constructor != Array) {
+ options.date = [options.date.valueOf()];
+ if (options.mode == 'range') {
+ options.date.push(((new Date(options.date[0])).setHours(23,59,59,0)).valueOf());
+ }
+ } else {
+ for (var i = 0; i < options.date.length; i++) {
+ options.date[i] = (parseDate(options.date[i], options.format).setHours(0,0,0,0)).valueOf();
+ }
+ if (options.mode == 'range') {
+ options.date[1] = ((new Date(options.date[1])).setHours(23,59,59,0)).valueOf();
+ }
+ }
+ } else {
+ options.date = options.date.valueOf();
+ }
+ if (!options.current) {
+ options.current = new Date();
+ } else {
+ options.current = parseDate(options.current, options.format);
+ }
+ options.current.setDate(1);
+ options.current.setHours(0,0,0,0);
+ var id = 'datepicker_' + parseInt(Math.random() * 1000), cnt;
+ options.id = id;
+ $(this).data('datepickerId', options.id);
+ var cal = $(tpl.wrapper).attr('id', id).bind('click', click).data('datepicker', options);
+ if (options.className) {
+ cal.addClass(options.className);
+ }
+ var html = '';
+ for (var i = 0; i < options.calendars; i++) {
+ cnt = options.starts;
+ if (i > 0) {
+ html += tpl.space;
+ }
+ html += tmpl(tpl.head.join(''), {
+ week: options.locale.weekMin,
+ prev: options.prev,
+ next: options.next,
+ day1: options.locale.daysMin[(cnt++)%7],
+ day2: options.locale.daysMin[(cnt++)%7],
+ day3: options.locale.daysMin[(cnt++)%7],
+ day4: options.locale.daysMin[(cnt++)%7],
+ day5: options.locale.daysMin[(cnt++)%7],
+ day6: options.locale.daysMin[(cnt++)%7],
+ day7: options.locale.daysMin[(cnt++)%7]
+ });
+ }
+ cal
+ .find('tr:first').append(html)
+ .find('table').addClass(views[options.view]);
+ fill(cal.get(0));
+ if (options.flat) {
+ cal.appendTo(this).show().css('position', 'relative');
+ layout(cal.get(0));
+ } else {
+ cal.appendTo(document.body);
+ $(this).bind(options.eventName, show);
+ }
+ }
+ });
+ },
+ showPicker: function() {
+ return this.each( function () {
+ if ($(this).data('datepickerId')) {
+ show.apply(this);
+ }
+ });
+ },
+ hidePicker: function() {
+ return this.each( function () {
+ if ($(this).data('datepickerId')) {
+ $('#' + $(this).data('datepickerId')).hide();
+ }
+ });
+ },
+ setDate: function(date, shiftTo){
+ return this.each(function(){
+ if ($(this).data('datepickerId')) {
+ var cal = $('#' + $(this).data('datepickerId'));
+ var options = cal.data('datepicker');
+ options.date = date;
+ if (options.date.constructor == String) {
+ options.date = parseDate(options.date, options.format);
+ options.date.setHours(0,0,0,0);
+ }
+ if (options.mode != 'single') {
+ if (options.date.constructor != Array) {
+ options.date = [options.date.valueOf()];
+ if (options.mode == 'range') {
+ options.date.push(((new Date(options.date[0])).setHours(23,59,59,0)).valueOf());
+ }
+ } else {
+ for (var i = 0; i < options.date.length; i++) {
+ options.date[i] = (parseDate(options.date[i], options.format).setHours(0,0,0,0)).valueOf();
+ }
+ if (options.mode == 'range') {
+ options.date[1] = ((new Date(options.date[1])).setHours(23,59,59,0)).valueOf();
+ }
+ }
+ } else {
+ options.date = options.date.valueOf();
+ }
+ if (shiftTo) {
+ options.current = new Date (options.mode != 'single' ? options.date[0] : options.date);
+ }
+ fill(cal.get(0));
+ }
+ });
+ },
+ getDate: function(formated) {
+ if (this.size() > 0) {
+ return prepareDate($('#' + $(this).data('datepickerId')).data('datepicker'))[formated ? 0 : 1];
+ }
+ },
+ clear: function(){
+ return this.each(function(){
+ if ($(this).data('datepickerId')) {
+ var cal = $('#' + $(this).data('datepickerId'));
+ var options = cal.data('datepicker');
+ if (options.mode != 'single') {
+ options.date = [];
+ fill(cal.get(0));
+ }
+ }
+ });
+ },
+ fixLayout: function(){
+ return this.each(function(){
+ if ($(this).data('datepickerId')) {
+ var cal = $('#' + $(this).data('datepickerId'));
+ var options = cal.data('datepicker');
+ if (options.flat) {
+ layout(cal.get(0));
+ }
+ }
+ });
+ }
+ };
+ }();
+ $.fn.extend({
+ DatePicker: DatePicker.init,
+ DatePickerHide: DatePicker.hidePicker,
+ DatePickerShow: DatePicker.showPicker,
+ DatePickerSetDate: DatePicker.setDate,
+ DatePickerGetDate: DatePicker.getDate,
+ DatePickerClear: DatePicker.clear,
+ DatePickerLayout: DatePicker.fixLayout
+ });
+})(jQuery);
+
+(function(){
+ var cache = {};
+
+ this.tmpl = function tmpl(str, data){
+ // Figure out if we're getting a template, or if we need to
+ // load the template - and be sure to cache the result.
+ var fn = !/\W/.test(str) ?
+ cache[str] = cache[str] ||
+ tmpl(document.getElementById(str).innerHTML) :
+
+ // Generate a reusable function that will serve as a template
+ // generator (and which will be cached).
+ new Function("obj",
+ "var p=[],print=function(){p.push.apply(p,arguments);};" +
+
+ // Introduce the data as local variables using with(){}
+ "with(obj){p.push('" +
+
+ // Convert the template into pure JavaScript
+ str
+ .replace(/[\r\t\n]/g, " ")
+ .split("<%").join("\t")
+ .replace(/((^|%>)[^\t]*)'/g, "$1\r")
+ .replace(/\t=(.*?)%>/g, "',$1,'")
+ .split("\t").join("');")
+ .split("%>").join("p.push('")
+ .split("\r").join("\\'")
+ + "');}return p.join('');");
+
+ // Provide some basic currying to the user
+ return data ? fn( data ) : fn;
+ };
+})();
diff --git a/jappixmini/jappix/js/jquery.form.js b/jappixmini/jappix/js/jquery.form.js
new file mode 100644
index 000000000..2b853df42
--- /dev/null
+++ b/jappixmini/jappix/js/jquery.form.js
@@ -0,0 +1,785 @@
+/*!
+ * jQuery Form Plugin
+ * version: 2.49 (18-OCT-2010)
+ * @requires jQuery v1.3.2 or later
+ *
+ * Examples and documentation at: http://malsup.com/jquery/form/
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+;(function($) {
+
+/*
+ Usage Note:
+ -----------
+ Do not use both ajaxSubmit and ajaxForm on the same form. These
+ functions are intended to be exclusive. Use ajaxSubmit if you want
+ to bind your own submit handler to the form. For example,
+
+ $(document).ready(function() {
+ $('#myForm').bind('submit', function(e) {
+ e.preventDefault(); // <-- important
+ $(this).ajaxSubmit({
+ target: '#output'
+ });
+ });
+ });
+
+ Use ajaxForm when you want the plugin to manage all the event binding
+ for you. For example,
+
+ $(document).ready(function() {
+ $('#myForm').ajaxForm({
+ target: '#output'
+ });
+ });
+
+ When using ajaxForm, the ajaxSubmit function will be invoked for you
+ at the appropriate time.
+*/
+
+/**
+ * ajaxSubmit() provides a mechanism for immediately submitting
+ * an HTML form using AJAX.
+ */
+$.fn.ajaxSubmit = function(options) {
+ // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
+ if (!this.length) {
+ log('ajaxSubmit: skipping submit process - no element selected');
+ return this;
+ }
+
+ if (typeof options == 'function') {
+ options = { success: options };
+ }
+
+ var url = $.trim(this.attr('action'));
+ if (url) {
+ // clean url (don't include hash vaue)
+ url = (url.match(/^([^#]+)/)||[])[1];
+ }
+ url = url || window.location.href || '';
+
+ options = $.extend(true, {
+ url: url,
+ type: this.attr('method') || 'GET',
+ iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
+ }, options);
+
+ // hook for manipulating the form data before it is extracted;
+ // convenient for use with rich editors like tinyMCE or FCKEditor
+ var veto = {};
+ this.trigger('form-pre-serialize', [this, options, veto]);
+ if (veto.veto) {
+ log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
+ return this;
+ }
+
+ // provide opportunity to alter form data before it is serialized
+ if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
+ log('ajaxSubmit: submit aborted via beforeSerialize callback');
+ return this;
+ }
+
+ var n,v,a = this.formToArray(options.semantic);
+ if (options.data) {
+ options.extraData = options.data;
+ for (n in options.data) {
+ if(options.data[n] instanceof Array) {
+ for (var k in options.data[n]) {
+ a.push( { name: n, value: options.data[n][k] } );
+ }
+ }
+ else {
+ v = options.data[n];
+ v = $.isFunction(v) ? v() : v; // if value is fn, invoke it
+ a.push( { name: n, value: v } );
+ }
+ }
+ }
+
+ // give pre-submit callback an opportunity to abort the submit
+ if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
+ log('ajaxSubmit: submit aborted via beforeSubmit callback');
+ return this;
+ }
+
+ // fire vetoable 'validate' event
+ this.trigger('form-submit-validate', [a, this, options, veto]);
+ if (veto.veto) {
+ log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
+ return this;
+ }
+
+ var q = $.param(a);
+
+ if (options.type.toUpperCase() == 'GET') {
+ options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
+ options.data = null; // data is null for 'get'
+ }
+ else {
+ options.data = q; // data is the query string for 'post'
+ }
+
+ var $form = this, callbacks = [];
+ if (options.resetForm) {
+ callbacks.push(function() { $form.resetForm(); });
+ }
+ if (options.clearForm) {
+ callbacks.push(function() { $form.clearForm(); });
+ }
+
+ // perform a load on the target only if dataType is not provided
+ if (!options.dataType && options.target) {
+ var oldSuccess = options.success || function(){};
+ callbacks.push(function(data) {
+ var fn = options.replaceTarget ? 'replaceWith' : 'html';
+ $(options.target)[fn](data).each(oldSuccess, arguments);
+ });
+ }
+ else if (options.success) {
+ callbacks.push(options.success);
+ }
+
+ options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
+ var context = options.context || options; // jQuery 1.4+ supports scope context
+ for (var i=0, max=callbacks.length; i < max; i++) {
+ callbacks[i].apply(context, [data, status, xhr || $form, $form]);
+ }
+ };
+
+ // are there files to upload?
+ var fileInputs = $('input:file', this).length > 0;
+ var mp = 'multipart/form-data';
+ var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
+
+ // options.iframe allows user to force iframe mode
+ // 06-NOV-09: now defaulting to iframe mode if file input is detected
+ if (options.iframe !== false && (fileInputs || options.iframe || multipart)) {
+ // hack to fix Safari hang (thanks to Tim Molendijk for this)
+ // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
+ if (options.closeKeepAlive) {
+ $.get(options.closeKeepAlive, fileUpload);
+ }
+ else {
+ fileUpload();
+ }
+ }
+ else {
+ $.ajax(options);
+ }
+
+ // fire 'notify' event
+ this.trigger('form-submit-notify', [this, options]);
+ return this;
+
+
+ // private function for handling file uploads (hat tip to YAHOO!)
+ function fileUpload() {
+ var form = $form[0];
+
+ if ($(':input[name=submit],:input[id=submit]', form).length) {
+ // if there is an input with a name or id of 'submit' then we won't be
+ // able to invoke the submit fn on the form (at least not x-browser)
+ alert('Error: Form elements must not have name or id of "submit".');
+ return;
+ }
+
+ var s = $.extend(true, {}, $.ajaxSettings, options);
+ s.context = s.context || s;
+ var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id;
+ window[fn] = function() {
+ var f = $io.data('form-plugin-onload');
+ if (f) {
+ f();
+ window[fn] = undefined;
+ try { delete window[fn]; } catch(e){}
+ }
+ }
+ var $io = $('');
+ var io = $io[0];
+
+ $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
+
+ var xhr = { // mock object
+ aborted: 0,
+ responseText: null,
+ responseXML: null,
+ status: 0,
+ statusText: 'n/a',
+ getAllResponseHeaders: function() {},
+ getResponseHeader: function() {},
+ setRequestHeader: function() {},
+ abort: function() {
+ this.aborted = 1;
+ $io.attr('src', s.iframeSrc); // abort op in progress
+ }
+ };
+
+ var g = s.global;
+ // trigger ajax global events so that activity/block indicators work like normal
+ if (g && ! $.active++) {
+ $.event.trigger("ajaxStart");
+ }
+ if (g) {
+ $.event.trigger("ajaxSend", [xhr, s]);
+ }
+
+ if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
+ if (s.global) {
+ $.active--;
+ }
+ return;
+ }
+ if (xhr.aborted) {
+ return;
+ }
+
+ var cbInvoked = false;
+ var timedOut = 0;
+
+ // add submitting element to data if we know it
+ var sub = form.clk;
+ if (sub) {
+ var n = sub.name;
+ if (n && !sub.disabled) {
+ s.extraData = s.extraData || {};
+ s.extraData[n] = sub.value;
+ if (sub.type == "image") {
+ s.extraData[n+'.x'] = form.clk_x;
+ s.extraData[n+'.y'] = form.clk_y;
+ }
+ }
+ }
+
+ // take a breath so that pending repaints get some cpu time before the upload starts
+ function doSubmit() {
+ // make sure form attrs are set
+ var t = $form.attr('target'), a = $form.attr('action');
+
+ // update form attrs in IE friendly way
+ form.setAttribute('target',id);
+ if (form.getAttribute('method') != 'POST') {
+ form.setAttribute('method', 'POST');
+ }
+ if (form.getAttribute('action') != s.url) {
+ form.setAttribute('action', s.url);
+ }
+
+ // ie borks in some cases when setting encoding
+ if (! s.skipEncodingOverride) {
+ $form.attr({
+ encoding: 'multipart/form-data',
+ enctype: 'multipart/form-data'
+ });
+ }
+
+ // support timout
+ if (s.timeout) {
+ setTimeout(function() { timedOut = true; cb(); }, s.timeout);
+ }
+
+ // add "extra" data to form if provided in options
+ var extraInputs = [];
+ try {
+ if (s.extraData) {
+ for (var n in s.extraData) {
+ extraInputs.push(
+ $('')
+ .appendTo(form)[0]);
+ }
+ }
+
+ // add iframe to doc and submit the form
+ $io.appendTo('body');
+ $io.data('form-plugin-onload', cb);
+ form.submit();
+ }
+ finally {
+ // reset attrs and remove "extra" input elements
+ form.setAttribute('action',a);
+ if(t) {
+ form.setAttribute('target', t);
+ } else {
+ $form.removeAttr('target');
+ }
+ $(extraInputs).remove();
+ }
+ }
+
+ if (s.forceSync) {
+ doSubmit();
+ }
+ else {
+ setTimeout(doSubmit, 10); // this lets dom updates render
+ }
+
+ var data, doc, domCheckCount = 50;
+
+ function cb() {
+ if (cbInvoked) {
+ return;
+ }
+
+ $io.removeData('form-plugin-onload');
+
+ var ok = true;
+ try {
+ if (timedOut) {
+ throw 'timeout';
+ }
+ // extract the server response from the iframe
+ doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
+
+ var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
+ log('isXml='+isXml);
+ if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) {
+ if (--domCheckCount) {
+ // in some browsers (Opera) the iframe DOM is not always traversable when
+ // the onload callback fires, so we loop a bit to accommodate
+ log('requeing onLoad callback, DOM not available');
+ setTimeout(cb, 250);
+ return;
+ }
+ // let this fall through because server response could be an empty document
+ //log('Could not access iframe DOM after mutiple tries.');
+ //throw 'DOMException: not available';
+ }
+
+ //log('response detected');
+ cbInvoked = true;
+ xhr.responseText = doc.documentElement ? doc.documentElement.innerHTML : null;
+ xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
+ xhr.getResponseHeader = function(header){
+ var headers = {'content-type': s.dataType};
+ return headers[header];
+ };
+
+ var scr = /(json|script)/.test(s.dataType);
+ if (scr || s.textarea) {
+ // see if user embedded response in textarea
+ var ta = doc.getElementsByTagName('textarea')[0];
+ if (ta) {
+ xhr.responseText = ta.value;
+ }
+ else if (scr) {
+ // account for browsers injecting pre around json response
+ var pre = doc.getElementsByTagName('pre')[0];
+ var b = doc.getElementsByTagName('body')[0];
+ if (pre) {
+ xhr.responseText = pre.innerHTML;
+ }
+ else if (b) {
+ xhr.responseText = b.innerHTML;
+ }
+ }
+ }
+ else if (s.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
+ xhr.responseXML = toXml(xhr.responseText);
+ }
+ data = $.httpData(xhr, s.dataType);
+ }
+ catch(e){
+ log('error caught:',e);
+ ok = false;
+ xhr.error = e;
+ $.handleError(s, xhr, 'error', e);
+ }
+
+ // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
+ if (ok) {
+ s.success.call(s.context, data, 'success', xhr);
+ if (g) {
+ $.event.trigger("ajaxSuccess", [xhr, s]);
+ }
+ }
+ if (g) {
+ $.event.trigger("ajaxComplete", [xhr, s]);
+ }
+ if (g && ! --$.active) {
+ $.event.trigger("ajaxStop");
+ }
+ if (s.complete) {
+ s.complete.call(s.context, xhr, ok ? 'success' : 'error');
+ }
+
+ // clean up
+ setTimeout(function() {
+ $io.removeData('form-plugin-onload');
+ $io.remove();
+ xhr.responseXML = null;
+ }, 100);
+ }
+
+ function toXml(s, doc) {
+ if (window.ActiveXObject) {
+ doc = new ActiveXObject('Microsoft.XMLDOM');
+ doc.async = 'false';
+ doc.loadXML(s);
+ }
+ else {
+ doc = (new DOMParser()).parseFromString(s, 'text/xml');
+ }
+ return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
+ }
+ }
+};
+
+/**
+ * ajaxForm() provides a mechanism for fully automating form submission.
+ *
+ * The advantages of using this method instead of ajaxSubmit() are:
+ *
+ * 1: This method will include coordinates for elements (if the element
+ * is used to submit the form).
+ * 2. This method will include the submit element's name/value data (for the element that was
+ * used to submit the form).
+ * 3. This method binds the submit() method to the form for you.
+ *
+ * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
+ * passes the options argument along after properly binding events for submit elements and
+ * the form itself.
+ */
+$.fn.ajaxForm = function(options) {
+ // in jQuery 1.3+ we can fix mistakes with the ready state
+ if (this.length === 0) {
+ var o = { s: this.selector, c: this.context };
+ if (!$.isReady && o.s) {
+ log('DOM not ready, queuing ajaxForm');
+ $(function() {
+ $(o.s,o.c).ajaxForm(options);
+ });
+ return this;
+ }
+ // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
+ log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
+ return this;
+ }
+
+ return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) {
+ if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
+ e.preventDefault();
+ $(this).ajaxSubmit(options);
+ }
+ }).bind('click.form-plugin', function(e) {
+ var target = e.target;
+ var $el = $(target);
+ if (!($el.is(":submit,input:image"))) {
+ // is this a child element of the submit el? (ex: a span within a button)
+ var t = $el.closest(':submit');
+ if (t.length == 0) {
+ return;
+ }
+ target = t[0];
+ }
+ var form = this;
+ form.clk = target;
+ if (target.type == 'image') {
+ if (e.offsetX != undefined) {
+ form.clk_x = e.offsetX;
+ form.clk_y = e.offsetY;
+ } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
+ var offset = $el.offset();
+ form.clk_x = e.pageX - offset.left;
+ form.clk_y = e.pageY - offset.top;
+ } else {
+ form.clk_x = e.pageX - target.offsetLeft;
+ form.clk_y = e.pageY - target.offsetTop;
+ }
+ }
+ // clear form vars
+ setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
+ });
+};
+
+// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
+$.fn.ajaxFormUnbind = function() {
+ return this.unbind('submit.form-plugin click.form-plugin');
+};
+
+/**
+ * formToArray() gathers form element data into an array of objects that can
+ * be passed to any of the following ajax functions: $.get, $.post, or load.
+ * Each object in the array has both a 'name' and 'value' property. An example of
+ * an array for a simple login form might be:
+ *
+ * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
+ *
+ * It is this array that is passed to pre-submit callback functions provided to the
+ * ajaxSubmit() and ajaxForm() methods.
+ */
+$.fn.formToArray = function(semantic) {
+ var a = [];
+ if (this.length === 0) {
+ return a;
+ }
+
+ var form = this[0];
+ var els = semantic ? form.getElementsByTagName('*') : form.elements;
+ if (!els) {
+ return a;
+ }
+
+ var i,j,n,v,el,max,jmax;
+ for(i=0, max=els.length; i < max; i++) {
+ el = els[i];
+ n = el.name;
+ if (!n) {
+ continue;
+ }
+
+ if (semantic && form.clk && el.type == "image") {
+ // handle image inputs on the fly when semantic == true
+ if(!el.disabled && form.clk == el) {
+ a.push({name: n, value: $(el).val()});
+ a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+ }
+ continue;
+ }
+
+ v = $.fieldValue(el, true);
+ if (v && v.constructor == Array) {
+ for(j=0, jmax=v.length; j < jmax; j++) {
+ a.push({name: n, value: v[j]});
+ }
+ }
+ else if (v !== null && typeof v != 'undefined') {
+ a.push({name: n, value: v});
+ }
+ }
+
+ if (!semantic && form.clk) {
+ // input type=='image' are not found in elements array! handle it here
+ var $input = $(form.clk), input = $input[0];
+ n = input.name;
+ if (n && !input.disabled && input.type == 'image') {
+ a.push({name: n, value: $input.val()});
+ a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+ }
+ }
+ return a;
+};
+
+/**
+ * Serializes form data into a 'submittable' string. This method will return a string
+ * in the format: name1=value1&name2=value2
+ */
+$.fn.formSerialize = function(semantic) {
+ //hand off to jQuery.param for proper encoding
+ return $.param(this.formToArray(semantic));
+};
+
+/**
+ * Serializes all field elements in the jQuery object into a query string.
+ * This method will return a string in the format: name1=value1&name2=value2
+ */
+$.fn.fieldSerialize = function(successful) {
+ var a = [];
+ this.each(function() {
+ var n = this.name;
+ if (!n) {
+ return;
+ }
+ var v = $.fieldValue(this, successful);
+ if (v && v.constructor == Array) {
+ for (var i=0,max=v.length; i < max; i++) {
+ a.push({name: n, value: v[i]});
+ }
+ }
+ else if (v !== null && typeof v != 'undefined') {
+ a.push({name: this.name, value: v});
+ }
+ });
+ //hand off to jQuery.param for proper encoding
+ return $.param(a);
+};
+
+/**
+ * Returns the value(s) of the element in the matched set. For example, consider the following form:
+ *
+ *
+ *
+ * var v = $(':text').fieldValue();
+ * // if no values are entered into the text inputs
+ * v == ['','']
+ * // if values entered into the text inputs are 'foo' and 'bar'
+ * v == ['foo','bar']
+ *
+ * var v = $(':checkbox').fieldValue();
+ * // if neither checkbox is checked
+ * v === undefined
+ * // if both checkboxes are checked
+ * v == ['B1', 'B2']
+ *
+ * var v = $(':radio').fieldValue();
+ * // if neither radio is checked
+ * v === undefined
+ * // if first radio is checked
+ * v == ['C1']
+ *
+ * The successful argument controls whether or not the field element must be 'successful'
+ * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
+ * The default value of the successful argument is true. If this value is false the value(s)
+ * for each element is returned.
+ *
+ * Note: This method *always* returns an array. If no valid value can be determined the
+ * array will be empty, otherwise it will contain one or more values.
+ */
+$.fn.fieldValue = function(successful) {
+ for (var val=[], i=0, max=this.length; i < max; i++) {
+ var el = this[i];
+ var v = $.fieldValue(el, successful);
+ if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
+ continue;
+ }
+ v.constructor == Array ? $.merge(val, v) : val.push(v);
+ }
+ return val;
+};
+
+/**
+ * Returns the value of the field element.
+ */
+$.fieldValue = function(el, successful) {
+ var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
+ if (successful === undefined) {
+ successful = true;
+ }
+
+ if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
+ (t == 'checkbox' || t == 'radio') && !el.checked ||
+ (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
+ tag == 'select' && el.selectedIndex == -1)) {
+ return null;
+ }
+
+ if (tag == 'select') {
+ var index = el.selectedIndex;
+ if (index < 0) {
+ return null;
+ }
+ var a = [], ops = el.options;
+ var one = (t == 'select-one');
+ var max = (one ? index+1 : ops.length);
+ for(var i=(one ? index : 0); i < max; i++) {
+ var op = ops[i];
+ if (op.selected) {
+ var v = op.value;
+ if (!v) { // extra pain for IE...
+ v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
+ }
+ if (one) {
+ return v;
+ }
+ a.push(v);
+ }
+ }
+ return a;
+ }
+ return $(el).val();
+};
+
+/**
+ * Clears the form data. Takes the following actions on the form's input fields:
+ * - input text fields will have their 'value' property set to the empty string
+ * - select elements will have their 'selectedIndex' property set to -1
+ * - checkbox and radio inputs will have their 'checked' property set to false
+ * - inputs of type submit, button, reset, and hidden will *not* be effected
+ * - button elements will *not* be effected
+ */
+$.fn.clearForm = function() {
+ return this.each(function() {
+ $('input,select,textarea', this).clearFields();
+ });
+};
+
+/**
+ * Clears the selected form elements.
+ */
+$.fn.clearFields = $.fn.clearInputs = function() {
+ return this.each(function() {
+ var t = this.type, tag = this.tagName.toLowerCase();
+ if (t == 'text' || t == 'password' || tag == 'textarea') {
+ this.value = '';
+ }
+ else if (t == 'checkbox' || t == 'radio') {
+ this.checked = false;
+ }
+ else if (tag == 'select') {
+ this.selectedIndex = -1;
+ }
+ });
+};
+
+/**
+ * Resets the form data. Causes all form elements to be reset to their original value.
+ */
+$.fn.resetForm = function() {
+ return this.each(function() {
+ // guard against an input with the name of 'reset'
+ // note that IE reports the reset function as an 'object'
+ if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
+ this.reset();
+ }
+ });
+};
+
+/**
+ * Enables or disables any matching elements.
+ */
+$.fn.enable = function(b) {
+ if (b === undefined) {
+ b = true;
+ }
+ return this.each(function() {
+ this.disabled = !b;
+ });
+};
+
+/**
+ * Checks/unchecks any matching checkboxes or radio buttons and
+ * selects/deselects and matching option elements.
+ */
+$.fn.selected = function(select) {
+ if (select === undefined) {
+ select = true;
+ }
+ return this.each(function() {
+ var t = this.type;
+ if (t == 'checkbox' || t == 'radio') {
+ this.checked = select;
+ }
+ else if (this.tagName.toLowerCase() == 'option') {
+ var $sel = $(this).parent('select');
+ if (select && $sel[0] && $sel[0].type == 'select-one') {
+ // deselect all other options
+ $sel.find('option').selected(false);
+ }
+ this.selected = select;
+ }
+ });
+};
+
+// helper fn for console logging
+// set $.fn.ajaxSubmit.debug to true to enable debug logging
+function log() {
+ if ($.fn.ajaxSubmit.debug) {
+ var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
+ if (window.console && window.console.log) {
+ window.console.log(msg);
+ }
+ else if (window.opera && window.opera.postError) {
+ window.opera.postError(msg);
+ }
+ }
+};
+
+})(jQuery);
diff --git a/jappixmini/jappix/js/jquery.js b/jappixmini/jappix/js/jquery.js
new file mode 100644
index 000000000..a4f114586
--- /dev/null
+++ b/jappixmini/jappix/js/jquery.js
@@ -0,0 +1,7179 @@
+/*!
+ * jQuery JavaScript Library v1.4.4
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Nov 11 19:04:53 2010 -0500
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
+
+ // Is it a simple selector
+ isSimple = /^.[^:#\[\.,]*$/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+ rwhite = /\s/,
+
+ // Used for trimming whitespace
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Check for non-word characters
+ rnonword = /\W/,
+
+ // Check for digits
+ rdigit = /\d/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // Has the ready events already been bound?
+ readyBound = false,
+
+ // The functions to execute on DOM ready
+ readyList = [],
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ init: function( selector, context ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context && document.body ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = "body";
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ match = quickExpr.exec( selector );
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ doc = (context ? context.ownerDocument || context : document);
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+ selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $("#id")
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $("TAG")
+ } else if ( !context && !rnonword.test( selector ) ) {
+ this.selector = selector;
+ this.context = document;
+ selector = document.getElementsByTagName( selector );
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return (context || rootjQuery).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return jQuery( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if (selector.selector !== undefined) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.4.4",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = jQuery();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // If the DOM is already ready
+ if ( jQuery.isReady ) {
+ // Execute the function immediately
+ fn.call( document, jQuery );
+
+ // Otherwise, remember the function for later
+ } else if ( readyList ) {
+ // Add the function to the wait list
+ readyList.push( fn );
+ }
+
+ return this;
+ },
+
+ eq: function( i ) {
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, +i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || jQuery(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ window.$ = _$;
+
+ if ( deep ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+ // A third-party is pushing the ready event forwards
+ if ( wait === true ) {
+ jQuery.readyWait--;
+ }
+
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ if ( readyList ) {
+ // Execute all of them
+ var fn,
+ i = 0,
+ ready = readyList;
+
+ // Reset the list of functions
+ readyList = null;
+
+ while ( (fn = ready[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
+ }
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyBound ) {
+ return;
+ }
+
+ readyBound = true;
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ // A crude way of determining if an object is a window
+ isWindow: function( obj ) {
+ return obj && typeof obj === "object" && "setInterval" in obj;
+ },
+
+ isNaN: function( obj ) {
+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw msg;
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test(data.replace(rvalidescape, "@")
+ .replace(rvalidtokens, "]")
+ .replace(rvalidbraces, "")) ) {
+
+ // Try to use the native JSON parser first
+ return window.JSON && window.JSON.parse ?
+ window.JSON.parse( data ) :
+ (new Function("return " + data))();
+
+ } else {
+ jQuery.error( "Invalid JSON: " + data );
+ }
+ },
+
+ noop: function() {},
+
+ // Evalulates a script in a global context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test(data) ) {
+ // Inspired by code by Andrea Giammarchi
+ // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+ var head = document.getElementsByTagName("head")[0] || document.documentElement,
+ script = document.createElement("script");
+
+ script.type = "text/javascript";
+
+ if ( jQuery.support.scriptEval ) {
+ script.appendChild( document.createTextNode( data ) );
+ } else {
+ script.text = data;
+ }
+
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709).
+ head.insertBefore( script, head.firstChild );
+ head.removeChild( script );
+ }
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction(object);
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( var value = object[0];
+ i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
+ }
+ }
+
+ return object;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // The extra typeof function check is to prevent crashes
+ // in Safari 2 (See: #3039)
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type(array);
+
+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var i = first.length,
+ j = 0;
+
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var ret = [], retVal;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var ret = [], value;
+
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ proxy: function( fn, proxy, thisObject ) {
+ if ( arguments.length === 2 ) {
+ if ( typeof proxy === "string" ) {
+ thisObject = fn;
+ fn = thisObject[ proxy ];
+ proxy = undefined;
+
+ } else if ( proxy && !jQuery.isFunction( proxy ) ) {
+ thisObject = proxy;
+ proxy = undefined;
+ }
+ }
+
+ if ( !proxy && fn ) {
+ proxy = function() {
+ return fn.apply( thisObject || this, arguments );
+ };
+ }
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ if ( fn ) {
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+ }
+
+ // So proxy can be declared as an argument
+ return proxy;
+ },
+
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can be optionally by executed if its a function
+ access: function( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ jQuery.access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+ },
+
+ now: function() {
+ return (new Date()).getTime();
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+if ( indexOf ) {
+ jQuery.inArray = function( elem, array ) {
+ return indexOf.call( array, elem );
+ };
+}
+
+// Verify that \s matches non-breaking spaces
+// (IE fails on this test)
+if ( !rwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch(e) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
+
+})();
+
+
+(function() {
+
+ jQuery.support = {};
+
+ var root = document.documentElement,
+ script = document.createElement("script"),
+ div = document.createElement("div"),
+ id = "script" + jQuery.now();
+
+ div.style.display = "none";
+ div.innerHTML = "
a";
+
+ var all = div.getElementsByTagName("*"),
+ a = div.getElementsByTagName("a")[0],
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return;
+ }
+
+ jQuery.support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText insted)
+ style: /red/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55$/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Will be defined later
+ deleteExpando: true,
+ optDisabled: false,
+ checkClone: false,
+ scriptEval: false,
+ noCloneEvent: true,
+ boxModel: null,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableHiddenOffsets: true
+ };
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as diabled)
+ select.disabled = true;
+ jQuery.support.optDisabled = !opt.disabled;
+
+ script.type = "text/javascript";
+ try {
+ script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+ } catch(e) {}
+
+ root.insertBefore( script, root.firstChild );
+
+ // Make sure that the execution of code works by injecting a script
+ // tag with appendChild/createTextNode
+ // (IE doesn't support this, fails, and uses .text instead)
+ if ( window[ id ] ) {
+ jQuery.support.scriptEval = true;
+ delete window[ id ];
+ }
+
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete script.test;
+
+ } catch(e) {
+ jQuery.support.deleteExpando = false;
+ }
+
+ root.removeChild( script );
+
+ if ( div.attachEvent && div.fireEvent ) {
+ div.attachEvent("onclick", function click() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ jQuery.support.noCloneEvent = false;
+ div.detachEvent("onclick", click);
+ });
+ div.cloneNode(true).fireEvent("onclick");
+ }
+
+ div = document.createElement("div");
+ div.innerHTML = "";
+
+ var fragment = document.createDocumentFragment();
+ fragment.appendChild( div.firstChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+ // Figure out if the W3C box model works as expected
+ // document.body must exist before we can do this
+ jQuery(function() {
+ var div = document.createElement("div");
+ div.style.width = div.style.paddingLeft = "1px";
+
+ document.body.appendChild( div );
+ jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
+
+ if ( "zoom" in div.style ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.style.display = "inline";
+ div.style.zoom = 1;
+ jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "";
+ div.innerHTML = "";
+ jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
+ }
+
+ div.innerHTML = "
t
";
+ var tds = div.getElementsByTagName("td");
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
+
+ tds[0].style.display = "";
+ tds[1].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE < 8 fail this test)
+ jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
+ div.innerHTML = "";
+
+ document.body.removeChild( div ).style.display = "none";
+ div = tds = null;
+ });
+
+ // Technique from Juriy Zaytsev
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
+
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
+
+ return isSupported;
+ };
+
+ jQuery.support.submitBubbles = eventSupported("submit");
+ jQuery.support.changeBubbles = eventSupported("change");
+
+ // release memory in IE
+ root = script = div = all = a = null;
+})();
+
+
+
+var windowData = {},
+ rbrace = /^(?:\{.*\}|\[.*\])$/;
+
+jQuery.extend({
+ cache: {},
+
+ // Please use with caution
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + jQuery.now(),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ data: function( elem, name, data ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ elem = elem == window ?
+ windowData :
+ elem;
+
+ var isNode = elem.nodeType,
+ id = isNode ? elem[ jQuery.expando ] : null,
+ cache = jQuery.cache, thisCache;
+
+ if ( isNode && !id && typeof name === "string" && data === undefined ) {
+ return;
+ }
+
+ // Get the data from the object directly
+ if ( !isNode ) {
+ cache = elem;
+
+ // Compute a unique ID for the element
+ } else if ( !id ) {
+ elem[ jQuery.expando ] = id = ++jQuery.uuid;
+ }
+
+ // Avoid generating a new cache unless none exists and we
+ // want to manipulate it.
+ if ( typeof name === "object" ) {
+ if ( isNode ) {
+ cache[ id ] = jQuery.extend(cache[ id ], name);
+
+ } else {
+ jQuery.extend( cache, name );
+ }
+
+ } else if ( isNode && !cache[ id ] ) {
+ cache[ id ] = {};
+ }
+
+ thisCache = isNode ? cache[ id ] : cache;
+
+ // Prevent overriding the named cache with undefined values
+ if ( data !== undefined ) {
+ thisCache[ name ] = data;
+ }
+
+ return typeof name === "string" ? thisCache[ name ] : thisCache;
+ },
+
+ removeData: function( elem, name ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ elem = elem == window ?
+ windowData :
+ elem;
+
+ var isNode = elem.nodeType,
+ id = isNode ? elem[ jQuery.expando ] : elem,
+ cache = jQuery.cache,
+ thisCache = isNode ? cache[ id ] : id;
+
+ // If we want to remove a specific section of the element's data
+ if ( name ) {
+ if ( thisCache ) {
+ // Remove the section of cache data
+ delete thisCache[ name ];
+
+ // If we've removed all the data, remove the element's cache
+ if ( isNode && jQuery.isEmptyObject(thisCache) ) {
+ jQuery.removeData( elem );
+ }
+ }
+
+ // Otherwise, we want to remove all of the element's data
+ } else {
+ if ( isNode && jQuery.support.deleteExpando ) {
+ delete elem[ jQuery.expando ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( jQuery.expando );
+
+ // Completely remove the data cache
+ } else if ( isNode ) {
+ delete cache[ id ];
+
+ // Remove all fields from the object
+ } else {
+ for ( var n in elem ) {
+ delete elem[ n ];
+ }
+ }
+ }
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ if ( elem.nodeName ) {
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ if ( match ) {
+ return !(match === true || elem.getAttribute("classid") !== match);
+ }
+ }
+
+ return true;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var data = null;
+
+ if ( typeof key === "undefined" ) {
+ if ( this.length ) {
+ var attr = this[0].attributes, name;
+ data = jQuery.data( this[0] );
+
+ for ( var i = 0, l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = name.substr( 5 );
+ dataAttr( this[0], name, data[ name ] );
+ }
+ }
+ }
+
+ return data;
+
+ } else if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ var parts = key.split(".");
+ parts[1] = parts[1] ? "." + parts[1] : "";
+
+ if ( value === undefined ) {
+ data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+ // Try to fetch any internally stored data first
+ if ( data === undefined && this.length ) {
+ data = jQuery.data( this[0], key );
+ data = dataAttr( this[0], key, data );
+ }
+
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+
+ } else {
+ return this.each(function() {
+ var $this = jQuery( this ),
+ args = [ parts[0], value ];
+
+ $this.triggerHandler( "setData" + parts[1] + "!", args );
+ jQuery.data( this, key, value );
+ $this.triggerHandler( "changeData" + parts[1] + "!", args );
+ });
+ }
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ data = elem.getAttribute( "data-" + key );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ !jQuery.isNaN( data ) ? parseFloat( data ) :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+
+
+
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ if ( !elem ) {
+ return;
+ }
+
+ type = (type || "fx") + "queue";
+ var q = jQuery.data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( !data ) {
+ return q || [];
+ }
+
+ if ( !q || jQuery.isArray(data) ) {
+ q = jQuery.data( elem, type, jQuery.makeArray(data) );
+
+ } else {
+ q.push( data );
+ }
+
+ return q;
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ fn = queue.shift();
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ }
+
+ if ( fn ) {
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift("inprogress");
+ }
+
+ fn.call(elem, function() {
+ jQuery.dequeue(elem, type);
+ });
+ }
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ }
+
+ if ( data === undefined ) {
+ return jQuery.queue( this[0], type );
+ }
+ return this.each(function( i ) {
+ var queue = jQuery.queue( this, type, data );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function() {
+ var elem = this;
+ setTimeout(function() {
+ jQuery.dequeue( elem, type );
+ }, time );
+ });
+ },
+
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ }
+});
+
+
+
+
+var rclass = /[\n\t]/g,
+ rspaces = /\s+/,
+ rreturn = /\r/g,
+ rspecialurl = /^(?:href|src|style)$/,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea)?$/i,
+ rradiocheck = /^(?:radio|checkbox)$/i;
+
+jQuery.props = {
+ "for": "htmlFor",
+ "class": "className",
+ readonly: "readOnly",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ tabindex: "tabIndex",
+ usemap: "useMap",
+ frameborder: "frameBorder"
+};
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, name, value, true, jQuery.attr );
+ },
+
+ removeAttr: function( name, fn ) {
+ return this.each(function(){
+ jQuery.attr( this, name, "" );
+ if ( this.nodeType === 1 ) {
+ this.removeAttribute( name );
+ }
+ });
+ },
+
+ addClass: function( value ) {
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.addClass( value.call(this, i, self.attr("class")) );
+ });
+ }
+
+ if ( value && typeof value === "string" ) {
+ var classNames = (value || "").split( rspaces );
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var elem = this[i];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className ) {
+ elem.className = value;
+
+ } else {
+ var className = " " + elem.className + " ",
+ setClass = elem.className;
+
+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
+ setClass += " " + classNames[c];
+ }
+ }
+ elem.className = jQuery.trim( setClass );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.removeClass( value.call(this, i, self.attr("class")) );
+ });
+ }
+
+ if ( (value && typeof value === "string") || value === undefined ) {
+ var classNames = (value || "").split( rspaces );
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var elem = this[i];
+
+ if ( elem.nodeType === 1 && elem.className ) {
+ if ( value ) {
+ var className = (" " + elem.className + " ").replace(rclass, " ");
+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+ className = className.replace(" " + classNames[c] + " ", " ");
+ }
+ elem.className = jQuery.trim( className );
+
+ } else {
+ elem.className = "";
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.split( rspaces );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space seperated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery.data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ";
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ if ( !arguments.length ) {
+ var elem = this[0];
+
+ if ( elem ) {
+ if ( jQuery.nodeName( elem, "option" ) ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+
+ // We need to handle select boxes special
+ if ( jQuery.nodeName( elem, "select" ) ) {
+ var index = elem.selectedIndex,
+ values = [],
+ options = elem.options,
+ one = elem.type === "select-one";
+
+ // Nothing was selected
+ if ( index < 0 ) {
+ return null;
+ }
+
+ // Loop through all the selected options
+ for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+ var option = options[ i ];
+
+ // Don't return options that are disabled or in a disabled optgroup
+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+ (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+ // Get the specific value for the option
+ value = jQuery(option).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ }
+
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+
+
+ // Everything else, we just grab the value
+ return (elem.value || "").replace(rreturn, "");
+
+ }
+
+ return undefined;
+ }
+
+ var isFunction = jQuery.isFunction(value);
+
+ return this.each(function(i) {
+ var self = jQuery(this), val = value;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call(this, i, self.val());
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray(val) ) {
+ val = jQuery.map(val, function (value) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
+ this.checked = jQuery.inArray( self.val(), val ) >= 0;
+
+ } else if ( jQuery.nodeName( this, "select" ) ) {
+ var values = jQuery.makeArray(val);
+
+ jQuery( "option", this ).each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ this.selectedIndex = -1;
+ }
+
+ } else {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ attrFn: {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true
+ },
+
+ attr: function( elem, name, value, pass ) {
+ // don't set attributes on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
+
+ if ( pass && name in jQuery.attrFn ) {
+ return jQuery(elem)[name](value);
+ }
+
+ var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
+ // Whether we are setting (or getting)
+ set = value !== undefined;
+
+ // Try to normalize/fix the name
+ name = notxml && jQuery.props[ name ] || name;
+
+ // These attributes require special treatment
+ var special = rspecialurl.test( name );
+
+ // Safari mis-reports the default selected property of an option
+ // Accessing the parent's selectedIndex property fixes it
+ if ( name === "selected" && !jQuery.support.optSelected ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ }
+
+ // If applicable, access the attribute via the DOM 0 way
+ // 'in' checks fail in Blackberry 4.7 #6931
+ if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
+ if ( set ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ }
+
+ if ( value === null ) {
+ if ( elem.nodeType === 1 ) {
+ elem.removeAttribute( name );
+ }
+
+ } else {
+ elem[ name ] = value;
+ }
+ }
+
+ // browsers index elements by id/name on forms, give priority to attributes.
+ if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
+ return elem.getAttributeNode( name ).nodeValue;
+ }
+
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ if ( name === "tabIndex" ) {
+ var attributeNode = elem.getAttributeNode( "tabIndex" );
+
+ return attributeNode && attributeNode.specified ?
+ attributeNode.value :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+
+ return elem[ name ];
+ }
+
+ if ( !jQuery.support.style && notxml && name === "style" ) {
+ if ( set ) {
+ elem.style.cssText = "" + value;
+ }
+
+ return elem.style.cssText;
+ }
+
+ if ( set ) {
+ // convert the value to a string (all browsers do this but IE) see #1070
+ elem.setAttribute( name, "" + value );
+ }
+
+ // Ensure that missing attributes return undefined
+ // Blackberry 4.7 returns "" from getAttribute #6938
+ if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
+ return undefined;
+ }
+
+ var attr = !jQuery.support.hrefNormalized && notxml && special ?
+ // Some attributes require a special call on IE
+ elem.getAttribute( name, 2 ) :
+ elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return attr === null ? undefined : attr;
+ }
+});
+
+
+
+
+var rnamespaces = /\.(.*)$/,
+ rformElems = /^(?:textarea|input|select)$/i,
+ rperiod = /\./g,
+ rspace = / /g,
+ rescape = /[^\w\s.|`]/g,
+ fcleanup = function( nm ) {
+ return nm.replace(rescape, "\\$&");
+ },
+ focusCounts = { focusin: 0, focusout: 0 };
+
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code originated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+ // Bind an event to an element
+ // Original by Dean Edwards
+ add: function( elem, types, handler, data ) {
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // For whatever reason, IE has trouble passing the window object
+ // around, causing it to be cloned in the process
+ if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
+ elem = window;
+ }
+
+ if ( handler === false ) {
+ handler = returnFalse;
+ } else if ( !handler ) {
+ // Fixes bug #7229. Fix recommended by jdalton
+ return;
+ }
+
+ var handleObjIn, handleObj;
+
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ }
+
+ // Make sure that the function being executed has a unique ID
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure
+ var elemData = jQuery.data( elem );
+
+ // If no elemData is found then we must be trying to bind to one of the
+ // banned noData elements
+ if ( !elemData ) {
+ return;
+ }
+
+ // Use a key less likely to result in collisions for plain JS objects.
+ // Fixes bug #7150.
+ var eventKey = elem.nodeType ? "events" : "__events__",
+ events = elemData[ eventKey ],
+ eventHandle = elemData.handle;
+
+ if ( typeof events === "function" ) {
+ // On plain objects events is a fn that holds the the data
+ // which prevents this data from being JSON serialized
+ // the function does not need to be called, it just contains the data
+ eventHandle = events.handle;
+ events = events.events;
+
+ } else if ( !events ) {
+ if ( !elem.nodeType ) {
+ // On plain objects, create a fn that acts as the holder
+ // of the values to avoid JSON serialization of event data
+ elemData[ eventKey ] = elemData = function(){};
+ }
+
+ elemData.events = events = {};
+ }
+
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = function() {
+ // Handle the second event of a trigger and when
+ // an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
+ jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ }
+
+ // Add elem as a property of the handle function
+ // This is to prevent a memory leak with non-native events in IE.
+ eventHandle.elem = elem;
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = types.split(" ");
+
+ var type, i = 0, namespaces;
+
+ while ( (type = types[ i++ ]) ) {
+ handleObj = handleObjIn ?
+ jQuery.extend({}, handleObjIn) :
+ { handler: handler, data: data };
+
+ // Namespaced event handlers
+ if ( type.indexOf(".") > -1 ) {
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ handleObj.namespace = namespaces.slice(0).sort().join(".");
+
+ } else {
+ namespaces = [];
+ handleObj.namespace = "";
+ }
+
+ handleObj.type = type;
+ if ( !handleObj.guid ) {
+ handleObj.guid = handler.guid;
+ }
+
+ // Get the current list of functions bound to this event
+ var handlers = events[ type ],
+ special = jQuery.event.special[ type ] || {};
+
+ // Init the event handler queue
+ if ( !handlers ) {
+ handlers = events[ type ] = [];
+
+ // Check for a special event handler
+ // Only use addEventListener/attachEvent if the special
+ // events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add the function to the element's handler list
+ handlers.push( handleObj );
+
+ // Keep track of which events have been used, for global triggering
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, pos ) {
+ // don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ if ( handler === false ) {
+ handler = returnFalse;
+ }
+
+ var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+ eventKey = elem.nodeType ? "events" : "__events__",
+ elemData = jQuery.data( elem ),
+ events = elemData && elemData[ eventKey ];
+
+ if ( !elemData || !events ) {
+ return;
+ }
+
+ if ( typeof events === "function" ) {
+ elemData = events;
+ events = events.events;
+ }
+
+ // types is actually an event object here
+ if ( types && types.type ) {
+ handler = types.handler;
+ types = types.type;
+ }
+
+ // Unbind all events for the element
+ if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+ types = types || "";
+
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types );
+ }
+
+ return;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).unbind("mouseover mouseout", fn);
+ types = types.split(" ");
+
+ while ( (type = types[ i++ ]) ) {
+ origType = type;
+ handleObj = null;
+ all = type.indexOf(".") < 0;
+ namespaces = [];
+
+ if ( !all ) {
+ // Namespaced event handlers
+ namespaces = type.split(".");
+ type = namespaces.shift();
+
+ namespace = new RegExp("(^|\\.)" +
+ jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ eventType = events[ type ];
+
+ if ( !eventType ) {
+ continue;
+ }
+
+ if ( !handler ) {
+ for ( j = 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( all || namespace.test( handleObj.namespace ) ) {
+ jQuery.event.remove( elem, origType, handleObj.handler, j );
+ eventType.splice( j--, 1 );
+ }
+ }
+
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+
+ for ( j = pos || 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( handler.guid === handleObj.guid ) {
+ // remove the given handler for the given type
+ if ( all || namespace.test( handleObj.namespace ) ) {
+ if ( pos == null ) {
+ eventType.splice( j--, 1 );
+ }
+
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+
+ if ( pos != null ) {
+ break;
+ }
+ }
+ }
+
+ // remove generic event handler if no more handlers exist
+ if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ ret = null;
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ var handle = elemData.handle;
+ if ( handle ) {
+ handle.elem = null;
+ }
+
+ delete elemData.events;
+ delete elemData.handle;
+
+ if ( typeof elemData === "function" ) {
+ jQuery.removeData( elem, eventKey );
+
+ } else if ( jQuery.isEmptyObject( elemData ) ) {
+ jQuery.removeData( elem );
+ }
+ }
+ },
+
+ // bubbling is internal
+ trigger: function( event, data, elem /*, bubbling */ ) {
+ // Event object or event type
+ var type = event.type || event,
+ bubbling = arguments[3];
+
+ if ( !bubbling ) {
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[ jQuery.expando ] ? event :
+ // Object literal
+ jQuery.extend( jQuery.Event(type), event ) :
+ // Just the event type (string)
+ jQuery.Event(type);
+
+ if ( type.indexOf("!") >= 0 ) {
+ event.type = type = type.slice(0, -1);
+ event.exclusive = true;
+ }
+
+ // Handle a global trigger
+ if ( !elem ) {
+ // Don't bubble custom events when global (to avoid too much overhead)
+ event.stopPropagation();
+
+ // Only trigger if we've ever bound an event for it
+ if ( jQuery.event.global[ type ] ) {
+ jQuery.each( jQuery.cache, function() {
+ if ( this.events && this.events[type] ) {
+ jQuery.event.trigger( event, data, this.handle.elem );
+ }
+ });
+ }
+ }
+
+ // Handle triggering a single element
+
+ // don't do events on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
+
+ // Clean up in case it is reused
+ event.result = undefined;
+ event.target = elem;
+
+ // Clone the incoming data, if any
+ data = jQuery.makeArray( data );
+ data.unshift( event );
+ }
+
+ event.currentTarget = elem;
+
+ // Trigger the event, it is assumed that "handle" is a function
+ var handle = elem.nodeType ?
+ jQuery.data( elem, "handle" ) :
+ (jQuery.data( elem, "__events__" ) || {}).handle;
+
+ if ( handle ) {
+ handle.apply( elem, data );
+ }
+
+ var parent = elem.parentNode || elem.ownerDocument;
+
+ // Trigger an inline bound script
+ try {
+ if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
+ if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
+ event.result = false;
+ event.preventDefault();
+ }
+ }
+
+ // prevent IE from throwing an error for some elements with some event types, see #3533
+ } catch (inlineError) {}
+
+ if ( !event.isPropagationStopped() && parent ) {
+ jQuery.event.trigger( event, data, parent, true );
+
+ } else if ( !event.isDefaultPrevented() ) {
+ var old,
+ target = event.target,
+ targetType = type.replace( rnamespaces, "" ),
+ isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
+ special = jQuery.event.special[ targetType ] || {};
+
+ if ( (!special._default || special._default.call( elem, event ) === false) &&
+ !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
+
+ try {
+ if ( target[ targetType ] ) {
+ // Make sure that we don't accidentally re-trigger the onFOO events
+ old = target[ "on" + targetType ];
+
+ if ( old ) {
+ target[ "on" + targetType ] = null;
+ }
+
+ jQuery.event.triggered = true;
+ target[ targetType ]();
+ }
+
+ // prevent IE from throwing an error for some elements with some event types, see #3533
+ } catch (triggerError) {}
+
+ if ( old ) {
+ target[ "on" + targetType ] = old;
+ }
+
+ jQuery.event.triggered = false;
+ }
+ }
+ },
+
+ handle: function( event ) {
+ var all, handlers, namespaces, namespace_re, events,
+ namespace_sort = [],
+ args = jQuery.makeArray( arguments );
+
+ event = args[0] = jQuery.event.fix( event || window.event );
+ event.currentTarget = this;
+
+ // Namespaced event handlers
+ all = event.type.indexOf(".") < 0 && !event.exclusive;
+
+ if ( !all ) {
+ namespaces = event.type.split(".");
+ event.type = namespaces.shift();
+ namespace_sort = namespaces.slice(0).sort();
+ namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ event.namespace = event.namespace || namespace_sort.join(".");
+
+ events = jQuery.data(this, this.nodeType ? "events" : "__events__");
+
+ if ( typeof events === "function" ) {
+ events = events.events;
+ }
+
+ handlers = (events || {})[ event.type ];
+
+ if ( events && handlers ) {
+ // Clone the handlers to prevent manipulation
+ handlers = handlers.slice(0);
+
+ for ( var j = 0, l = handlers.length; j < l; j++ ) {
+ var handleObj = handlers[ j ];
+
+ // Filter the functions by class
+ if ( all || namespace_re.test( handleObj.namespace ) ) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ event.handler = handleObj.handler;
+ event.data = handleObj.data;
+ event.handleObj = handleObj;
+
+ var ret = handleObj.handler.apply( this, args );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // store a copy of the original event object
+ // and "clone" to set read-only properties
+ var originalEvent = event;
+ event = jQuery.Event( originalEvent );
+
+ for ( var i = this.props.length, prop; i; ) {
+ prop = this.props[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary
+ if ( !event.target ) {
+ // Fixes #1925 where srcElement might not be defined either
+ event.target = event.srcElement || document;
+ }
+
+ // check if target is a textnode (safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && event.fromElement ) {
+ event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
+ }
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && event.clientX != null ) {
+ var doc = document.documentElement,
+ body = document.body;
+
+ event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
+ event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
+ }
+
+ // Add which for key events
+ if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
+ event.which = event.charCode != null ? event.charCode : event.keyCode;
+ }
+
+ // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+ if ( !event.metaKey && event.ctrlKey ) {
+ event.metaKey = event.ctrlKey;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && event.button !== undefined ) {
+ event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+ }
+
+ return event;
+ },
+
+ // Deprecated, use jQuery.guid instead
+ guid: 1E8,
+
+ // Deprecated, use jQuery.proxy instead
+ proxy: jQuery.proxy,
+
+ special: {
+ ready: {
+ // Make sure the ready event is setup
+ setup: jQuery.bindReady,
+ teardown: jQuery.noop
+ },
+
+ live: {
+ add: function( handleObj ) {
+ jQuery.event.add( this,
+ liveConvert( handleObj.origType, handleObj.selector ),
+ jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
+ },
+
+ remove: function( handleObj ) {
+ jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+ }
+ },
+
+ beforeunload: {
+ setup: function( data, namespaces, eventHandle ) {
+ // We only want to do this special case on windows
+ if ( jQuery.isWindow( this ) ) {
+ this.onbeforeunload = eventHandle;
+ }
+ },
+
+ teardown: function( namespaces, eventHandle ) {
+ if ( this.onbeforeunload === eventHandle ) {
+ this.onbeforeunload = null;
+ }
+ }
+ }
+ }
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ if ( elem.detachEvent ) {
+ elem.detachEvent( "on" + type, handle );
+ }
+ };
+
+jQuery.Event = function( src ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !this.preventDefault ) {
+ return new jQuery.Event( src );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // timeStamp is buggy for some events on Firefox(#3843)
+ // So we won't rely on the native value
+ this.timeStamp = jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // otherwise set the returnValue property of the original event to false (IE)
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function( event ) {
+ // Check if mouse(over|out) are still within the same parent element
+ var parent = event.relatedTarget;
+
+ // Firefox sometimes assigns relatedTarget a XUL element
+ // which we cannot access the parentNode property of
+ try {
+ // Traverse up the tree
+ while ( parent && parent !== this ) {
+ parent = parent.parentNode;
+ }
+
+ if ( parent !== this ) {
+ // set the correct event type
+ event.type = event.data;
+
+ // handle event if we actually just moused on to a non sub-element
+ jQuery.event.handle.apply( this, arguments );
+ }
+
+ // assuming we've left the element since we most likely mousedover a xul element
+ } catch(e) { }
+},
+
+// In case of event delegation, we only need to rename the event.type,
+// liveHandler will take care of the rest.
+delegate = function( event ) {
+ event.type = event.data;
+ jQuery.event.handle.apply( this, arguments );
+};
+
+// Create mouseenter and mouseleave events
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ setup: function( data ) {
+ jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
+ },
+ teardown: function( data ) {
+ jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
+ }
+ };
+});
+
+// submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function( data, namespaces ) {
+ if ( this.nodeName.toLowerCase() !== "form" ) {
+ jQuery.event.add(this, "click.specialSubmit", function( e ) {
+ var elem = e.target,
+ type = elem.type;
+
+ if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+ e.liveFired = undefined;
+ return trigger( "submit", this, arguments );
+ }
+ });
+
+ jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
+ var elem = e.target,
+ type = elem.type;
+
+ if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+ e.liveFired = undefined;
+ return trigger( "submit", this, arguments );
+ }
+ });
+
+ } else {
+ return false;
+ }
+ },
+
+ teardown: function( namespaces ) {
+ jQuery.event.remove( this, ".specialSubmit" );
+ }
+ };
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+ var changeFilters,
+
+ getVal = function( elem ) {
+ var type = elem.type, val = elem.value;
+
+ if ( type === "radio" || type === "checkbox" ) {
+ val = elem.checked;
+
+ } else if ( type === "select-multiple" ) {
+ val = elem.selectedIndex > -1 ?
+ jQuery.map( elem.options, function( elem ) {
+ return elem.selected;
+ }).join("-") :
+ "";
+
+ } else if ( elem.nodeName.toLowerCase() === "select" ) {
+ val = elem.selectedIndex;
+ }
+
+ return val;
+ },
+
+ testChange = function testChange( e ) {
+ var elem = e.target, data, val;
+
+ if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
+ return;
+ }
+
+ data = jQuery.data( elem, "_change_data" );
+ val = getVal(elem);
+
+ // the current data will be also retrieved by beforeactivate
+ if ( e.type !== "focusout" || elem.type !== "radio" ) {
+ jQuery.data( elem, "_change_data", val );
+ }
+
+ if ( data === undefined || val === data ) {
+ return;
+ }
+
+ if ( data != null || val ) {
+ e.type = "change";
+ e.liveFired = undefined;
+ return jQuery.event.trigger( e, arguments[1], elem );
+ }
+ };
+
+ jQuery.event.special.change = {
+ filters: {
+ focusout: testChange,
+
+ beforedeactivate: testChange,
+
+ click: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Change has to be called before submit
+ // Keydown will be called before keypress, which is used in submit-event delegation
+ keydown: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
+ (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+ type === "select-multiple" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Beforeactivate happens also before the previous element is blurred
+ // with this event you can't trigger a change event, but you can store
+ // information
+ beforeactivate: function( e ) {
+ var elem = e.target;
+ jQuery.data( elem, "_change_data", getVal(elem) );
+ }
+ },
+
+ setup: function( data, namespaces ) {
+ if ( this.type === "file" ) {
+ return false;
+ }
+
+ for ( var type in changeFilters ) {
+ jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
+ }
+
+ return rformElems.test( this.nodeName );
+ },
+
+ teardown: function( namespaces ) {
+ jQuery.event.remove( this, ".specialChange" );
+
+ return rformElems.test( this.nodeName );
+ }
+ };
+
+ changeFilters = jQuery.event.special.change.filters;
+
+ // Handle when the input is .focus()'d
+ changeFilters.focus = changeFilters.beforeactivate;
+}
+
+function trigger( type, elem, args ) {
+ args[0].type = type;
+ return jQuery.event.handle.apply( elem, args );
+}
+
+// Create "bubbling" focus and blur events
+if ( document.addEventListener ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( focusCounts[fix]++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --focusCounts[fix] === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+
+ function handler( e ) {
+ e = jQuery.event.fix( e );
+ e.type = fix;
+ return jQuery.event.trigger( e, null, e.target );
+ }
+ });
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+ jQuery.fn[ name ] = function( type, data, fn ) {
+ // Handle object literals
+ if ( typeof type === "object" ) {
+ for ( var key in type ) {
+ this[ name ](key, data, type[key], fn);
+ }
+ return this;
+ }
+
+ if ( jQuery.isFunction( data ) || data === false ) {
+ fn = data;
+ data = undefined;
+ }
+
+ var handler = name === "one" ? jQuery.proxy( fn, function( event ) {
+ jQuery( this ).unbind( event, handler );
+ return fn.apply( this, arguments );
+ }) : fn;
+
+ if ( type === "unload" && name !== "one" ) {
+ this.one( type, data, fn );
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ jQuery.event.add( this[i], type, handler, data );
+ }
+ }
+
+ return this;
+ };
+});
+
+jQuery.fn.extend({
+ unbind: function( type, fn ) {
+ // Handle object literals
+ if ( typeof type === "object" && !type.preventDefault ) {
+ for ( var key in type ) {
+ this.unbind(key, type[key]);
+ }
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ jQuery.event.remove( this[i], type, fn );
+ }
+ }
+
+ return this;
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.live( types, data, fn, selector );
+ },
+
+ undelegate: function( selector, types, fn ) {
+ if ( arguments.length === 0 ) {
+ return this.unbind( "live" );
+
+ } else {
+ return this.die( types, null, fn, selector );
+ }
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+
+ triggerHandler: function( type, data ) {
+ if ( this[0] ) {
+ var event = jQuery.Event( type );
+ event.preventDefault();
+ event.stopPropagation();
+ jQuery.event.trigger( event, data, this[0] );
+ return event.result;
+ }
+ },
+
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments,
+ i = 1;
+
+ // link all the functions, so any of them can unbind this click handler
+ while ( i < args.length ) {
+ jQuery.proxy( fn, args[ i++ ] );
+ }
+
+ return this.click( jQuery.proxy( fn, function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ }));
+ },
+
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ }
+});
+
+var liveMap = {
+ focus: "focusin",
+ blur: "focusout",
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+};
+
+jQuery.each(["live", "die"], function( i, name ) {
+ jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
+ var type, i = 0, match, namespaces, preType,
+ selector = origSelector || this.selector,
+ context = origSelector ? this : jQuery( this.context );
+
+ if ( typeof types === "object" && !types.preventDefault ) {
+ for ( var key in types ) {
+ context[ name ]( key, data, types[key], selector );
+ }
+
+ return this;
+ }
+
+ if ( jQuery.isFunction( data ) ) {
+ fn = data;
+ data = undefined;
+ }
+
+ types = (types || "").split(" ");
+
+ while ( (type = types[ i++ ]) != null ) {
+ match = rnamespaces.exec( type );
+ namespaces = "";
+
+ if ( match ) {
+ namespaces = match[0];
+ type = type.replace( rnamespaces, "" );
+ }
+
+ if ( type === "hover" ) {
+ types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+ continue;
+ }
+
+ preType = type;
+
+ if ( type === "focus" || type === "blur" ) {
+ types.push( liveMap[ type ] + namespaces );
+ type = type + namespaces;
+
+ } else {
+ type = (liveMap[ type ] || type) + namespaces;
+ }
+
+ if ( name === "live" ) {
+ // bind live handler
+ for ( var j = 0, l = context.length; j < l; j++ ) {
+ jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+ { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+ }
+
+ } else {
+ // unbind live handler
+ context.unbind( "live." + liveConvert( type, selector ), fn );
+ }
+ }
+
+ return this;
+ };
+});
+
+function liveHandler( event ) {
+ var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+ elems = [],
+ selectors = [],
+ events = jQuery.data( this, this.nodeType ? "events" : "__events__" );
+
+ if ( typeof events === "function" ) {
+ events = events.events;
+ }
+
+ // Make sure we avoid non-left-click bubbling in Firefox (#3861)
+ if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
+ return;
+ }
+
+ if ( event.namespace ) {
+ namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ event.liveFired = this;
+
+ var live = events.live.slice(0);
+
+ for ( j = 0; j < live.length; j++ ) {
+ handleObj = live[j];
+
+ if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
+ selectors.push( handleObj.selector );
+
+ } else {
+ live.splice( j--, 1 );
+ }
+ }
+
+ match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+ for ( i = 0, l = match.length; i < l; i++ ) {
+ close = match[i];
+
+ for ( j = 0; j < live.length; j++ ) {
+ handleObj = live[j];
+
+ if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
+ elem = close.elem;
+ related = null;
+
+ // Those two events require additional checking
+ if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+ event.type = handleObj.preType;
+ related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
+ }
+
+ if ( !related || related !== elem ) {
+ elems.push({ elem: elem, handleObj: handleObj, level: close.level });
+ }
+ }
+ }
+ }
+
+ for ( i = 0, l = elems.length; i < l; i++ ) {
+ match = elems[i];
+
+ if ( maxLevel && match.level > maxLevel ) {
+ break;
+ }
+
+ event.currentTarget = match.elem;
+ event.data = match.handleObj.data;
+ event.handleObj = match.handleObj;
+
+ ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+ if ( ret === false || event.isPropagationStopped() ) {
+ maxLevel = match.level;
+
+ if ( ret === false ) {
+ stop = false;
+ }
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
+ }
+ }
+
+ return stop;
+}
+
+function liveConvert( type, selector ) {
+ return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&");
+}
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.bind( name, data, fn ) :
+ this.trigger( name );
+ };
+
+ if ( jQuery.attrFn ) {
+ jQuery.attrFn[ name ] = true;
+ }
+});
+
+// Prevent memory leaks in IE
+// Window isn't included so as not to unbind existing unload events
+// More info:
+// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
+if ( window.attachEvent && !window.addEventListener ) {
+ jQuery(window).bind("unload", function() {
+ for ( var id in jQuery.cache ) {
+ if ( jQuery.cache[ id ].handle ) {
+ // Try/Catch is to handle iframes being unloaded, see #4280
+ try {
+ jQuery.event.remove( jQuery.cache[ id ].handle.elem );
+ } catch(e) {}
+ }
+ }
+ });
+}
+
+
+/*!
+ * Sizzle CSS Selector Engine - v1.0
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+ done = 0,
+ toString = Object.prototype.toString,
+ hasDuplicate = false,
+ baseHasDuplicate = true;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+// Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+ baseHasDuplicate = false;
+ return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+ results = results || [];
+ context = context || document;
+
+ var origContext = context;
+
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ var m, set, checkSet, extra, ret, cur, pop, i,
+ prune = true,
+ contextXML = Sizzle.isXML( context ),
+ parts = [],
+ soFar = selector;
+
+ // Reset the position of the chunker regexp (start from head)
+ do {
+ chunker.exec( "" );
+ m = chunker.exec( soFar );
+
+ if ( m ) {
+ soFar = m[3];
+
+ parts.push( m[1] );
+
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
+ }
+ } while ( m );
+
+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+ set = posProcess( parts[0] + parts[1], context );
+
+ } else {
+ set = Expr.relative[ parts[0] ] ?
+ [ context ] :
+ Sizzle( parts.shift(), context );
+
+ while ( parts.length ) {
+ selector = parts.shift();
+
+ if ( Expr.relative[ selector ] ) {
+ selector += parts.shift();
+ }
+
+ set = posProcess( selector, set );
+ }
+ }
+
+ } else {
+ // Take a shortcut and set the context if the root selector is an ID
+ // (but not if it'll be faster if the inner selector is an ID)
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+ ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set )[0] :
+ ret.set[0];
+ }
+
+ if ( context ) {
+ ret = seed ?
+ { expr: parts.pop(), set: makeArray(seed) } :
+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+ set = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set ) :
+ ret.set;
+
+ if ( parts.length > 0 ) {
+ checkSet = makeArray( set );
+
+ } else {
+ prune = false;
+ }
+
+ while ( parts.length ) {
+ cur = parts.pop();
+ pop = cur;
+
+ if ( !Expr.relative[ cur ] ) {
+ cur = "";
+ } else {
+ pop = parts.pop();
+ }
+
+ if ( pop == null ) {
+ pop = context;
+ }
+
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
+ }
+
+ } else {
+ checkSet = parts = [];
+ }
+ }
+
+ if ( !checkSet ) {
+ checkSet = set;
+ }
+
+ if ( !checkSet ) {
+ Sizzle.error( cur || selector );
+ }
+
+ if ( toString.call(checkSet) === "[object Array]" ) {
+ if ( !prune ) {
+ results.push.apply( results, checkSet );
+
+ } else if ( context && context.nodeType === 1 ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+ results.push( set[i] );
+ }
+ }
+
+ } else {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+ results.push( set[i] );
+ }
+ }
+ }
+
+ } else {
+ makeArray( checkSet, results );
+ }
+
+ if ( extra ) {
+ Sizzle( extra, origContext, results, seed );
+ Sizzle.uniqueSort( results );
+ }
+
+ return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+ if ( sortOrder ) {
+ hasDuplicate = baseHasDuplicate;
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ for ( var i = 1; i < results.length; i++ ) {
+ if ( results[i] === results[ i - 1 ] ) {
+ results.splice( i--, 1 );
+ }
+ }
+ }
+ }
+
+ return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+ return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+ return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+ var set;
+
+ if ( !expr ) {
+ return [];
+ }
+
+ for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+ var match,
+ type = Expr.order[i];
+
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+ var left = match[1];
+ match.splice( 1, 1 );
+
+ if ( left.substr( left.length - 1 ) !== "\\" ) {
+ match[1] = (match[1] || "").replace(/\\/g, "");
+ set = Expr.find[ type ]( match, context, isXML );
+
+ if ( set != null ) {
+ expr = expr.replace( Expr.match[ type ], "" );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !set ) {
+ set = context.getElementsByTagName( "*" );
+ }
+
+ return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+ var match, anyFound,
+ old = expr,
+ result = [],
+ curLoop = set,
+ isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+ while ( expr && set.length ) {
+ for ( var type in Expr.filter ) {
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+ var found, item,
+ filter = Expr.filter[ type ],
+ left = match[1];
+
+ anyFound = false;
+
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) === "\\" ) {
+ continue;
+ }
+
+ if ( curLoop === result ) {
+ result = [];
+ }
+
+ if ( Expr.preFilter[ type ] ) {
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+ if ( !match ) {
+ anyFound = found = true;
+
+ } else if ( match === true ) {
+ continue;
+ }
+ }
+
+ if ( match ) {
+ for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
+ if ( item ) {
+ found = filter( item, match, i, curLoop );
+ var pass = not ^ !!found;
+
+ if ( inplace && found != null ) {
+ if ( pass ) {
+ anyFound = true;
+
+ } else {
+ curLoop[i] = false;
+ }
+
+ } else if ( pass ) {
+ result.push( item );
+ anyFound = true;
+ }
+ }
+ }
+ }
+
+ if ( found !== undefined ) {
+ if ( !inplace ) {
+ curLoop = result;
+ }
+
+ expr = expr.replace( Expr.match[ type ], "" );
+
+ if ( !anyFound ) {
+ return [];
+ }
+
+ break;
+ }
+ }
+ }
+
+ // Improper expression
+ if ( expr === old ) {
+ if ( anyFound == null ) {
+ Sizzle.error( expr );
+
+ } else {
+ break;
+ }
+ }
+
+ old = expr;
+ }
+
+ return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+ throw "Syntax error, unrecognized expression: " + msg;
+};
+
+var Expr = Sizzle.selectors = {
+ order: [ "ID", "NAME", "TAG" ],
+
+ match: {
+ ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+ },
+
+ leftMatch: {},
+
+ attrMap: {
+ "class": "className",
+ "for": "htmlFor"
+ },
+
+ attrHandle: {
+ href: function( elem ) {
+ return elem.getAttribute( "href" );
+ }
+ },
+
+ relative: {
+ "+": function(checkSet, part){
+ var isPartStr = typeof part === "string",
+ isTag = isPartStr && !/\W/.test( part ),
+ isPartStrNotTag = isPartStr && !isTag;
+
+ if ( isTag ) {
+ part = part.toLowerCase();
+ }
+
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+ if ( (elem = checkSet[i]) ) {
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+ elem || false :
+ elem === part;
+ }
+ }
+
+ if ( isPartStrNotTag ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ },
+
+ ">": function( checkSet, part ) {
+ var elem,
+ isPartStr = typeof part === "string",
+ i = 0,
+ l = checkSet.length;
+
+ if ( isPartStr && !/\W/.test( part ) ) {
+ part = part.toLowerCase();
+
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
+ if ( elem ) {
+ var parent = elem.parentNode;
+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+ }
+ }
+
+ } else {
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
+ if ( elem ) {
+ checkSet[i] = isPartStr ?
+ elem.parentNode :
+ elem.parentNode === part;
+ }
+ }
+
+ if ( isPartStr ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ }
+ },
+
+ "": function(checkSet, part, isXML){
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !/\W/.test(part) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+ },
+
+ "~": function( checkSet, part, isXML ) {
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !/\W/.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+ }
+ },
+
+ find: {
+ ID: function( match, context, isXML ) {
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ },
+
+ NAME: function( match, context ) {
+ if ( typeof context.getElementsByName !== "undefined" ) {
+ var ret = [],
+ results = context.getElementsByName( match[1] );
+
+ for ( var i = 0, l = results.length; i < l; i++ ) {
+ if ( results[i].getAttribute("name") === match[1] ) {
+ ret.push( results[i] );
+ }
+ }
+
+ return ret.length === 0 ? null : ret;
+ }
+ },
+
+ TAG: function( match, context ) {
+ return context.getElementsByTagName( match[1] );
+ }
+ },
+ preFilter: {
+ CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+ match = " " + match[1].replace(/\\/g, "") + " ";
+
+ if ( isXML ) {
+ return match;
+ }
+
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+ if ( elem ) {
+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) {
+ if ( !inplace ) {
+ result.push( elem );
+ }
+
+ } else if ( inplace ) {
+ curLoop[i] = false;
+ }
+ }
+ }
+
+ return false;
+ },
+
+ ID: function( match ) {
+ return match[1].replace(/\\/g, "");
+ },
+
+ TAG: function( match, curLoop ) {
+ return match[1].toLowerCase();
+ },
+
+ CHILD: function( match ) {
+ if ( match[1] === "nth" ) {
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+ var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+ // calculate the numbers (first)n+(last) including if they are negative
+ match[2] = (test[1] + (test[2] || 1)) - 0;
+ match[3] = test[3] - 0;
+ }
+
+ // TODO: Move to normal caching system
+ match[0] = done++;
+
+ return match;
+ },
+
+ ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+ var name = match[1].replace(/\\/g, "");
+
+ if ( !isXML && Expr.attrMap[name] ) {
+ match[1] = Expr.attrMap[name];
+ }
+
+ if ( match[2] === "~=" ) {
+ match[4] = " " + match[4] + " ";
+ }
+
+ return match;
+ },
+
+ PSEUDO: function( match, curLoop, inplace, result, not ) {
+ if ( match[1] === "not" ) {
+ // If we're dealing with a complex expression, or a simple one
+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+ match[3] = Sizzle(match[3], null, null, curLoop);
+
+ } else {
+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+ if ( !inplace ) {
+ result.push.apply( result, ret );
+ }
+
+ return false;
+ }
+
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+ return true;
+ }
+
+ return match;
+ },
+
+ POS: function( match ) {
+ match.unshift( true );
+
+ return match;
+ }
+ },
+
+ filters: {
+ enabled: function( elem ) {
+ return elem.disabled === false && elem.type !== "hidden";
+ },
+
+ disabled: function( elem ) {
+ return elem.disabled === true;
+ },
+
+ checked: function( elem ) {
+ return elem.checked === true;
+ },
+
+ selected: function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ elem.parentNode.selectedIndex;
+
+ return elem.selected === true;
+ },
+
+ parent: function( elem ) {
+ return !!elem.firstChild;
+ },
+
+ empty: function( elem ) {
+ return !elem.firstChild;
+ },
+
+ has: function( elem, i, match ) {
+ return !!Sizzle( match[3], elem ).length;
+ },
+
+ header: function( elem ) {
+ return (/h\d/i).test( elem.nodeName );
+ },
+
+ text: function( elem ) {
+ return "text" === elem.type;
+ },
+ radio: function( elem ) {
+ return "radio" === elem.type;
+ },
+
+ checkbox: function( elem ) {
+ return "checkbox" === elem.type;
+ },
+
+ file: function( elem ) {
+ return "file" === elem.type;
+ },
+ password: function( elem ) {
+ return "password" === elem.type;
+ },
+
+ submit: function( elem ) {
+ return "submit" === elem.type;
+ },
+
+ image: function( elem ) {
+ return "image" === elem.type;
+ },
+
+ reset: function( elem ) {
+ return "reset" === elem.type;
+ },
+
+ button: function( elem ) {
+ return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
+ },
+
+ input: function( elem ) {
+ return (/input|select|textarea|button/i).test( elem.nodeName );
+ }
+ },
+ setFilters: {
+ first: function( elem, i ) {
+ return i === 0;
+ },
+
+ last: function( elem, i, match, array ) {
+ return i === array.length - 1;
+ },
+
+ even: function( elem, i ) {
+ return i % 2 === 0;
+ },
+
+ odd: function( elem, i ) {
+ return i % 2 === 1;
+ },
+
+ lt: function( elem, i, match ) {
+ return i < match[3] - 0;
+ },
+
+ gt: function( elem, i, match ) {
+ return i > match[3] - 0;
+ },
+
+ nth: function( elem, i, match ) {
+ return match[3] - 0 === i;
+ },
+
+ eq: function( elem, i, match ) {
+ return match[3] - 0 === i;
+ }
+ },
+ filter: {
+ PSEUDO: function( elem, match, i, array ) {
+ var name = match[1],
+ filter = Expr.filters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+
+ } else if ( name === "contains" ) {
+ return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+ } else if ( name === "not" ) {
+ var not = match[3];
+
+ for ( var j = 0, l = not.length; j < l; j++ ) {
+ if ( not[j] === elem ) {
+ return false;
+ }
+ }
+
+ return true;
+
+ } else {
+ Sizzle.error( "Syntax error, unrecognized expression: " + name );
+ }
+ },
+
+ CHILD: function( elem, match ) {
+ var type = match[1],
+ node = elem;
+
+ switch ( type ) {
+ case "only":
+ case "first":
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ if ( type === "first" ) {
+ return true;
+ }
+
+ node = elem;
+
+ case "last":
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ return true;
+
+ case "nth":
+ var first = match[2],
+ last = match[3];
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ var doneName = match[0],
+ parent = elem.parentNode;
+
+ if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
+ var count = 0;
+
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ node.nodeIndex = ++count;
+ }
+ }
+
+ parent.sizcache = doneName;
+ }
+
+ var diff = elem.nodeIndex - last;
+
+ if ( first === 0 ) {
+ return diff === 0;
+
+ } else {
+ return ( diff % first === 0 && diff / first >= 0 );
+ }
+ }
+ },
+
+ ID: function( elem, match ) {
+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
+ },
+
+ TAG: function( elem, match ) {
+ return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
+ },
+
+ CLASS: function( elem, match ) {
+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
+ .indexOf( match ) > -1;
+ },
+
+ ATTR: function( elem, match ) {
+ var name = match[1],
+ result = Expr.attrHandle[ name ] ?
+ Expr.attrHandle[ name ]( elem ) :
+ elem[ name ] != null ?
+ elem[ name ] :
+ elem.getAttribute( name ),
+ value = result + "",
+ type = match[2],
+ check = match[4];
+
+ return result == null ?
+ type === "!=" :
+ type === "=" ?
+ value === check :
+ type === "*=" ?
+ value.indexOf(check) >= 0 :
+ type === "~=" ?
+ (" " + value + " ").indexOf(check) >= 0 :
+ !check ?
+ value && result !== false :
+ type === "!=" ?
+ value !== check :
+ type === "^=" ?
+ value.indexOf(check) === 0 :
+ type === "$=" ?
+ value.substr(value.length - check.length) === check :
+ type === "|=" ?
+ value === check || value.substr(0, check.length + 1) === check + "-" :
+ false;
+ },
+
+ POS: function( elem, match, i, array ) {
+ var name = match[2],
+ filter = Expr.setFilters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ }
+ }
+ }
+};
+
+var origPOS = Expr.match.POS,
+ fescape = function(all, num){
+ return "\\" + (num - 0 + 1);
+ };
+
+for ( var type in Expr.match ) {
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+
+var makeArray = function( array, results ) {
+ array = Array.prototype.slice.call( array, 0 );
+
+ if ( results ) {
+ results.push.apply( results, array );
+ return results;
+ }
+
+ return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+ makeArray = function( array, results ) {
+ var i = 0,
+ ret = results || [];
+
+ if ( toString.call(array) === "[object Array]" ) {
+ Array.prototype.push.apply( ret, array );
+
+ } else {
+ if ( typeof array.length === "number" ) {
+ for ( var l = array.length; i < l; i++ ) {
+ ret.push( array[i] );
+ }
+
+ } else {
+ for ( ; array[i]; i++ ) {
+ ret.push( array[i] );
+ }
+ }
+ }
+
+ return ret;
+ };
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+ return a.compareDocumentPosition ? -1 : 1;
+ }
+
+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+ };
+
+} else {
+ sortOrder = function( a, b ) {
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
+ }
+
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
+ }
+ }
+
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+ siblingCheck = function( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
+ }
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
+ };
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( elems ) {
+ var ret = "", elem;
+
+ for ( var i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += Sizzle.getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+};
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+ // We're going to inject a fake input element with a specified name
+ var form = document.createElement("div"),
+ id = "script" + (new Date()).getTime(),
+ root = document.documentElement;
+
+ form.innerHTML = "";
+
+ // Inject it into the root element, check its status, and remove it quickly
+ root.insertBefore( form, root.firstChild );
+
+ // The workaround has to do additional checks after a getElementById
+ // Which slows things down for other browsers (hence the branching)
+ if ( document.getElementById( id ) ) {
+ Expr.find.ID = function( match, context, isXML ) {
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+
+ return m ?
+ m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+ [m] :
+ undefined :
+ [];
+ }
+ };
+
+ Expr.filter.ID = function( elem, match ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+ return elem.nodeType === 1 && node && node.nodeValue === match;
+ };
+ }
+
+ root.removeChild( form );
+
+ // release memory in IE
+ root = form = null;
+})();
+
+(function(){
+ // Check to see if the browser returns only elements
+ // when doing getElementsByTagName("*")
+
+ // Create a fake element
+ var div = document.createElement("div");
+ div.appendChild( document.createComment("") );
+
+ // Make sure no comments are found
+ if ( div.getElementsByTagName("*").length > 0 ) {
+ Expr.find.TAG = function( match, context ) {
+ var results = context.getElementsByTagName( match[1] );
+
+ // Filter out possible comments
+ if ( match[1] === "*" ) {
+ var tmp = [];
+
+ for ( var i = 0; results[i]; i++ ) {
+ if ( results[i].nodeType === 1 ) {
+ tmp.push( results[i] );
+ }
+ }
+
+ results = tmp;
+ }
+
+ return results;
+ };
+ }
+
+ // Check to see if an attribute returns normalized href attributes
+ div.innerHTML = "";
+
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+
+ Expr.attrHandle.href = function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ };
+ }
+
+ // release memory in IE
+ div = null;
+})();
+
+if ( document.querySelectorAll ) {
+ (function(){
+ var oldSizzle = Sizzle,
+ div = document.createElement("div"),
+ id = "__sizzle__";
+
+ div.innerHTML = "";
+
+ // Safari can't handle uppercase or unicode characters when
+ // in quirks mode.
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+ return;
+ }
+
+ Sizzle = function( query, context, extra, seed ) {
+ context = context || document;
+
+ // Make sure that attribute selectors are quoted
+ query = query.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+ // Only use querySelectorAll on non-XML documents
+ // (ID selectors don't work in non-HTML documents)
+ if ( !seed && !Sizzle.isXML(context) ) {
+ if ( context.nodeType === 9 ) {
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(qsaError) {}
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ var old = context.getAttribute( "id" ),
+ nid = old || id;
+
+ if ( !old ) {
+ context.setAttribute( "id", nid );
+ }
+
+ try {
+ return makeArray( context.querySelectorAll( "#" + nid + " " + query ), extra );
+
+ } catch(pseudoError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute( "id" );
+ }
+ }
+ }
+ }
+
+ return oldSizzle(query, context, extra, seed);
+ };
+
+ for ( var prop in oldSizzle ) {
+ Sizzle[ prop ] = oldSizzle[ prop ];
+ }
+
+ // release memory in IE
+ div = null;
+ })();
+}
+
+(function(){
+ var html = document.documentElement,
+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
+ pseudoWorks = false;
+
+ try {
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( document.documentElement, "[test!='']:sizzle" );
+
+ } catch( pseudoError ) {
+ pseudoWorks = true;
+ }
+
+ if ( matches ) {
+ Sizzle.matchesSelector = function( node, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+ if ( !Sizzle.isXML( node ) ) {
+ try {
+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+ return matches.call( node, expr );
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle(expr, null, null, [node]).length > 0;
+ };
+ }
+})();
+
+(function(){
+ var div = document.createElement("div");
+
+ div.innerHTML = "";
+
+ // Opera can't find a second classname (in 9.6)
+ // Also, make sure that getElementsByClassName actually exists
+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+ return;
+ }
+
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
+ div.lastChild.className = "e";
+
+ if ( div.getElementsByClassName("e").length === 1 ) {
+ return;
+ }
+
+ Expr.order.splice(1, 0, "CLASS");
+ Expr.find.CLASS = function( match, context, isXML ) {
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+ return context.getElementsByClassName(match[1]);
+ }
+ };
+
+ // release memory in IE
+ div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+
+ if ( elem ) {
+ var match = false;
+
+ elem = elem[dir];
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 && !isXML ){
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+
+ if ( elem.nodeName.toLowerCase() === cur ) {
+ match = elem;
+ break;
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+
+ if ( elem ) {
+ var match = false;
+
+ elem = elem[dir];
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 ) {
+ if ( !isXML ) {
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+
+ if ( typeof cur !== "string" ) {
+ if ( elem === cur ) {
+ match = true;
+ break;
+ }
+
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+ match = elem;
+ break;
+ }
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+if ( document.documentElement.contains ) {
+ Sizzle.contains = function( a, b ) {
+ return a !== b && (a.contains ? a.contains(b) : true);
+ };
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+ Sizzle.contains = function( a, b ) {
+ return !!(a.compareDocumentPosition(b) & 16);
+ };
+
+} else {
+ Sizzle.contains = function() {
+ return false;
+ };
+}
+
+Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context ) {
+ var match,
+ tmpSet = [],
+ later = "",
+ root = context.nodeType ? [context] : context;
+
+ // Position selectors must be done after the filter
+ // And so must :not(positional) so we move all PSEUDOs to the end
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+ later += match[0];
+ selector = selector.replace( Expr.match.PSEUDO, "" );
+ }
+
+ selector = Expr.relative[selector] ? selector + "*" : selector;
+
+ for ( var i = 0, l = root.length; i < l; i++ ) {
+ Sizzle( selector, root[i], tmpSet );
+ }
+
+ return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+ // Note: This RegExp should be improved, or likely pulled from Sizzle
+ rmultiselector = /,/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ slice = Array.prototype.slice,
+ POS = jQuery.expr.match.POS;
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var ret = this.pushStack( "", "find", selector ),
+ length = 0;
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( var n = length; n < ret.length; n++ ) {
+ for ( var r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ has: function( target ) {
+ var targets = jQuery( target );
+ return this.filter(function() {
+ for ( var i = 0, l = targets.length; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false), "not", selector);
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
+ },
+
+ is: function( selector ) {
+ return !!selector && jQuery.filter( selector, this ).length > 0;
+ },
+
+ closest: function( selectors, context ) {
+ var ret = [], i, l, cur = this[0];
+
+ if ( jQuery.isArray( selectors ) ) {
+ var match, selector,
+ matches = {},
+ level = 1;
+
+ if ( cur && selectors.length ) {
+ for ( i = 0, l = selectors.length; i < l; i++ ) {
+ selector = selectors[i];
+
+ if ( !matches[selector] ) {
+ matches[selector] = jQuery.expr.match.POS.test( selector ) ?
+ jQuery( selector, context || this.context ) :
+ selector;
+ }
+ }
+
+ while ( cur && cur.ownerDocument && cur !== context ) {
+ for ( selector in matches ) {
+ match = matches[selector];
+
+ if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
+ ret.push({ selector: selector, elem: cur, level: level });
+ }
+ }
+
+ cur = cur.parentNode;
+ level++;
+ }
+ }
+
+ return ret;
+ }
+
+ var pos = POS.test( selectors ) ?
+ jQuery( selectors, context || this.context ) : null;
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+
+ } else {
+ cur = cur.parentNode;
+ if ( !cur || !cur.ownerDocument || cur === context ) {
+ break;
+ }
+ }
+ }
+ }
+
+ ret = ret.length > 1 ? jQuery.unique(ret) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+ if ( !elem || typeof elem === "string" ) {
+ return jQuery.inArray( this[0],
+ // If it receives a string, the selector is used
+ // If it receives nothing, the siblings are used
+ elem ? jQuery( elem ) : this.parent().children() );
+ }
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context || this.context ) :
+ jQuery.makeArray( selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+ all :
+ jQuery.unique( all ) );
+ },
+
+ andSelf: function() {
+ return this.add( this.prevObject );
+ }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return jQuery.nth( elem, 2, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return jQuery.nth( elem, 2, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( elem.parentNode.firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.makeArray( elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 ? jQuery.unique( ret ) : ret;
+
+ if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, slice.call(arguments).join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ nth: function( cur, result, dir, elem ) {
+ result = result || 1;
+ var num = 0;
+
+ for ( ; cur; cur = cur[dir] ) {
+ if ( cur.nodeType === 1 && ++num === result ) {
+ break;
+ }
+ }
+
+ return cur;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return (elem === qualifier) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+ });
+}
+
+
+
+
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+ rtagName = /<([\w:]+)/,
+ rtbody = /\s]+\/)>/g,
+ wrapMap = {
+ option: [ 1, "" ],
+ legend: [ 1, "" ],
+ thead: [ 1, "
", "
" ],
+ tr: [ 2, "
", "
" ],
+ td: [ 3, "
", "
" ],
+ col: [ 2, "
", "
" ],
+ area: [ 1, "" ],
+ _default: [ 0, "", "" ]
+ };
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize and ';
+
+ $files = getFiles($h, $l, $t, $g, $f);
+
+ if (is_string($files))
+ printf($pattern, $files);
+ else {
+ $c = count($files)-1;
+ for($i=0; $i<=$c; $i++) {
+ if ($i)
+ echo ' ';
+ printf($pattern, $files[$i]);
+ if ($i != $c)
+ echo "\n";
+ }
+ }
+}
+
+// The function to check if anonymous mode is authorized
+function anonymousMode() {
+ if(isset($_GET['r']) && !empty($_GET['r']) && HOST_ANONYMOUS && (ANONYMOUS == 'on'))
+ return true;
+ else
+ return false;
+}
+
+// The function to quickly translate a string
+function _e($string) {
+ echo T_gettext($string);
+}
+
+// The function to check the encrypted mode
+function sslCheck() {
+ if(ENCRYPTION == 'on')
+ return true;
+ else
+ return false;
+}
+
+// The function to return the encrypted link
+function sslLink() {
+ // Using HTTPS?
+ if(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on'))
+ $link = ''.T_('Unencrypted').'';
+
+ // Using HTTP?
+ else
+ $link = ''.T_('Encrypted').'';
+
+ return $link;
+}
+
+// The function to get the Jappix static URL
+function staticURL() {
+ // Check for HTTPS
+ $protocol = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
+
+ // Full URL
+ $url = $protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
+
+ return $url;
+}
+
+// The function to get the Jappix location (only from Get API!)
+function staticLocation() {
+ // Filter the URL
+ return preg_replace('/((.+)\/)php\/get\.php(\S)+$/', '$1', staticURL());
+}
+
+// The function to include a translation file
+function includeTranslation($locale, $domain) {
+ T_setlocale(LC_MESSAGES, $locale);
+ T_bindtextdomain($domain, JAPPIX_BASE.'/lang');
+ T_bind_textdomain_codeset($domain, 'UTF-8');
+ T_textdomain($domain);
+}
+
+// The function to check the cache presence
+function hasCache($hash) {
+ if(file_exists(JAPPIX_BASE.'/store/cache/'.$hash.'.cache'))
+ return true;
+ else
+ return false;
+}
+
+// The function to check if developer mode is enabled
+function isDeveloper() {
+ if(DEVELOPER == 'on')
+ return true;
+ else
+ return false;
+}
+
+// The function to get a file extension
+function getFileExt($name) {
+ return strtolower(preg_replace('/^(.+)(\.)([^\.]+)$/i', '$3', $name));
+}
+
+// The function to get a file type
+function getFileType($ext) {
+ switch($ext) {
+ // Images
+ case 'jpg':
+ case 'jpeg':
+ case 'png':
+ case 'bmp':
+ case 'gif':
+ case 'tif':
+ case 'svg':
+ case 'psp':
+ case 'xcf':
+ $file_type = 'image';
+
+ break;
+
+ // Videos
+ case 'ogv':
+ case 'mkv':
+ case 'avi':
+ case 'mov':
+ case 'mp4':
+ case 'm4v':
+ case 'wmv':
+ case 'asf':
+ case 'mpg':
+ case 'mpeg':
+ case 'ogm':
+ case 'rmvb':
+ case 'rmv':
+ case 'qt':
+ case 'flv':
+ case 'ram':
+ case '3gp':
+ case 'avc':
+ $file_type = 'video';
+
+ break;
+
+ // Sounds
+ case 'oga':
+ case 'ogg':
+ case 'mka':
+ case 'flac':
+ case 'mp3':
+ case 'wav':
+ case 'm4a':
+ case 'wma':
+ case 'rmab':
+ case 'rma':
+ case 'bwf':
+ case 'aiff':
+ case 'caf':
+ case 'cda':
+ case 'atrac':
+ case 'vqf':
+ case 'au':
+ case 'aac':
+ case 'm3u':
+ case 'mid':
+ case 'mp2':
+ case 'snd':
+ case 'voc':
+ $file_type = 'audio';
+
+ break;
+
+ // Documents
+ case 'pdf':
+ case 'odt':
+ case 'ott':
+ case 'sxw':
+ case 'stw':
+ case 'ots':
+ case 'sxc':
+ case 'stc':
+ case 'sxi':
+ case 'sti':
+ case 'pot':
+ case 'odp':
+ case 'ods':
+ case 'doc':
+ case 'docx':
+ case 'docm':
+ case 'xls':
+ case 'xlsx':
+ case 'xlsm':
+ case 'xlt':
+ case 'ppt':
+ case 'pptx':
+ case 'pptm':
+ case 'pps':
+ case 'odg':
+ case 'otp':
+ case 'sxd':
+ case 'std':
+ case 'std':
+ case 'rtf':
+ case 'txt':
+ case 'htm':
+ case 'html':
+ case 'shtml':
+ case 'dhtml':
+ case 'mshtml':
+ $file_type = 'document';
+
+ break;
+
+ // Packages
+ case 'tgz':
+ case 'gz':
+ case 'tar':
+ case 'ar':
+ case 'cbz':
+ case 'jar':
+ case 'tar.7z':
+ case 'tar.bz2':
+ case 'tar.gz':
+ case 'tar.lzma':
+ case 'tar.xz':
+ case 'zip':
+ case 'xz':
+ case 'rar':
+ case 'bz':
+ case 'deb':
+ case 'rpm':
+ case '7z':
+ case 'ace':
+ case 'cab':
+ case 'arj':
+ case 'msi':
+ $file_type = 'package';
+
+ break;
+
+ // Others
+ default:
+ $file_type = 'other';
+
+ break;
+ }
+
+ return $file_type;
+}
+
+// The function to get the MIME type of a file
+function getFileMIME($path) {
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ $cmime = finfo_file($finfo, $path);
+ finfo_close($finfo);
+
+ return $cmime;
+}
+
+// The function to keep the current GET vars
+function keepGet($current, $no_get) {
+ // Get the HTTP GET vars
+ $request = $_SERVER['REQUEST_URI'];
+
+ if(strrpos($request, '?') === false)
+ $get = '';
+
+ else {
+ $uri = explode('?', $request);
+ $get = $uri[1];
+ }
+
+ // Remove the items we don't want here
+ $proper = str_replace('&', '&', $get);
+ $proper = preg_replace('/((^)|(&))(('.$current.'=)([^&]+))/i', '', $proper);
+
+ // Nothing at the end?
+ if(!$proper)
+ return '';
+
+ // We have no defined GET var
+ if($no_get) {
+ // Remove the first "&" if it appears
+ if(preg_match('/^(&(amp;)?)/i', $proper))
+ $proper = preg_replace('/^(&(amp;)?)/i', '', $proper);
+
+ // Add the first "?"
+ $proper = '?'.$proper;
+ }
+
+ // Add a first "&" if there is no one and no defined GET var
+ else if(!$no_get && (substr($proper, 0, 1) != '&') && (substr($proper, 0, 5) != '&'))
+ $proper = '&'.$proper;
+
+ return $proper;
+}
+
+// Escapes regex special characters for in-regex usage
+function escapeRegex($string) {
+ return preg_replace('/[-[\]{}()*+?.,\\^$|#]/', '\\$&', $string);
+}
+
+// Generates the security HTML code
+function securityHTML() {
+ return '
+
+
+
+
+ Jappix - Forbidden
+
+
+
+
Forbidden
+
This is a private folder
+
+
+';
+}
+
+// Checks if a relative server path is safe
+function isSafe($path) {
+ // Mhh, someone is about to nasty stuffs (previous folder, or executable scripts)
+ if(preg_match('/\.\.\//', $path) || preg_match('/index\.html?$/', $path) || preg_match('/(\.)((php([0-9]+)?)|(aspx?)|(cgi)|(rb)|(py)|(pl)|(jsp)|(ssjs)|(lasso)|(dna)|(tpl)|(smx)|(cfm))$/i', $path))
+ return false;
+
+ return true;
+}
+
+// Set the good unity for a size in bytes
+function formatBytes($bytes, $precision = 2) {
+ $units = array('B', 'KB', 'MB', 'GB', 'TB');
+
+ $bytes = max($bytes, 0);
+ $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
+ $pow = min($pow, count($units) - 1);
+
+ $bytes /= pow(1024, $pow);
+
+ return round($bytes, $precision) . ' ' . $units[$pow];
+}
+
+// Converts a human-readable bytes value to a computer one
+function humanToBytes($string) {
+ // Values array
+ $values = array(
+ 'K' => '000',
+ 'M' => '000000',
+ 'G' => '000000000',
+ 'T' => '000000000000',
+ 'P' => '000000000000000',
+ 'E' => '000000000000000000',
+ 'Z' => '000000000000000000000',
+ 'Y' => '000000000000000000000000'
+ );
+
+ // Filter the string
+ foreach($values as $key => $zero)
+ $string = str_replace($key, $zero, $string);
+
+ // Converts the string into an integer
+ $string = intval($string);
+
+ return $string;
+}
+
+// Get the maximum file upload size
+function uploadMaxSize() {
+ // Not allowed to upload files?
+ if(ini_get('file_uploads') != 1)
+ return 0;
+
+ // Upload maximum file size
+ $upload = humanToBytes(ini_get('upload_max_filesize'));
+
+ // POST maximum size
+ $post = humanToBytes(ini_get('post_max_size'));
+
+ // Return the lowest value
+ if($upload <= $post)
+ return $upload;
+
+ return $post;
+}
+
+// Normalizes special chars
+function normalizeChars($string) {
+ $table = array(
+ 'Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z', 'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',
+ 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
+ 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',
+ 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss',
+ 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e',
+ 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',
+ 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b',
+ 'ÿ'=>'y', 'Ŕ'=>'R', 'ŕ'=>'r'
+ );
+
+ return strtr($string, $table);
+}
+
+// Filters the XML special chars for the SVG drawer
+function filterSpecialXML($string) {
+ // Strange thing: when $string = 'Mises à jour' -> bug! but 'Mise à jour' -> ok!
+ $string = normalizeChars($string);
+
+ // Encodes with HTML special chars
+ $string = htmlspecialchars($string);
+
+ return $string;
+}
+
+// Writes the current visit in the total file
+function writeTotalVisit() {
+ // Get the current time stamp
+ $stamp = time();
+
+ // Initialize the defaults
+ $array = array(
+ 'total' => 0,
+ 'stamp' => $stamp
+ );
+
+ // Try to read the saved data
+ $total_data = readXML('access', 'total');
+
+ // Get the XML file values
+ if($total_data) {
+ // Initialize the visits reading
+ $read_xml = new SimpleXMLElement($total_data);
+
+ // Loop the visit elements
+ foreach($read_xml->children() as $current_child)
+ $array[$current_child->getName()] = intval($current_child);
+ }
+
+ // Increment the total number of visits
+ $array['total']++;
+
+ // Generate the new XML data
+ $total_xml =
+ ''.$array['total'].'
+ '.$array['stamp'].''
+ ;
+
+ // Re-write the new values
+ writeXML('access', 'total', $total_xml);
+}
+
+// Writes the current visit in the months file
+function writeMonthsVisit() {
+ // Get the current month
+ $month = intval(date('m'));
+
+ // Define the stats array
+ $array = array();
+
+ // January to August period
+ if($month <= 8) {
+ for($i = 1; $i <= 8; $i++)
+ $array['month_'.$i] = 0;
+ }
+
+ // August to September period
+ else {
+ $i = 8;
+ $j = 1;
+
+ while($j <= 3) {
+ // Last year months
+ if(($i >= 8) && ($i <= 12))
+ $array['month_'.$i++] = 0;
+
+ // First year months
+ else
+ $array['month_'.$j++] = 0;
+ }
+ }
+
+ // Try to read the saved data
+ $months_data = readXML('access', 'months');
+
+ // Get the XML file values
+ if($months_data) {
+ // Initialize the visits reading
+ $read_xml = new SimpleXMLElement($months_data);
+
+ // Loop the visit elements
+ foreach($read_xml->children() as $current_child) {
+ $current_month = $current_child->getName();
+
+ // Parse the current month id
+ $current_id = intval(preg_replace('/month_([0-9]+)/i', '$1', $current_month));
+
+ // Is this month still valid?
+ if((($month <= 8) && ($current_id <= $month)) || (($month >= 8) && ($current_id >= 8) && ($current_id <= $month)))
+ $array[$current_month] = intval($current_child);
+ }
+ }
+
+ // Increment the current month value
+ $array['month_'.$month]++;
+
+ // Generate the new XML data
+ $months_xml = '';
+
+ foreach($array as $array_key => $array_value)
+ $months_xml .= "\n".' <'.$array_key.'>'.$array_value.''.$array_key.'>';
+
+ // Re-write the new values
+ writeXML('access', 'months', $months_xml);
+}
+
+// Writes the current visit to the storage file
+function writeVisit() {
+ // Write total visits
+ writeTotalVisit();
+
+ // Write months visits
+ writeMonthsVisit();
+}
+
+// Returns the default background array
+function defaultBackground() {
+ // Define the default values
+ $background_default = array(
+ 'type' => 'default',
+ 'image_file' => '',
+ 'image_repeat' => 'repeat-x',
+ 'image_horizontal' => 'center',
+ 'image_vertical' => 'top',
+ 'image_adapt' => 'off',
+ 'image_color' => '#cae1e9',
+ 'color_color' => '#cae1e9'
+ );
+
+ return $background_default;
+}
+
+// Reads the notice configuration
+function readNotice() {
+ // Read the notice configuration XML
+ $notice_data = readXML('conf', 'notice');
+
+ // Define the default values
+ $notice_default = array(
+ 'type' => 'none',
+ 'notice' => ''
+ );
+
+ // Stored data array
+ $notice_conf = array();
+
+ // Read the stored values
+ if($notice_data) {
+ // Initialize the notice configuration XML data
+ $notice_xml = new SimpleXMLElement($notice_data);
+
+ // Loop the notice configuration elements
+ foreach($notice_xml->children() as $notice_child)
+ $notice_conf[$notice_child->getName()] = utf8_decode($notice_child);
+ }
+
+ // Checks no value is missing in the stored configuration
+ foreach($notice_default as $notice_name => $notice_value) {
+ if(!isset($notice_conf[$notice_name]) || empty($notice_conf[$notice_name]))
+ $notice_conf[$notice_name] = $notice_default[$notice_name];
+ }
+
+ return $notice_conf;
+}
+
+// The function to get the admin users
+function getUsers() {
+ // Try to read the XML file
+ $data = readXML('conf', 'users');
+ $array = array();
+
+ // Any data?
+ if($data) {
+ $read = new SimpleXMLElement($data);
+
+ // Check the submitted user exists
+ foreach($read->children() as $child) {
+ // Get the node attributes
+ $attributes = $child->attributes();
+
+ // Push the attributes to the global array (converted into strings)
+ $array[$attributes['name'].''] = $attributes['password'].'';
+ }
+ }
+
+ return $array;
+}
+
+// Manages users
+function manageUsers($action, $array) {
+ // Try to read the old XML file
+ $users_array = getUsers();
+
+ // What must we do?
+ switch($action) {
+ // Add some users
+ case 'add':
+ foreach($array as $array_user => $array_password)
+ $users_array[$array_user] = genStrongHash($array_password);
+
+ break;
+
+ // Remove some users
+ case 'remove':
+ foreach($array as $array_user) {
+ // Not the last user?
+ if(count($users_array) > 1)
+ unset($users_array[$array_user]);
+ }
+
+ break;
+ }
+
+ // Regenerate the XML
+ $users_xml = '';
+
+ foreach($users_array as $users_name => $users_password)
+ $users_xml .= "\n".' ';
+
+ // Write the main configuration
+ writeXML('conf', 'users', $users_xml);
+}
+
+// Resize an image with GD
+function resizeImage($path, $ext, $width, $height) {
+ // No GD?
+ if(!function_exists('gd_info'))
+ return false;
+
+ try {
+ // Initialize GD
+ switch($ext) {
+ case 'png':
+ $img_resize = imagecreatefrompng($path);
+
+ break;
+
+ case 'gif':
+ $img_resize = imagecreatefromgif($path);
+
+ break;
+
+ default:
+ $img_resize = imagecreatefromjpeg($path);
+ }
+
+ // Get the image size
+ $img_size = getimagesize($path);
+ $img_width = $img_size[0];
+ $img_height = $img_size[1];
+
+ // Necessary to change the image width
+ if($img_width > $width && ($img_width > $img_height)) {
+ // Process the new sizes
+ $new_width = $width;
+ $img_process = (($new_width * 100) / $img_width);
+ $new_height = (($img_height * $img_process) / 100);
+ }
+
+ // Necessary to change the image height
+ else if($img_height > $height && ($img_width < $img_height)) {
+ // Process the new sizes
+ $new_height = $height;
+ $img_process = (($new_height * 100) / $img_height);
+ $new_width = (($img_width * $img_process) / 100);
+ }
+
+ // Else, just use the old sizes
+ else {
+ $new_width = $img_width;
+ $new_height = $img_height;
+ }
+
+ // Create the new image
+ $new_img = imagecreatetruecolor($new_width, $new_height);
+
+ // Must keep alpha pixels?
+ if(($ext == 'png') || ($ext == 'gif')){
+ imagealphablending($new_img, false);
+ imagesavealpha($new_img, true);
+
+ // Set transparent pixels
+ $transparent = imagecolorallocatealpha($new_img, 255, 255, 255, 127);
+ imagefilledrectangle($new_img, 0, 0, $new_width, $new_height, $transparent);
+ }
+
+ // Copy the new image
+ imagecopyresampled($new_img, $img_resize, 0, 0, 0, 0, $new_width, $new_height, $img_size[0], $img_size[1]);
+
+ // Destroy the old data
+ imagedestroy($img_resize);
+ unlink($path);
+
+ // Write the new image
+ switch($ext) {
+ case 'png':
+ imagepng($new_img, $path);
+
+ break;
+
+ case 'gif':
+ imagegif($new_img, $path);
+
+ break;
+
+ default:
+ imagejpeg($new_img, $path, 85);
+ }
+
+ return true;
+ }
+
+ catch(Exception $e) {
+ return false;
+ }
+}
+
+?>
diff --git a/jappixmini/jappix/php/generate-chat.php b/jappixmini/jappix/php/generate-chat.php
new file mode 100644
index 000000000..19c8e71cb
--- /dev/null
+++ b/jappixmini/jappix/php/generate-chat.php
@@ -0,0 +1,235 @@
+'.$avatar.'';
+ else
+ $avatar = '';
+
+ // Generates an human-readable date
+ $date = explode('T', $date);
+ $date = explode('-', $date[0]);
+ $date = $date[2].'/'.$date[1].'/'.$date[0];
+
+ // Generate some values
+ $content_dir = '../store/logs/';
+ $filename = 'chat_log-'.md5($xid.time());
+ $filepath = $content_dir.$filename.'.html';
+
+ // Generate Jappix logo Base64 code
+ $logo = base64_encode(file_get_contents(JAPPIX_BASE.'/img/sprites/logs.png'));
+
+ // Create the HTML code
+ $new_text_inter =
+'
+
+
+
+
+ '.$nick.' ('.$xid.')
+
+
+
+
+