]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote branch 'upstream/master'
authorMichael Vogel <icarus@dabo.de>
Fri, 29 Jun 2012 19:43:49 +0000 (21:43 +0200)
committerMichael Vogel <icarus@dabo.de>
Fri, 29 Jun 2012 19:43:49 +0000 (21:43 +0200)
Conflicts:
include/items.php

55 files changed:
boot.php
database.sql
include/api.php
include/bb2diaspora.php
include/bbcode.php
include/conversation.php
include/datetime.php
include/delivery.php
include/diaspora.php
include/event.php
include/follow.php
include/items.php
include/network.php
include/notifier.php
include/onepoll.php
include/plugin.php
include/profile_advanced.php
include/text.php
include/user.php
js/country.js
js/jquery.js
mod/dfrn_confirm.php
mod/events.php
mod/item.php
mod/like.php
mod/lockview.php
mod/parse_url.php
mod/photos.php
mod/profiles.php
mod/settings.php
mod/share.php
mod/wall_attach.php
mod/wall_upload.php
update.php
util/messages.po
view/en/update_fail_eml.tpl
view/event_form.tpl
view/photos_upload.tpl
view/profile_advanced.tpl
view/profile_edit.tpl
view/theme/diabook/jot.tpl
view/theme/diabook/theme.php
view/theme/dispy/conversation.tpl
view/theme/dispy/dark/style.css
view/theme/dispy/dark/style.less
view/theme/dispy/jot.tpl
view/theme/dispy/light/style.css
view/theme/dispy/light/style.less
view/theme/dispy/wall_item.tpl
view/theme/dispy/wallwall_item.tpl
view/theme/duepuntozero/style.css
view/theme/slackr/birthdays_reminder.tpl
view/theme/slackr/style.css
view/wall_item.tpl
view/wallwall_item.tpl

index be47184aa254e541c5c52c104f88a162b622c814..973e3578a66804c1f4fd7aea2819b73a6aaac5b4 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -10,9 +10,9 @@ require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
-define ( 'FRIENDICA_VERSION',      '3.0.1382' );
+define ( 'FRIENDICA_VERSION',      '3.0.1388' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1149      );
+define ( 'DB_UPDATE_VERSION',      1151      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@ -434,6 +434,8 @@ if(! class_exists('App')) {
                        $this->pager['page'] = ((x($_GET,'page') && intval($_GET['page']) > 0) ? intval($_GET['page']) : 1);
                        $this->pager['itemspage'] = 50;
                        $this->pager['start'] = ($this->pager['page'] * $this->pager['itemspage']) - $this->pager['itemspage'];
+                       if($this->pager['start'] < 1)
+                               $this->pager['start'] = 1;
                        $this->pager['total'] = 0;
                }
 
@@ -1252,6 +1254,9 @@ if(! function_exists('get_birthdays')) {
                        '$event_reminders' => t('Birthday Reminders'),
                        '$event_title' => t('Birthdays this week:'),
                        '$events' => $r,
+                       '$lbr' => '{',  // raw brackets mess up if/endif macro processing
+                       '$rbr' => '}'
+
                ));
        }
 }
@@ -1374,9 +1379,9 @@ if(! function_exists('proc_run')) {
 
                if(count($args) && $args[0] === 'php')
                        $args[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
-               foreach ($args as $arg){
-                       $arg = escapeshellarg($arg);
-               }
+               for($x = 0; $x < count($args); $x ++)
+                       $args[$x] = escapeshellarg($args[$x]);
+
                $cmdline = implode($args," ");
                proc_close(proc_open($cmdline." &",array(),$foo));
        }
index 53dc0c5b215c77248563c9cb6246cba62ff646d8..b3b8c3a060a0b54432d8121c174bd16af501624d 100644 (file)
@@ -254,6 +254,7 @@ CREATE TABLE IF NOT EXISTS `event` (
   `edited` datetime NOT NULL,
   `start` datetime NOT NULL,
   `finish` datetime NOT NULL,
+  `summary` text NOT NULL,
   `desc` text NOT NULL,
   `location` text NOT NULL,
   `type` char(255) NOT NULL,
@@ -263,7 +264,14 @@ CREATE TABLE IF NOT EXISTS `event` (
   `allow_gid` mediumtext NOT NULL,
   `deny_cid` mediumtext NOT NULL,
   `deny_gid` mediumtext NOT NULL,
-  PRIMARY KEY (`id`)
+  PRIMARY KEY (`id`),
+  KEY `uid` ( `uid` ),
+  KEY `cid` ( `cid` ),
+  KEY `uri` ( `uri` ),
+  KEY `type` ( `type` ),
+  KEY `start` ( `start` ),
+  KEY `finish` ( `finish` ),
+  KEY `adjust` ( `adjust` )
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
 -- --------------------------------------------------------
@@ -831,6 +839,8 @@ CREATE TABLE IF NOT EXISTS `profile` (
   `religion` char(255) NOT NULL,
   `pub_keywords` text NOT NULL,
   `prv_keywords` text NOT NULL,
+  `likes` text NOT NULL,
+  `dislikes` text NOT NULL,
   `about` text NOT NULL,
   `summary` char(255) NOT NULL,
   `music` text NOT NULL,
index b77156dfaefbe6ea319f827dedbcb717cc126977..d790b4b875516bc39f661b99041723b8998d1c10 100644 (file)
                if(requestdata('lat') && requestdata('long'))
                        $_REQUEST['coord'] = sprintf("%s %s",requestdata('lat'),requestdata('long'));
                $_REQUEST['profile_uid'] = local_user();
-               if(requestdata('parent'))
+
+               if($parent)
                        $_REQUEST['type'] = 'net-comment';
                else {
                        $_REQUEST['type'] = 'wall';
-                        if(x($_FILES,'media')) {
-                               // upload the image if we have one
-                               $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo
-                               require_once('mod/wall_upload.php');
-                               $media = wall_upload_post($a);
-                               if(strlen($media)>0)
-                                       $_REQUEST['body'] .= "\n\n".$media;
-                               }
+                       if(x($_FILES,'media')) {
+                               // upload the image if we have one
+                               $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo
+                               require_once('mod/wall_upload.php');
+                               $media = wall_upload_post($a);
+                               if(strlen($media)>0)
+                                       $_REQUEST['body'] .= "\n\n".$media;
+                       }
                }
 
                // set this so that the item_post() function is quiet and doesn't redirect or emit json
                logger('API: api_statuses_show: '.$id);
 
                //$include_entities = (x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:false);
-               //$sql_extra = "";
-               if ($_GET["conversation"] == "true") $sql_extra .= " AND `item`.`parent` = %d  ORDER BY `received` ASC "; else $sql_extra .= " AND `item`.`id` = %d";
+               $conversation = (x($_REQUEST,'conversation')?1:0);
+
+               $sql_extra = '';
+               if ($conversation)
+                       $sql_extra .= " AND `item`.`parent` = %d  ORDER BY `received` ASC ";
+               else
+                       $sql_extra .= " AND `item`.`id` = %d";
 
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
                        `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
                        WHERE `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
                        AND `contact`.`id` = `item`.`contact-id`
                        AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
-                       $sql_extra
-                       ",
+                       $sql_extra",
                        intval($id)
                );
-//var_dump($r);
+
                $ret = api_format_items($r,$user_info);
-//var_dump($ret);
-               if ($_GET["conversation"] == "true") {
+
+               if ($conversation) {
                        $data = array('$statuses' => $ret);
-                       return  api_apply_template("timeline", $type, $data);
+                       return api_apply_template("timeline", $type, $data);
                } else {
                        $data = array('$status' => $ret[0]);
                        /*switch($type){
                return($as);
        }
 
+       function api_format_messages($item, $recipient, $sender) {
+               // standard meta information
+               $ret=Array(
+                               'id'                    => $item['id'],
+                               'created_at'            => api_date($item['created']),
+                               'sender_id'             => $sender['id'] ,
+                               'sender_screen_name'    => $sender['screen_name'],
+                               'sender'                => $sender,
+                               'recipient_id'          => $recipient['id'],
+                               'recipient_screen_name' => $recipient['screen_name'],
+                               'recipient'             => $recipient,
+               );
+
+               //don't send title to regular StatusNET requests to avoid confusing these apps
+               if (x($_GET, 'getText')) {
+                       $ret['title'] = $item['title'] ;
+                       if ($_GET["getText"] == "html") {
+                               $ret['text'] = bbcode($item['body']);
+                       }
+                       elseif ($_GET["getText"] == "plain") {
+                               $ret['text'] = html2plain(bbcode($item['body']), 0);
+                       }
+               }
+               else {
+                       $ret['text'] = $item['title']."\n".html2plain(bbcode($item['body']), 0);
+               }
+               if (isset($_GET["getUserObjects"]) && $_GET["getUserObjects"] == "false") {
+                       unset($ret['sender']);
+                       unset($ret['recipient']);
+               }
+
+               return $ret;
+       }
+
        function api_format_items($r,$user_info) {
 
                //logger('api_format_items: ' . print_r($r,true));
                                'logo' => $logo, 'fancy' => 'true', 'language' => 'en', 'email' => $email, 'broughtby' => '',
                                'broughtbyurl' => '', 'timezone' => 'UTC', 'closed' => $closed, 'inviteonly' => 'false',
                                'private' => $private, 'textlimit' => $textlimit, 'sslserver' => $sslserver, 'ssl' => $ssl,
-                               'shorturllength' => '30'
+                               'shorturllength' => '30',
+        'friendica' => array(
+                             'FRIENDICA_PLATFORM' => FRIENDICA_PLATFORM,
+                             'FRIENDICA_VERSION' => FRIENDICA_VERSION,
+                             'DFRN_PROTOCOL_VERSION' => DFRN_PROTOCOL_VERSION,
+                             'DB_UPDATE_VERSION' => DB_UPDATE_VERSION
+                             )
                        ),
                );  
 
                if (local_user()===false) return false;
                
                if (!x($_POST, "text") || !x($_POST,"screen_name")) return;
-               
+
                $sender = api_get_user($a);
                
+               require_once("include/message.php");
+
                $r = q("SELECT `id` FROM `contact` WHERE `uid`=%d AND `nick`='%s'",
                                intval(local_user()),
                                dbesc($_POST['screen_name']));
-               
+
                $recipient = api_get_user($a, $r[0]['id']);                     
-               
+               $replyto = '';
+               $sub     = '';
+               if (x($_REQUEST,'replyto')) {
+                       $r = q('SELECT `parent-uri`, `title` FROM `mail` WHERE `uid`=%d AND `id`=%d',
+                                       intval(local_user()),
+                                       intval($_REQUEST['replyto']));
+                       $replyto = $r[0]['parent-uri'];
+                       $sub     = $r[0]['title'];
+               }
+               else {
+                       if (x($_REQUEST,'title')) {
+                               $sub = $_REQUEST['title'];
+                       }
+                       else {
+                               $sub = ((strlen($_POST['text'])>10)?substr($_POST['text'],0,10)."...":$_POST['text']);
+                       }
+               }
+
+               $id = send_message($recipient['id'], $_POST['text'], $sub, $replyto);
 
-               require_once("include/message.php");
-               $sub = ( (strlen($_POST['text'])>10)?substr($_POST['text'],0,10)."...":$_POST['text']);
-               $id = send_message($recipient['id'], $_POST['text'], $sub);
-               
-               
                if ($id>-1) {
                        $r = q("SELECT * FROM `mail` WHERE id=%d", intval($id));
-                       $item = $r[0];
-                       $ret=Array(
-                                       'id' => $item['id'],
-                                       'created_at'=> api_date($item['created']),
-                                       'sender_id'=> $sender['id'] ,
-                                       'sender_screen_name'=> $sender['screen_name'],
-                                       'sender'=> $sender,
-                                       'recipient_id'=> $recipient['id'],
-                                       'recipient_screen_name'=> $recipient['screen_name'],
-                                       'recipient'=> $recipient,
-                                       
-                                       'text'=> $item['title']."\n".html2plain(bbcode($item['body']), 0) ,
-                                       
-                       );
+                       $ret = api_format_messages($r[0], $recipient, $sender);
                
                } else {
                        $ret = array("error"=>$id);     
        }
        api_register_func('api/direct_messages/new','api_direct_messages_new',true);
 
-    function api_direct_messages_box(&$a, $type, $box) {
+       function api_direct_messages_box(&$a, $type, $box) {
                if (local_user()===false) return false;
                
                $user_info = api_get_user($a);
                
                $start = $page*$count;
                
-       
+               $profile_url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
                if ($box=="sentbox") {
-                       $sql_extra = "`from-url`='%s'";
-               } else {
-                       $sql_extra = "`from-url`!='%s'";
+                       $sql_extra = "`from-url`='".dbesc( $profile_url )."'";
+               }
+               elseif ($box=="conversation") {
+                       $sql_extra = "`parent-uri`='".dbesc( $_GET["uri"] )  ."'";
+               }
+               elseif ($box=="all") {
+                       $sql_extra = "true";
+               }
+               elseif ($box=="inbox") {
+                       $sql_extra = "`from-url`!='".dbesc( $profile_url )."'";
                }
                
                $r = q("SELECT * FROM `mail` WHERE uid=%d AND $sql_extra ORDER BY created DESC LIMIT %d,%d",
                                intval(local_user()),
-                               dbesc( $a->get_baseurl() . '/profile/' . $a->user['nickname'] ),
                                intval($start), intval($count)
-                          );
+               );
                
                $ret = Array();
-               foreach($r as $item){
-                       switch ($box){
-                               case "inbox":
-                                       $recipient = $user_info;
-                                       $sender = api_get_user($a,$item['contact-id']);
-                                       break;
-                               case "sentbox":
-                                       $recipient = api_get_user($a,$item['contact-id']);
-                                       $sender = $user_info;
-                                       break;
+               foreach($r as $item) {
+                       if ($box == "inbox" || $item['from-url'] != $profile_url){
+                               $recipient = $user_info;
+                               $sender = api_get_user($a,$item['contact-id']);
                        }
-                               
-                       $ret[]=Array(
-                               'id' => $item['id'],
-                               'created_at'=> api_date($item['created']),
-                               'sender_id'=> $sender['id'] ,
-                               'sender_screen_name'=> $sender['screen_name'],
-                               'sender'=> $sender,
-                               'recipient_id'=> $recipient['id'],
-                               'recipient_screen_name'=> $recipient['screen_name'],
-                               'recipient'=> $recipient,
-                               
-                               'text'=> $item['title']."\n".html2plain(bbcode($item['body']), 0) ,
-                               
-                       );
-                       
+                       elseif ($box == "sentbox" || $item['from-url'] != $profile_url){
+                               $recipient = api_get_user($a,$item['contact-id']);
+                               $sender = $user_info;
+                       }
+
+                       $ret[]=api_format_messages($item, $recipient, $sender);
                }
                
 
        function api_direct_messages_inbox(&$a, $type){
                return api_direct_messages_box($a, $type, "inbox");
        }
+       function api_direct_messages_all(&$a, $type){
+               return api_direct_messages_box($a, $type, "all");
+       }
+       function api_direct_messages_conversation(&$a, $type){
+               return api_direct_messages_box($a, $type, "conversation");
+       }
+       api_register_func('api/direct_messages/conversation','api_direct_messages_conversation',true);
+       api_register_func('api/direct_messages/all','api_direct_messages_all',true);
        api_register_func('api/direct_messages/sent','api_direct_messages_sentbox',true);
        api_register_func('api/direct_messages','api_direct_messages_inbox',true);
 
index 96cc735bdba393ee6a0ba65b929749ccbd2e63bd..77a5f5c2a0b3cc6183c16feafb32d89819db3e23 100644 (file)
@@ -68,9 +68,14 @@ function stripdcode_br_cb($s) {
 
 
 function diaspora_ul($s) {
-       // Replace "[\\*]" followed by any number (including zero) of
+       // Replace "[*]" followed by any number (including zero) of
        // spaces by "* " to match Diaspora's list format
-       return preg_replace("/\[\\\\\*\]( *)/", "* ", $s[1]);
+       if( strpos($s[0], "[list]") === 0 )
+               return '<ul class="listbullet" style="list-style-type: circle;">' . preg_replace("/\[\*\]( *)/", "* ", $s[1]) . '</ul>';
+       elseif( strpos($s[0], "[ul]") === 0 )
+               return '<ul class="listbullet" style="list-style-type: circle;">' . preg_replace("/\[\*\]( *)/", "* ", $s[1]) . '</ul>';
+       else
+               return $s[0];
 }
 
 
@@ -80,12 +85,47 @@ function diaspora_ol($s) {
        //              1. First element
        //              1. Second element
        //              1. Third element
-       return preg_replace("/\[\\\\\*\]( *)/", "1. ", $s[1]);
+       if( strpos($s[0], "[list=1]") === 0 )
+               return '<ul class="listdecimal" style="list-style-type: decimal;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+       elseif( strpos($s[0], "[list=i]") === 0 )
+               return '<ul class="listlowerroman" style="list-style-type: lower-roman;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+       elseif( strpos($s[0], "[list=I]") === 0 )
+               return '<ul class="listupperroman" style="list-style-type: upper-roman;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+       elseif( strpos($s[0], "[list=a]") === 0 )
+               return '<ul class="listloweralpha" style="list-style-type: lower-alpha;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+       elseif( strpos($s[0], "[list=A]") === 0 )
+               return '<ul class="listupperalpha" style="list-style-type: upper-alpha;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+       elseif( strpos($s[0], "[ol]") === 0 )
+               return '<ul class="listdecimal" style="list-style-type: decimal;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+       else
+               return $s[0];
 }
 
 
 function bb2diaspora($Text,$preserve_nl = false) {
 
+       // bbcode() will convert "[*]" into "<li>" with no closing "</li>"
+       // Markdownify() is unable to handle these, as it makes each new
+       // "<li>" into a deeper nested element until it crashes. So pre-format
+       // the lists as Diaspora lists before sending the $Text to bbcode()
+       //
+       // Note that to get nested lists to work for Diaspora, we would need
+       // to define the closing tag for the list elements. So nested lists
+       // are going to be flattened out in Diaspora for now
+       $endlessloop = 0;
+       while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) ||
+              ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) || 
+              ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false))) && (++$endlessloop < 20)) {
+               $Text = preg_replace_callback("/\[list\](.*?)\[\/list\]/is", 'diaspora_ul', $Text);
+               $Text = preg_replace_callback("/\[list=1\](.*?)\[\/list\]/is", 'diaspora_ol', $Text);
+               $Text = preg_replace_callback("/\[list=i\](.*?)\[\/list\]/s",'diaspora_ol', $Text);
+               $Text = preg_replace_callback("/\[list=I\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+               $Text = preg_replace_callback("/\[list=a\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+               $Text = preg_replace_callback("/\[list=A\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+               $Text = preg_replace_callback("/\[ul\](.*?)\[\/ul\]/is", 'diaspora_ul', $Text);
+               $Text = preg_replace_callback("/\[ol\](.*?)\[\/ol\]/is", 'diaspora_ol', $Text);
+       }
+
        // Convert it to HTML - don't try oembed
        $Text = bbcode($Text, $preserve_nl, false);
 
@@ -93,6 +133,12 @@ function bb2diaspora($Text,$preserve_nl = false) {
        $md = new Markdownify(false, false, false);
        $Text = $md->parseString($Text);
 
+       // If the text going into bbcode() has a plain URL in it, i.e.
+       // with no [url] tags around it, it will come out of parseString()
+       // looking like: <http://url.com>, which gets removed by strip_tags().
+       // So take off the angle brackets of any such URL
+       $Text = preg_replace("/<http(.*?)>/is", "http$1", $Text);
+
        // Remove all unconverted tags
        $Text = strip_tags($Text);
 
index f542ad263c8d2a0f741796d13b03c3cb00da6705..9071c767b692e3e25bd84699a31c67b8bb04b220 100644 (file)
@@ -162,7 +162,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
 
        // handle nested lists
        $endlessloop = 0;
-       while ((strpos($Text, "[/list]") !== false) and (strpos($Text, "[list") !== false) and (++$endlessloop < 20)) {
+
+       while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) ||
+              ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) || 
+              ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false))) && (++$endlessloop < 20)) {
                $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
                $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '<ul class="listnone" style="list-style-type: none;">$1</ul>' ,$Text);
                $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
@@ -170,11 +173,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
                $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '<ul class="listupperroman" style="list-style-type: upper-roman;">$2</ul>' ,$Text);
                $Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$2</ul>' ,$Text);
                $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$2</ul>' ,$Text);
+               $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
+               $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
        }
 
-       $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
-       $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
-
        $Text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '<th>$1</th>' ,$Text);
        $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '<td>$1</td>' ,$Text);
        $Text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '<tr>$1</tr>' ,$Text);
@@ -295,12 +297,16 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
        $Text = oembed_bbcode2html($Text);
 
        // If we found an event earlier, strip out all the event code and replace with a reformatted version.
+       // Replace the event-start section with the entire formatted event. The other bbcode is stripped.
+       // Summary (e.g. title) is required, earlier revisions only required description (in addition to 
+       // start which is always required). Allow desc with a missing summary for compatibility.
 
-       if(x($ev,'desc') && x($ev,'start')) {
+       if((x($ev,'desc') || x($ev,'summary')) && x($ev,'start')) {
                $sub = format_event_html($ev);
 
-               $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",$sub,$Text);
-               $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",'',$Text);
+               $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text);
+               $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",'',$Text);
+               $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",$sub,$Text); 
                $Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text);
                $Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/ism",'',$Text);
                $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text);
index 2244e8df7ff0bbd2d43fca95e1d32a835ffdfac5..f2fb2e97b4c1c7994d9f5a2e16ab094142f9afc9 100644 (file)
@@ -432,7 +432,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                        continue;
 
                                $toplevelpost = (($item['id'] == $item['parent']) ? true : false);
-                               $toplevelprivate = false;
+
 
                                // Take care of author collapsing and comment collapsing
                                // (author collapsing is currently disabled)
@@ -440,7 +440,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                // If there are more than two comments, squash all but the last 2.
                        
                                if($toplevelpost) {
-                                       $toplevelprivate = (($toplevelpost && $item['private']) ? true : false);
+
                                        $item_writeable = (($item['writable'] || $item['self']) ? true : false);
 
                                        $comments_seen = 0;
@@ -485,7 +485,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
 
                                $redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $item['cid'] ;
 
-                               $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) 
+                               $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) 
                                        || strlen($item['deny_cid']) || strlen($item['deny_gid']))))
                                        ? t('Private Message')
                                        : false);
@@ -546,16 +546,16 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                }
 
                                $likebuttons = '';
-                               $shareable = ((($profile_owner == local_user()) &&  ((! $item['private']) || $item['network'] === NETWORK_FEED)) ? true : false); 
+                               $shareable = ((($profile_owner == local_user()) && (! $item['private'] == 1)) ? true : false); 
 
                                if($page_writeable) {
-                                       if($toplevelpost) {
+/*                                     if($toplevelpost) {  */
                                                $likebuttons = array(
                                                        'like' => array( t("I like this \x28toggle\x29"), t("like")),
                                                        'dislike' => array( t("I don't like this \x28toggle\x29"), t("dislike")),
                                                );
                                                if ($shareable) $likebuttons['share'] = array( t('Share this'), t('share'));
-                                       }
+/*                                     } */
 
                                        $qc = $qcomment =  null;
 
@@ -659,8 +659,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                else
                                        $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($thumb));
 
-                               $like    = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
-                               $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
+                               $like    = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
+                               $dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
 
                                $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
                                call_hooks('render_location',$locate);
@@ -876,13 +876,17 @@ function like_puller($a,$item,&$arr,$mode) {
                }
                else
                        $url = zrl($url);
-               if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
-                       $arr[$item['parent'] . '-l'] = array();
-               if(! isset($arr[$item['parent']]))
-                       $arr[$item['parent']] = 1;
+
+               if(! $item['thr-parent'])
+                       $item['thr-parent'] = $item['parent-uri'];
+
+               if(! ((isset($arr[$item['thr-parent'] . '-l'])) && (is_array($arr[$item['thr-parent'] . '-l']))))
+                       $arr[$item['thr-parent'] . '-l'] = array();
+               if(! isset($arr[$item['thr-parent']]))
+                       $arr[$item['thr-parent']] = 1;
                else    
-                       $arr[$item['parent']] ++;
-               $arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
+                       $arr[$item['thr-parent']] ++;
+               $arr[$item['thr-parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
        }
        return;
 }}
index 58a6186108472adc123e1445fa3f2aea69366f70..75ae685f3ae2b3d23dfba2cdfe2a9db9bb1e235b 100644 (file)
@@ -447,11 +447,13 @@ function update_contact_birthdays() {
                         *
                         */
                         
-                       $bdtext = t('Birthday:') . ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]' ;
+                       $bdtext = sprintf( t('%s\'s birthday'), $rr['name']);
+                       $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ;
 
 
-                       $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`desc`,`type`,`adjust`)
-                               VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ",
+
+                       $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`,`adjust`)
+                               VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ",
                                intval($rr['uid']),
                                intval($rr['id']),
                                dbesc(datetime_convert()),
@@ -459,6 +461,7 @@ function update_contact_birthdays() {
                                dbesc(datetime_convert('UTC','UTC', $nextbd)),
                                dbesc(datetime_convert('UTC','UTC', $nextbd . ' + 1 day ')),
                                dbesc($bdtext),
+                               dbesc($bdtext2),
                                dbesc('birthday'),
                                intval(0)
                        );
index e6cfc8155430ecb8f594d8744aa0af1e28787ff0..1328771a6789bb3e623459e95e70ec76fd009c50 100644 (file)
@@ -113,7 +113,7 @@ function delivery_run($argv, $argc){
                        $uid = $r[0]['uid'];
                        $updated = $r[0]['edited'];
 
-                       // The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
+                       // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
                        if(! $parent_id)
                                continue;
 
@@ -280,7 +280,7 @@ function delivery_run($argv, $argc){
                                                continue;
 
                                        // private emails may be in included in public conversations. Filter them.
-                                       if(($public_message) && $item['private'])
+                                       if(($public_message) && $item['private'] == 1)
                                                continue;
 
                                        $item_contact = get_item_contact($item,$icontacts);
@@ -383,7 +383,7 @@ function delivery_run($argv, $argc){
                                                        continue;
 
                                                // private emails may be in included in public conversations. Filter them.
-                                               if(($public_message) && $item['private'])
+                                               if(($public_message) && $item['private'] == 1)
                                                        continue;
        
                                                $item_contact = get_item_contact($item,$icontacts);
index 80fb104046f827fae5a9b426b90239498d73e7b0..a398007e197d206629caa3b17cd92fd5845eb27b 100755 (executable)
@@ -1560,7 +1560,8 @@ function diaspora_photo($importer,$xml,$msg) {
 
        $link_text = '[img]' . $remote_photo_path . $remote_photo_name . '[/img]' . "\n";
 
-       $link_text = scale_external_images($link_text);
+       $link_text = scale_external_images($link_text, true,
+                                          array($remote_photo_name, 'scaled_full_' . $remote_photo_name));
 
        if(strpos($parent_item['body'],$link_text) === false) {
                $r = q("update item set `body` = '%s', `visible` = 1 where `id` = %d and `uid` = %d limit 1",
@@ -2251,7 +2252,6 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
                $relay_retract = true;
 
                $target_type = ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
-               $sender_signed_text = $item['guid'] . ';' . $target_type ;
 
                $sql_sign_id = 'retract_iid';
                $tpl = get_markup_template('diaspora_relayable_retraction.tpl');
@@ -2262,13 +2262,10 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
                $target_type = 'Post';
 //             $positive = (($item['deleted']) ? 'false' : 'true');
                $positive = 'true';
-               $sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent_guid . ';' . $positive . ';' . $myaddr;
 
                $tpl = get_markup_template('diaspora_like_relay.tpl');
        }
        else { // item is a comment
-               $sender_signed_text = $item['guid'] . ';' . $parent_guid . ';' . $text . ';' . $myaddr;
-
                $tpl = get_markup_template('diaspora_comment_relay.tpl');
        }
 
@@ -2294,6 +2291,13 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
                return;
        }
 
+       if($relay_retract)
+               $sender_signed_text = $item['guid'] . ';' . $target_type;
+       elseif($like)
+               $sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent_guid . ';' . $positive . ';' . $handle;
+       else
+               $sender_signed_text = $item['guid'] . ';' . $parent_guid . ';' . $text . ';' . $handle;
+
        // Sign the relayable with the top-level owner's signature
        //
        // We'll use the $sender_signed_text that we just created, instead of the $signed_text
index 866ae8c3f006370c7f0bae151995e47a5cad2934..8aef0a263613cd8db9afaadf8cfa34361e9cec3d 100644 (file)
@@ -12,6 +12,9 @@ function format_event_html($ev) {
 
        $o = '<div class="vevent">' . "\r\n";
 
+
+       $o .= '<p class="summary event-summary">' . bbcode($ev['summary']) .  '</p>' . "\r\n";
+
        $o .= '<p class="description event-description">' . bbcode($ev['desc']) .  '</p>' . "\r\n";
 
        $o .= '<p class="event-start">' . t('Starts:') . ' <abbr class="dtstart" title="'
@@ -114,6 +117,9 @@ function format_event_bbcode($ev) {
 
        $o = '';
 
+       if($ev['summary'])
+               $o .= '[event-summary]' . $ev['summary'] . '[/event-summary]';
+
        if($ev['desc'])
                $o .= '[event-description]' . $ev['desc'] . '[/event-description]';
 
@@ -147,6 +153,9 @@ function bbtoevent($s) {
 
        $ev = array();
 
+       $match = '';
+       if(preg_match("/\[event\-summary\](.*?)\[\/event\-summary\]/is",$s,$match))
+               $ev['summary'] = $match[1];
        $match = '';
        if(preg_match("/\[event\-description\](.*?)\[\/event\-description\]/is",$s,$match))
                $ev['desc'] = $match[1];
@@ -244,6 +253,7 @@ function event_store($arr) {
                        `edited` = '%s',
                        `start` = '%s',
                        `finish` = '%s',
+                       `summary` = '%s',
                        `desc` = '%s',
                        `location` = '%s',
                        `type` = '%s',
@@ -258,6 +268,7 @@ function event_store($arr) {
                        dbesc($arr['edited']),
                        dbesc($arr['start']),
                        dbesc($arr['finish']),
+                       dbesc($arr['summary']),
                        dbesc($arr['desc']),
                        dbesc($arr['location']),
                        dbesc($arr['type']),
@@ -306,9 +317,9 @@ function event_store($arr) {
 
                // New event. Store it. 
 
-               $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`desc`,`location`,`type`,
+               $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`summary`, `desc`,`location`,`type`,
                        `adjust`,`nofinish`,`allow_cid`,`allow_gid`,`deny_cid`,`deny_gid`)
-                       VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ",
+                       VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ",
                        intval($arr['uid']),
                        intval($arr['cid']),
                        dbesc($arr['uri']),
@@ -316,6 +327,7 @@ function event_store($arr) {
                        dbesc($arr['edited']),
                        dbesc($arr['start']),
                        dbesc($arr['finish']),
+                       dbesc($arr['summary']),
                        dbesc($arr['desc']),
                        dbesc($arr['location']),
                        dbesc($arr['type']),
index 22288a0daf64b1d01ed134de487f494852012187..b4d1732b88091e5e7b21af3d5c71294d12955b89 100644 (file)
@@ -62,6 +62,11 @@ function new_contact($uid,$url,$interactive = false) {
                }
        }
        
+
+
+
+
+
        // This extra param just confuses things, remove it
        if($ret['network'] === NETWORK_DIASPORA)
                $ret['url'] = str_replace('?absolute=true','',$ret['url']);
@@ -89,6 +94,11 @@ function new_contact($uid,$url,$interactive = false) {
                $ret['notify'] = '';
        }
 
+
+
+
+
+
        if(! $ret['notify']) {
                $result['message'] .=  t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL;
        }
@@ -129,6 +139,32 @@ function new_contact($uid,$url,$interactive = false) {
        }
        else {
 
+
+               // check service class limits
+
+               $r = q("select count(*) as total from contact where uid = %d and pending = 0 and self = 0",
+                       intval($uid)
+               );
+               if(count($r))
+                       $total_contacts = $r[0]['total'];
+
+               if(! service_class_allows($uid,'total_contacts',$total_contacts)) {
+                       $result['message'] .= upgrade_message();
+                       return $result;
+               }
+
+               $r = q("select count(network) as total from contact where uid = %d and network = '%s' and pending = 0 and self = 0",
+                       intval($uid),
+                       dbesc($network)
+               );
+               if(count($r))
+                       $total_network = $r[0]['total'];
+
+               if(! service_class_allows($uid,'total_contacts_' . $network,$total_network)) {
+                       $result['message'] .= upgrade_message();
+                       return $result;
+               }
+
                $new_relation = (($ret['network'] === NETWORK_MAIL) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
                if($ret['network'] === NETWORK_DIASPORA)
                        $new_relation = CONTACT_IS_FOLLOWER;
index fbd4af5f3df367065b5fd2ebab74e39065e97c06..aed0a8e6845f88ed6e7bbdb35d4d9ddf4858a67a 100755 (executable)
@@ -469,8 +469,8 @@ function get_atom_elements($feed,$item) {
                $res['last-child'] = 0;
 
        $private = $item->get_item_tags(NAMESPACE_DFRN,'private');
-       if($private && $private[0]['data'] == 1)
-               $res['private'] = 1;
+       if($private && intval($private[0]['data']) > 0)
+               $res['private'] = intval($private[0]['data']);
        else
                $res['private'] = 0;
 
@@ -817,7 +817,7 @@ function item_store($arr,$force_parent = false) {
                        // email correspondents to be private even if the overall thread is not. 
 
                        if($r[0]['private'])
-                               $arr['private'] = 1;
+                               $arr['private'] = $r[0]['private'];
 
                        // Edge case. We host a public forum that was originally posted to privately.
                        // The original author commented, but as this is a comment, the permissions
@@ -1460,11 +1460,12 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                         *
                         */
                         
-                       $bdtext = t('Birthday:') . ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ;
+                       $bdtext = sprintf( t('%s\'s birthday'), $contact['name']);
+                       $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ) ;
 
 
-                       $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`desc`,`type`)
-                               VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s' ) ",
+                       $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`)
+                               VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
                                intval($contact['uid']),
                                intval($contact['id']),
                                dbesc(datetime_convert()),
@@ -1472,6 +1473,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                dbesc(datetime_convert('UTC','UTC', $birthday)),
                                dbesc(datetime_convert('UTC','UTC', $birthday . ' + 1 day ')),
                                dbesc($bdtext),
+                               dbesc($bdtext2),
                                dbesc('birthday')
                        );
                        
@@ -1660,6 +1662,21 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                        continue;
                                }
 
+                               $force_parent = false;
+                               if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
+                                       if($contact['network'] === NETWORK_OSTATUS)
+                                               $force_parent = true;
+                                       if(strlen($datarray['title']))
+                                               unset($datarray['title']);
+                                       $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
+                                               dbesc(datetime_convert()),
+                                               dbesc($parent_uri),
+                                               intval($importer['uid'])
+                                       );
+                                       $datarray['last-child'] = 1;
+                               }
+
+
                                $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
                                        dbesc($item_id),
                                        intval($importer['uid'])
@@ -1703,19 +1720,6 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                        continue;
                                }
 
-                               $force_parent = false;
-                               if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
-                                       if($contact['network'] === NETWORK_OSTATUS)
-                                               $force_parent = true;
-                                       if(strlen($datarray['title']))
-                                               unset($datarray['title']);
-                                       $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
-                                               dbesc(datetime_convert()),
-                                               dbesc($parent_uri),
-                                               intval($importer['uid'])
-                                       );
-                                       $datarray['last-child'] = 1;
-                               }
 
                                if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) {
                                        // one way feed - no remote comment ability
@@ -1728,10 +1732,12 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                        $datarray['type'] = 'activity';
                                        $datarray['gravity'] = GRAVITY_LIKE;
                                        // only one like or dislike per person
-                                       $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1",
+                                       $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 and (`parent-uri` = '%s' OR `thr-parent` = '%s') limit 1",
                                                intval($datarray['uid']),
                                                intval($datarray['contact-id']),
-                                               dbesc($datarray['verb'])
+                                               dbesc($datarray['verb']),
+                                               dbesc($parent_uri),
+                                               dbesc($parent_uri)
                                        );
                                        if($r && count($r))
                                                continue; 
@@ -1811,6 +1817,13 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                        }
                                }
 
+                               if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
+                                       if(strlen($datarray['title']))
+                                               unset($datarray['title']);
+                                       $datarray['last-child'] = 1;
+                               }
+
+
                                $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
                                        dbesc($item_id),
                                        intval($importer['uid'])
@@ -1873,24 +1886,23 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                if(! is_array($contact))
                                        return;
 
-                               if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
-                                       if(strlen($datarray['title']))
-                                               unset($datarray['title']);
-                                       $datarray['last-child'] = 1;
-                               }
 
                                if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) {
                                                // one way feed - no remote comment ability
                                                $datarray['last-child'] = 0;
                                }
                                if($contact['network'] === NETWORK_FEED)
-                                       $datarray['private'] = 1;
+                                       $datarray['private'] = 2;
 
                                // This is my contact on another system, but it's really me.
                                // Turn this into a wall post.
 
-                               if($contact['remote_self'])
+                               if($contact['remote_self']) {
                                        $datarray['wall'] = 1;
+                                       if($contact['network'] === NETWORK_FEED) {
+                                               $datarray['private'] = 0;
+                                       }
+                               }
 
                                $datarray['parent-uri'] = $item_id;
                                $datarray['uid'] = $importer['uid'];
@@ -2148,6 +2160,67 @@ function local_delivery($importer,$data) {
                        }
                        if($deleted) {
 
+                               // check for relayed deletes to our conversation
+
+                               $is_reply = false;              
+                               $r = q("select * from item where uri = '%s' and uid = %d limit 1",
+                                       dbesc($uri),
+                                       intval($importer['importer_uid'])
+                               );
+                               if(count($r)) {
+                                       $parent_uri = $r[0]['parent-uri'];
+                                       if($r[0]['id'] != $r[0]['parent'])
+                                               $is_reply = true;
+                               }                               
+
+                               if($is_reply) {
+                                       $community = false;
+
+                                       if($importer['page-flags'] == PAGE_COMMUNITY || $importer['page-flags'] == PAGE_PRVGROUP ) {
+                                               $sql_extra = '';
+                                               $community = true;
+                                               logger('local_delivery: possible community delete');
+                                       }
+                                       else
+                                               $sql_extra = " and contact.self = 1 and item.wall = 1 ";
+                                       // was the top-level post for this reply written by somebody on this site? 
+                                       // Specifically, the recipient? 
+
+                                       $is_a_remote_delete = false;
+
+                                       $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`, 
+                                               `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item` 
+                                               LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` 
+                                               WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s')
+                                               AND `item`.`uid` = %d 
+                                               $sql_extra
+                                               LIMIT 1",
+                                               dbesc($parent_uri),
+                                               dbesc($parent_uri),
+                                               dbesc($parent_uri),
+                                               intval($importer['importer_uid'])
+                                       );
+                                       if($r && count($r))
+                                               $is_a_remote_delete = true;                     
+
+                                       // Does this have the characteristics of a community or private group comment?
+                                       // If it's a reply to a wall post on a community/prvgroup page it's a 
+                                       // valid community comment. Also forum_mode makes it valid for sure. 
+                                       // If neither, it's not.
+
+                                       if($is_a_remote_delete && $community) {
+                                               if((! $r[0]['forum_mode']) && (! $r[0]['wall'])) {
+                                                       $is_a_remote_delete = false;
+                                                       logger('local_delivery: not a community delete');
+                                               }
+                                       }
+
+                                       if($is_a_remote_delete) {
+                                               logger('local_delivery: received remote delete');
+                                       }
+                               }
+
                                $r = q("SELECT `item`.*, `contact`.`self` FROM `item` left join contact on `item`.`contact-id` = `contact`.`id`
                                        WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1",
                                        dbesc($uri),
@@ -2235,7 +2308,11 @@ function local_delivery($importer,$data) {
                                                                );
                                                        }       
                                                }
-                                       }       
+                                               // if this is a relayed delete, propagate it to other recipients
+
+                                               if($is_a_remote_delete)
+                                                       proc_run('php',"include/notifier.php","drop",$item['id']);
+                                       }
                                }
                        }
                }
@@ -2268,15 +2345,17 @@ function local_delivery($importer,$data) {
 
                        $is_a_remote_comment = false;
 
+                       // POSSIBLE CLEANUP --> Why select so many fields when only forum_mode and wall are used?
                        $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`, 
                                `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item` 
                                LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` 
-                               WHERE `item`.`uri` = '%s' AND `item`.`parent-uri` = '%s'
+                               WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s')
                                AND `item`.`uid` = %d 
                                $sql_extra
                                LIMIT 1",
                                dbesc($parent_uri),
                                dbesc($parent_uri),
+                               dbesc($parent_uri),
                                intval($importer['importer_uid'])
                        );
                        if($r && count($r))
@@ -2364,10 +2443,13 @@ function local_delivery($importer,$data) {
                                        $datarray['gravity'] = GRAVITY_LIKE;
                                        $datarray['last-child'] = 0;
                                        // only one like or dislike per person
-                                       $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1",
+                                       $r = q("select id from item where uid = %d and `contact-id` = %d and verb = '%s' and (`thr-parent` = '%s' or `parent-uri` = '%s') and deleted = 0 limit 1",
                                                intval($datarray['uid']),
                                                intval($datarray['contact-id']),
-                                               dbesc($datarray['verb'])
+                                               dbesc($datarray['verb']),
+                                               dbesc($datarray['parent-uri']),
+                                               dbesc($datarray['parent-uri'])
+               
                                        );
                                        if($r && count($r))
                                                continue; 
@@ -2535,10 +2617,12 @@ function local_delivery($importer,$data) {
                                        $datarray['type'] = 'activity';
                                        $datarray['gravity'] = GRAVITY_LIKE;
                                        // only one like or dislike per person
-                                       $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1",
+                                       $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 and (`parent-uri` = '%s' OR `thr-parent` = '%s') limit 1",
                                                intval($datarray['uid']),
                                                intval($datarray['contact-id']),
-                                               dbesc($datarray['verb'])
+                                               dbesc($datarray['verb']),
+                                               dbesc($parent_uri),
+                                               dbesc($parent_uri)
                                        );
                                        if($r && count($r))
                                                continue; 
@@ -2933,8 +3017,10 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
        if(strlen($item['owner-name']))
                $o .= atom_author('dfrn:owner',$item['owner-name'],$item['owner-link'],80,80,$item['owner-avatar']);
 
-       if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']))
-               $o .= '<thr:in-reply-to ref="' . xmlify($item['parent-uri']) . '" type="text/html" href="' .  xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['parent']) . '" />' . "\r\n";
+       if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || ($item['thr-parent'])) {
+               $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
+               $o .= '<thr:in-reply-to ref="' . xmlify($parent_item) . '" type="text/html" href="' .  xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['parent']) . '" />' . "\r\n";
+       }
 
        $o .= '<id>' . xmlify($item['uri']) . '</id>' . "\r\n";
        $o .= '<title>' . xmlify($item['title']) . '</title>' . "\r\n";
@@ -2955,7 +3041,7 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
                $o .= '<georss:point>' . xmlify($item['coord']) . '</georss:point>' . "\r\n";
 
        if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid']))
-               $o .= '<dfrn:private>1</dfrn:private>' . "\r\n";
+               $o .= '<dfrn:private>' . (($item['private']) ? $item['private'] : 1) . '</dfrn:private>' . "\r\n";
 
        if($item['extid'])
                $o .= '<dfrn:extid>' . xmlify($item['extid']) . '</dfrn:extid>' . "\r\n";
@@ -3351,40 +3437,8 @@ function drop_item($id,$interactive = true) {
                                );
                        }
 
-                       // Add a relayable_retraction signature for Diaspora. Note that we can't add a target_author_signature
-                       // if the comment was deleted by a remote user. That should be ok, because if a remote user is deleting
-                       // the comment, that means we're the home of the post, and Diaspora will only
-                       // check the parent_author_signature of retractions that it doesn't have to relay further
-                       //
-                       // I don't think this function gets called for an "unlike," but I'll check anyway
-                       $signed_text = $item['guid'] . ';' . ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
-
-                       if(local_user() == $item['uid']) {
-
-                               $handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
-                               $authorsig = base64_encode(rsa_sign($signed_text,$a->user['prvkey'],'sha256'));
-                       }
-                       else {
-                               $r = q("SELECT `nick`, `url` FROM `contact` WHERE `id` = '%d' LIMIT 1",
-                                       $item['contact-id']
-                               );
-                               if(count($r)) {
-                                       // The below handle only works for NETWORK_DFRN. I think that's ok, because this function
-                                       // only handles DFRN deletes
-                                       $handle_baseurl_start = strpos($r['url'],'://') + 3;
-                                       $handle_baseurl_length = strpos($r['url'],'/profile') - $handle_baseurl_start;
-                                       $handle = $r['nick'] . '@' . substr($r['url'], $handle_baseurl_start, $handle_baseurl_length);
-                                       $authorsig = '';
-                               }
-                       }
-
-                       if(isset($handle))
-                               q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
-                                       intval($item['id']),
-                                       dbesc($signed_text),
-                                       dbesc($authorsig),
-                                       dbesc($handle)
-                               );
+                       // Add a relayable_retraction signature for Diaspora.
+                       store_diaspora_retract_sig($item, $a->user, $a->get_baseurl());
                }
                $drop_id = intval($item['id']);
 
@@ -3472,3 +3526,51 @@ function posted_date_widget($url,$uid,$wall) {
        ));
        return $o;
 }
+
+function store_diaspora_retract_sig($item, $user, $baseurl) {
+       // Note that we can't add a target_author_signature
+       // if the comment was deleted by a remote user. That should be ok, because if a remote user is deleting
+       // the comment, that means we're the home of the post, and Diaspora will only
+       // check the parent_author_signature of retractions that it doesn't have to relay further
+       //
+       // I don't think this function gets called for an "unlike," but I'll check anyway
+
+       $enabled = intval(get_config('system','diaspora_enabled'));
+       if(! $enabled) {
+               logger('drop_item: diaspora support disabled, not storing retraction signature', LOGGER_DEBUG);
+               return;
+       }
+
+       logger('drop_item: storing diaspora retraction signature');
+
+       $signed_text = $item['guid'] . ';' . ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
+
+       if(local_user() == $item['uid']) {
+
+               $handle = $user['nickname'] . '@' . substr($baseurl, strpos($baseurl,'://') + 3);
+               $authorsig = base64_encode(rsa_sign($signed_text,$user['prvkey'],'sha256'));
+       }
+       else {
+               $r = q("SELECT `nick`, `url` FROM `contact` WHERE `id` = '%d' LIMIT 1",
+                       $item['contact-id']
+               );
+               if(count($r)) {
+                       // The below handle only works for NETWORK_DFRN. I think that's ok, because this function
+                       // only handles DFRN deletes
+                       $handle_baseurl_start = strpos($r['url'],'://') + 3;
+                       $handle_baseurl_length = strpos($r['url'],'/profile') - $handle_baseurl_start;
+                       $handle = $r['nick'] . '@' . substr($r['url'], $handle_baseurl_start, $handle_baseurl_length);
+                       $authorsig = '';
+               }
+       }
+
+       if(isset($handle))
+               q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
+                       intval($item['id']),
+                       dbesc($signed_text),
+                       dbesc($authorsig),
+                       dbesc($handle)
+               );
+
+       return;
+}
index 446413cd834c5cd81ebd4e02ca6d8861c9f2e6fc..c1a76000ef2b021174a29af69b56004fddb7512f 100644 (file)
@@ -793,7 +793,7 @@ function add_fcontact($arr,$update = false) {
 }
 
 
-function scale_external_images($s,$include_link = true) {
+function scale_external_images($s, $include_link = true, $scale_replace = false) {
 
        $a = get_app();
 
@@ -803,10 +803,22 @@ function scale_external_images($s,$include_link = true) {
                require_once('include/Photo.php');
                foreach($matches as $mtch) {
                        logger('scale_external_image: ' . $mtch[1]);
+
                        $hostname = str_replace('www.','',substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3));
                        if(stristr($mtch[1],$hostname))
                                continue;
-                       $i = fetch_url($mtch[1]);
+
+                       // $scale_replace, if passed, is an array of two elements. The
+                       // first is the name of the full-size image. The second is the
+                       // name of a remote, scaled-down version of the full size image.
+                       // This allows Friendica to display the smaller remote image if
+                       // one exists, while still linking to the full-size image
+                       if($scale_replace)
+                               $scaled = str_replace($scale_replace[0], $scale_replace[1], $mtch[1]);
+                       else
+                               $scaled = $mtch[1];
+                       $i = fetch_url($scaled);
+
                        // guess mimetype from headers or filename
                        $type = guess_image_type($mtch[1],true);
                        
@@ -822,7 +834,7 @@ function scale_external_images($s,$include_link = true) {
                                                $new_width = $ph->getWidth();
                                                $new_height = $ph->getHeight();
                                                logger('scale_external_images: ' . $orig_width . '->' . $new_width . 'w ' . $orig_height . '->' . $new_height . 'h' . ' match: ' . $mtch[0], LOGGER_DEBUG);
-                                               $s = str_replace($mtch[0],'[img=' . $new_width . 'x' . $new_height. ']' . $mtch[1] . '[/img]'
+                                               $s = str_replace($mtch[0],'[img=' . $new_width . 'x' . $new_height. ']' . $scaled . '[/img]'
                                                        . "\n" . (($include_link) 
                                                                ? '[url=' . $mtch[1] . ']' . t('view full size') . '[/url]' . "\n"
                                                                : ''),$s);
index f0a1940d498cffd17cc426ddc41f64ebe7d6f535..f54efba31de8101bc5a658e0ece65eec7571651f 100644 (file)
@@ -125,7 +125,7 @@ function notifier_run($argv, $argc){
                $uid = $r[0]['uid'];
                $updated = $r[0]['edited'];
 
-               // The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
+               // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
                if(! $parent_id)
                        return;
 
@@ -399,7 +399,7 @@ function notifier_run($argv, $argc){
 
                                // private emails may be in included in public conversations. Filter them.
 
-                               if(($public_message) && $item['private'])
+                               if(($public_message) && $item['private'] == 1)
                                        continue;
 
 
index d68f268837d1aac2147b8dfc69cc22a214aab705..09e7bb7638d85885f1f64ab87984f2ac0abb455f 100644 (file)
@@ -449,7 +449,7 @@ function onepoll_run($argv, $argc){
 
        if($xml) {
                logger('poller: received xml : ' . $xml, LOGGER_DATA);
-                       if((! strstr($xml,'<?xml')) && (! strstr($xml,'<rss'))) {
+               if((! strstr($xml,'<?xml')) && (! strstr($xml,'<rss'))) {
                        logger('poller: post_handshake: response from ' . $url . ' did not contain XML.');
                        $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
                                dbesc(datetime_convert()),
index c6b61ae6e92fe45a54920cfa5faf672a34c2e95b..ffa562273fb6b3ee8637148867abe8896aae5308 100644 (file)
@@ -316,3 +316,87 @@ function get_theme_screenshot($theme) {
        }
        return($a->get_baseurl() . '/images/blank.png');
 }
+
+
+// check service_class restrictions. If there are no service_classes defined, everything is allowed.
+// if $usage is supplied, we check against a maximum count and return true if the current usage is 
+// less than the subscriber plan allows. Otherwise we return boolean true or false if the property
+// is allowed (or not) in this subscriber plan. An unset property for this service plan means 
+// the property is allowed, so it is only necessary to provide negative properties for each plan, 
+// or what the subscriber is not allowed to do. 
+
+
+function service_class_allows($uid,$property,$usage = false) {
+
+       if($uid == local_user()) {
+               $service_class = $a->user['service_class'];
+       }
+       else {
+               $r = q("select service_class from user where uid = %d limit 1",
+                       intval($uid)
+               );
+               if($r !== false and count($r)) {
+                       $service_class = $r[0]['service_class'];
+               }
+       }
+       if(! x($service_class))
+               return true; // everything is allowed
+
+       $arr = get_config('service_class',$service_class);
+       if(! is_array($arr) || (! count($arr)))
+               return true;
+
+       if($usage === false)
+               return ((x($arr[$property])) ? (bool) $arr['property'] : true);
+       else {
+               if(! array_key_exists($property,$arr))
+                       return true;
+               return (((intval($usage)) < intval($arr[$property])) ? true : false);
+       }
+}
+
+
+function service_class_fetch($uid,$property) {
+
+       if($uid == local_user()) {
+               $service_class = $a->user['service_class'];
+       }
+       else {
+               $r = q("select service_class from user where uid = %d limit 1",
+                       intval($uid)
+               );
+               if($r !== false and count($r)) {
+                       $service_class = $r[0]['service_class'];
+               }
+       }
+       if(! x($service_class))
+               return false; // everything is allowed
+
+       $arr = get_config('service_class',$service_class);
+       if(! is_array($arr) || (! count($arr)))
+               return false;
+
+       return((array_key_exists($property,$arr)) ? $arr[$property] : false);
+
+}
+
+function upgrade_link($bbcode = false) {
+       $l = get_config('service_class','upgrade_link');
+       if(! $l)
+               return '';
+       if($bbcode)
+               $t = sprintf('[url=%s]' . t('Click here to upgrade.') . '[/url]', $l);
+       else
+               $t = sprintf('<a href="%s">' . t('Click here to upgrade.') . '</div>', $l);
+       return $t;
+}
+
+function upgrade_message($bbcode = false) {
+       $x = upgrade_link($bbcode);
+       return t('This action exceeds the limits set by your subscription plan.') . (($x) ? ' ' . $x : '') ;
+}
+
+function upgrade_bool_message($bbcode = false) {
+       $x = upgrade_link($bbcode);
+       return t('This action is not available under your subscription plan.') . (($x) ? ' ' . $x : '') ;
+}
index ffb45090b9b8c5f876c30b2272ba4b48287f9bd5..8dfb1beecc3744d2661efb34dddb490cf01619f8 100644 (file)
@@ -59,6 +59,11 @@ function advanced_profile(&$a) {
 
                if($txt = prepare_text($a->profile['interest'])) $profile['interest'] = array( t('Hobbies/Interests:'), $txt);
 
+               if($txt = prepare_text($a->profile['likes'])) $profile['likes'] = array( t('Likes:'), $txt);
+
+               if($txt = prepare_text($a->profile['dislikes'])) $profile['dislikes'] = array( t('Dislikes:'), $txt);
+
+
                if($txt = prepare_text($a->profile['contact'])) $profile['contact'] = array( t('Contact information and Social Networks:'), $txt);
 
                if($txt = prepare_text($a->profile['music'])) $profile['music'] = array( t('Musical interests:'), $txt);
index cc4bee268fc79ebfd174fa7b50e5a672e63f5e44..3b0050d387a559c93fc391f59c27fc775f5b98e7 100644 (file)
@@ -750,40 +750,40 @@ function smilies($s, $sample = false) {
        );
 
        $icons = array(
-               '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />',                
-               '<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-cool.gif" alt="8-)" />',
-               '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />',
-               '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />',
-               '<img src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />',
-               '<img src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
-               '<img src="' . $a->get_baseurl() . '/images/like.gif" alt=":like" />',
-               '<img src="' . $a->get_baseurl() . '/images/dislike.gif" alt=":dislike" />',
-               '<a href="http://project.friendika.com">~friendika <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>',
-               '<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>'
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />',                
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-cool.gif" alt="8-)" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/like.gif" alt=":like" />',
+               '<img class="smiley" src="' . $a->get_baseurl() . '/images/dislike.gif" alt=":dislike" />',
+               '<a href="http://project.friendika.com">~friendika <img class="smiley" src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>',
+               '<a href="http://friendica.com">~friendica <img class="smiley" src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>'
        );
 
        $params = array('texts' => $texts, 'icons' => $icons, 'string' => $s);
@@ -823,7 +823,7 @@ function preg_heart($x) {
                return $x[0];
        $t = '';
        for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
-               $t .= '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
+               $t .= '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
        $r =  str_replace($x[0],$t,$x[0]);
        return $r;
 }
@@ -1059,12 +1059,13 @@ function feed_salmonlinks($nick) {
 if(! function_exists('get_plink')) {
 function get_plink($item) {
        $a = get_app(); 
-       if (x($item,'plink') && ((! $item['private']) || ($item['network'] === NETWORK_FEED))){
+       if (x($item,'plink') && ($item['private'] != 1)) {
                return array(
                        'href' => $item['plink'],
                        'title' => t('link to source'),
                );
-       } else {
+       } 
+       else {
                return false;
        }
 }}
index 2477438bf4deab4a4e9806f7df50156ef9753c29..383a3b3e1cf76fe7a9ba484b5443d7e9c2071130 100644 (file)
@@ -147,13 +147,18 @@ function create_user($arr) {
 
        require_once('include/crypto.php');
 
-       $keys = new_keypair(1024);
+       $keys = new_keypair(4096);
 
        if($keys === false) {
                $result['message'] .= t('SERIOUS ERROR: Generation of security keys failed.') . EOL;
                return $result;
        }
 
+       $default_service_class = get_config('system','default_service_class');
+       if(! $default_service_class)
+               $default_service_class = '';
+
+
        $prvkey = $keys['prvkey'];
        $pubkey = $keys['pubkey'];
 
@@ -173,8 +178,8 @@ function create_user($arr) {
        $spubkey = $sres['pubkey'];
 
        $r = q("INSERT INTO `user` ( `guid`, `username`, `password`, `email`, `openid`, `nickname`,
-               `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked`, `timezone` )
-               VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, 'UTC' )",
+               `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked`, `timezone`, `service_class` )
+               VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, 'UTC', '%s' )",
                dbesc(generate_user_guid()),
                dbesc($username),
                dbesc($new_password_encoded),
@@ -187,7 +192,8 @@ function create_user($arr) {
                dbesc($sprvkey),
                dbesc(datetime_convert()),
                intval($verified),
-               intval($blocked)
+               intval($blocked),
+               dbesc($default_service_class)
        );
 
        if($r) {
index c3add477f013c2df9a40a758c82873b5e6d918ae..cc7697a1f5d3a7b7f3a89002019486ea4c9a54aa 100644 (file)
@@ -275,7 +275,7 @@ aStates[249]="|'Adan|'Ataq|Abyan|Al Bayda'|Al Hudaydah|Al Jawf|Al Mahrah|Al Mahw
 aStates[250]="|Kosovo|Montenegro|Serbia|Vojvodina";\r
 aStates[251]="|Central|Copperbelt|Eastern|Luapula|Lusaka|North-Western|Northern|Southern|Western";\r
 aStates[252]="|Bulawayo|Harare|ManicalandMashonaland Central|Mashonaland East|Mashonaland West|Masvingo|Matabeleland North|Matabeleland South|Midlands";\r
-aStates[253]="|Self Hosted|Private Server|Architects Of Sleep|DFRN|Distributed Friend Network|Free-Beer.ch|Foojbook|Free-Haven|Friendica.eu|Friendika.me.4.it|Friendika - I Ask Questions|Frndc.com|Hipatia|Hungerfreunde|Kaluguran Community|Kak Ste?|Karl.Markx.pm|Loozah Social Club|MyFriendica.net|MyFriendNetwork|Oi!|OpenMindSpace|Recolutionari.es|Sysfu Social Club|theshi.re|Tumpambae|Uzmiac|Other";\r
+aStates[253]="|Self Hosted|Private Server|Architects Of Sleep|DFRN|Distributed Friend Network|Free-Beer.ch|Foojbook|Free-Haven|Friendica.eu|Friendika.me.4.it|Friendika - I Ask Questions|Frndc.com|Hikado|Hipatia|Hungerfreunde|Kaluguran Community|Kak Ste?|Karl.Markx.pm|Loozah Social Club|MyFriendica.net|MyFriendNetwork|Oi!|OpenMindSpace|Recolutionari.es|SPRACI|Sysfu Social Club|theshi.re|Tumpambae|Uzmiac|Other";\r
 /* \r
  * gArCountryInfo\r
  * (0) Country name\r
index 198b3ff07d801dffa2c42fcf3b67eb3295eef85f..16ad06c5acaad09ee4d6e9d7c428506db028aeeb 100644 (file)
@@ -1,4 +1,4 @@
-/*! jQuery v1.7.1 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
-f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
-{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
\ No newline at end of file
+/*! jQuery v1.7.2 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
+a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
+.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
\ No newline at end of file
index 76b99cbca7a121ba600553992bf8ee310d4af24b..8e39f5fd0bc0308118b628e9fa357d54cd4ab478 100644 (file)
@@ -146,7 +146,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
                         */
                        require_once('include/crypto.php');
 
-                       $res = new_keypair(1024);
+                       $res = new_keypair(4096);
 
                        $private_key = $res['prvkey'];
                        $public_key  = $res['pubkey'];
index 2a6fb692eb6b947de9b828d8d99db7556d87e3bb..7940e79a420a6056ea9070010bdd93cc95745790 100755 (executable)
@@ -57,12 +57,13 @@ function events_post(&$a) {
        if(strcmp($finish,$start) < 0)
                $finish = $start;
 
+       $summary  = escape_tags(trim($_POST['summary']));
        $desc     = escape_tags(trim($_POST['desc']));
        $location = escape_tags(trim($_POST['location']));
        $type     = 'event';
 
-       if((! $desc) || (! $start)) {
-               notice( t('Event description and start time are required.') . EOL);
+       if((! $summary) || (! $start)) {
+               notice( t('Event title and start time are required.') . EOL);
                goaway($a->get_baseurl() . '/events/new');
        }
 
@@ -107,6 +108,7 @@ function events_post(&$a) {
        $datarray = array();
        $datarray['start'] = $start;
        $datarray['finish'] = $finish;
+       $datarray['summary'] = $summary;
        $datarray['desc'] = $desc;
        $datarray['location'] = $location;
        $datarray['type'] = $type;
@@ -118,7 +120,7 @@ function events_post(&$a) {
        $datarray['allow_gid'] = $str_group_allow;
        $datarray['deny_cid'] = $str_contact_deny;
        $datarray['deny_gid'] = $str_group_deny;
-       $datarray['private'] = $private_event;
+       $datarray['private'] = (($private_event) ? 1 : 0);
        $datarray['id'] = $event_id;
        $datarray['created'] = $created;
        $datarray['edited'] = $edited;
@@ -278,9 +280,11 @@ function events_content(&$a) {
                                        
                                $last_date = $d;
                                $edit = ((! $rr['cid']) ? array($a->get_baseurl().'/events/event/'.$rr['id'],t('Edit event'),'','') : null);
-
-                               list($title, $_trash) = explode("<br",bbcode($rr['desc']),2);
-                               $title = strip_tags($title);
+                               $title = strip_tags(bbcode($rr['summary']));
+                               if(! $title) {
+                                       list($title, $_trash) = explode("<br",bbcode($rr['desc']),2);
+                                       $title = strip_tags($title);
+                               }
                                $html = format_event_html($rr);
                                $rr['desc'] = bbcode($rr['desc']);
                                $rr['location'] = bbcode($rr['location']);
@@ -351,6 +355,7 @@ function events_content(&$a) {
 
                $n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : '');
                $a_checked = ((x($orig_event) && $orig_event['adjust']) ? ' checked="checked" ' : '');
+               $t_orig = ((x($orig_event)) ? $orig_event['summary'] : '');
                $d_orig = ((x($orig_event)) ? $orig_event['desc'] : '');
                $l_orig = ((x($orig_event)) ? $orig_event['location'] : '');
                $eid = ((x($orig_event)) ? $orig_event['id'] : 0);
@@ -405,10 +410,11 @@ function events_content(&$a) {
                        '$eid' => $eid, 
                        '$cid' => $cid,
                        '$uri' => $uri,
+       
                        '$title' => t('Event details'),
-                       '$desc' => sprintf( t('Format is %s %s. Starting date and Description are required.'),$dateformat,$timeformat),
+                       '$desc' => sprintf( t('Format is %s %s. Starting date and Title are required.'),$dateformat,$timeformat),
                        
-                       '$s_text' => t('Event Starts:') . ' <span class="required">*</span> ',
+                       '$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>',
                        '$s_dsel' => datesel($f,'start',$syear+5,$syear,false,$syear,$smonth,$sday),
                        '$s_tsel' => timesel('start',$shour,$sminute),
                        '$n_text' => t('Finish date/time is not known or not relevant'),
@@ -418,10 +424,12 @@ function events_content(&$a) {
                        '$f_tsel' => timesel('finish',$fhour,$fminute),
                        '$a_text' => t('Adjust for viewer timezone'),
                        '$a_checked' => $a_checked,
-                       '$d_text' => t('Description:') . ' <span class="required">*</span>',
+                       '$d_text' => t('Description:')
                        '$d_orig' => $d_orig,
                        '$l_text' => t('Location:'),
                        '$l_orig' => $l_orig,
+                       '$t_text' => t('Title:') . ' <span class="required" title="' . t('Required') . '">*</span>',
+                       '$t_orig' => $t_orig,
                        '$sh_text' => t('Share this event'),
                        '$sh_checked' => $sh_checked,
                        '$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user),false)),
index c1c0b14ec6cd507acb1f51f43857e0755f949c8c..554e97fe46a0d595b2df122a3c32b5c3f4830865 100644 (file)
@@ -108,7 +108,7 @@ function item_post(&$a) {
                }
        }
 
-       if($parent) logger('mod_post: parent=' . $parent);
+       if($parent) logger('mod_item: item_post parent=' . $parent);
 
        $profile_uid = ((x($_REQUEST,'profile_uid')) ? intval($_REQUEST['profile_uid']) : 0);
        $post_id     = ((x($_REQUEST,'post_id'))     ? intval($_REQUEST['post_id'])     : 0);
@@ -228,7 +228,7 @@ function item_post(&$a) {
                                || strlen($parent_item['allow_gid']) 
                                || strlen($parent_item['deny_cid']) 
                                || strlen($parent_item['deny_gid'])) {
-                               $private = 1;
+                               $private = (($parent_item['private']) ? $parent_item['private'] : 1);
                        }
 
                        $str_contact_allow = $parent_item['allow_cid'];
@@ -728,26 +728,10 @@ function item_post(&$a) {
                        
                        }
 
-                       // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key
 
-                       if($self) {
-                               require_once('include/bb2diaspora.php');
-                               $signed_body = html_entity_decode(bb2diaspora($datarray['body']));
-                               $myaddr = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
-                               if($datarray['verb'] === ACTIVITY_LIKE) 
-                                       $signed_text = $datarray['guid'] . ';' . 'Post' . ';' . $parent_item['guid'] . ';' . 'true' . ';' . $myaddr;
-                               else
-                                       $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $myaddr;
-
-                               $authorsig = base64_encode(rsa_sign($signed_text,$a->user['prvkey'],'sha256'));
+                       // Store the comment signature information in case we need to relay to Diaspora
+                       store_diaspora_comment_sig($datarray, $author, ($self ? $a->user['prvkey'] : false), $parent_item, $post_id);
 
-                               q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
-                                       intval($post_id),
-                                       dbesc($signed_text),
-                                       dbesc(base64_encode($authorsig)),
-                                       dbesc($myaddr)
-                               );
-                       }
                }
                else {
                        $parent = $post_id;
@@ -1038,3 +1022,47 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
 
        return array('replaced' => $replaced, 'contact' => $r[0]);      
 }
+
+
+function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, $post_id) {
+       // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key
+
+       $enabled = intval(get_config('system','diaspora_enabled'));
+       if(! $enabled) {
+               logger('mod_item: diaspora support disabled, not storing comment signature', LOGGER_DEBUG);
+               return;
+       }
+
+
+       logger('mod_item: storing diaspora comment signature');
+
+       require_once('include/bb2diaspora.php');
+       $signed_body = html_entity_decode(bb2diaspora($datarray['body']));
+
+//     $myaddr = $user['nickname'] . '@' . substr($baseurl, strpos($baseurl,'://') + 3);
+//     if( $author['network'] === NETWORK_DIASPORA)
+//             $diaspora_handle = $author['addr'];
+//     else {
+       // Only works for NETWORK_DFRN
+       $contact_baseurl_start = strpos($author['url'],'://') + 3;
+       $contact_baseurl_length = strpos($author['url'],'/profile') - $contact_baseurl_start;
+       $contact_baseurl = substr($author['url'], $contact_baseurl_start, $contact_baseurl_length);
+       $diaspora_handle = $author['nick'] . '@' . $contact_baseurl;
+//     }
+
+       $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $diaspora_handle;
+
+       if( $uprvkey !== false )
+               $authorsig = base64_encode(rsa_sign($signed_text,$uprvkey,'sha256'));
+       else
+               $authorsig = '';
+
+       q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
+               intval($post_id),
+               dbesc($signed_text),
+               dbesc(base64_encode($authorsig)),
+               dbesc($diaspora_handle)
+       );
+
+       return;
+}
index 942a04fe7f1980318599fdc55e1fc13a17621cb0..1176c31101000390043e8da0e441bfede9d1c3cf 100755 (executable)
@@ -37,7 +37,7 @@ function like_content(&$a) {
        logger('like: verb ' . $verb . ' item ' . $item_id);
 
 
-       $r = q("SELECT * FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s') AND `id` = `parent` LIMIT 1",
+       $r = q("SELECT * FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
                dbesc($item_id),
                dbesc($item_id)
        );
@@ -121,57 +121,16 @@ function like_content(&$a) {
                        intval($like_item['id'])
                );
 
-               // Clean up the `sign` table
+
+               // Clean up the Diaspora signatures for this like
+               // Go ahead and do it even if Diaspora support is disabled. We still want to clean up
+               // if it had been enabled in the past
                $r = q("DELETE FROM `sign` WHERE `iid` = %d",
                        intval($like_item['id'])
                );
 
                // Save the author information for the unlike in case we need to relay to Diaspora
-               // Note that we can only create a signature for a user of the local server. We don't have
-               // a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it 
-               // means we are the relay, and for relayable_retractions, Diaspora
-               // only checks the parent_author_signature if it doesn't have to relay further
-               //
-               // If $item['resource-id'] exists, it means the item is a photo. Diaspora doesn't support
-               // likes on photos, so don't bother.
-
-               if(($activity === ACTIVITY_LIKE) && (! $item['resource-id'])) {
-                       $signed_text = $like_item['guid'] . ';' . 'Like';
-
-                       if( $contact['network'] === NETWORK_DIASPORA)
-                               $diaspora_handle = $contact['addr'];
-                       else { // Only works for NETWORK_DFRN
-                               $contact_baseurl_start = strpos($contact['url'],'://') + 3;
-                               $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
-                               $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
-                               $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
-
-                               // Get contact's private key if he's a user of the local Friendica server
-                               $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
-                                       dbesc($contact['url'])
-                               );
-
-                               if( $r) {
-                                       $contact_uid = $r['uid'];
-                                       $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
-                                               intval($contact_uid)
-                                       );
-
-                                       if( $r)
-                                               $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256'));
-                               }
-                       }
-
-                       if(! isset($authorsig))
-                               $authorsig = '';
-
-                       q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
-                               intval($like_item['id']),
-                               dbesc($signed_text),
-                               dbesc($authorsig),
-                               dbesc($diaspora_handle)
-                       );
-               }
+               store_diaspora_like_retract_sig($activity, $item, $like_item, $contact);
 
 
 //             proc_run('php',"include/notifier.php","like","$post_id"); // $post_id isn't defined here!
@@ -217,6 +176,7 @@ EOT;
        $arr['gravity'] = GRAVITY_LIKE;
        $arr['parent'] = $item['id'];
        $arr['parent-uri'] = $item['uri'];
+       $arr['thr-parent'] = $item['uri'];
        $arr['owner-name'] = $remote_owner['name'];
        $arr['owner-link'] = $remote_owner['url'];
        $arr['owner-avatar'] = $remote_owner['thumb'];
@@ -251,35 +211,118 @@ EOT;
 
 
        // Save the author information for the like in case we need to relay to Diaspora
+       store_diaspora_like_sig($activity, $post_type, $contact, $post_id);
+
+
+       $arr['id'] = $post_id;
+
+       call_hooks('post_local_end', $arr);
+
+       proc_run('php',"include/notifier.php","like","$post_id");
+
+       killme();
+//     return; // NOTREACHED
+}
+
+
+function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact) {
        // Note that we can only create a signature for a user of the local server. We don't have
        // a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it 
        // means we are the relay, and for relayable_retractions, Diaspora
        // only checks the parent_author_signature if it doesn't have to relay further
+       //
+       // If $item['resource-id'] exists, it means the item is a photo. Diaspora doesn't support
+       // likes on photos, so don't bother.
 
-       if(($activity === ACTIVITY_LIKE) && ($post_type === t('status'))) {
-               if( $contact['network'] === NETWORK_DIASPORA)
-                       $diaspora_handle = $contact['addr'];
-               else { // Only works for NETWORK_DFRN
-                       $contact_baseurl_start = strpos($contact['url'],'://') + 3;
-                       $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
-                       $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
-                       $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
-
-                       // Get contact's private key if he's a user of the local Friendica server
-                       $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
-                               dbesc($contact['url'])
+       $enabled = intval(get_config('system','diaspora_enabled'));
+       if(! $enabled) {
+               logger('mod_like: diaspora support disabled, not storing like retraction signature', LOGGER_DEBUG);
+               return;
+       }
+
+       logger('mod_like: storing diaspora like retraction signature');
+
+       if(($activity === ACTIVITY_LIKE) && (! $item['resource-id'])) {
+               $signed_text = $like_item['guid'] . ';' . 'Like';
+
+//             if( $contact['network'] === NETWORK_DIASPORA)
+//                     $diaspora_handle = $contact['addr'];
+//             else {
+               // Only works for NETWORK_DFRN
+               $contact_baseurl_start = strpos($contact['url'],'://') + 3;
+               $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
+               $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
+               $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
+
+               // Get contact's private key if he's a user of the local Friendica server
+               $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
+                       dbesc($contact['url'])
+               );
+
+               if( $r) {
+                       $contact_uid = $r['uid'];
+                       $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
+                               intval($contact_uid)
                        );
 
-                       if( $r) {
-                               $contact_uid = $r['uid'];
-                               $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
-                                       intval($contact_uid)
-                               );
+                       if( $r)
+                               $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256'));
+               }
+//             }
 
-                               if( $r)
-                                       $contact_uprvkey = $r['prvkey'];
-                       }
+               if(! isset($authorsig))
+                       $authorsig = '';
+
+               q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
+                       intval($like_item['id']),
+                       dbesc($signed_text),
+                       dbesc($authorsig),
+                       dbesc($diaspora_handle)
+               );
+       }
+
+       return;
+}
+
+function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) {
+       // Note that we can only create a signature for a user of the local server. We don't have
+       // a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it 
+       // means we are the relay, and for relayable_retractions, Diaspora
+       // only checks the parent_author_signature if it doesn't have to relay further
+
+       $enabled = intval(get_config('system','diaspora_enabled'));
+       if(! $enabled) {
+               logger('mod_like: diaspora support disabled, not storing like signature', LOGGER_DEBUG);
+               return;
+       }
+
+       logger('mod_like: storing diaspora like signature');
+
+       if(($activity === ACTIVITY_LIKE) && ($post_type === t('status'))) {
+//             if( $contact['network'] === NETWORK_DIASPORA)
+//                     $diaspora_handle = $contact['addr'];
+//             else {
+               // Only works for NETWORK_DFRN
+               $contact_baseurl_start = strpos($contact['url'],'://') + 3;
+               $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
+               $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
+               $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
+
+               // Get contact's private key if he's a user of the local Friendica server
+               $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
+                       dbesc($contact['url'])
+               );
+
+               if( $r) {
+                       $contact_uid = $r['uid'];
+                       $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
+                               intval($contact_uid)
+                       );
+
+                       if( $r)
+                               $contact_uprvkey = $r['prvkey'];
                }
+//             }
 
                $r = q("SELECT guid, parent FROM `item` WHERE id = %d LIMIT 1",
                        intval($post_id)
@@ -307,13 +350,5 @@ EOT;
                }
        }
 
-
-       $arr['id'] = $post_id;
-
-       call_hooks('post_local_end', $arr);
-
-       proc_run('php',"include/notifier.php","like","$post_id");
-
-       killme();
-//     return; // NOTREACHED
+       return;
 }
index 9e64e2608b1e341f0e6de41373e643892f8fd85e..a832629f198ef680e0afce32e96a60f1e9de2e06 100644 (file)
@@ -33,7 +33,7 @@ function lockview_content(&$a) {
        $deny_users = expand_acl($item['deny_cid']);
        $deny_groups = expand_acl($item['deny_gid']);
 
-       if(($item['private']) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid'])) 
+       if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid'])) 
                && (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) {
 
                echo t('Remote privacy information not available.') . '<br />';
index cdf2223a866d677c2598614b4c8e185c6b480154..a38f7e27027ea2923bd2cae777f9bdd26793e214 100644 (file)
@@ -215,10 +215,10 @@ function parse_url_content(&$a) {
                                        
                                        $i = fetch_url($image);
                                        if($i) {
+                                               require_once('include/Photo.php');
                                                // guess mimetype from headers or filename
                                                $type = guess_image_type($image,true);
-                                               
-                                               require_once('include/Photo.php');
+
                                                $ph = new Photo($i, $type);
                                                if($ph->is_valid()) {
                                                        if($ph->getWidth() > 300 || $ph->getHeight() > 300) {
index d96bc135e4133d62eabfd126e725a72f051993e0..ea4d7f81f50ffb7eda81fbe9d82fd8c44c60b713 100644 (file)
@@ -38,8 +38,10 @@ function photos_init(&$a) {
                        $o .= '<div class="fn">' . $a->data['user']['username'] . '</div>';
                        $o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg') . '" alt="' . $a->data['user']['username'] . '" /></div>';
                        $o .= '</div>';
-                       
-                       if(! intval($a->data['user']['hidewall'])) {
+
+                       $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true);     
+
+                       if($albums_visible) {
                                $o .= '<div id="side-bar-photos-albums" class="widget">';
                                $o .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
                                        
@@ -709,6 +711,24 @@ function photos_post(&$a) {
        logger('mod/photos.php: photos_post(): loading the contents of ' . $src , LOGGER_DEBUG);
 
        $imagedata = @file_get_contents($src);
+
+
+
+       $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
+               intval($a->data['user']['uid'])
+       );
+
+       $limit = service_class_fetch($a->data['user']['uid'],'photo_upload_limit');
+
+       if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
+               notice( upgrade_message() . EOL );
+               @unlink($src);
+               $foo = 0;
+               call_hooks('photo_post_end',$foo);
+               killme();
+       }
+               
+
        $ph = new Photo($imagedata, $type);
 
        if(! $ph->is_valid()) {
@@ -966,12 +986,25 @@ function photos_content(&$a) {
                <input type="submit" name="submit" value="' . t('Submit') . '" id="photos-upload-submit" /> </div>';
 
 
+               $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
+                       intval($a->data['user']['uid'])
+               );
+
+
+               $limit = service_class_fetch($a->data['user']['uid'],'photo_upload_limit');
+               if($limit !== false) {
+                       $usage_message = sprintf( t("You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."), $r[0]['total'] / 1024000, $limit / 1024000 );
+               }
+               else {
+                       $usage_message = sprintf( t('You have used %1$.2f Mbytes of photo storage.'), $r[0]['total'] / 1024000 );
+               }
+
 
                $tpl = get_markup_template('photos_upload.tpl');
                $o .= replace_macros($tpl,array(
                        '$pagename' => t('Upload Photos'),
                        '$sessid' => session_id(),
+                       '$usage' => $usage_message,
                        '$nickname' => $a->data['user']['nickname'],
                        '$newalbum' => t('New album name: '),
                        '$existalbumtext' => t('or existing album name: '),
index a9da5454cf787ae4674b77d4ecc96defaa20e91d..4df8a5af7e6b3d1da8c52c41ccdfa7810e17ff91 100644 (file)
@@ -130,6 +130,9 @@ function profiles_post(&$a) {
                $politic = notags(trim($_POST['politic']));
                $religion = notags(trim($_POST['religion']));
 
+               $likes = fix_mce_lf(escape_tags(trim($_POST['likes'])));
+               $dislikes = fix_mce_lf(escape_tags(trim($_POST['dislikes'])));
+
                $about = fix_mce_lf(escape_tags(trim($_POST['about'])));
                $interest = fix_mce_lf(escape_tags(trim($_POST['interest'])));
                $contact = fix_mce_lf(escape_tags(trim($_POST['contact'])));
@@ -155,7 +158,15 @@ function profiles_post(&$a) {
                        if($withchanged) {
                                $changes[] = '[color=#ff0000]&hearts;[/color] ' . t('Romantic Partner');
                                $value = strip_tags($with);
-                       }                                                       
+                       }
+                       if($likes != $orig[0]['likes']) {
+                               $changes[] = t('Likes');
+                               $value = $likes;
+                       }
+                       if($dislikes != $orig[0]['dislikes']) {
+                               $changes[] = t('Dislikes');
+                               $value = $dislikes;
+                       }
                        if($work != $orig[0]['work']) {
                                $changes[] = t('Work/Employment');
                        }
@@ -222,6 +233,8 @@ function profiles_post(&$a) {
                        `religion` = '%s',
                        `pub_keywords` = '%s',
                        `prv_keywords` = '%s',
+                       `likes` = '%s',
+                       `dislikes` = '%s',
                        `about` = '%s',
                        `interest` = '%s',
                        `contact` = '%s',
@@ -254,6 +267,8 @@ function profiles_post(&$a) {
                        dbesc($religion),
                        dbesc($pub_keywords),
                        dbesc($prv_keywords),
+                       dbesc($likes),
+                       dbesc($dislikes),
                        dbesc($about),
                        dbesc($interest),
                        dbesc($contact),
@@ -577,6 +592,8 @@ function profiles_content(&$a) {
                        '$lbl_religion' => t('Religious Views:'),
                        '$lbl_pubkey' => t('Public Keywords:'),
                        '$lbl_prvkey' => t('Private Keywords:'),
+                       '$lbl_likes' => t('Likes:'),
+                       '$lbl_dislikes' => t('Dislikes:'),
                        '$lbl_ex2' => t('Example: fishing photography software'),
                        '$lbl_pubdsc' => t("\x28Used for suggesting potential friends, can be seen by others\x29"),
                        '$lbl_prvdsc' => t("\x28Used for searching profiles, never shown to others\x29"),
@@ -617,6 +634,8 @@ function profiles_content(&$a) {
                        '$religion' => $r[0]['religion'],
                        '$pub_keywords' => $r[0]['pub_keywords'],
                        '$prv_keywords' => $r[0]['prv_keywords'],
+                       '$likes' => $r[0]['likes'],
+                       '$dislikes' => $r[0]['dislikes'],
                        '$music' => $r[0]['music'],
                        '$book' => $r[0]['book'],
                        '$tv' => $r[0]['tv'],
index 92593d7a848034c564b525f36c50fe34eb84e74f..b1c3cf7d40277f9b5f3fce977f1b76e976557d06 100644 (file)
@@ -677,6 +677,14 @@ function settings_content(&$a) {
 
 
                $tpl = get_markup_template("settings_connectors.tpl");
+
+               if(! service_class_allows(local_user(),'email_connect')) {
+                       $mail_disabled_message = upgrade_bool_message();
+               }
+               else {
+                       $mail_disabled_message = (($mail_disabled) ? t('Email access is disabled on this site.') : '');
+               }
+       
                $o .= replace_macros($tpl, array(
                        '$form_security_token' => get_form_security_token("settings_connectors"),
                        
@@ -688,7 +696,7 @@ function settings_content(&$a) {
                        '$h_imap' => t('Email/Mailbox Setup'),
                        '$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
                        '$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk,''),
-                       '$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''),
+                       '$mail_disabled' => $mail_disabled_message,
                        '$mail_server'  => array('mail_server',  t('IMAP server name:'), $mail_server, ''),
                        '$mail_port'    => array('mail_port',    t('IMAP port:'), $mail_port, ''),
                        '$mail_ssl'             => array('mail_ssl',     t('Security:'), strtoupper($mail_ssl), '', array( 'notls'=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')),
@@ -921,18 +929,12 @@ function settings_content(&$a) {
 
        ));
 
-
-
-
        $invisible = (((! $profile['publish']) && (! $profile['net-publish']))
                ? true : false);
 
        if($invisible)
                info( t('Profile is <strong>not published</strong>.') . EOL );
 
-       
-
-
 
        $subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/profile/' . $nickname : '');
 
@@ -1029,17 +1031,6 @@ function settings_content(&$a) {
                '$h_descadvn' => t('Change the behaviour of this account for special situations'),
                '$pagetype' => $pagetype,
                
-
-               
-               
-
-               
-
-
-
-
-               
-
        ));
 
        call_hooks('settings_form',$o);
index 08c63105e35ed04175dce9e1b4c470d1dd838074..29d31f6b51ea547862a719810fc2015f71d700f7 100644 (file)
@@ -15,7 +15,7 @@ function share_init(&$a) {
                intval($post_id),
                intval(local_user())
        );
-       if(! count($r) || ($r[0]['private'] && ($r[0]['network'] != NETWORK_FEED)))
+       if(! count($r) || ($r[0]['private'] == 1))
                killme();
 
        $o = '';
index 03d9f51055aa43f9920aa4dcbb7f602bfa4d0483..f179b3ca5078bbb66a717d6b8d5bf2f1875ce0f9 100644 (file)
@@ -60,6 +60,19 @@ function wall_attach_post(&$a) {
                return;
        }
 
+       $r = q("select sum(octet_length(data)) as total from attach where uid = %d ",
+               intval($page_owner_uid)
+       );
+
+       $limit = service_class_fetch($page_owner_uid,'attach_upload_limit');
+
+       if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
+               echo upgrade_message(true) . EOL ;
+               @unlink($src);
+               killme();
+       }
+
+
        $filedata = @file_get_contents($src);
        $mimetype = z_mime_content_type($filename);
        $hash = random_string();
index 4b81f8d1c209564581653bda00178c4035f37c48..5990f28344b92b0c2007538d159e3aac15f6647e 100644 (file)
@@ -79,6 +79,19 @@ function wall_upload_post(&$a) {
                killme();
        }
 
+       $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
+               intval($page_owner_uid)
+       );
+
+       $limit = service_class_fetch($page_owner_uid,'photo_upload_limit');
+
+       if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
+               echo upgrade_message(true) . EOL ;
+               @unlink($src);
+               killme();
+       }
+
+
        $imagedata = @file_get_contents($src);
        $ph = new Photo($imagedata, $filetype);
 
index 0f7bf664d99ec8e8fb1a766909d583a6fd6dedab..b8e247f57ce99f885714ce1467da93979ea0eb19 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define( 'UPDATE_VERSION' , 1149 );
+define( 'UPDATE_VERSION' , 1151 );
 
 /**
  *
@@ -1289,3 +1289,21 @@ function update_1148() {
                return UPDATE_FAILED;
        return UPDATE_SUCCESS;
 }
+
+
+function update_1149() {
+       $r1 = q("ALTER TABLE profile ADD likes text NOT NULL after prv_keywords");
+       $r2 = q("ALTER TABLE profile ADD dislikes text NOT NULL after likes");
+       if (! ($r1 && $r2))
+               return UPDATE_FAILED;
+       return UPDATE_SUCCESS;
+}
+
+
+function update_1150() {
+       $r = q("ALTER TABLE event ADD summary text NOT NULL after finish, add index ( uid ), add index ( cid ), add index ( uri ), add index ( `start` ), add index ( finish ), add index ( `type` ), add index ( adjust ) ");
+       if(! $r)
+               return UPDATE_FAILED;
+       return UPDATE_SUCCESS;
+}
+
index 416e30ef8e2b44aa6e932e01aab37793cd716d92..8519651ae45d254e49f006ead01e8e3057b177d8 100644 (file)
@@ -6,9 +6,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: 3.0.1382\n"
+"Project-Id-Version: 3.0.1388\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-06-22 10:00-0700\n"
+"POT-Creation-Date: 2012-06-28 10:00-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -35,8 +35,8 @@ msgid "Contact update failed."
 msgstr ""
 
 #: ../../mod/crepair.php:115 ../../mod/wall_attach.php:44
-#: ../../mod/fsuggest.php:78 ../../mod/events.php:138 ../../mod/api.php:26
-#: ../../mod/api.php:31 ../../mod/photos.php:133 ../../mod/photos.php:931
+#: ../../mod/fsuggest.php:78 ../../mod/events.php:140 ../../mod/api.php:26
+#: ../../mod/api.php:31 ../../mod/photos.php:135 ../../mod/photos.php:951
 #: ../../mod/editpost.php:10 ../../mod/install.php:151
 #: ../../mod/notifications.php:66 ../../mod/contacts.php:145
 #: ../../mod/settings.php:106 ../../mod/settings.php:537
@@ -52,11 +52,11 @@ msgstr ""
 #: ../../mod/message.php:97 ../../mod/allfriends.php:9
 #: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53
 #: ../../mod/follow.php:9 ../../mod/display.php:138 ../../mod/profiles.php:7
-#: ../../mod/profiles.php:385 ../../mod/delegate.php:6
+#: ../../mod/profiles.php:400 ../../mod/delegate.php:6
 #: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81
-#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:507
-#: ../../addon/dav/layout.fnk.php:353 ../../include/items.php:3401
-#: ../../index.php:309
+#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:508
+#: ../../addon/facebook/facebook.php:514 ../../addon/dav/layout.fnk.php:353
+#: ../../include/items.php:3447 ../../index.php:309
 msgid "Permission denied."
 msgstr ""
 
@@ -123,17 +123,18 @@ msgid "New photo from this URL"
 msgstr ""
 
 #: ../../mod/crepair.php:166 ../../mod/fsuggest.php:107
-#: ../../mod/events.php:428 ../../mod/photos.php:966 ../../mod/photos.php:1024
-#: ../../mod/photos.php:1270 ../../mod/photos.php:1310
-#: ../../mod/photos.php:1350 ../../mod/photos.php:1381
+#: ../../mod/events.php:436 ../../mod/photos.php:986 ../../mod/photos.php:1057
+#: ../../mod/photos.php:1303 ../../mod/photos.php:1343
+#: ../../mod/photos.php:1383 ../../mod/photos.php:1414
 #: ../../mod/install.php:246 ../../mod/install.php:284
 #: ../../mod/localtime.php:45 ../../mod/contacts.php:343
-#: ../../mod/settings.php:555 ../../mod/settings.php:701
-#: ../../mod/settings.php:762 ../../mod/settings.php:969
+#: ../../mod/settings.php:555 ../../mod/settings.php:709
+#: ../../mod/settings.php:770 ../../mod/settings.php:971
 #: ../../mod/group.php:85 ../../mod/message.php:216 ../../mod/message.php:410
 #: ../../mod/admin.php:420 ../../mod/admin.php:656 ../../mod/admin.php:792
-#: ../../mod/admin.php:991 ../../mod/admin.php:1078 ../../mod/profiles.php:554
-#: ../../mod/invite.php:119 ../../addon/facebook/facebook.php:609
+#: ../../mod/admin.php:991 ../../mod/admin.php:1078 ../../mod/profiles.php:569
+#: ../../mod/invite.php:119 ../../addon/fromgplus/fromgplus.php:40
+#: ../../addon/facebook/facebook.php:617
 #: ../../addon/snautofollow/snautofollow.php:64
 #: ../../addon/yourls/yourls.php:76 ../../addon/ljpost/ljpost.php:93
 #: ../../addon/nsfw/nsfw.php:57 ../../addon/page/page.php:164
@@ -156,11 +157,11 @@ msgstr ""
 #: ../../addon/statusnet/statusnet.php:318
 #: ../../addon/statusnet/statusnet.php:325
 #: ../../addon/statusnet/statusnet.php:353
-#: ../../addon/statusnet/statusnet.php:561 ../../addon/tumblr/tumblr.php:90
+#: ../../addon/statusnet/statusnet.php:567 ../../addon/tumblr/tumblr.php:90
 #: ../../addon/numfriends/numfriends.php:85 ../../addon/gnot/gnot.php:88
 #: ../../addon/wppost/wppost.php:110 ../../addon/showmore/showmore.php:48
 #: ../../addon/piwik/piwik.php:89 ../../addon/twitter/twitter.php:180
-#: ../../addon/twitter/twitter.php:209 ../../addon/twitter/twitter.php:381
+#: ../../addon/twitter/twitter.php:209 ../../addon/twitter/twitter.php:387
 #: ../../addon/irc/irc.php:55 ../../addon/blogger/blogger.php:102
 #: ../../addon/posterous/posterous.php:103
 #: ../../view/theme/cleanzero/config.php:80
@@ -193,7 +194,7 @@ msgstr ""
 msgid "File exceeds size limit of %d"
 msgstr ""
 
-#: ../../mod/wall_attach.php:86 ../../mod/wall_attach.php:97
+#: ../../mod/wall_attach.php:99 ../../mod/wall_attach.php:110
 msgid "File upload failed."
 msgstr ""
 
@@ -210,79 +211,87 @@ msgstr ""
 msgid "Suggest a friend for %s"
 msgstr ""
 
-#: ../../mod/events.php:65
-msgid "Event description and start time are required."
+#: ../../mod/events.php:66
+msgid "Event title and start time are required."
 msgstr ""
 
-#: ../../mod/events.php:258
+#: ../../mod/events.php:260
 msgid "l, F j"
 msgstr ""
 
-#: ../../mod/events.php:280
+#: ../../mod/events.php:282
 msgid "Edit event"
 msgstr ""
 
-#: ../../mod/events.php:300 ../../include/text.php:1065
+#: ../../mod/events.php:304 ../../include/text.php:1065
 msgid "link to source"
 msgstr ""
 
-#: ../../mod/events.php:324 ../../view/theme/diabook/theme.php:131
-#: ../../include/nav.php:52 ../../boot.php:1546
+#: ../../mod/events.php:328 ../../view/theme/diabook/theme.php:131
+#: ../../include/nav.php:52 ../../boot.php:1549
 msgid "Events"
 msgstr ""
 
-#: ../../mod/events.php:325
+#: ../../mod/events.php:329
 msgid "Create New Event"
 msgstr ""
 
-#: ../../mod/events.php:326 ../../addon/dav/layout.fnk.php:154
+#: ../../mod/events.php:330 ../../addon/dav/layout.fnk.php:154
 msgid "Previous"
 msgstr ""
 
-#: ../../mod/events.php:327 ../../mod/install.php:205
+#: ../../mod/events.php:331 ../../mod/install.php:205
 #: ../../addon/dav/layout.fnk.php:157
 msgid "Next"
 msgstr ""
 
-#: ../../mod/events.php:399
+#: ../../mod/events.php:404
 msgid "hour:minute"
 msgstr ""
 
-#: ../../mod/events.php:408
+#: ../../mod/events.php:414
 msgid "Event details"
 msgstr ""
 
-#: ../../mod/events.php:409
+#: ../../mod/events.php:415
 #, php-format
-msgid "Format is %s %s. Starting date and Description are required."
+msgid "Format is %s %s. Starting date and Title are required."
 msgstr ""
 
-#: ../../mod/events.php:411
+#: ../../mod/events.php:417
 msgid "Event Starts:"
 msgstr ""
 
-#: ../../mod/events.php:414
+#: ../../mod/events.php:417 ../../mod/events.php:431
+msgid "Required"
+msgstr ""
+
+#: ../../mod/events.php:420
 msgid "Finish date/time is not known or not relevant"
 msgstr ""
 
-#: ../../mod/events.php:416
+#: ../../mod/events.php:422
 msgid "Event Finishes:"
 msgstr ""
 
-#: ../../mod/events.php:419
+#: ../../mod/events.php:425
 msgid "Adjust for viewer timezone"
 msgstr ""
 
-#: ../../mod/events.php:421
+#: ../../mod/events.php:427
 msgid "Description:"
 msgstr ""
 
-#: ../../mod/events.php:423 ../../include/event.php:37
-#: ../../include/bb2diaspora.php:265 ../../boot.php:1126
+#: ../../mod/events.php:429 ../../include/event.php:40
+#: ../../include/bb2diaspora.php:357 ../../boot.php:1126
 msgid "Location:"
 msgstr ""
 
-#: ../../mod/events.php:425
+#: ../../mod/events.php:431
+msgid "Title:"
+msgstr ""
+
+#: ../../mod/events.php:433
 msgid "Share this event"
 msgstr ""
 
@@ -332,258 +341,268 @@ msgid ""
 msgstr ""
 
 #: ../../mod/api.php:105 ../../mod/dfrn_request.php:833
-#: ../../mod/settings.php:879 ../../mod/settings.php:885
-#: ../../mod/settings.php:893 ../../mod/settings.php:897
-#: ../../mod/settings.php:902 ../../mod/settings.php:908
-#: ../../mod/settings.php:914 ../../mod/settings.php:920
-#: ../../mod/settings.php:956 ../../mod/settings.php:957
+#: ../../mod/settings.php:887 ../../mod/settings.php:893
+#: ../../mod/settings.php:901 ../../mod/settings.php:905
+#: ../../mod/settings.php:910 ../../mod/settings.php:916
+#: ../../mod/settings.php:922 ../../mod/settings.php:928
 #: ../../mod/settings.php:958 ../../mod/settings.php:959
-#: ../../mod/settings.php:960 ../../mod/register.php:234
-#: ../../mod/profiles.php:531
+#: ../../mod/settings.php:960 ../../mod/settings.php:961
+#: ../../mod/settings.php:962 ../../mod/register.php:234
+#: ../../mod/profiles.php:546
 msgid "Yes"
 msgstr ""
 
 #: ../../mod/api.php:106 ../../mod/dfrn_request.php:834
-#: ../../mod/settings.php:879 ../../mod/settings.php:885
-#: ../../mod/settings.php:893 ../../mod/settings.php:897
-#: ../../mod/settings.php:902 ../../mod/settings.php:908
-#: ../../mod/settings.php:914 ../../mod/settings.php:920
-#: ../../mod/settings.php:956 ../../mod/settings.php:957
+#: ../../mod/settings.php:887 ../../mod/settings.php:893
+#: ../../mod/settings.php:901 ../../mod/settings.php:905
+#: ../../mod/settings.php:910 ../../mod/settings.php:916
+#: ../../mod/settings.php:922 ../../mod/settings.php:928
 #: ../../mod/settings.php:958 ../../mod/settings.php:959
-#: ../../mod/settings.php:960 ../../mod/register.php:235
-#: ../../mod/profiles.php:532
+#: ../../mod/settings.php:960 ../../mod/settings.php:961
+#: ../../mod/settings.php:962 ../../mod/register.php:235
+#: ../../mod/profiles.php:547
 msgid "No"
 msgstr ""
 
-#: ../../mod/photos.php:44 ../../boot.php:1540
+#: ../../mod/photos.php:46 ../../boot.php:1543
 msgid "Photo Albums"
 msgstr ""
 
-#: ../../mod/photos.php:52 ../../mod/photos.php:154 ../../mod/photos.php:945
-#: ../../mod/photos.php:1016 ../../mod/photos.php:1031
-#: ../../mod/photos.php:1459 ../../mod/photos.php:1471
+#: ../../mod/photos.php:54 ../../mod/photos.php:156 ../../mod/photos.php:965
+#: ../../mod/photos.php:1049 ../../mod/photos.php:1064
+#: ../../mod/photos.php:1492 ../../mod/photos.php:1504
 #: ../../addon/communityhome/communityhome.php:110
 #: ../../view/theme/diabook/theme.php:598
 msgid "Contact Photos"
 msgstr ""
 
-#: ../../mod/photos.php:59 ../../mod/photos.php:1041 ../../mod/photos.php:1509
+#: ../../mod/photos.php:61 ../../mod/photos.php:1074 ../../mod/photos.php:1542
 msgid "Upload New Photos"
 msgstr ""
 
-#: ../../mod/photos.php:70 ../../mod/settings.php:21
+#: ../../mod/photos.php:72 ../../mod/settings.php:21
 msgid "everybody"
 msgstr ""
 
-#: ../../mod/photos.php:143
+#: ../../mod/photos.php:145
 msgid "Contact information unavailable"
 msgstr ""
 
-#: ../../mod/photos.php:154 ../../mod/photos.php:658 ../../mod/photos.php:1016
-#: ../../mod/photos.php:1031 ../../mod/profile_photo.php:60
+#: ../../mod/photos.php:156 ../../mod/photos.php:660 ../../mod/photos.php:1049
+#: ../../mod/photos.php:1064 ../../mod/profile_photo.php:60
 #: ../../mod/profile_photo.php:67 ../../mod/profile_photo.php:74
 #: ../../mod/profile_photo.php:176 ../../mod/profile_photo.php:254
 #: ../../mod/profile_photo.php:263
 #: ../../addon/communityhome/communityhome.php:111
-#: ../../view/theme/diabook/theme.php:599 ../../include/user.php:298
-#: ../../include/user.php:305 ../../include/user.php:312
+#: ../../view/theme/diabook/theme.php:599 ../../include/user.php:304
+#: ../../include/user.php:311 ../../include/user.php:318
 msgid "Profile Photos"
 msgstr ""
 
-#: ../../mod/photos.php:164
+#: ../../mod/photos.php:166
 msgid "Album not found."
 msgstr ""
 
-#: ../../mod/photos.php:182 ../../mod/photos.php:1025
+#: ../../mod/photos.php:184 ../../mod/photos.php:1058
 msgid "Delete Album"
 msgstr ""
 
-#: ../../mod/photos.php:245 ../../mod/photos.php:1271
+#: ../../mod/photos.php:247 ../../mod/photos.php:1304
 msgid "Delete Photo"
 msgstr ""
 
-#: ../../mod/photos.php:589
+#: ../../mod/photos.php:591
 msgid "was tagged in a"
 msgstr ""
 
-#: ../../mod/photos.php:589 ../../mod/like.php:185 ../../mod/tagger.php:70
+#: ../../mod/photos.php:591 ../../mod/like.php:144 ../../mod/tagger.php:70
 #: ../../addon/communityhome/communityhome.php:163
 #: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1316
-#: ../../include/diaspora.php:1709 ../../include/conversation.php:53
+#: ../../include/diaspora.php:1710 ../../include/conversation.php:53
 #: ../../include/conversation.php:126
 msgid "photo"
 msgstr ""
 
-#: ../../mod/photos.php:589
+#: ../../mod/photos.php:591
 msgid "by"
 msgstr ""
 
-#: ../../mod/photos.php:694 ../../addon/js_upload/js_upload.php:315
+#: ../../mod/photos.php:696 ../../addon/js_upload/js_upload.php:315
 msgid "Image exceeds size limit of "
 msgstr ""
 
-#: ../../mod/photos.php:702
+#: ../../mod/photos.php:704
 msgid "Image file is empty."
 msgstr ""
 
-#: ../../mod/photos.php:716 ../../mod/profile_photo.php:126
-#: ../../mod/wall_upload.php:86
+#: ../../mod/photos.php:736 ../../mod/profile_photo.php:126
+#: ../../mod/wall_upload.php:99
 msgid "Unable to process image."
 msgstr ""
 
-#: ../../mod/photos.php:737 ../../mod/profile_photo.php:259
-#: ../../mod/wall_upload.php:105
+#: ../../mod/photos.php:757 ../../mod/profile_photo.php:259
+#: ../../mod/wall_upload.php:118
 msgid "Image upload failed."
 msgstr ""
 
-#: ../../mod/photos.php:823 ../../mod/community.php:16
+#: ../../mod/photos.php:843 ../../mod/community.php:16
 #: ../../mod/dfrn_request.php:759 ../../mod/viewcontacts.php:17
 #: ../../mod/display.php:7 ../../mod/search.php:71 ../../mod/directory.php:29
 msgid "Public access denied."
 msgstr ""
 
-#: ../../mod/photos.php:833
+#: ../../mod/photos.php:853
 msgid "No photos selected"
 msgstr ""
 
-#: ../../mod/photos.php:912
+#: ../../mod/photos.php:932
 msgid "Access to this item is restricted."
 msgstr ""
 
-#: ../../mod/photos.php:973
+#: ../../mod/photos.php:996
+#, php-format
+msgid "You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."
+msgstr ""
+
+#: ../../mod/photos.php:999
+#, php-format
+msgid "You have used %1$.2f Mbytes of photo storage."
+msgstr ""
+
+#: ../../mod/photos.php:1005
 msgid "Upload Photos"
 msgstr ""
 
-#: ../../mod/photos.php:976 ../../mod/photos.php:1020
+#: ../../mod/photos.php:1009 ../../mod/photos.php:1053
 msgid "New album name: "
 msgstr ""
 
-#: ../../mod/photos.php:977
+#: ../../mod/photos.php:1010
 msgid "or existing album name: "
 msgstr ""
 
-#: ../../mod/photos.php:978
+#: ../../mod/photos.php:1011
 msgid "Do not show a status post for this upload"
 msgstr ""
 
-#: ../../mod/photos.php:980 ../../mod/photos.php:1266
+#: ../../mod/photos.php:1013 ../../mod/photos.php:1299
 msgid "Permissions"
 msgstr ""
 
-#: ../../mod/photos.php:1035
+#: ../../mod/photos.php:1068
 msgid "Edit Album"
 msgstr ""
 
-#: ../../mod/photos.php:1059 ../../mod/photos.php:1492
+#: ../../mod/photos.php:1092 ../../mod/photos.php:1525
 msgid "View Photo"
 msgstr ""
 
-#: ../../mod/photos.php:1094
+#: ../../mod/photos.php:1127
 msgid "Permission denied. Access to this item may be restricted."
 msgstr ""
 
-#: ../../mod/photos.php:1096
+#: ../../mod/photos.php:1129
 msgid "Photo not available"
 msgstr ""
 
-#: ../../mod/photos.php:1146
+#: ../../mod/photos.php:1179
 msgid "View photo"
 msgstr ""
 
-#: ../../mod/photos.php:1146
+#: ../../mod/photos.php:1179
 msgid "Edit photo"
 msgstr ""
 
-#: ../../mod/photos.php:1147
+#: ../../mod/photos.php:1180
 msgid "Use as profile photo"
 msgstr ""
 
-#: ../../mod/photos.php:1153 ../../include/conversation.php:490
+#: ../../mod/photos.php:1186 ../../include/conversation.php:490
 msgid "Private Message"
 msgstr ""
 
-#: ../../mod/photos.php:1175
+#: ../../mod/photos.php:1208
 msgid "View Full Size"
 msgstr ""
 
-#: ../../mod/photos.php:1243
+#: ../../mod/photos.php:1276
 msgid "Tags: "
 msgstr ""
 
-#: ../../mod/photos.php:1246
+#: ../../mod/photos.php:1279
 msgid "[Remove any tag]"
 msgstr ""
 
-#: ../../mod/photos.php:1256
+#: ../../mod/photos.php:1289
 msgid "Rotate CW (right)"
 msgstr ""
 
-#: ../../mod/photos.php:1257
+#: ../../mod/photos.php:1290
 msgid "Rotate CCW (left)"
 msgstr ""
 
-#: ../../mod/photos.php:1259
+#: ../../mod/photos.php:1292
 msgid "New album name"
 msgstr ""
 
-#: ../../mod/photos.php:1262
+#: ../../mod/photos.php:1295
 msgid "Caption"
 msgstr ""
 
-#: ../../mod/photos.php:1264
+#: ../../mod/photos.php:1297
 msgid "Add a Tag"
 msgstr ""
 
-#: ../../mod/photos.php:1268
+#: ../../mod/photos.php:1301
 msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
 msgstr ""
 
-#: ../../mod/photos.php:1288 ../../include/conversation.php:554
+#: ../../mod/photos.php:1321 ../../include/conversation.php:554
 msgid "I like this (toggle)"
 msgstr ""
 
-#: ../../mod/photos.php:1289 ../../include/conversation.php:555
+#: ../../mod/photos.php:1322 ../../include/conversation.php:555
 msgid "I don't like this (toggle)"
 msgstr ""
 
-#: ../../mod/photos.php:1290 ../../include/conversation.php:989
+#: ../../mod/photos.php:1323 ../../include/conversation.php:993
 msgid "Share"
 msgstr ""
 
-#: ../../mod/photos.php:1291 ../../mod/editpost.php:104
+#: ../../mod/photos.php:1324 ../../mod/editpost.php:104
 #: ../../mod/wallmessage.php:145 ../../mod/message.php:215
 #: ../../mod/message.php:411 ../../include/conversation.php:371
-#: ../../include/conversation.php:731 ../../include/conversation.php:1008
+#: ../../include/conversation.php:731 ../../include/conversation.php:1012
 msgid "Please wait"
 msgstr ""
 
-#: ../../mod/photos.php:1307 ../../mod/photos.php:1347
-#: ../../mod/photos.php:1378 ../../include/conversation.php:577
+#: ../../mod/photos.php:1340 ../../mod/photos.php:1380
+#: ../../mod/photos.php:1411 ../../include/conversation.php:577
 msgid "This is you"
 msgstr ""
 
-#: ../../mod/photos.php:1309 ../../mod/photos.php:1349
-#: ../../mod/photos.php:1380 ../../include/conversation.php:579
+#: ../../mod/photos.php:1342 ../../mod/photos.php:1382
+#: ../../mod/photos.php:1413 ../../include/conversation.php:579
 #: ../../boot.php:518
 msgid "Comment"
 msgstr ""
 
-#: ../../mod/photos.php:1311 ../../mod/editpost.php:125
-#: ../../include/conversation.php:589 ../../include/conversation.php:1026
+#: ../../mod/photos.php:1344 ../../mod/editpost.php:125
+#: ../../include/conversation.php:589 ../../include/conversation.php:1030
 msgid "Preview"
 msgstr ""
 
-#: ../../mod/photos.php:1408 ../../mod/settings.php:618
-#: ../../mod/settings.php:699 ../../mod/group.php:168 ../../mod/admin.php:663
+#: ../../mod/photos.php:1441 ../../mod/settings.php:618
+#: ../../mod/settings.php:707 ../../mod/group.php:168 ../../mod/admin.php:663
 #: ../../include/conversation.php:328 ../../include/conversation.php:609
 msgid "Delete"
 msgstr ""
 
-#: ../../mod/photos.php:1498
+#: ../../mod/photos.php:1531
 msgid "View Album"
 msgstr ""
 
-#: ../../mod/photos.php:1507
+#: ../../mod/photos.php:1540
 msgid "Recent Photos"
 msgstr ""
 
@@ -640,7 +659,7 @@ msgstr ""
 msgid "Edit post"
 msgstr ""
 
-#: ../../mod/editpost.php:80 ../../include/conversation.php:975
+#: ../../mod/editpost.php:80 ../../include/conversation.php:979
 msgid "Post to Email"
 msgstr ""
 
@@ -651,17 +670,17 @@ msgstr ""
 
 #: ../../mod/editpost.php:96 ../../mod/wallmessage.php:143
 #: ../../mod/message.php:213 ../../mod/message.php:408
-#: ../../include/conversation.php:990
+#: ../../include/conversation.php:994
 msgid "Upload photo"
 msgstr ""
 
-#: ../../mod/editpost.php:97 ../../include/conversation.php:992
+#: ../../mod/editpost.php:97 ../../include/conversation.php:996
 msgid "Attach file"
 msgstr ""
 
 #: ../../mod/editpost.php:98 ../../mod/wallmessage.php:144
 #: ../../mod/message.php:214 ../../mod/message.php:409
-#: ../../include/conversation.php:994
+#: ../../include/conversation.php:998
 msgid "Insert web link"
 msgstr ""
 
@@ -677,35 +696,35 @@ msgstr ""
 msgid "Insert Vorbis [.ogg] audio"
 msgstr ""
 
-#: ../../mod/editpost.php:102 ../../include/conversation.php:1000
+#: ../../mod/editpost.php:102 ../../include/conversation.php:1004
 msgid "Set your location"
 msgstr ""
 
-#: ../../mod/editpost.php:103 ../../include/conversation.php:1002
+#: ../../mod/editpost.php:103 ../../include/conversation.php:1006
 msgid "Clear browser location"
 msgstr ""
 
-#: ../../mod/editpost.php:105 ../../include/conversation.php:1009
+#: ../../mod/editpost.php:105 ../../include/conversation.php:1013
 msgid "Permission settings"
 msgstr ""
 
-#: ../../mod/editpost.php:113 ../../include/conversation.php:1018
+#: ../../mod/editpost.php:113 ../../include/conversation.php:1022
 msgid "CC: email addresses"
 msgstr ""
 
-#: ../../mod/editpost.php:114 ../../include/conversation.php:1019
+#: ../../mod/editpost.php:114 ../../include/conversation.php:1023
 msgid "Public post"
 msgstr ""
 
-#: ../../mod/editpost.php:117 ../../include/conversation.php:1005
+#: ../../mod/editpost.php:117 ../../include/conversation.php:1009
 msgid "Set title"
 msgstr ""
 
-#: ../../mod/editpost.php:119 ../../include/conversation.php:1007
+#: ../../mod/editpost.php:119 ../../include/conversation.php:1011
 msgid "Categories (comma-separated list)"
 msgstr ""
 
-#: ../../mod/editpost.php:120 ../../include/conversation.php:1021
+#: ../../mod/editpost.php:120 ../../include/conversation.php:1025
 msgid "Example: bob@example.com, mary@example.com"
 msgstr ""
 
@@ -826,7 +845,7 @@ msgstr ""
 msgid "Confirm"
 msgstr ""
 
-#: ../../mod/dfrn_request.php:715 ../../include/items.php:2797
+#: ../../mod/dfrn_request.php:715 ../../include/items.php:2873
 msgid "[Name Withheld]"
 msgstr ""
 
@@ -1152,7 +1171,7 @@ msgid ""
 msgstr ""
 
 #: ../../mod/localtime.php:12 ../../include/event.php:11
-#: ../../include/bb2diaspora.php:243
+#: ../../include/bb2diaspora.php:335
 msgid "l F d, Y \\@ g:i A"
 msgstr ""
 
@@ -1725,10 +1744,10 @@ msgstr ""
 #: ../../mod/lostpass.php:45 ../../mod/lostpass.php:107
 #: ../../mod/register.php:90 ../../mod/register.php:144
 #: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:752
-#: ../../addon/facebook/facebook.php:692
-#: ../../addon/facebook/facebook.php:1182
+#: ../../addon/facebook/facebook.php:700
+#: ../../addon/facebook/facebook.php:1190
 #: ../../addon/public_server/public_server.php:62
-#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2806
+#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2882
 #: ../../boot.php:720
 msgid "Administrator"
 msgstr ""
@@ -1874,11 +1893,11 @@ msgstr ""
 msgid "Private forum has no privacy permissions and no default privacy group."
 msgstr ""
 
-#: ../../mod/settings.php:484 ../../addon/facebook/facebook.php:492
+#: ../../mod/settings.php:484 ../../addon/facebook/facebook.php:493
 #: ../../addon/impressum/impressum.php:77
 #: ../../addon/openstreetmap/openstreetmap.php:80
 #: ../../addon/mathjax/mathjax.php:66 ../../addon/piwik/piwik.php:105
-#: ../../addon/twitter/twitter.php:376
+#: ../../addon/twitter/twitter.php:382
 msgid "Settings updated."
 msgstr ""
 
@@ -1888,12 +1907,12 @@ msgid "Add application"
 msgstr ""
 
 #: ../../mod/settings.php:558 ../../mod/settings.php:584
-#: ../../addon/statusnet/statusnet.php:555
+#: ../../addon/statusnet/statusnet.php:561
 msgid "Consumer Key"
 msgstr ""
 
 #: ../../mod/settings.php:559 ../../mod/settings.php:585
-#: ../../addon/statusnet/statusnet.php:554
+#: ../../addon/statusnet/statusnet.php:560
 msgid "Consumer Secret"
 msgstr ""
 
@@ -1950,357 +1969,357 @@ msgstr ""
 msgid "StatusNet"
 msgstr ""
 
-#: ../../mod/settings.php:683
+#: ../../mod/settings.php:685
+msgid "Email access is disabled on this site."
+msgstr ""
+
+#: ../../mod/settings.php:691
 msgid "Connector Settings"
 msgstr ""
 
-#: ../../mod/settings.php:688
+#: ../../mod/settings.php:696
 msgid "Email/Mailbox Setup"
 msgstr ""
 
-#: ../../mod/settings.php:689
+#: ../../mod/settings.php:697
 msgid ""
 "If you wish to communicate with email contacts using this service "
 "(optional), please specify how to connect to your mailbox."
 msgstr ""
 
-#: ../../mod/settings.php:690
+#: ../../mod/settings.php:698
 msgid "Last successful email check:"
 msgstr ""
 
-#: ../../mod/settings.php:691
-msgid "Email access is disabled on this site."
-msgstr ""
-
-#: ../../mod/settings.php:692
+#: ../../mod/settings.php:700
 msgid "IMAP server name:"
 msgstr ""
 
-#: ../../mod/settings.php:693
+#: ../../mod/settings.php:701
 msgid "IMAP port:"
 msgstr ""
 
-#: ../../mod/settings.php:694
+#: ../../mod/settings.php:702
 msgid "Security:"
 msgstr ""
 
-#: ../../mod/settings.php:694 ../../mod/settings.php:699
+#: ../../mod/settings.php:702 ../../mod/settings.php:707
 msgid "None"
 msgstr ""
 
-#: ../../mod/settings.php:695
+#: ../../mod/settings.php:703
 msgid "Email login name:"
 msgstr ""
 
-#: ../../mod/settings.php:696
+#: ../../mod/settings.php:704
 msgid "Email password:"
 msgstr ""
 
-#: ../../mod/settings.php:697
+#: ../../mod/settings.php:705
 msgid "Reply-to address:"
 msgstr ""
 
-#: ../../mod/settings.php:698
+#: ../../mod/settings.php:706
 msgid "Send public posts to all email contacts:"
 msgstr ""
 
-#: ../../mod/settings.php:699
+#: ../../mod/settings.php:707
 msgid "Action after import:"
 msgstr ""
 
-#: ../../mod/settings.php:699
+#: ../../mod/settings.php:707
 msgid "Mark as seen"
 msgstr ""
 
-#: ../../mod/settings.php:699
+#: ../../mod/settings.php:707
 msgid "Move to folder"
 msgstr ""
 
-#: ../../mod/settings.php:700
+#: ../../mod/settings.php:708
 msgid "Move to folder:"
 msgstr ""
 
-#: ../../mod/settings.php:760
+#: ../../mod/settings.php:768
 msgid "Display Settings"
 msgstr ""
 
-#: ../../mod/settings.php:766
+#: ../../mod/settings.php:774
 msgid "Display Theme:"
 msgstr ""
 
-#: ../../mod/settings.php:767
+#: ../../mod/settings.php:775
 msgid "Update browser every xx seconds"
 msgstr ""
 
-#: ../../mod/settings.php:767
+#: ../../mod/settings.php:775
 msgid "Minimum of 10 seconds, no maximum"
 msgstr ""
 
-#: ../../mod/settings.php:768
+#: ../../mod/settings.php:776
 msgid "Number of items to display on the network page:"
 msgstr ""
 
-#: ../../mod/settings.php:768
+#: ../../mod/settings.php:776
 msgid "Maximum of 100 items"
 msgstr ""
 
-#: ../../mod/settings.php:769
+#: ../../mod/settings.php:777
 msgid "Don't show emoticons"
 msgstr ""
 
-#: ../../mod/settings.php:840
+#: ../../mod/settings.php:848
 msgid "Normal Account Page"
 msgstr ""
 
-#: ../../mod/settings.php:841
+#: ../../mod/settings.php:849
 msgid "This account is a normal personal profile"
 msgstr ""
 
-#: ../../mod/settings.php:844
+#: ../../mod/settings.php:852
 msgid "Soapbox Page"
 msgstr ""
 
-#: ../../mod/settings.php:845
+#: ../../mod/settings.php:853
 msgid "Automatically approve all connection/friend requests as read-only fans"
 msgstr ""
 
-#: ../../mod/settings.php:848
+#: ../../mod/settings.php:856
 msgid "Community Forum/Celebrity Account"
 msgstr ""
 
-#: ../../mod/settings.php:849
+#: ../../mod/settings.php:857
 msgid "Automatically approve all connection/friend requests as read-write fans"
 msgstr ""
 
-#: ../../mod/settings.php:852
+#: ../../mod/settings.php:860
 msgid "Automatic Friend Page"
 msgstr ""
 
-#: ../../mod/settings.php:853
+#: ../../mod/settings.php:861
 msgid "Automatically approve all connection/friend requests as friends"
 msgstr ""
 
-#: ../../mod/settings.php:856
+#: ../../mod/settings.php:864
 msgid "Private Forum [Experimental]"
 msgstr ""
 
-#: ../../mod/settings.php:857
+#: ../../mod/settings.php:865
 msgid "Private forum - approved members only"
 msgstr ""
 
-#: ../../mod/settings.php:869
+#: ../../mod/settings.php:877
 msgid "OpenID:"
 msgstr ""
 
-#: ../../mod/settings.php:869
+#: ../../mod/settings.php:877
 msgid "(Optional) Allow this OpenID to login to this account."
 msgstr ""
 
-#: ../../mod/settings.php:879
+#: ../../mod/settings.php:887
 msgid "Publish your default profile in your local site directory?"
 msgstr ""
 
-#: ../../mod/settings.php:885
+#: ../../mod/settings.php:893
 msgid "Publish your default profile in the global social directory?"
 msgstr ""
 
-#: ../../mod/settings.php:893
+#: ../../mod/settings.php:901
 msgid "Hide your contact/friend list from viewers of your default profile?"
 msgstr ""
 
-#: ../../mod/settings.php:897
+#: ../../mod/settings.php:905
 msgid "Hide your profile details from unknown viewers?"
 msgstr ""
 
-#: ../../mod/settings.php:902
+#: ../../mod/settings.php:910
 msgid "Allow friends to post to your profile page?"
 msgstr ""
 
-#: ../../mod/settings.php:908
+#: ../../mod/settings.php:916
 msgid "Allow friends to tag your posts?"
 msgstr ""
 
-#: ../../mod/settings.php:914
+#: ../../mod/settings.php:922
 msgid "Allow us to suggest you as a potential friend to new members?"
 msgstr ""
 
-#: ../../mod/settings.php:920
+#: ../../mod/settings.php:928
 msgid "Permit unknown people to send you private mail?"
 msgstr ""
 
-#: ../../mod/settings.php:931
+#: ../../mod/settings.php:936
 msgid "Profile is <strong>not published</strong>."
 msgstr ""
 
-#: ../../mod/settings.php:937 ../../mod/profile_photo.php:213
+#: ../../mod/settings.php:939 ../../mod/profile_photo.php:213
 msgid "or"
 msgstr ""
 
-#: ../../mod/settings.php:942
+#: ../../mod/settings.php:944
 msgid "Your Identity Address is"
 msgstr ""
 
-#: ../../mod/settings.php:953
+#: ../../mod/settings.php:955
 msgid "Automatically expire posts after this many days:"
 msgstr ""
 
-#: ../../mod/settings.php:953
+#: ../../mod/settings.php:955
 msgid "If empty, posts will not expire. Expired posts will be deleted"
 msgstr ""
 
-#: ../../mod/settings.php:954
+#: ../../mod/settings.php:956
 msgid "Advanced expiration settings"
 msgstr ""
 
-#: ../../mod/settings.php:955
+#: ../../mod/settings.php:957
 msgid "Advanced Expiration"
 msgstr ""
 
-#: ../../mod/settings.php:956
+#: ../../mod/settings.php:958
 msgid "Expire posts:"
 msgstr ""
 
-#: ../../mod/settings.php:957
+#: ../../mod/settings.php:959
 msgid "Expire personal notes:"
 msgstr ""
 
-#: ../../mod/settings.php:958
+#: ../../mod/settings.php:960
 msgid "Expire starred posts:"
 msgstr ""
 
-#: ../../mod/settings.php:959
+#: ../../mod/settings.php:961
 msgid "Expire photos:"
 msgstr ""
 
-#: ../../mod/settings.php:960
+#: ../../mod/settings.php:962
 msgid "Only expire posts by others:"
 msgstr ""
 
-#: ../../mod/settings.php:967
+#: ../../mod/settings.php:969
 msgid "Account Settings"
 msgstr ""
 
-#: ../../mod/settings.php:975
+#: ../../mod/settings.php:977
 msgid "Password Settings"
 msgstr ""
 
-#: ../../mod/settings.php:976
+#: ../../mod/settings.php:978
 msgid "New Password:"
 msgstr ""
 
-#: ../../mod/settings.php:977
+#: ../../mod/settings.php:979
 msgid "Confirm:"
 msgstr ""
 
-#: ../../mod/settings.php:977
+#: ../../mod/settings.php:979
 msgid "Leave password fields blank unless changing"
 msgstr ""
 
-#: ../../mod/settings.php:981
+#: ../../mod/settings.php:983
 msgid "Basic Settings"
 msgstr ""
 
-#: ../../mod/settings.php:982 ../../include/profile_advanced.php:15
+#: ../../mod/settings.php:984 ../../include/profile_advanced.php:15
 msgid "Full Name:"
 msgstr ""
 
-#: ../../mod/settings.php:983
+#: ../../mod/settings.php:985
 msgid "Email Address:"
 msgstr ""
 
-#: ../../mod/settings.php:984
+#: ../../mod/settings.php:986
 msgid "Your Timezone:"
 msgstr ""
 
-#: ../../mod/settings.php:985
+#: ../../mod/settings.php:987
 msgid "Default Post Location:"
 msgstr ""
 
-#: ../../mod/settings.php:986
+#: ../../mod/settings.php:988
 msgid "Use Browser Location:"
 msgstr ""
 
-#: ../../mod/settings.php:989
+#: ../../mod/settings.php:991
 msgid "Security and Privacy Settings"
 msgstr ""
 
-#: ../../mod/settings.php:991
+#: ../../mod/settings.php:993
 msgid "Maximum Friend Requests/Day:"
 msgstr ""
 
-#: ../../mod/settings.php:991 ../../mod/settings.php:1010
+#: ../../mod/settings.php:993 ../../mod/settings.php:1012
 msgid "(to prevent spam abuse)"
 msgstr ""
 
-#: ../../mod/settings.php:992
+#: ../../mod/settings.php:994
 msgid "Default Post Permissions"
 msgstr ""
 
-#: ../../mod/settings.php:993
+#: ../../mod/settings.php:995
 msgid "(click to open/close)"
 msgstr ""
 
-#: ../../mod/settings.php:1010
+#: ../../mod/settings.php:1012
 msgid "Maximum private messages per day from unknown people:"
 msgstr ""
 
-#: ../../mod/settings.php:1013
+#: ../../mod/settings.php:1015
 msgid "Notification Settings"
 msgstr ""
 
-#: ../../mod/settings.php:1014
+#: ../../mod/settings.php:1016
 msgid "By default post a status message when:"
 msgstr ""
 
-#: ../../mod/settings.php:1015
+#: ../../mod/settings.php:1017
 msgid "accepting a friend request"
 msgstr ""
 
-#: ../../mod/settings.php:1016
+#: ../../mod/settings.php:1018
 msgid "joining a forum/community"
 msgstr ""
 
-#: ../../mod/settings.php:1017
+#: ../../mod/settings.php:1019
 msgid "making an <em>interesting</em> profile change"
 msgstr ""
 
-#: ../../mod/settings.php:1018
+#: ../../mod/settings.php:1020
 msgid "Send a notification email when:"
 msgstr ""
 
-#: ../../mod/settings.php:1019
+#: ../../mod/settings.php:1021
 msgid "You receive an introduction"
 msgstr ""
 
-#: ../../mod/settings.php:1020
+#: ../../mod/settings.php:1022
 msgid "Your introductions are confirmed"
 msgstr ""
 
-#: ../../mod/settings.php:1021
+#: ../../mod/settings.php:1023
 msgid "Someone writes on your profile wall"
 msgstr ""
 
-#: ../../mod/settings.php:1022
+#: ../../mod/settings.php:1024
 msgid "Someone writes a followup comment"
 msgstr ""
 
-#: ../../mod/settings.php:1023
+#: ../../mod/settings.php:1025
 msgid "You receive a private message"
 msgstr ""
 
-#: ../../mod/settings.php:1024
+#: ../../mod/settings.php:1026
 msgid "You receive a friend suggestion"
 msgstr ""
 
-#: ../../mod/settings.php:1025
+#: ../../mod/settings.php:1027
 msgid "You are tagged in a post"
 msgstr ""
 
-#: ../../mod/settings.php:1028
+#: ../../mod/settings.php:1030
 msgid "Advanced Account/Page Type Settings"
 msgstr ""
 
-#: ../../mod/settings.php:1029
+#: ../../mod/settings.php:1031
 msgid "Change the behaviour of this account for special situations"
 msgstr ""
 
@@ -2414,13 +2433,13 @@ msgstr ""
 msgid "Invalid contact."
 msgstr ""
 
-#: ../../mod/notes.php:44 ../../boot.php:1552
+#: ../../mod/notes.php:44 ../../boot.php:1555
 msgid "Personal Notes"
 msgstr ""
 
 #: ../../mod/notes.php:63 ../../mod/filer.php:30
-#: ../../addon/facebook/facebook.php:760
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:185
+#: ../../addon/facebook/facebook.php:768
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:187
 #: ../../addon/dav/layout.fnk.php:384 ../../include/text.php:652
 msgid "Save"
 msgstr ""
@@ -2455,7 +2474,7 @@ msgid "No recipient."
 msgstr ""
 
 #: ../../mod/wallmessage.php:124 ../../mod/message.php:172
-#: ../../include/conversation.php:943
+#: ../../include/conversation.php:947
 msgid "Please enter a link URL:"
 msgstr ""
 
@@ -2664,8 +2683,8 @@ msgid "Profile Visibility Editor"
 msgstr ""
 
 #: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:128
-#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:79
-#: ../../include/nav.php:50 ../../boot.php:1531
+#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:84
+#: ../../include/nav.php:50 ../../boot.php:1534
 msgid "Profile"
 msgstr ""
 
@@ -2777,33 +2796,33 @@ msgstr ""
 msgid "People Search"
 msgstr ""
 
-#: ../../mod/like.php:185 ../../mod/like.php:259 ../../mod/tagger.php:70
-#: ../../addon/facebook/facebook.php:1576
+#: ../../mod/like.php:144 ../../mod/like.php:301 ../../mod/tagger.php:70
+#: ../../addon/facebook/facebook.php:1584
 #: ../../addon/communityhome/communityhome.php:158
 #: ../../addon/communityhome/communityhome.php:167
 #: ../../view/theme/diabook/theme.php:565
-#: ../../view/theme/diabook/theme.php:574 ../../include/diaspora.php:1709
+#: ../../view/theme/diabook/theme.php:574 ../../include/diaspora.php:1710
 #: ../../include/conversation.php:48 ../../include/conversation.php:57
 #: ../../include/conversation.php:121 ../../include/conversation.php:130
 msgid "status"
 msgstr ""
 
-#: ../../mod/like.php:202 ../../addon/facebook/facebook.php:1580
+#: ../../mod/like.php:161 ../../addon/facebook/facebook.php:1588
 #: ../../addon/communityhome/communityhome.php:172
-#: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1725
+#: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1726
 #: ../../include/conversation.php:65
 #, php-format
 msgid "%1$s likes %2$s's %3$s"
 msgstr ""
 
-#: ../../mod/like.php:204 ../../include/conversation.php:68
+#: ../../mod/like.php:163 ../../include/conversation.php:68
 #, php-format
 msgid "%1$s doesn't like %2$s's %3$s"
 msgstr ""
 
 #: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:159
 #: ../../mod/admin.php:700 ../../mod/admin.php:899 ../../mod/display.php:37
-#: ../../mod/display.php:142 ../../include/items.php:3248
+#: ../../mod/display.php:142 ../../include/items.php:3326
 msgid "Item not found."
 msgstr ""
 
@@ -2812,7 +2831,7 @@ msgid "Access denied."
 msgstr ""
 
 #: ../../mod/fbrowser.php:25 ../../view/theme/diabook/theme.php:130
-#: ../../include/nav.php:51 ../../boot.php:1537
+#: ../../include/nav.php:51 ../../boot.php:1540
 msgid "Photos"
 msgstr ""
 
@@ -2841,34 +2860,34 @@ msgstr ""
 msgid "Empty post discarded."
 msgstr ""
 
-#: ../../mod/item.php:379 ../../mod/wall_upload.php:102
-#: ../../mod/wall_upload.php:111 ../../mod/wall_upload.php:118
+#: ../../mod/item.php:379 ../../mod/wall_upload.php:115
+#: ../../mod/wall_upload.php:124 ../../mod/wall_upload.php:131
 #: ../../include/message.php:144
 msgid "Wall Photos"
 msgstr ""
 
-#: ../../mod/item.php:800
+#: ../../mod/item.php:784
 msgid "System error. Post not saved."
 msgstr ""
 
-#: ../../mod/item.php:825
+#: ../../mod/item.php:809
 #, php-format
 msgid ""
 "This message was sent to you by %s, a member of the Friendica social network."
 msgstr ""
 
-#: ../../mod/item.php:827
+#: ../../mod/item.php:811
 #, php-format
 msgid "You may visit them online at %s"
 msgstr ""
 
-#: ../../mod/item.php:828
+#: ../../mod/item.php:812
 msgid ""
 "Please contact the sender by replying to this post if you do not wish to "
 "receive these messages."
 msgstr ""
 
-#: ../../mod/item.php:830
+#: ../../mod/item.php:814
 #, php-format
 msgid "%s posted an update."
 msgstr ""
@@ -3155,7 +3174,7 @@ msgstr ""
 msgid "Advanced"
 msgstr ""
 
-#: ../../mod/admin.php:428 ../../addon/statusnet/statusnet.php:552
+#: ../../mod/admin.php:428 ../../addon/statusnet/statusnet.php:558
 msgid "Site name"
 msgstr ""
 
@@ -3719,8 +3738,8 @@ msgstr ""
 msgid "Search"
 msgstr ""
 
-#: ../../mod/profiles.php:21 ../../mod/profiles.php:395
-#: ../../mod/profiles.php:509 ../../mod/dfrn_confirm.php:62
+#: ../../mod/profiles.php:21 ../../mod/profiles.php:410
+#: ../../mod/profiles.php:524 ../../mod/dfrn_confirm.php:62
 msgid "Profile not found."
 msgstr ""
 
@@ -3728,289 +3747,305 @@ msgstr ""
 msgid "Profile Name is required."
 msgstr ""
 
-#: ../../mod/profiles.php:152
+#: ../../mod/profiles.php:155
 msgid "Marital Status"
 msgstr ""
 
-#: ../../mod/profiles.php:156
+#: ../../mod/profiles.php:159
 msgid "Romantic Partner"
 msgstr ""
 
-#: ../../mod/profiles.php:160
+#: ../../mod/profiles.php:163
+msgid "Likes"
+msgstr ""
+
+#: ../../mod/profiles.php:167
+msgid "Dislikes"
+msgstr ""
+
+#: ../../mod/profiles.php:171
 msgid "Work/Employment"
 msgstr ""
 
-#: ../../mod/profiles.php:163
+#: ../../mod/profiles.php:174
 msgid "Religion"
 msgstr ""
 
-#: ../../mod/profiles.php:167
+#: ../../mod/profiles.php:178
 msgid "Political Views"
 msgstr ""
 
-#: ../../mod/profiles.php:171
+#: ../../mod/profiles.php:182
 msgid "Gender"
 msgstr ""
 
-#: ../../mod/profiles.php:175
+#: ../../mod/profiles.php:186
 msgid "Sexual Preference"
 msgstr ""
 
-#: ../../mod/profiles.php:179
+#: ../../mod/profiles.php:190
 msgid "Homepage"
 msgstr ""
 
-#: ../../mod/profiles.php:183
+#: ../../mod/profiles.php:194
 msgid "Interests"
 msgstr ""
 
-#: ../../mod/profiles.php:187
+#: ../../mod/profiles.php:198
 msgid "Address"
 msgstr ""
 
-#: ../../mod/profiles.php:194 ../../addon/dav/layout.fnk.php:310
+#: ../../mod/profiles.php:205 ../../addon/dav/layout.fnk.php:310
 msgid "Location"
 msgstr ""
 
-#: ../../mod/profiles.php:273
+#: ../../mod/profiles.php:288
 msgid "Profile updated."
 msgstr ""
 
-#: ../../mod/profiles.php:340
+#: ../../mod/profiles.php:355
 msgid " and "
 msgstr ""
 
-#: ../../mod/profiles.php:348
+#: ../../mod/profiles.php:363
 msgid "public profile"
 msgstr ""
 
-#: ../../mod/profiles.php:351
+#: ../../mod/profiles.php:366
 #, php-format
 msgid "%1$s changed %2$s to &ldquo;%3$s&rdquo;"
 msgstr ""
 
-#: ../../mod/profiles.php:352
+#: ../../mod/profiles.php:367
 #, php-format
 msgid " - Visit %1$s's %2$s"
 msgstr ""
 
-#: ../../mod/profiles.php:355
+#: ../../mod/profiles.php:370
 #, php-format
 msgid "%1$s has an updated %2$s, changing %3$s."
 msgstr ""
 
-#: ../../mod/profiles.php:414
+#: ../../mod/profiles.php:429
 msgid "Profile deleted."
 msgstr ""
 
-#: ../../mod/profiles.php:432 ../../mod/profiles.php:466
+#: ../../mod/profiles.php:447 ../../mod/profiles.php:481
 msgid "Profile-"
 msgstr ""
 
-#: ../../mod/profiles.php:451 ../../mod/profiles.php:493
+#: ../../mod/profiles.php:466 ../../mod/profiles.php:508
 msgid "New profile created."
 msgstr ""
 
-#: ../../mod/profiles.php:472
+#: ../../mod/profiles.php:487
 msgid "Profile unavailable to clone."
 msgstr ""
 
-#: ../../mod/profiles.php:530
+#: ../../mod/profiles.php:545
 msgid "Hide your contact/friend list from viewers of this profile?"
 msgstr ""
 
-#: ../../mod/profiles.php:553
+#: ../../mod/profiles.php:568
 msgid "Edit Profile Details"
 msgstr ""
 
-#: ../../mod/profiles.php:555
+#: ../../mod/profiles.php:570
 msgid "View this profile"
 msgstr ""
 
-#: ../../mod/profiles.php:556
+#: ../../mod/profiles.php:571
 msgid "Create a new profile using these settings"
 msgstr ""
 
-#: ../../mod/profiles.php:557
+#: ../../mod/profiles.php:572
 msgid "Clone this profile"
 msgstr ""
 
-#: ../../mod/profiles.php:558
+#: ../../mod/profiles.php:573
 msgid "Delete this profile"
 msgstr ""
 
-#: ../../mod/profiles.php:559
+#: ../../mod/profiles.php:574
 msgid "Profile Name:"
 msgstr ""
 
-#: ../../mod/profiles.php:560
+#: ../../mod/profiles.php:575
 msgid "Your Full Name:"
 msgstr ""
 
-#: ../../mod/profiles.php:561
+#: ../../mod/profiles.php:576
 msgid "Title/Description:"
 msgstr ""
 
-#: ../../mod/profiles.php:562
+#: ../../mod/profiles.php:577
 msgid "Your Gender:"
 msgstr ""
 
-#: ../../mod/profiles.php:563
+#: ../../mod/profiles.php:578
 #, php-format
 msgid "Birthday (%s):"
 msgstr ""
 
-#: ../../mod/profiles.php:564
+#: ../../mod/profiles.php:579
 msgid "Street Address:"
 msgstr ""
 
-#: ../../mod/profiles.php:565
+#: ../../mod/profiles.php:580
 msgid "Locality/City:"
 msgstr ""
 
-#: ../../mod/profiles.php:566
+#: ../../mod/profiles.php:581
 msgid "Postal/Zip Code:"
 msgstr ""
 
-#: ../../mod/profiles.php:567
+#: ../../mod/profiles.php:582
 msgid "Country:"
 msgstr ""
 
-#: ../../mod/profiles.php:568
+#: ../../mod/profiles.php:583
 msgid "Region/State:"
 msgstr ""
 
-#: ../../mod/profiles.php:569
+#: ../../mod/profiles.php:584
 msgid "<span class=\"heart\">&hearts;</span> Marital Status:"
 msgstr ""
 
-#: ../../mod/profiles.php:570
+#: ../../mod/profiles.php:585
 msgid "Who: (if applicable)"
 msgstr ""
 
-#: ../../mod/profiles.php:571
+#: ../../mod/profiles.php:586
 msgid "Examples: cathy123, Cathy Williams, cathy@example.com"
 msgstr ""
 
-#: ../../mod/profiles.php:572
+#: ../../mod/profiles.php:587
 msgid "Since [date]:"
 msgstr ""
 
-#: ../../mod/profiles.php:573 ../../include/profile_advanced.php:46
+#: ../../mod/profiles.php:588 ../../include/profile_advanced.php:46
 msgid "Sexual Preference:"
 msgstr ""
 
-#: ../../mod/profiles.php:574
+#: ../../mod/profiles.php:589
 msgid "Homepage URL:"
 msgstr ""
 
-#: ../../mod/profiles.php:575 ../../include/profile_advanced.php:50
+#: ../../mod/profiles.php:590 ../../include/profile_advanced.php:50
 msgid "Hometown:"
 msgstr ""
 
-#: ../../mod/profiles.php:576 ../../include/profile_advanced.php:54
+#: ../../mod/profiles.php:591 ../../include/profile_advanced.php:54
 msgid "Political Views:"
 msgstr ""
 
-#: ../../mod/profiles.php:577
+#: ../../mod/profiles.php:592
 msgid "Religious Views:"
 msgstr ""
 
-#: ../../mod/profiles.php:578
+#: ../../mod/profiles.php:593
 msgid "Public Keywords:"
 msgstr ""
 
-#: ../../mod/profiles.php:579
+#: ../../mod/profiles.php:594
 msgid "Private Keywords:"
 msgstr ""
 
-#: ../../mod/profiles.php:580
+#: ../../mod/profiles.php:595 ../../include/profile_advanced.php:62
+msgid "Likes:"
+msgstr ""
+
+#: ../../mod/profiles.php:596 ../../include/profile_advanced.php:64
+msgid "Dislikes:"
+msgstr ""
+
+#: ../../mod/profiles.php:597
 msgid "Example: fishing photography software"
 msgstr ""
 
-#: ../../mod/profiles.php:581
+#: ../../mod/profiles.php:598
 msgid "(Used for suggesting potential friends, can be seen by others)"
 msgstr ""
 
-#: ../../mod/profiles.php:582
+#: ../../mod/profiles.php:599
 msgid "(Used for searching profiles, never shown to others)"
 msgstr ""
 
-#: ../../mod/profiles.php:583
+#: ../../mod/profiles.php:600
 msgid "Tell us about yourself..."
 msgstr ""
 
-#: ../../mod/profiles.php:584
+#: ../../mod/profiles.php:601
 msgid "Hobbies/Interests"
 msgstr ""
 
-#: ../../mod/profiles.php:585
+#: ../../mod/profiles.php:602
 msgid "Contact information and Social Networks"
 msgstr ""
 
-#: ../../mod/profiles.php:586
+#: ../../mod/profiles.php:603
 msgid "Musical interests"
 msgstr ""
 
-#: ../../mod/profiles.php:587
+#: ../../mod/profiles.php:604
 msgid "Books, literature"
 msgstr ""
 
-#: ../../mod/profiles.php:588
+#: ../../mod/profiles.php:605
 msgid "Television"
 msgstr ""
 
-#: ../../mod/profiles.php:589
+#: ../../mod/profiles.php:606
 msgid "Film/dance/culture/entertainment"
 msgstr ""
 
-#: ../../mod/profiles.php:590
+#: ../../mod/profiles.php:607
 msgid "Love/romance"
 msgstr ""
 
-#: ../../mod/profiles.php:591
+#: ../../mod/profiles.php:608
 msgid "Work/employment"
 msgstr ""
 
-#: ../../mod/profiles.php:592
+#: ../../mod/profiles.php:609
 msgid "School/education"
 msgstr ""
 
-#: ../../mod/profiles.php:597
+#: ../../mod/profiles.php:614
 msgid ""
 "This is your <strong>public</strong> profile.<br />It <strong>may</strong> "
 "be visible to anybody using the internet."
 msgstr ""
 
-#: ../../mod/profiles.php:607 ../../mod/directory.php:111
+#: ../../mod/profiles.php:624 ../../mod/directory.php:111
 msgid "Age: "
 msgstr ""
 
-#: ../../mod/profiles.php:644
+#: ../../mod/profiles.php:663
 msgid "Edit/Manage Profiles"
 msgstr ""
 
-#: ../../mod/profiles.php:645 ../../boot.php:1092
+#: ../../mod/profiles.php:664 ../../boot.php:1092
 msgid "Change profile photo"
 msgstr ""
 
-#: ../../mod/profiles.php:646 ../../boot.php:1093
+#: ../../mod/profiles.php:665 ../../boot.php:1093
 msgid "Create New Profile"
 msgstr ""
 
-#: ../../mod/profiles.php:657 ../../boot.php:1103
+#: ../../mod/profiles.php:676 ../../boot.php:1103
 msgid "Profile Image"
 msgstr ""
 
-#: ../../mod/profiles.php:659 ../../boot.php:1106
+#: ../../mod/profiles.php:678 ../../boot.php:1106
 msgid "visible to everybody"
 msgstr ""
 
-#: ../../mod/profiles.php:660 ../../boot.php:1107
+#: ../../mod/profiles.php:679 ../../boot.php:1107
 msgid "Edit visibility"
 msgstr ""
 
-#: ../../mod/filer.php:29 ../../include/conversation.php:947
+#: ../../mod/filer.php:29 ../../include/conversation.php:951
 msgid "Save to Folder:"
 msgstr ""
 
@@ -4264,83 +4299,99 @@ msgstr ""
 msgid "%1$s has joined %2$s"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:513
+#: ../../addon/fromgplus/fromgplus.php:29
+msgid "Google+ Import Settings"
+msgstr ""
+
+#: ../../addon/fromgplus/fromgplus.php:32
+msgid "Enable Google+ Import"
+msgstr ""
+
+#: ../../addon/fromgplus/fromgplus.php:35
+msgid "Google Account ID"
+msgstr ""
+
+#: ../../addon/fromgplus/fromgplus.php:55
+msgid "Google+ Import Settings saved."
+msgstr ""
+
+#: ../../addon/facebook/facebook.php:521
 msgid "Facebook disabled"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:518
+#: ../../addon/facebook/facebook.php:526
 msgid "Updating contacts"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:541
+#: ../../addon/facebook/facebook.php:549
 msgid "Facebook API key is missing."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:548
+#: ../../addon/facebook/facebook.php:556
 msgid "Facebook Connect"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:554
+#: ../../addon/facebook/facebook.php:562
 msgid "Install Facebook connector for this account."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:561
+#: ../../addon/facebook/facebook.php:569
 msgid "Remove Facebook connector"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:566
+#: ../../addon/facebook/facebook.php:574
 msgid ""
 "Re-authenticate [This is necessary whenever your Facebook password is "
 "changed.]"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:573
+#: ../../addon/facebook/facebook.php:581
 msgid "Post to Facebook by default"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:579
+#: ../../addon/facebook/facebook.php:587
 msgid ""
 "Facebook friend linking has been disabled on this site. The following "
 "settings will have no effect."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:583
+#: ../../addon/facebook/facebook.php:591
 msgid ""
 "Facebook friend linking has been disabled on this site. If you disable it, "
 "you will be unable to re-enable it."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:586
+#: ../../addon/facebook/facebook.php:594
 msgid "Link all your Facebook friends and conversations on this website"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:588
+#: ../../addon/facebook/facebook.php:596
 msgid ""
 "Facebook conversations consist of your <em>profile wall</em> and your friend "
 "<em>stream</em>."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:589
+#: ../../addon/facebook/facebook.php:597
 msgid "On this website, your Facebook friend stream is only visible to you."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:590
+#: ../../addon/facebook/facebook.php:598
 msgid ""
 "The following settings determine the privacy of your Facebook profile wall "
 "on this website."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:594
+#: ../../addon/facebook/facebook.php:602
 msgid ""
 "On this website your Facebook profile wall conversations will only be "
 "visible to you"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:599
+#: ../../addon/facebook/facebook.php:607
 msgid "Do not import your Facebook profile wall conversations"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:601
+#: ../../addon/facebook/facebook.php:609
 msgid ""
 "If you choose to link conversations and leave both of these boxes unchecked, "
 "your Facebook profile wall will be merged with your profile wall on this "
@@ -4348,120 +4399,120 @@ msgid ""
 "who may see the conversations."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:606
+#: ../../addon/facebook/facebook.php:614
 msgid "Comma separated applications to ignore"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:690
+#: ../../addon/facebook/facebook.php:698
 msgid "Problems with Facebook Real-Time Updates"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:718
+#: ../../addon/facebook/facebook.php:726
 #: ../../include/contact_selectors.php:81
 msgid "Facebook"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:719
+#: ../../addon/facebook/facebook.php:727
 msgid "Facebook Connector Settings"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:734
+#: ../../addon/facebook/facebook.php:742
 msgid "Facebook API Key"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:744
+#: ../../addon/facebook/facebook.php:752
 msgid ""
 "Error: it appears that you have specified the App-ID and -Secret in your ."
 "htconfig.php file. As long as they are specified there, they cannot be set "
 "using this form.<br><br>"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:749
+#: ../../addon/facebook/facebook.php:757
 msgid ""
 "Error: the given API Key seems to be incorrect (the application access token "
 "could not be retrieved)."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:751
+#: ../../addon/facebook/facebook.php:759
 msgid "The given API Key seems to work correctly."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:753
+#: ../../addon/facebook/facebook.php:761
 msgid ""
 "The correctness of the API Key could not be detected. Somthing strange's "
 "going on."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:756
+#: ../../addon/facebook/facebook.php:764
 msgid "App-ID / API-Key"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:757
+#: ../../addon/facebook/facebook.php:765
 msgid "Application secret"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:758
+#: ../../addon/facebook/facebook.php:766
 #, php-format
 msgid "Polling Interval in minutes (minimum %1$s minutes)"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:759
+#: ../../addon/facebook/facebook.php:767
 msgid ""
 "Synchronize comments (no comments on Facebook are missed, at the cost of "
 "increased system load)"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:763
+#: ../../addon/facebook/facebook.php:771
 msgid "Real-Time Updates"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:767
+#: ../../addon/facebook/facebook.php:775
 msgid "Real-Time Updates are activated."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:768
+#: ../../addon/facebook/facebook.php:776
 msgid "Deactivate Real-Time Updates"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:770
+#: ../../addon/facebook/facebook.php:778
 msgid "Real-Time Updates not activated."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:770
+#: ../../addon/facebook/facebook.php:778
 msgid "Activate Real-Time Updates"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:789 ../../addon/dav/layout.fnk.php:360
+#: ../../addon/facebook/facebook.php:797 ../../addon/dav/layout.fnk.php:360
 msgid "The new values have been saved."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:813
+#: ../../addon/facebook/facebook.php:821
 msgid "Post to Facebook"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:911
+#: ../../addon/facebook/facebook.php:919
 msgid ""
 "Post to Facebook cancelled because of multi-network access permission "
 "conflict."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:1131
+#: ../../addon/facebook/facebook.php:1139
 msgid "View on Friendica"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:1164
+#: ../../addon/facebook/facebook.php:1172
 msgid "Facebook post failed. Queued for retry."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:1204
+#: ../../addon/facebook/facebook.php:1212
 msgid "Your Facebook connection became invalid. Please Re-authenticate."
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:1205
+#: ../../addon/facebook/facebook.php:1213
 msgid "Facebook connection became invalid"
 msgstr ""
 
-#: ../../addon/facebook/facebook.php:1206
+#: ../../addon/facebook/facebook.php:1214
 #, php-format
 msgid ""
 "Hi %1$s,\n"
@@ -4483,23 +4534,23 @@ msgstr ""
 msgid "Automatically follow any StatusNet followers/mentioners"
 msgstr ""
 
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:182
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:184
 msgid "Lifetime of the cache (in hours)"
 msgstr ""
 
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:187
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:189
 msgid "Cache Statistics"
 msgstr ""
 
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:190
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:192
 msgid "Number of items"
 msgstr ""
 
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:192
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:194
 msgid "Size of the cache"
 msgstr ""
 
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:194
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:196
 msgid "Delete the whole cache"
 msgstr ""
 
@@ -5034,7 +5085,7 @@ msgstr ""
 msgid "Post to Drupal by default"
 msgstr ""
 
-#: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:199
+#: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:201
 #: ../../addon/blogger/blogger.php:172 ../../addon/posterous/posterous.php:189
 msgid "Post from Friendica"
 msgstr ""
@@ -5551,7 +5602,7 @@ msgstr ""
 msgid "Clear OAuth configuration"
 msgstr ""
 
-#: ../../addon/statusnet/statusnet.php:553
+#: ../../addon/statusnet/statusnet.php:559
 msgid "API URL"
 msgstr ""
 
@@ -5650,7 +5701,7 @@ msgstr ""
 msgid "Provide a backlink to the Friendica post"
 msgstr ""
 
-#: ../../addon/wppost/wppost.php:205
+#: ../../addon/wppost/wppost.php:207
 msgid "Read the original post and comment stream on Friendica"
 msgstr ""
 
@@ -5768,11 +5819,11 @@ msgstr ""
 msgid "Send linked #-tags and @-names to Twitter"
 msgstr ""
 
-#: ../../addon/twitter/twitter.php:383
+#: ../../addon/twitter/twitter.php:389
 msgid "Consumer key"
 msgstr ""
 
-#: ../../addon/twitter/twitter.php:384
+#: ../../addon/twitter/twitter.php:390
 msgid "Consumer secret"
 msgstr ""
 
@@ -6084,8 +6135,7 @@ msgstr ""
 msgid "j F"
 msgstr ""
 
-#: ../../include/profile_advanced.php:30 ../../include/datetime.php:450
-#: ../../include/items.php:1460
+#: ../../include/profile_advanced.php:30
 msgid "Birthday:"
 msgstr ""
 
@@ -6122,35 +6172,35 @@ msgstr ""
 msgid "Hobbies/Interests:"
 msgstr ""
 
-#: ../../include/profile_advanced.php:62
+#: ../../include/profile_advanced.php:67
 msgid "Contact information and Social Networks:"
 msgstr ""
 
-#: ../../include/profile_advanced.php:64
+#: ../../include/profile_advanced.php:69
 msgid "Musical interests:"
 msgstr ""
 
-#: ../../include/profile_advanced.php:66
+#: ../../include/profile_advanced.php:71
 msgid "Books, literature:"
 msgstr ""
 
-#: ../../include/profile_advanced.php:68
+#: ../../include/profile_advanced.php:73
 msgid "Television:"
 msgstr ""
 
-#: ../../include/profile_advanced.php:70
+#: ../../include/profile_advanced.php:75
 msgid "Film/dance/culture/entertainment:"
 msgstr ""
 
-#: ../../include/profile_advanced.php:72
+#: ../../include/profile_advanced.php:77
 msgid "Love/Romance:"
 msgstr ""
 
-#: ../../include/profile_advanced.php:74
+#: ../../include/profile_advanced.php:79
 msgid "Work/employment:"
 msgstr ""
 
-#: ../../include/profile_advanced.php:76
+#: ../../include/profile_advanced.php:81
 msgid "School/education:"
 msgstr ""
 
@@ -6370,7 +6420,7 @@ msgstr ""
 msgid "Sex Addict"
 msgstr ""
 
-#: ../../include/profile_selectors.php:42 ../../include/user.php:272
+#: ../../include/profile_selectors.php:42 ../../include/user.php:278
 msgid "Friends"
 msgstr ""
 
@@ -6458,11 +6508,11 @@ msgstr ""
 msgid "Ask me"
 msgstr ""
 
-#: ../../include/event.php:17 ../../include/bb2diaspora.php:249
+#: ../../include/event.php:20 ../../include/bb2diaspora.php:341
 msgid "Starts:"
 msgstr ""
 
-#: ../../include/event.php:27 ../../include/bb2diaspora.php:257
+#: ../../include/event.php:30 ../../include/bb2diaspora.php:349
 msgid "Finishes:"
 msgstr ""
 
@@ -6606,7 +6656,7 @@ msgstr ""
 msgid "Click to open/close"
 msgstr ""
 
-#: ../../include/text.php:1096 ../../include/user.php:230
+#: ../../include/text.php:1096 ../../include/user.php:236
 msgid "default"
 msgstr ""
 
@@ -6634,19 +6684,19 @@ msgstr ""
 msgid "Sharing notification from Diaspora network"
 msgstr ""
 
-#: ../../include/diaspora.php:2074
+#: ../../include/diaspora.php:2085
 msgid "Attachments:"
 msgstr ""
 
-#: ../../include/network.php:827
+#: ../../include/network.php:839
 msgid "view full size"
 msgstr ""
 
-#: ../../include/oembed.php:134
+#: ../../include/oembed.php:135
 msgid "Embedded content"
 msgstr ""
 
-#: ../../include/oembed.php:143
+#: ../../include/oembed.php:144
 msgid "Embedding disabled"
 msgstr ""
 
@@ -6693,7 +6743,7 @@ msgstr ""
 msgid "End this session"
 msgstr ""
 
-#: ../../include/nav.php:49 ../../boot.php:1525
+#: ../../include/nav.php:49 ../../boot.php:1528
 msgid "Status"
 msgstr ""
 
@@ -6939,15 +6989,25 @@ msgstr ""
 msgid "%1$d %2$s ago"
 msgstr ""
 
+#: ../../include/datetime.php:450 ../../include/items.php:1460
+#, php-format
+msgid "%s's birthday"
+msgstr ""
+
+#: ../../include/datetime.php:451 ../../include/items.php:1461
+#, php-format
+msgid "Happy Birthday %s"
+msgstr ""
+
 #: ../../include/onepoll.php:399
 msgid "From: "
 msgstr ""
 
-#: ../../include/bbcode.php:210 ../../include/bbcode.php:230
+#: ../../include/bbcode.php:216 ../../include/bbcode.php:236
 msgid "$1 wrote:"
 msgstr ""
 
-#: ../../include/bbcode.php:245 ../../include/bbcode.php:314
+#: ../../include/bbcode.php:251 ../../include/bbcode.php:328
 msgid "Image/photo"
 msgstr ""
 
@@ -7142,73 +7202,64 @@ msgid ""
 "This site is not configured to allow communications with other networks."
 msgstr ""
 
-#: ../../include/follow.php:60 ../../include/follow.php:75
+#: ../../include/follow.php:60 ../../include/follow.php:80
 msgid "No compatible communication protocols or feeds were discovered."
 msgstr ""
 
-#: ../../include/follow.php:73
+#: ../../include/follow.php:78
 msgid "The profile address specified does not provide adequate information."
 msgstr ""
 
-#: ../../include/follow.php:77
+#: ../../include/follow.php:82
 msgid "An author or name was not found."
 msgstr ""
 
-#: ../../include/follow.php:79
+#: ../../include/follow.php:84
 msgid "No browser URL could be matched to this address."
 msgstr ""
 
-#: ../../include/follow.php:81
+#: ../../include/follow.php:86
 msgid ""
 "Unable to match @-style Identity Address with a known protocol or email "
 "contact."
 msgstr ""
 
-#: ../../include/follow.php:82
+#: ../../include/follow.php:87
 msgid "Use mailto: in front of address to force email check."
 msgstr ""
 
-#: ../../include/follow.php:88
+#: ../../include/follow.php:93
 msgid ""
 "The profile address specified belongs to a network which has been disabled "
 "on this site."
 msgstr ""
 
-#: ../../include/follow.php:93
+#: ../../include/follow.php:103
 msgid ""
 "Limited profile. This person will be unable to receive direct/personal "
 "notifications from you."
 msgstr ""
 
-#: ../../include/follow.php:169
+#: ../../include/follow.php:205
 msgid "Unable to retrieve contact information."
 msgstr ""
 
-#: ../../include/follow.php:223
+#: ../../include/follow.php:259
 msgid "following"
 msgstr ""
 
-#: ../../include/items.php:2804
+#: ../../include/items.php:2880
 msgid "A new person is sharing with you at "
 msgstr ""
 
-#: ../../include/items.php:2804
+#: ../../include/items.php:2880
 msgid "You have a new follower at "
 msgstr ""
 
-#: ../../include/items.php:3466
+#: ../../include/items.php:3512
 msgid "Archives"
 msgstr ""
 
-#: ../../include/bb2diaspora.php:102 ../../include/bb2diaspora.php:112
-#: ../../include/bb2diaspora.php:113
-msgid "image/photo"
-msgstr ""
-
-#: ../../include/bb2diaspora.php:102
-msgid "link"
-msgstr ""
-
 #: ../../include/user.php:38
 msgid "An invitation is required."
 msgstr ""
@@ -7255,7 +7306,7 @@ msgid ""
 "must also begin with a letter."
 msgstr ""
 
-#: ../../include/user.php:127 ../../include/user.php:219
+#: ../../include/user.php:127 ../../include/user.php:225
 msgid "Nickname is already registered. Please choose another."
 msgstr ""
 
@@ -7269,11 +7320,11 @@ msgstr ""
 msgid "SERIOUS ERROR: Generation of security keys failed."
 msgstr ""
 
-#: ../../include/user.php:205
+#: ../../include/user.php:211
 msgid "An error occurred during registration. Please try again."
 msgstr ""
 
-#: ../../include/user.php:240
+#: ../../include/user.php:246
 msgid "An error occurred creating your default profile. Please try again."
 msgstr ""
 
@@ -7449,105 +7500,117 @@ msgstr ""
 msgid "Delete Selected Items"
 msgstr ""
 
-#: ../../include/conversation.php:901
+#: ../../include/conversation.php:905
 #, php-format
 msgid "%s likes this."
 msgstr ""
 
-#: ../../include/conversation.php:901
+#: ../../include/conversation.php:905
 #, php-format
 msgid "%s doesn't like this."
 msgstr ""
 
-#: ../../include/conversation.php:905
+#: ../../include/conversation.php:909
 #, php-format
 msgid "<span  %1$s>%2$d people</span> like this."
 msgstr ""
 
-#: ../../include/conversation.php:907
+#: ../../include/conversation.php:911
 #, php-format
 msgid "<span  %1$s>%2$d people</span> don't like this."
 msgstr ""
 
-#: ../../include/conversation.php:913
+#: ../../include/conversation.php:917
 msgid "and"
 msgstr ""
 
-#: ../../include/conversation.php:916
+#: ../../include/conversation.php:920
 #, php-format
 msgid ", and %d other people"
 msgstr ""
 
-#: ../../include/conversation.php:917
+#: ../../include/conversation.php:921
 #, php-format
 msgid "%s like this."
 msgstr ""
 
-#: ../../include/conversation.php:917
+#: ../../include/conversation.php:921
 #, php-format
 msgid "%s don't like this."
 msgstr ""
 
-#: ../../include/conversation.php:942
+#: ../../include/conversation.php:946
 msgid "Visible to <strong>everybody</strong>"
 msgstr ""
 
-#: ../../include/conversation.php:944
+#: ../../include/conversation.php:948
 msgid "Please enter a video link/URL:"
 msgstr ""
 
-#: ../../include/conversation.php:945
+#: ../../include/conversation.php:949
 msgid "Please enter an audio link/URL:"
 msgstr ""
 
-#: ../../include/conversation.php:946
+#: ../../include/conversation.php:950
 msgid "Tag term:"
 msgstr ""
 
-#: ../../include/conversation.php:948
+#: ../../include/conversation.php:952
 msgid "Where are you right now?"
 msgstr ""
 
-#: ../../include/conversation.php:991
+#: ../../include/conversation.php:995
 msgid "upload photo"
 msgstr ""
 
-#: ../../include/conversation.php:993
+#: ../../include/conversation.php:997
 msgid "attach file"
 msgstr ""
 
-#: ../../include/conversation.php:995
+#: ../../include/conversation.php:999
 msgid "web link"
 msgstr ""
 
-#: ../../include/conversation.php:996
+#: ../../include/conversation.php:1000
 msgid "Insert video link"
 msgstr ""
 
-#: ../../include/conversation.php:997
+#: ../../include/conversation.php:1001
 msgid "video link"
 msgstr ""
 
-#: ../../include/conversation.php:998
+#: ../../include/conversation.php:1002
 msgid "Insert audio link"
 msgstr ""
 
-#: ../../include/conversation.php:999
+#: ../../include/conversation.php:1003
 msgid "audio link"
 msgstr ""
 
-#: ../../include/conversation.php:1001
+#: ../../include/conversation.php:1005
 msgid "set location"
 msgstr ""
 
-#: ../../include/conversation.php:1003
+#: ../../include/conversation.php:1007
 msgid "clear location"
 msgstr ""
 
-#: ../../include/conversation.php:1010
+#: ../../include/conversation.php:1014
 msgid "permissions"
 msgstr ""
 
+#: ../../include/plugin.php:388 ../../include/plugin.php:390
+msgid "Click here to upgrade."
+msgstr ""
+
+#: ../../include/plugin.php:396
+msgid "This action exceeds the limits set by your subscription plan."
+msgstr ""
+
+#: ../../include/plugin.php:401
+msgid "This action is not available under your subscription plan."
+msgstr ""
+
 #: ../../boot.php:517
 msgid "Delete this item?"
 msgstr ""
@@ -7594,15 +7657,15 @@ msgstr ""
 msgid "Message"
 msgstr ""
 
-#: ../../boot.php:1194 ../../boot.php:1270
+#: ../../boot.php:1194 ../../boot.php:1273
 msgid "g A l F d"
 msgstr ""
 
-#: ../../boot.php:1195 ../../boot.php:1271
+#: ../../boot.php:1195 ../../boot.php:1274
 msgid "F d"
 msgstr ""
 
-#: ../../boot.php:1240 ../../boot.php:1311
+#: ../../boot.php:1240 ../../boot.php:1314
 msgid "[today]"
 msgstr ""
 
@@ -7614,30 +7677,30 @@ msgstr ""
 msgid "Birthdays this week:"
 msgstr ""
 
-#: ../../boot.php:1304
+#: ../../boot.php:1307
 msgid "[No description]"
 msgstr ""
 
-#: ../../boot.php:1322
+#: ../../boot.php:1325
 msgid "Event Reminders"
 msgstr ""
 
-#: ../../boot.php:1323
+#: ../../boot.php:1326
 msgid "Events this week:"
 msgstr ""
 
-#: ../../boot.php:1528
+#: ../../boot.php:1531
 msgid "Status Messages and Posts"
 msgstr ""
 
-#: ../../boot.php:1534
+#: ../../boot.php:1537
 msgid "Profile Details"
 msgstr ""
 
-#: ../../boot.php:1549
+#: ../../boot.php:1552
 msgid "Events and Calendar"
 msgstr ""
 
-#: ../../boot.php:1555
+#: ../../boot.php:1558
 msgid "Only You Can See This"
 msgstr ""
index f68a3dece12bb14cfa0a07ccb804108401b1e98c..548e1a0df16cda0b5a7882467232a8893e9bae8a 100644 (file)
@@ -1,5 +1,5 @@
 Hey, \r
-I'm $sitename.   \r
+I'm $sitename;   \r
 The friendica developers released update $update recently, \r
 but when I tried to install it, something went terribly wrong.  \r
 This needs to be fixed soon and I can't do it alone. Please contact a \r
index 7d5f8cf4a30431fab605698404055267fb70796d..536c52b0fa94927ba218a0644ae7b62da22aa7e2 100644 (file)
@@ -26,6 +26,10 @@ $f_dsel $f_tsel
 
 <div id="event-adjust-break"></div>
 
+<div id="event-summary-text">$t_text</div>
+<input type="text" id="event-summary" name="summary" value="$t_orig" />
+
+
 <div id="event-desc-text">$d_text</div>
 <textarea id="event-desc-textarea" name="desc">$d_orig</textarea>
 
index 318a9242771ecaf8c84f72266d0e80fa1748a7f7..706b3398dd8fdc59b25c9b61eefba84c94f4590a 100644 (file)
@@ -1,4 +1,7 @@
 <h3>$pagename</h3>
+
+<div id="photos-usage-message">$usage</div>
+
 <form action="photos/$nickname" enctype="multipart/form-data" method="post" name="photos-upload-form" id="photos-upload-form" >
        <div id="photos-upload-new-wrapper" >
                <div id="photos-upload-newalbum-div">
index 0b8f31f437fabceb792add6d83b1297c16f10df0..b02b7f27defc2d2c9de287cc039648a0c87974c8 100644 (file)
 </dl>
 {{ endif }}
 
+{{ if $profile.likes }}
+<dl id="aprofile-likes" class="aprofile">
+ <dt>$profile.likes.0</dt>
+ <dd>$profile.likes.1</dd>
+</dl>
+{{ endif }}
+
+{{ if $profile.dislikes }}
+<dl id="aprofile-dislikes" class="aprofile">
+ <dt>$profile.dislikes.0</dt>
+ <dd>$profile.dislikes.1</dd>
+</dl>
+{{ endif }}
 
 {{ if $profile.contact }}
 <dl id="aprofile-contact" class="aprofile">
index ad34b995672e8bffc18128514d3ee8ec42d71898..64cd4732487a90a487618e2232941fcfef984501 100644 (file)
@@ -187,6 +187,30 @@ $lbl_hobbies
 </div>
 
 
+<div id="likes-jot-wrapper" >
+<p id="likes-jot-desc" >
+$lbl_likes
+</p>
+
+<textarea rows="10" cols="72" id="likes-jot-text" name="likes" >$likes</textarea>
+
+</div>
+<div id="likes-jot-end"></div>
+</div>
+
+
+<div id="dislikes-jot-wrapper" >
+<p id="dislikes-jot-desc" >
+$lbl_dislikes
+</p>
+
+<textarea rows="10" cols="72" id="dislikes-jot-text" name="dislikes" >$dislikes</textarea>
+
+</div>
+<div id="dislikes-jot-end"></div>
+</div>
+
+
 <div id="contact-jot-wrapper" >
 <p id="contact-jot-desc" >
 $lbl_social
index 79151aeedb6dc9059680a653efb9ea322da57564..1d94cb6d3c05752da8b856a4bad13386413ab6a3 100755 (executable)
@@ -70,7 +70,7 @@
        <div style="display: none;">
                <div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
                        $acl
-                       <hr style="clear:both"/>
+                       <hr style="clear:both;"/>
                        <div id="profile-jot-email-label">$emailcc</div><input type="text" name="emailcc" id="profile-jot-email" title="$emtitle" />
                        <div id="profile-jot-email-end"></div>
                        $jotnets
index 83079782e87676a2aa4f5dec69d88e6a2d780128..53048df6cd19e7f5e83bb874f61343396c1793f0 100755 (executable)
@@ -528,7 +528,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
                        $entry = replace_macros($tpl,array(
                                '$id' => $rr['id'],
                                '$profile-link' => $profile_link,
-                               '$photo' => $rr[$photo],
+                               '$photo' => $a->get_cached_avatar_image($rr[$photo]),
                                '$alt-text' => $rr['name'],
                        ));
                        $aside['$lastusers_items'][] = $entry;
index ca1b560a6896558851de747c5165a3753a9bbc6a..4a93dacf3744bbb5dfd4c550507a652e76485fcd 100644 (file)
@@ -19,8 +19,9 @@
 <div id="conversation-end"></div>
 
 {{ if $dropping }}
-<div class="delete-checked">
-<a href="#" onclick="deleteCheckedItems();return false;"><span class="icon delete"></span><span class="s22 text" onmouseover="imgbright(this);" onmouseout="imgdull(this);">$dropping</span></a>
+<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems(); return false;">
+  <div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
+  <div id="item-delete-selected-desc" >$dropping</div>
 </div>
 <div id="item-delete-selected-end"></div>
 {{ endif }}
index 327b053abab6c00918764b4980ff7399761d8468..8ab192368584bb691e0965f6515c52204a945b1c 100644 (file)
@@ -59,7 +59,7 @@ h6{font-size:xx-small;}
 .button{color:#eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;padding:5px;cursor:pointer;}.button a{color:#eeeecc;font-weight:bold;}
 #profile-listing-desc a{color:#eeeecc;font-weight:bold;}
 [class$="-desc"],[id$="-desc"]{color:#eeeecc;background:#2e2f2e;border:2px outset #d4d580;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:3px 10px 7px 0;padding:5px;font-weight:bold;font-size:smaller;}
-#item-delete-selected-desc{float:left;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;}
+#item-delete-selected-desc{float:left;font-size:x-small;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;}
 .intro-approve-as-friend-desc{margin-top:10px;}
 .intro-desc{margin-bottom:20px;font-weight:bold;}
 #group-edit-desc{margin:10px 0px;}
@@ -214,7 +214,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
 .wall-item-subtools1{width:30px;height:30px;list-style:none outside none;margin:18px 0 30px -20px;padding:0;}
 .wall-item-subtools2{width:25px;height:25px;list-style:none outside none;margin:-78px 0 0 5px;padding:0;}
 .wall-item-title{font-size:1.2em;font-weight:bold;margin-bottom:1.4em;}
-.wall-item-body{margin:15px 10px 10px 0px;text-align:left;overflow-x:auto;}
+.wall-item-body{margin:1em;text-align:left;overflow-x:auto;}
 .wall-item-lock-wrapper{float:right;width:22px;height:22px;margin:0 -5px 0 0;opacity:1;}
 .wall-item-dislike,.wall-item-like{clear:left;font-size:0.8em;color:#888b85;margin:5px 0 5px 10.2em;-webkit-transition:all 0.75s ease-in-out;-moz-transition:all 0.75s ease-in-out;-o-transition:all 0.75s ease-in-out;-ms-transition:all 0.75s ease-in-out;transition:all 0.75s ease-in-out;opacity:0.5;}.wall-item-dislike:hover,.wall-item-like:hover{opacity:1;}
 .wall-item-author,.wall-item-actions-author,.wall-item-ago{color:#eeeecc;line-height:1;display:inline-block;font-size:x-small;margin:0.5em auto;font-weight:bold;}
@@ -226,7 +226,6 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
 .wallwall .wall-item-photo-end{clear:both;}
 .wall-item-arrowphoto-wrapper{position:absolute;left:35px;top:80px;z-index:10002;}
 .wall-item-photo-menu{min-width:92px;font-size:0.75em;border:2px solid #555753;border-top:0px;background:#555753;position:absolute;left:-2px;top:101px;display:none;z-index:10003;-o-border-radius:0 5px 5px 5px;-webkit-border-radius:0 5px 5px 5px;-moz-border-radius:0 5px 5px 5px;-ms-border-radius:0 5px 5px 5px;border-radius:0 5px 5px 5px;}.wall-item-photo-menu li a{white-space:nowrap;display:block;padding:5px 6px;color:#eeeeee;}.wall-item-photo-menu li a:hover{color:#555753;background:#eeeeee;}
-#item-delete-selected{overflow:auto;width:100%;}
 #connect-services-header,#extra-help-header{margin:1.5em 0 0 0;}
 #connect-services,#extra-help{margin:0px;padding:0px;list-style:none;list-style-position:inside;margin:1em 0 0 0;}#connect-services li,#extra-help li{display:inline;}
 .ccollapse-wrapper{font-size:0.9em;margin-left:5em;}
@@ -390,9 +389,8 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
 .filesavetags:hover,.categorytags:hover{margin:20px 0;opacity:1.0 !important;}
 .item-select{opacity:0.1;margin:5px 0 0 6px !important;}.item-select:hover{opacity:1;}
 .checkeditem{opacity:1;}
-#item-delete-selected{margin-top:30px;}
-.delete-checked{position:absolute;left:35px;margin-top:20px;}
-#item-delete-selected-icon{float:left;margin-right:5px;}
+#item-delete-selected{margin:3em 5px;position:relative;left:4em;width:15em;overflow:auto;}
+#item-delete-selected-icon{float:left;margin:11px 5px;}
 .fc-state-highlight{background:#eeeecc;color:#2e2f2e;}
 .directory-item{float:left;margin:0 5px 4px 0;padding:3px;width:180px;height:250px;position:relative;}
 #group-sidebar{margin-bottom:10px;}
index e3966683bf9fbf8a5fa3b51d6e91b05627ced09e..60b49865e978c25df7f08cd92ca70aa01db82462 100644 (file)
@@ -325,6 +325,7 @@ h6 {
 }
 #item-delete-selected-desc {
     float: left;
+    font-size: x-small;
     margin-right: 5px;
     &:hover {
         text-decoration: underline;
@@ -1428,7 +1429,7 @@ nav #nav-notifications-linkmenu {
     margin-bottom: 1.4em;
 }
 .wall-item-body {
-    margin: 15px 10px 10px 0px;
+    margin: 1em;
     text-align: left;
     overflow-x: auto;
 }
@@ -1533,10 +1534,6 @@ nav #nav-notifications-linkmenu {
         }
     }
 }
-#item-delete-selected {
-    overflow: auto;
-    width: 100%;
-}
 #connect-services-header,
 #extra-help-header {
     margin: 1.5em 0 0 0;
@@ -2369,18 +2366,15 @@ div {
     opacity: 1;
 }
 #item-delete-selected {
-    margin-top: 30px;
-}
-/* was tired of having no way of moving it around, so
-* here's a little 'hook' to do so */
-.delete-checked {
-    position: absolute;
-    left: 35px;
-    margin-top: 20px;
+    margin: 3em 5px;
+    position: relative;
+    left: 4em;
+       width: 15em;
+    overflow: auto;
 }
 #item-delete-selected-icon {
     float: left;
-    margin-right: 5px;
+    margin: 11px 5px;
 }
 .fc-state-highlight {
     background: @main_colour;
index c6b3394572aa3d2d749f599bb1b17a513b4a9fbc..563d58ce4975f5ccb06a87bd49e1d77a6730d4f3 100644 (file)
 <div id="jot-tools" class="jothidden" style="display:none">
        <div id="profile-jot-submit-wrapper" class="jothidden">
 
-               <div id="profile-upload-wrapper" style="display: $visitor;">
-                       <div id="wall-image-upload-div"><a class="icon camera" href="#" onclick="return false;" id="wall-image-upload" title="$upload"></a></div>
-               </div>
-               <div id="profile-attach-wrapper" style="display: $visitor;">
-                       <div id="wall-file-upload-div"><a class="icon attach" href="#" onclick="return false;" id="wall-file-upload" title="$attach"></a></div>
-               </div>
-               <div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);">
-                       <a class="icon link" id="profile-link" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;" title="$weblink"></a>
-               </div>
-               <div id="profile-video-wrapper" style="display: $visitor;">
-                       <a class="icon video" id="profile-video" onclick="jotVideoURL();return false;" title="$video"></a>
-               </div>
-               <div id="profile-audio-wrapper" style="display: $visitor;">
-                       <a class="icon audio" id="profile-audio" onclick="jotAudioURL();return false;" title="$audio"></a>
-               </div>
-               <div id="profile-location-wrapper" style="display: $visitor;">
-                       <a class="icon globe" id="profile-location" onclick="jotGetLocation();return false;" title="$setloc"></a>
-               </div>
-               <div id="profile-nolocation-wrapper" style="display: none;">
-                       <a class="icon noglobe" id="profile-nolocation" onclick="jotClearLocation();return false;" title="$noloc"></a>
-               </div>
+       <div id="profile-upload-wrapper" style="display: $visitor;">
+               <div id="wall-image-upload-div"><a href="#" onclick="return false;" id="wall-image-upload" class="icon camera" title="$upload"></a></div>
+       </div>
+       <div id="profile-attach-wrapper" style="display: $visitor;">
+               <div id="wall-file-upload-div"><a href="#" onclick="return false;" id="wall-file-upload" class="icon attach" title="$attach"></a></div>
+       </div>
 
-               <div id="profile-jot-plugin-wrapper">
-               $jotplugins
-               </div>
+       <div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);">
+               <a id="profile-link" class="icon link" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;" title="$weblink"></a>
+       </div>
+       <div id="profile-video-wrapper" style="display: $visitor;">
+               <a id="profile-video" class="icon video" onclick="jotVideoURL();return false;" title="$video"></a>
+       </div>
+       <div id="profile-audio-wrapper" style="display: $visitor;">
+               <a id="profile-audio" class="icon audio" onclick="jotAudioURL();return false;" title="$audio"></a>
+       </div>
+       <div id="profile-location-wrapper" style="display: $visitor;">
+               <a id="profile-location" class="icon globe" onclick="jotGetLocation();return false;" title="$setloc"></a>
+       </div>
+       <div id="profile-nolocation-wrapper" style="display: none;">
+               <a id="profile-nolocation" class="icon noglobe" onclick="jotClearLocation();return false;" title="$noloc"></a>
+       </div>
+
+       <div id="profile-jot-plugin-wrapper">
+       $jotplugins
+       </div>
 
        <a class="icon-text-preview pointer"></a><a id="jot-preview-link" class="pointer" onclick="preview_post(); return false;" title="$preview">$preview</a>
        <input type="submit" id="profile-jot-submit" name="submit" value="$share" />
 </div> <!-- /#jot-tools -->
        
        <div id="jot-preview-content" style="display:none;"></div>
+
        <div style="display: none;">
                <div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
                        $acl
                        <hr style="clear:both" />
-                       <div id="profile-jot-email-label">$emailcc</div>
-                       <input type="text" name="emailcc" id="profile-jot-email" title="$emtitle" />
+                       <div id="profile-jot-email-label">$emailcc</div><input type="text" name="emailcc" id="profile-jot-email" title="$emtitle" />
                        <div id="profile-jot-email-end"></div>
                        $jotnets
                </div>
        </div>
 
 </form>
-{{ if $content }}<script>initEditor();</script>{{ endif }}
+               {{ if $content }}<script>initEditor();</script>{{ endif }}
index 1946094288cf7d56c6b9e28fbdb783cf0178d0a9..de2717f0c4a823b8b37d3e493a812d4e1f5b7014 100644 (file)
@@ -59,7 +59,7 @@ h6{font-size:xx-small;}
 .button{color:#111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;padding:5px;cursor:pointer;}.button a{color:#111111;font-weight:bold;}
 #profile-listing-desc a{color:#eeeeec;font-weight:bold;}
 [class$="-desc"],[id$="-desc"]{color:#eeeeec;background:#2e3436;border:2px outset #111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:3px 10px 7px 0;padding:5px;font-weight:bold;font-size:smaller;}
-#item-delete-selected-desc{float:left;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;}
+#item-delete-selected-desc{float:left;font-size:x-small;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;}
 .intro-approve-as-friend-desc{margin-top:10px;}
 .intro-desc{margin-bottom:20px;font-weight:bold;}
 #group-edit-desc{margin:10px 0px;}
@@ -214,7 +214,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
 .wall-item-subtools1{width:30px;height:30px;list-style:none outside none;margin:18px 0 30px -20px;padding:0;}
 .wall-item-subtools2{width:25px;height:25px;list-style:none outside none;margin:-78px 0 0 5px;padding:0;}
 .wall-item-title{font-size:1.2em;font-weight:bold;margin-bottom:1.4em;}
-.wall-item-body{margin:15px 10px 10px 0px;text-align:left;overflow-x:auto;}
+.wall-item-body{margin:1em;text-align:left;overflow-x:auto;}
 .wall-item-lock-wrapper{float:right;width:22px;height:22px;margin:0 -5px 0 0;opacity:1;}
 .wall-item-dislike,.wall-item-like{clear:left;font-size:0.8em;color:#111111;margin:5px 0 5px 10.2em;-webkit-transition:all 0.75s ease-in-out;-moz-transition:all 0.75s ease-in-out;-o-transition:all 0.75s ease-in-out;-ms-transition:all 0.75s ease-in-out;transition:all 0.75s ease-in-out;opacity:0.5;}.wall-item-dislike:hover,.wall-item-like:hover{opacity:1;}
 .wall-item-author,.wall-item-actions-author,.wall-item-ago{color:#111111;line-height:1;display:inline-block;font-size:x-small;margin:0.5em auto;font-weight:bold;}
@@ -226,7 +226,6 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
 .wallwall .wall-item-photo-end{clear:both;}
 .wall-item-arrowphoto-wrapper{position:absolute;left:35px;top:80px;z-index:10002;}
 .wall-item-photo-menu{min-width:92px;font-size:0.75em;border:2px solid #555753;border-top:0px;background:#555753;position:absolute;left:-2px;top:101px;display:none;z-index:10003;-o-border-radius:0 5px 5px 5px;-webkit-border-radius:0 5px 5px 5px;-moz-border-radius:0 5px 5px 5px;-ms-border-radius:0 5px 5px 5px;border-radius:0 5px 5px 5px;}.wall-item-photo-menu li a{white-space:nowrap;display:block;padding:5px 6px;color:#eeeeec;}.wall-item-photo-menu li a:hover{color:#555753;background:#eeeeec;}
-#item-delete-selected{overflow:auto;width:100%;}
 #connect-services-header,#extra-help-header{margin:1.5em 0 0 0;}
 #connect-services,#extra-help{margin:0px;padding:0px;list-style:none;list-style-position:inside;margin:1em 0 0 0;}#connect-services li,#extra-help li{display:inline;}
 .ccollapse-wrapper{font-size:0.9em;margin-left:5em;}
@@ -390,9 +389,8 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
 .filesavetags:hover,.categorytags:hover{margin:20px 0;opacity:1.0 !important;}
 .item-select{opacity:0.1;margin:5px 0 0 6px !important;}.item-select:hover{opacity:1;}
 .checkeditem{opacity:1;}
-#item-delete-selected{margin-top:30px;}
-.delete-checked{position:absolute;left:35px;margin-top:20px;}
-#item-delete-selected-icon{float:left;margin-right:5px;}
+#item-delete-selected{margin:3em 5px;position:relative;left:4em;width:15em;overflow:auto;}
+#item-delete-selected-icon{float:left;margin:11px 5px;}
 .fc-state-highlight{background:#eeeeec;color:#111111;}
 .directory-item{float:left;margin:0 5px 4px 0;padding:3px;width:180px;height:250px;position:relative;}
 #group-sidebar{margin-bottom:10px;}
index b0fab994c61e84e3ea913d482975ad658b0a478c..e18f9a01b0360b89a0eea5ebde3b71381ed0afdf 100644 (file)
@@ -326,6 +326,7 @@ h6 {
 }
 #item-delete-selected-desc {
     float: left;
+    font-size: x-small;
     margin-right: 5px;
     &:hover {
         text-decoration: underline;
@@ -1429,7 +1430,7 @@ nav #nav-notifications-linkmenu {
     margin-bottom: 1.4em;
 }
 .wall-item-body {
-    margin: 15px 10px 10px 0px;
+    margin: 1em;
     text-align: left;
     overflow-x: auto;
 }
@@ -1534,10 +1535,6 @@ nav #nav-notifications-linkmenu {
         }
     }
 }
-#item-delete-selected {
-    overflow: auto;
-    width: 100%;
-}
 #connect-services-header,
 #extra-help-header {
     margin: 1.5em 0 0 0;
@@ -2370,18 +2367,15 @@ div {
     opacity: 1;
 }
 #item-delete-selected {
-    margin-top: 30px;
-}
-/* was tired of having no way of moving it around, so
-* here's a little 'hook' to do so */
-.delete-checked {
-    position: absolute;
-    left: 35px;
-    margin-top: 20px;
+    margin: 3em 5px;
+    position: relative;
+    left: 4em;
+       width: 15em;
+    overflow: auto;
 }
 #item-delete-selected-icon {
     float: left;
-    margin-right: 5px;
+    margin: 11px 5px;
 }
 .fc-state-highlight {
     background: @bg_colour;
index 115f05ad7627bd857f4de052dffa2290f34d59ed..8ffae040373859a82222b9b9b88bd9b374653bf6 100644 (file)
@@ -78,9 +78,9 @@
                </div>
        </div>
        <div class="wall-item-wrapper-end"></div>
-       <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
-       <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
-       <div class="wall-item-comment-wrapper">
+       <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+       <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
+       <div class="wall-item-comment-wrapper" >
        $item.comment
        </div>
 
index da5fa13b3e6e0715ccd0545ca17c209ed47e6295..84da598cd652eefad8afa2d76b40ece900b86458 100644 (file)
@@ -64,7 +64,7 @@ class="icon recycle wall-item-share-buttons"  title="$item.vote.share.0" onclick
                        {{ if $item.edpost }}
                                <li><a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a></li>
                        {{ endif }}
-               
+
                        <li class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
                                {{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }}
                                {{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }}
@@ -86,8 +86,8 @@ class="icon recycle wall-item-share-buttons"  title="$item.vote.share.0" onclick
                </div>
        </div>  
        <div class="wall-item-wrapper-end"></div>
-       <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
-       <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
+       <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+       <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
        <div class="wall-item-comment-separator"></div>
        <div class="wall-item-comment-wrapper">
        $item.comment
index be755d411160e85010a4b93c59ddd405eb53ce62..997c6d315af52b6534143710ad82d0eb9e6a4f9e 100644 (file)
@@ -935,6 +935,10 @@ input#dfrn-url {
        background: #EEEEEE;
 }
 
+.wall-item-like.comment, .wall-item-dislike.comment {
+       margin-left: 50px;
+}
+
 .wall-item-info {
        display: block;
        float: left;
@@ -1640,6 +1644,9 @@ input#dfrn-url {
        display:block!important;
 }
 
+#photos-usage-message {
+       margin-bottom: 15px;
+}
 
 
 #acl-wrapper {
@@ -2414,9 +2421,40 @@ aside input[type='text'] {
        font-size: 20px;
 }
 
+#event-summary-text {
+       margin-top: 15px;
+}
+
+#event-share-checkbox {
+       float: left;
+       margin-top: 10px;
+}
+
+#event-share-text {
+       float: left;
+       margin-top: 10px;
+       margin-left: 5px;
+}
+
+#event-share-break {
+       clear: both;
+       margin-bottom: 10px;
+}
+
+#event-summary {
+       width: 400px;
+}
+
 .vevent {
        border: 1px solid #CCCCCC;
 }
+
+.vevent .event-summary {
+       margin-left: 10px;
+       margin-right: 10px;
+       font-weight: bold;
+}
+
 .vevent .event-description, .vevent .event-location {
        margin-left: 10px;
        margin-right: 10px;
index 8b137891791fe96927ad78e64b0aad7bded08bdc..1dc65295a9f2e28a7c2a05fcf017cb8bb68e9367 100644 (file)
@@ -1 +1,8 @@
+{{ if $classtoday }}
+<script>
+       $(document).ready(function() $lbr
+               $('#events-reminder').addClass($.trim('$classtoday'));
+       $rbr);
+</script>
+{{ endif }}
 
index ea10cc377af2ff4fcdf475a569ce6a7cc9e03c05..4c0fdc22daf5d717b50c939f340bc1f8b938ee88 100644 (file)
@@ -67,6 +67,8 @@ nav #site-location {
        opacity: 1.0;
        filter:alpha(opacity=100);
        box-shadow: 4px 4px 3px 0 #444444;
+       margin-left: 0px;
+       margin-top: 0px;
 }
 
 #events-reminder:hover {
@@ -108,6 +110,8 @@ nav #site-location {
 #posted-date-selector {
        margin-left: 30px !important;
        margin-top: 5px !important;
+       margin-right: 0px !important;
+       margin-bottom: 0px !important;
 }
 
 
@@ -115,6 +119,9 @@ nav #site-location {
        box-shadow: 4px 4px 3px 0 #444444;
        margin-left: 25px !important;
        margin-top: 0px !important;
+       margin-right: 5px !important;
+       margin-bottom: 5px !important;
+
 }
 
 .contact-entry-photo img, .profile-match-photo img, #photo-photo img, .directory-photo-img, .photo-album-photo, .photo-top-photo, .profile-jot-text, .group-selected, .nets-selected, .fileas-selected, #profile-jot-submit, .categories-selected {
index a6a96d8792933af2f223c290f094530c822d51b8..dae33b3f75a209ad9deefa194927cf105109db3a 100644 (file)
@@ -69,8 +69,8 @@
                </div>
        </div>
        <div class="wall-item-wrapper-end"></div>
-       <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
-       <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
+       <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+       <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
        <div class="wall-item-comment-wrapper" >
        $item.comment
        </div>
index 9cbfc991eae06a16d933ee22723256d5af1789fc..a48acfec5bfad5ab2ff3fb2eccbff198857759dc 100644 (file)
@@ -74,8 +74,8 @@
                </div>
        </div>  
        <div class="wall-item-wrapper-end"></div>
-       <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
-       <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
+       <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+       <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
        <div class="wall-item-comment-separator"></div>
        <div class="wall-item-comment-wrapper">
        $item.comment