twttr.templates = { user_dropdown: '

\n {{screen_name_from_server}}\n\n

', stream_loading: '

\n {{_i}}Loading...{{/i}}\n

\n', stream_end: '

\n \n {{{end_text}}}\n

\n', dashboard_friend_requests: '{{button_label}}', geo_similar_places: '

{{_i}}This place may already exist{{/i}}

\n

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
{{_i}}Did you mean:{{/i}}
\n \n
\n \n {{_i}}Go Back{{/i}}\n \u0026nbsp;\n
\n
\n
\n

\n', home_dashboard: '

\n{{>dashboard_your_profile}}\n
\n

\n\n

\n{{>dashboard_footer}}\n

', profile_pane: '

\n \n
\n
\n \n \'{{name}}\'\n \n {{>full_name}}\n \n
{{#location}}{{location}}{{/location}}
\n
\n \n\n {{>user_stats}}\n
\n

', stream_whale_end: '

\n
{{{text}}}
\n
\n {{_i}}Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.{{/i}}\n
\n

\n', delete_list_button: '

{{_i}}Delete{{/i}}

\n', geo_failure_try_again: '{{message}}\n\u0026#32;\n{{_i}}Try again{{/i}}\n{{>geo_disable_geo}}', mute_users: '

\n \n

{{_i}}Current List:{{/i}}

\n
    \n

    ', place_page_users_title: "{{#poi}}\n {{_i}}Twitter / Recent people at {{{placeName}}}{{/i}}\n{{/poi}}\n{{^poi}}\n {{_i}}Twitter / Recent people in {{{placeName}}}{{/i}}\n{{/poi}}\n", user: "\n\n \n {{name}}\n\n", stream_follower_request: "

    \n \n
    \n \n \n {{name}}\n {{#verified}}\n \n {{/verified}}\n {{#protected}}\n \n {{/protected}}\n \n
    {{{linkified_description}}}
    \n
    \n
    \n
    \n
    {{_i}}Accept{{/i}}
    \n
    {{_i}}Decline{{/i}}
    \n
    \n

    \n", email_already_verified_banner: '

    \n', tweet_user_image_48: "{{#user}}\n\n{{/user}}\n", stream_message: "

    {{screenName}}

    ", stream: '

    \n
    \n

    ', rate_limit_page: "

    \n {{#render_page_content}}\n

    {{_i}}Uh-oh! You're being rate-limited!{{/i}}

    \n\n

    \n {{_i}}While we appreciate your enthusiasm, in order to control abuse, we limit how often you can search.{{/i}}\n

    \n\n

    \n {{_i}}For locations where many people share the same IP address (e.g., corporations and conferences), our rate limits may be too strict. If you believe you are using Twitter normally, please let us know.{{/i}}\n

    \n\n

    {{>dashboard_footer}}

    \n {{/render_page_content}}\n

    ", machine_translated_tweet: '

    \n
    {{{translated_text}}}
    \n
    {{_i}}Translation powered by Google Translate{{/i}}
    \n

    \n', other_profile_activity: '

    ', britt_tweet: "{{_i}}Late night hacking on {{superlative}} things with @{{user}}.{{/i}}\n{{^is_before_midnight}}\n {{_i}}Time to head home.{{/i}}\n{{/is_before_midnight}}\n{{something_about_addi}}\n", geo_similar_place_item: '

    \n

    {{_i}}Trends{{/i}}

    \n

    {{_i}}Worldwide{{/i}}\u0026nbsp;\u0026middot;{{_i}}change{{/i}}

    \n \n

    ", phone_setup_prompt: "

    {{_i}}Before you can receive @{{screen_name}}'s Tweets as text messages, you need to activate your phone. Do this now?{{/i}}
    \n{{>prompt}}\n", bg_img_css: '', message_drawer: "
    {{{text}}}{{#close_button}}\u0026times;{{/close_button}}
    \n", retweeters: "

    {{{retweeted_by_count}}}

    \n \n", user_detailed_list_item: '
    • \n {{screen_name}}\n
      \n
      \n {{screen_name}}\n {{name}}\n {{#verified}}\n \n {{/verified}}\n {{#protected}}\n \n {{/protected}}\n \n {{^following}}\n \u0026middot; \n {{/following}}\n {{#recently_followed}}\n \u0026middot; {{_i}}Unfollow{{/i}}\n {{/recently_followed}}\n \n
      \n {{#location}}\n
      \n {{_i}}Location:{{/i}}\u0026nbsp;{{location}}\n
      \n {{/location}}\n {{#description}}\n
      \n {{description}}\n
      \n {{/description}}\n
      \n
    • ', user_css: '\n', trend_item: "
    • \n\t{{name}}\n\t{{#is_sponsored}}\n \n {{/is_sponsored}}\n
    • ", place_business_unclaimed: "

      {{_i}}Are you the owner of {{place_name}}?{{/i}}

      \n{{_i}}See who's visiting your place and what they're saying about it! Promote your presence and increase traffic to your profile.{{/i}}\n
      \n{{_i}}Claim this place \u0026rarr;{{/i}}", checkbox_dropdown: ' ', checkbox_list_item: '
    • \n {{#icon}}\n \n {{{label}}}\n {{/icon}}\n {{^icon}}\n \n \n \n {{{label}}}\n {{#isPrivate}}\n \n {{/isPrivate}}\n \n {{/icon}}\n
    • ', latest_tweet_timestamp: '{{full_timestamp}}', edit_list_button: '
      {{_i}}Edit{{/i}}
      \n', user_small_list_item: '
    • \n {{screen_name}}\n {{#dismissable}}\n \u0026times;\n {{/dismissable}}\n
      \n {{screen_name}}\n {{#verified}}\n \n {{/verified}}\n {{#protected}}\n \n {{/protected}}\n \n {{^following}}\n \u0026middot; \n {{/following}}\n {{#recently_followed}}\n \u0026middot; {{_i}}Unfollow{{/i}}\n {{/recently_followed}}\n \n {{name}}\n
      \n
    • \n', reply_dialog_footer: ' \n', geo_confirm_place_creation: '
      {{_i}}Add this place{{/i}}
      \n
      \n
      \n \n \n \n \n \n \n \n \n \n
      {{_i}}Name{{/i}} \n \n
      {{_i}}Address{{/i}} \n \n
      \n
      {{_i}}"795 Folsom St" or "24th St and Noe"{{/i}}
      \n
      {{city_name}}
      \n \n {{_i}}Back{{/i}}\n \u0026nbsp;\n
      \n
      \n
      \n', geo_ie_google_toolbar_banner: '
      \n
      {{_i}}Before Twitter can get your location...{{/i}}
      \n
      {{_i}}Check "Remember for this site"{{/i}}
      \n
      {{_i}}Click "Share my location"{{/i}}
      \n
      \n', list_actions: '
      \n {{#is_own_list}}\n
      \n {{>edit_list_button}}\n {{>delete_list_button}}\n
      \n {{/is_own_list}}\n {{^is_own_list}}\n \n {{/is_own_list}}\n
      \n', tweet_geo_text: '{{#has_geo}}\n\n {{_i}}from {{place_name}}{{/i}}\n\n{{/has_geo}}\n', dashboard_footer: ' \n', place_page: '
      \n {{{noscript}}}\n \n
      \n

      \n {{#poi}}\n {{_i}}At {{name}}{{/i}}\n {{/poi}}\n {{^poi}}\n {{_i}}In {{name}}{{/i}}\n {{/poi}}\n

      \n
      \n {{#full_address}}\n {{full_address}}|\n {{/full_address}}\n {{#map_link}}\n {{_i}}full map{{/i}}\n {{/map_link}}\n
      {{phone}}
      \n {{#location_service_down}}\n {{_i}}Location service is temporarily unavailable{{/i}}\n {{/location_service_down}}\n
      \n
      \n {{#show_map}}\n
      \n
      \n
      \n {{/show_map}}\n \n {{>stream_manager}}\n {{{end_noscript}}}\n
      \n
      \n \n
      \n
      \n
      \n
      \n
      \n
      \n{{>details_pane_container}}', recent_lists: "
      \n {{_i}}Recently listed in:{{/i}}\n
      \n {{{list_names}}}\n
      \n
      ", details_pane_container: '
      \n
      \n
      \n {{{pane}}}\n
      \n
      \n
      ', more_lists: '
      \n {{#user}}\n

      {{_i}}More lists by @{{screen_name}} \u0026rarr;{{/i}}

      \n {{/user}}\n {{#lists}}\n
      • \n {{#items}}\n
      • {{name}}
      • \n {{/items}}\n
      \n {{/lists}}\n
      ', user_stats: " \n", stream_list: '
      \n {{#user}}\n
      \n \n
      \n {{/user}}\n
      \n {{full_name}}\n {{^is_public}}\n \n {{/is_public}}\n {{description}}\n
      \n {{#is_own_list}}\n {{>edit_list_button}}\n {{>delete_list_button}}\n {{/is_own_list}}\n {{^is_own_list}}\n {{#following}}\n
      \n {{/following}}\n {{^following}}\n \n {{/following}}\n {{/is_own_list}}\n
      \n
      \n
      ', stream_link: '
    • \n', search_stream_title: "\n {{_i}}Search results for {{query}}{{/i}}\n\n ", dropdown: ' ', profile_header: '{{%TRANSLATION-HINT mode=profile_tabs}}\n\n
      \n
      \n
      \n {{name}}\n
      \n
      \n {{>full_name}}\n
      @{{screen_name}} {{location}}
      \n
      {{description}}
      \n \n
      \n
      \n
      \n \n
      \n', geo_city_search: '
      \n \n \n \n \n \n \n
      {{_i}}City{{/i}} \n \u0026nbsp;\n
        \n
        \n
        \n
        \n
        \n', stream_manager: '
        \n {{#tweets}}\n
        \n
        \n {{{tweets}}}\n
        \n {{/tweets}}\n
        ', geo_add_location_geo_disabled: '\u0026nbsp;\n{{_i}}Add your location{{/i}}', default_dropdown_divider: ' \n', place_page_links_title: "{{#poi}}\n {{_i}}Twitter / Tweets with links at {{{placeName}}}{{/i}}\n{{/poi}}\n{{^poi}}\n {{_i}}Twitter / Tweets with links in {{{placeName}}}{{/i}}\n{{/poi}}", geo_autocomplete_item: '{{#is_poi}}\n
      • \n \u0026nbsp;{{formatted_name}}\n {{details}}\n
      • \n{{/is_poi}}\n{{^is_poi}}\n
      • \n {{formatted_name}}\n
      • \n{{/is_poi}}', "404_page": '
        \n {{#render_page_content}}\n

        {{_i}}Sorry, that page doesn\u2019t exist!{{/i}}

        \n
        \n \n \n
        \n

        {{>dashboard_footer}}

        \n {{/render_page_content}}\n
        ', geo_detection_failed_set_manually: '{{_i}}We couldn\'t find you!{{/i}}\n\u0026#32;\n{{_i}}Add Location{{/i}}\n{{>geo_disable_geo}}', tweet_labels: "{{#is_top_tweet}}\n {{_i}}Top Tweet{{/i}}\n{{/is_top_tweet}}\n{{#is_sponsored}}\n \n{{/is_sponsored}}", local_trends: ' \n \n', people_results: "

        {{_i}}People results for\u0026nbsp;{{query}}{{/i}}

        \n
        \n {{#found_people}}\n {{>user_small_list}}\n {{/found_people}}\n
        \n{{_i}}More people results \u0026rarr;{{/i}}", protected_user: '
        \n

        {{_i}}@{{screen_name}}\'s account is private.{{/i}}

        \n

        {{_i}}Only confirmed followers have access to @{{screen_name}}\'s Tweets. You need to send a request before you can start following this account.{{/i}}

        \n
        ', dialog: '
        \n
        \n
        \n

        {{{title}}}

        \u0026times;
        \n
        \n
        \n
        \n
        \n {{{content}}}\n
        \n
        \n \n
        \n
        \n
        \n', dashboard_profile_stats: '
        \n

        {{name}}{{screen_name}}

        \n {{#translator_level}}\n \n {{_i}}Translator{{/i}}\n {{_i}}LEVEL {{translator_level}}{{/i}}\n \n {{/translator_level}}\n
        \n\n{{>user_stats}}', posting_tweet_box: '
        \n
        \n

        {{_i}}What\u2019s happening?{{/i}}

        \n
        \n
        \n
        \n
        ', welcome_to_phoenix_banner: ' \n', user_detailed_list: "{{#items}}\n {{>user_detailed_list_item}}\n{{/items}}", tweet_source: '{{_i}}via {{{source}}}{{/i}}', tweet_actions: "\n\n {{^favorited}}\n {{_i}}Favorite{{/i}}\n {{/favorited}}\n {{#favorited}}\n {{_i}}Unfavorite{{/i}}\n {{/favorited}}\n\n {{^current_user_retweet}}\n {{#allowed_to_retweet}}\n {{_i}}Retweet{{/i}}\n {{/allowed_to_retweet}}\n {{/current_user_retweet}}\n {{#current_user_retweet}}\n {{_i}}Undo Retweet{{/i}}\n {{/current_user_retweet}}\n\n {{_i}}Reply{{/i}}\n {{#is_owned_by_current_user}}\n {{_i}}Delete{{/i}}\n {{/is_owned_by_current_user}}\n\n", details_pane: "
        \n
        \n {{#popable}}\n \u0026larr; {{back_label}}\n {{/popable}}\n {{#closable}}\n {{_i}}close{{/i}} \u0026times;\n {{/closable}}\n
        \n
        \n
        \n
        \n", home_page: '
        \n {{#render_page_content}}\n
        \n
        \n {{>posting_tweet_box}}\n
        \n \n
        \n {{>stream_manager}}\n {{/render_page_content}}\n
        \n
        \n {{#render_page_content}}\n {{#current_user}}\n {{>home_dashboard}}\n {{/current_user}}\n {{/render_page_content}}\n
        \n\n{{>details_pane_container}}\n', place_tweets: ' \n', what_the_trend: '
        \n {{_i}}TRENDING:{{/i}} {{#blurb}}{{text}}{{/blurb}}\n
        \n \u0026nbsp; {{_i}}Source:\u0026nbsp;What\u0026nbsp;the\u0026nbsp;Trend?{{/i}}\n
        \n
        ', user_thumb_list: "
        \n {{#items}}\n {{>user_thumb_list_item}}\n {{/items}}\n
        \n", tweet_meta: "
        \n \n {{#is_sponsored}}\n {{#retweet_count}}\n {{retweet_count_text}}\n {{/retweet_count}}\n {{/is_sponsored}}\n {{^is_sponsored}}\n {{#was_retweeted}}\n {{#retweeting_status}}\n {{#user}}{{_i}}by {{screen_name}}{{/i}}{{/user}}\n {{/retweeting_status}}\n {{/was_retweeted}}\n {{/is_sponsored}}\n
        \n {{#is_reply}}\n @\n {{/is_reply}}\n \n {{#has_geo}}\n {{#has_geo_point}}{{/has_geo_point}}\n {{/has_geo}}\n
        \n \n
        ", recent_list: '
      • \n {{name}}\n
      • \n', first_time_dialog: '
        \n
        \n
        \n
        \n
        \n
        \n

        {{_i}}Everything in one place.{{/i}}

        \n

        \n {{_i}}Preview pictures videos replies right from Twitter!{{/i}}\n

        \n

        \n {{_i}}Click on the arrow button in a Tweet to view rich media and related content in a details pane.{{/i}}\n

        \n
        \n \n
        \n
        {{_i}}OK, thanks!{{/i}}
        \n
        \n
        \n
        \n
        \n
        \n
        \n', list_page: '
        \n {{{noscript}}}\n {{#list}}\n
        \n
        \n

        {{name}}

        \n

        {{description}}

        \n
        \n
        \n
        \n {{#user}}\n {{name}}\n {{/user}}\n

        \n {{_i}}A {{#is_public}}public{{/is_public}}{{^is_public}}private{{/is_public}} list{{/i}}\n
        \n {{#user}}\n {{_i}}Curated by {{name}}{{/i}}\n {{/user}}\n

        \n
        \n
        \n
        \n
        \n
        \n \n \n
        \n {{>stream_manager}}\n {{/list}}\n {{{end_noscript}}}\n
        \n
        \n{{>details_pane_container}}', pill_css: ".profile-style-{{screen_name}} a {\n {{#profile_link_color}}\n color: #{{profile_link_color}} !important;\n {{/profile_link_color}}\n}\n\na:hover .geo-pin, body.user-style-{{screen_name}} .stream-item:hover .geo-pin, .place_link span.place_icon {\n background-color: #{{profile_link_color}};\n}", geo_promo_dialog: '
        \n
        \n
        \n {{_i}}Ever had something you wanted to share ("fireworks!", "party!", "ice cream truck!", or "quicksand...") that would be better with a location?{{/i}}\u0026#32;\n {{_i}}By turning on this feature, you can include location information like neighborhood, town, or exact point when you tweet.{{/i}}

        \n {{_i}}When you tweet with a location, Twitter stores that location.{{/i}}\u0026#32;\n {{_i}}You can switch location on/off before each Tweet and always have the option to delete your location history.{{/i}}\u0026#32;\n {{_i}}Learn more{{/i}}\n
        \n
        \n \n {{_i}}Not now{{/i}}\n \u0026nbsp;\n
        \n
        \n {{_i}}Unable to turn location on at this time. Please try again later.{{/i}}\n
        \n
        ', geo_map_big: '
        \n{{#place}}\n
        \n
        {{name}}
        \n
        {{full_address}}
        \n
        {{phone}}
        \n {{#place_path}}\n \n {{/place_path}}\n
        \n{{/place}}\n{{^place}}\n {{#user}}\n
        \n
        {{_i}}@{{screen_name}}\'s Tweet location{{/i}}
        \n
        \n {{/user}}\n{{/place}}\n
        \n
        \n', dashboard_profile: "{{>dashboard_profile_stats}}\n
        \n{{>dashboard_who_to_follow}}\n
        \n{{>dashboard_promo}}", geo_add_location_geo_enabled: '\u0026nbsp;\n{{_i}}Add your location{{/i}}', related_tweets: ' ', message_notification: "{{#message}}\n
        \n \u0026times;\n

        {{_i}}New Message from {{{sender_screen_name}}}{{/i}}

        \n
        {{{text}}}
        \n
        \n
        \n
        {{_i}}Send{{/i}}
        \n
        \n
        \n{{/message}}", geo_search_result_item: '{{#is_poi}}\n
      • \n \u0026nbsp;{{name}}
        \n {{full_address}}\n
      • \n{{/is_poi}}\n{{^is_poi}}\n
      • \n {{name}}
        \n {{full_address}}\n
      • \n{{/is_poi}}\n', geo_dropdown_item: '{{#is_poi}}\n
      • \n \u0026nbsp;\n \u0026nbsp; {{formatted_name}}\n {{details}}\n
      • \n{{/is_poi}}\n{{^is_poi}}\n
      • \n \u0026nbsp;\n {{formatted_name}}\n
      • \n{{/is_poi}}\n', geo_chrome_banner: '
        \n
        {{_i}}Click "Allow" to let Twitter get your location.{{/i}}
        \n
        \n', list_dialog: '
        \n
        \n \n \n
        \n \n
        \n\n
        \n \n \n {{_i}}Under 100 characters, optional{{/i}}\n
        \n
        \n\n
        \n \n
        \n \n \n
        \n
        \n
        \n\n
        \n
        {{_i}}Save list{{/i}}
        \n
        \n\n
        ', place_business_claimed: '

        {{_i}}{{place_name}} has been claimed by{{/i}}

        \n
        \n {{#user_list}}\n {{>user_small_list}}\n {{/user_list}}\n
        \n{{#tweet}}\n
        \n
        \n
        \n {{>latest_tweet_timestamp}}: {{>tweet_text}}\n
        \n
        \n
        \n{{/tweet}}\n', your_activity: '{{>profile_activity}}\n\n{{#favorites_count_commaized}}\n \n{{/favorites_count_commaized}}\n\n \n', tweet_text_large: "
        {{{linkified_text}}}
        ", pane_header: '
        \n {{pane_header_text}}\n
        {{_i}}\u0026larr; Back{{/i}}
        \n
        ', user_thumb_list_item: '
      • \n \n
      • ', user_small_list: "{{#items}}\n {{>user_small_list_item}}\n{{/items}}", tweet_dogear: '
        ', newest_list_members: '
        \n

        {{_i}}Recently Following{{/i}}

        \n {{#list}}\n

        {{_i}}This list\'s most recently followed accounts \u0026middot; View all following{{/i}}

        \n {{/list}}\n
        \n {{#members}}\n {{>user_small_list}}\n {{/members}}\n
        \n
        ', place_users_page: '
        \n {{{noscript}}}\n \n
        \n

        \n {{#poi}}\n {{_i}}Recent people at {{name}}{{/i}}\n {{/poi}}\n {{^poi}}\n {{_i}}Recent people in {{name}}{{/i}}\n {{/poi}}\n

        \n
        \n {{#location_service_down}}\n {{_i}}Location service is temporarily unavailable{{/i}}\n {{/location_service_down}}\n
        \n
        \n \n {{>stream_manager}}\n {{{end_noscript}}}\n
        \n
        \n{{>details_pane_container}}', permalink_page: ' ', mentioned_in_tweet: '
        \n

        {{_i}}Mentioned in this tweet{{/i}}

        \n
        \n {{#mentioned_users}}\n {{>user_detailed_list}}\n {{/mentioned_users}}\n
        \n
        \n', permalink_tweet: '{{#can_view}}\n \n{{/can_view}}\n{{^can_view}}\n {{_i}}This person has protected their Tweets.{{/i}}\n{{/can_view}}\n', place_page_users_following_title: "{{#poi}}\n {{_i}}Twitter / Recent people you are following at {{{placeName}}}{{/i}}\n{{/poi}}\n{{^poi}}\n {{_i}}Twitter / Recent people you are following in {{{placeName}}}{{/i}}\n{{/poi}}\n", simple_tweet: '
        \n
        \u0026raquo;
        \n
        \n {{>tweet_dogear}}\n
        \n {{>tweet_user_image_32}}\n
        \n
        \n
        \n {{>tweet_user_name}}\n
        \n {{>tweet_meta}}\n
        \n
        \n
        \n {{>tweet_text}}\n
        \n
        \n {{>tweet_geo_text}}\n
        \n
        \n {{>tweet_timestamp}}\n {{>tweet_actions}}\n
        \n
        \n {{>tweet_labels}}\n
        \n
        \n
        \n
        ', dashboard_your_profile: '
        \n
        \n

        {{_i}}Your Tweets{{/i}}{{statuses_count_commaized}}

        \n{{#status}}\n {{>latest_tweet}}\n{{/status}}\n
        ', no_list_members: '

        {{_i}}This list doesn\u2019t follow any users yet. It probably will soon, though.{{/i}}

        \n', who_to_follow_dropdown: '
        \n \u0026times;\n

        {{_i}}Since you followed {{user}}, you might also want to follow:{{/i}}

        \n \n
        ', stream_tweet_box: '
        \n
        \n\n
        \n 140\n {{_i}}Tweet{{/i}}\n
        \n
        ', stream_item: '
        \n {{{item_html}}}\n
        ', sign_up_call_out: ' ', message_thread_preview: "
        \n
        {{_i}}\u00bb{{/i}}
        \n
        \n {{#other_person}}\n {{name}}\n {{screen_name}} {{name}}\n {{/other_person}}\n
        \n {{#last_message}}\n {{timestamp}}\n {{/last_message}}\n
        {{message_count}}
        \n
        \n
        \n
        \n", in_reply_to: '
        \n {{>simple_tweet}}\n
        \n \n {{_i}}in reply to{{/i}}\u0026nbsp;@{{#user}}{{screen_name}}{{/user}}\u0026nbsp;\u0026uarr;\n \n
        \n
        \n', dashboard_user: "
        \n {{>user_stats}}\n
        \n {{>who_to_follow}}\n
        \n

        \n
        \n
        ", tweet_user_image_32: "{{#user}}\n\n{{/user}}\n", stream_user_buttons: '
        \n \n {{^is_current_user}}\n {{^following}}\n {{#follow_request_sent}}\n
        \n {{_i}}pending{{/i}}\n {{_i}}(cancel){{/i}}\n
        \n {{/follow_request_sent}}\n {{^follow_request_sent}}\n \n {{/follow_request_sent}}\n {{/following}}\n {{#following}}\n
        \n {{/following}}\n {{/is_current_user}}\n\n
        \n \n \n
        \n
        \n', sms_codes: '
        \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n\n
        {{_i}}Country{{/i}} {{_i}}Code{{/i}} {{_i}}For customers of{{/i}}
        {{_i}}Australia{{/i}} \n
        • \n
        • \n 0198089488\n {{_i}}Telstra{{/i}}\n
        • \n
        \n
        {{_i}}Canada{{/i}} \n
        • \n
        • \n 21212\n {{_i}}(any){{/i}}\n
        • \n
        \n
        {{_i}}United Kingdom{{/i}} \n
        • \n
        • \n 86444\n {{_i}}Vodafone, Orange, 3, O2{{/i}}\n
        • \n
        \n
        {{_i}}Indonesia{{/i}} \n
        • \n
        • \n 89887\n {{_i}}AXIS, 3, Telkomsel{{/i}}\n
        • \n
        \n
        {{_i}}Ireland{{/i}} \n
        • \n
        • \n 51210\n {{_i}}O2{{/i}}\n
        • \n\n
        \n
        {{_i}}India{{/i}} \n
        • \n
        • \n 53000\n {{_i}}Bharti Airtel{{/i}}\n
        • \n
        \n
        {{_i}}New Zealand{{/i}} \n
        • \n
        • \n 8987\n {{_i}}Vodafone, Telecom NZ{{/i}}\n
        • \n
        \n
        {{_i}}United States{{/i}} \n
        • \n
        • \n 40404\n {{_i}}(any){{/i}}\n
        • \n
        \n
        \n
        ', profile_page: '
        \n {{#render_page_content}}\n {{^logged_in}}\n {{#profile_user}}\n {{>sign_up_call_out}}\n {{/profile_user}}\n {{/logged_in}}\n {{#profile_user}}\n {{>profile_header}}\n {{/profile_user}}\n {{>stream_manager}}\n {{/render_page_content}}\n
        \n
        \n {{#render_page_content}}\n {{#rendering_on_server}}\n {{#profile_user}}\n {{>profile_dashboard}}\n {{/profile_user}}\n {{/rendering_on_server}}\n {{/render_page_content}}\n
        \n{{>details_pane_container}}', local_trend_location: "
        {{name}}
        ", no_lists: '
        \n
        {{_i}}You don\'t have any lists yet.{{/i}}
        \n

        \n {{_i}}Create a custom timeline of Tweets by adding users to a list (see how). You can also follow lists curated by others.{{/i}}\n

        \n
        ', geo_firefox_banner: '
        \n
        {{_i}}Before Twitter can get your location...{{/i}}
        \n
        {{_i}}Check "Remember for this site"{{/i}}
        \n
        {{_i}}Click "Share Location"{{/i}}
        \n
        \n', send_message_box: '
        \n

        {{_i}}Send{{/i}}\u0026nbsp;{{screen_name}} {{_i}}a message{{/i}}

        \n
        \n
        ', link_list: '{{%IMPLICIT-ITERATOR iterator=link}}\n
        • \n {{#links}}\n
        • {{link}}
        • \n {{/links}}\n
        ', latest_tweet: '
        \n \n
        \n
        \n {{>latest_tweet_timestamp}}:\n {{#was_retweeted}}\n \n {{{retweet_source_screen_name_link}}}\n {{/was_retweeted}}\n \u0026#32;{{>tweet_text}}\n
        \n
        \n
        \n', japanese_ad: '\n', profile_list_tags: '
        \n
        \n {{_i}}Your Lists:{{/i}}\n {{#items}}\n \n \n {{{name}}}\n {{#isPrivate}}\n \n {{/isPrivate}}\n \n \n {{/items}}\n
        ', web_search_results: '

        {{_i}}Web results for {{query}}{{/i}}

        \n \n{{_i}}More web results from Bing \u0026rarr;{{/i}}', user_admin_tools: '
        • Become @{{screen_name}}
        • \n
        • Investigate @{{screen_name}}
        • \n', geo_progress: '\u0026nbsp;\n{{message}}\n{{>geo_disable_geo}}', next_steps: '
          \n
          \n

          {{_i}}What to do now{{/i}}

          \n
          1. \n
          2. \n {{_i}}Tell us what you\u0026rsquo;re doing in the box above{{/i}}\n

            \n {{#protected_account}}\n {{_i}}Your Tweets are protected and only available to your followers. You can make your Tweets public on your account page.{{/i}}\n {{/protected_account}}\n {{^protected_account}}\n {{_i}}Note that your Tweets will be available publicly. You can make your Tweets private on your account page.{{/i}}\n {{/protected_account}}\n

            \n
          3. \n
          4. \n {{_i}}Find some friends and follow what they\u0026rsquo;re doing{{/i}}\n
          5. \n
          6. \n {{_i}}Turn on your mobile phone to update your friends on the go{{/i}}\n
          7. \n
          \n
          \n
          \n', default_dropdown_item: '
        • {{{label}}}
        • \n', details_pane_tweet: '
          \n {{>tweet_dogear}}\n
          \n {{#user}}\n {{>tweet_user_block}}\n {{/user}}\n
          \n
          \n {{>tweet_text_large}}\n
          \n
          \n {{>tweet_timestamp}}\n {{>tweet_contributor}}\n {{>tweet_source}}\n {{>tweet_actions}}\n
          \n
          \n', profile_rss: '\n\n\n', profile_dashboard: '
          \n{{>dashboard_profile_stats}}\n
          \n
          \n
          \n{{>dashboard_footer}}\n
          ', message: "
          \n
          \n {{#sender}}\n \n \n \n \n {{/sender}}\n
          \n
          {{{linkified_text}}}
          \n \n
          \n
          \n
          ", prompt: '
          \n
          {{ok}}
          \n
          {{cancel}}
          \n
          ', place_page_tweets_title: "{{#poi}}\n {{_i}}Twitter / Tweets at {{{placeName}}}{{/i}}\n{{/poi}}\n{{^poi}}\n {{_i}}Twitter / Tweets in {{{placeName}}}{{/i}}\n{{/poi}}\n", geo_place_search: '
          \n \n \n \n \n \n \n \n \n \n \n \n \n
          {{_i}}City{{/i}} {{city}}\u0026#32;\u0026nbsp;{{_i}}Change{{/i}}
          {{_i}}Place Name{{/i}} \n \u0026nbsp;\n
            \n
            {{_i}}Optional{{/i}}
            \n
            \n \n \n
            \n
            \n', message_thread: '
            \n {{#items}}\n {{>message}}\n {{/items}}\n
            ', dashboard: "
            ", dashboard_who_to_follow: '
            \n {{^screenName}}\n

            {{_i}}Who to follow{{/i}}

            \n

            {{_i}}Suggestions for you{{/i}}\u0026#32;\u0026middot; {{_i}}refresh{{/i}}

            \n {{/screenName}}\n {{#screenName}}\n

            {{_i}}Similar to @{{screenName}}{{/i}}

            \n {{/screenName}}\n
            \n {{#recommended_followers}}\n {{>user_small_list}}\n {{/recommended_followers}}\n
            \n {{#screenName}}\n \n {{/screenName}}\n {{^screenName}}\n \n {{/screenName}}\n
            ', new_tweets_bar: '
            {{_i}}{{tweets_count_phrase}}{{/i}}
            \n', search_page: '
            \n {{{noscript}}}\n
            \n \n \n \n
            \n
            \n

            {{_i}}Results for {{pretty_query}}{{/i}}

            \n
            \n \n {{>stream_manager}}\n {{{end_noscript}}}\n
            \n
            \n{{>details_pane_container}}', frame_busting: '\n', geo_place_content: '\n{{>geo_disable_geo}}', profile_activity: '{{%TRANSLATION-HINT mode=user_stats}}\n\n \n\n ', tweet_user_name: "{{#user}}\n\n \n {{name}}\n\n{{/user}}", tweet_pane: "
            \n {{#tweet}}\n {{>details_pane_tweet}}\n {{/tweet}}\n
            ", tipsy: '
            \n \n {{title}}\n \n
            ', geo_where_is_place: '
            {{_i}}Where is "{{place_name}}"?{{/i}}
            \n
            \n \u0026nbsp;\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n {{_i}}Does this look right?
            If not, move the pin to edit the location.{{/i}}\n
            \n
            \n
            \n
            \n {{_i}}Move the pin onto the map to add this place.{{/i}}\n
            \n
            \n
            \n
            \n
            \n \n \u0026nbsp;\n
            \n
            \n
            \n\n', follower_request_stream_controls: '{{_i}}Accept all{{/i}}\n|\n{{_i}}Decline all{{/i}}\n', media_not_displayed: '
            \n

            {{_i}}Media not displayed.{{/i}}

            \n

            {{_i}}This Tweet is from someone you\'re not following. The media they\'re mentioning could be anything, even something you might find offensive.{{/i}}

            \n
            \n
            \n {{_i}}Display media{{/i}}\n
            \n
            \n {{#logged_in}}\n

            {{_i}}or...{{/i}}

            \n {{_i}}Always display media{{/i}}\n

            {{_i}}(even from people you don\'t follow){{/i}}

            \n {{_i}}Tip: You can turn off auto-display anytime in Settings.{{/i}}\n {{/logged_in}}\n
            \n', tweet_contributor: '{{#contributor}}\n {{_i}}by {{/i}}\n{{/contributor}}', list_stream_title: "\n {{full_name}}\n\n{{#showTitleLink}}\n \n {{_i}}View list page \u0026rarr;{{/i}}\n \n{{/showTitleLink}}", no_saved_searches: '
            \n
            {{_i}}You haven\'t saved any searches yet.{{/i}}
            \n

            \n {{_i}}Click on "Save this search" from the results page to quickly access the latest Tweets about a topic or query, right from here. Learn More{{/i}}\n

            \n
            ', place_people: '

            \n{{#poi}}\n {{_i}}Recent people at {{name}}{{/i}}\n{{/poi}}\n{{^poi}}\n {{_i}}Recent people in {{name}}{{/i}}\n{{/poi}}\n

            \n{{#user_thumbs}}\n {{>user_thumb_list}}\n{{/user_thumbs}}\n
            \n \n', keyboard_shortcuts: '
            \n
            \n
            \n
            {{_i}}Actions{{/i}}
            \n
            f : {{_i}}favorite{{/i}}
            \n
            r : {{_i}}reply{{/i}}
            \n
            t : {{_i}}retweet{{/i}}
            \n
            m : {{_i}}direct message{{/i}}
            \n
            n : {{_i}}new Tweet{{/i}}
            \n
            \n
            \n
            \n\n
            \n\n
            \n\n
            \n
            {{_i}}Navigation{{/i}}
            \n
            ? : {{_i}}this menu{{/i}}
            \n
            j : {{_i}}next Tweet{{/i}}
            \n
            k : {{_i}}previous Tweet{{/i}}
            \n
            space : {{_i}}page down{{/i}}
            \n
            / : {{_i}}search{{/i}}
            \n
            . : {{_i}}refresh Tweets and{{/i}}
            \n
            . : {{_i}}back to top{{/i}}
            \n
            \n\n
            \n
            \n
            \n
            {{_i}}Timelines{{/i}}
            \n
            g h : {{_i}}home{{/i}}
            \n
            g r : {{_i}}replies / mentions{{/i}}
            \n
            g p : {{_i}}profile{{/i}}
            \n
            g f : {{_i}}favorites{{/i}}
            \n
            g m : {{_i}}messages{{/i}}
            \n
            g u : {{_i}}go to user{{/i}}
            \n
            \n
            \n
            \n
            \n
            \n', geo_disable_geo: '\u0026#32;\n\u0026nbsp;', tweet_geo: "", dashboard_promo: "
            \n

            {{{promo_contents}}}

            \n
            ", verify_email_banner: ' \n', tweet_box: '
            \n {{#show_title}}\n
            \n

            {{title}}

            \n
            \n {{/show_title}}\n
            \n
            \n {{#show_geo}}\n \n {{/show_geo}}\n \n 140\n {{button_text}}\n
            \n
            \n', suspended_banner: ' \n', messages_page: '
            \n {{{noscript}}}\n
            \n

            {{_i}}Messages{{/i}}

            {{_i}}New Message{{/i}}
            \n
            \n {{>stream_manager}}\n {{{end_noscript}}}\n
            \n{{>details_pane_container}}\n', tweet_user_block: "
            \n \n
            \n \n {{name}}\n
            \n
            \n", tweet_timestamp: '{{#user}}{{#protected}}{{/protected}}{{/user}}{{full_timestamp}}', tweet_short_timestamp: '{{short_timestamp}}', stream_user: "
            \n \n
            \n \n \n {{name}}\n {{#verified}}\n \n {{/verified}}\n {{#protected}}\n \n {{/protected}}\n \n
            {{{linkified_description}}}
            \n
            \n
            \n {{>stream_user_buttons}}\n
            \n", full_name: '
            \n

            {{name}}

            \n {{#verified}}\n \n {{/verified}}\n {{#protected}}\n \n {{/protected}}\n
            ', add_people: '
            \n

            {{_i}}Find people to add to your list:{{/i}}

            \n \n \n \n
            {{_i}}Search{{/i}}
            \n

            {{_i}}Search for a username, first or last name, business or brand{{/i}}

            \n

            {{_i}}You can also add people from your Following page or anyone\u2019s profile page.{{/i}}

            \n
            ', bouncing_email_banner: ' \n', tweet_text: "
            {{{linkified_text}}}
            ", stream_tweet: '
            \u0026raquo;
            \n
            \n {{>tweet_dogear}}\n
            \n {{>tweet_user_image_48}}\n
            \n
            \n
            \n {{>tweet_user_name}}\n
            \n {{>tweet_meta}}\n
            \n
            \n
            \n {{>tweet_text}}\n
            \n
            \n {{>tweet_geo_text}}\n
            \n
            \n {{>tweet_timestamp}}\n {{>tweet_actions}}\n
            \n
            \n {{>tweet_labels}}\n
            \n
            \n
            ', rss_feeds: '
            \n{{#feeds}}\n\n{{title}}\n{{/feeds}}\n
            ', recent_tweets: '
            \n

            {{_i}}Recent Tweets{{/i}}

            \n {{#items}}\n {{>simple_tweet}}\n {{/items}}\n {{_i}}More Tweets from @{{screen_name}} \u0026rarr;{{/i}}\n
            ', latest_favorite: "
            \n{{#user}}\n\n \n\n{{/user}}\n{{>tweet_text}}\n
            ", detached_email_banner: ' \n', follow_list: "

            {{header}}

            \n{{#follow_list}}\n {{{follow_list}}}\n{{/follow_list}}", google_analytics: "", geo_map_small: '
            \n{{#place}}\n \n
            \n
            {{_i}}from {{name}}{{/i}}
            \n
            {{address}}
            \n
            {{container}}
            \n
            {{phone}}
            \n \n
            \n{{/place}}\n{{^place}}\n \n{{/place}}\n
            \n', profile_actions: '{{%TRANSLATION-HINT mode=actions}}\n\n
            \n\n
            \n {{#followed_by}}
            {{_i}}Message{{/i}}
            {{/followed_by}}\n {{#show_list_options}}\n
            \n \n
            \n {{/show_list_options}}\n {{^is_current_user}}\n
            \n \n
            \n {{/is_current_user}}\n
            \n\n \n\n {{#show_device_notifications}}\n \n {{/show_device_notifications}}\n {{#following}}\n \n {{/following}}\n
            \n'
        }; /* * jQuery JavaScript Library v1.4.2 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Sat Feb 13 22:33:48 2010 -0500 */ (function(window, undefined) { var jQuery = function(selector, context) { return new jQuery.fn.init(selector, context) }, _jQuery = window.jQuery, _$ = window.$, document = window.document, rootjQuery, quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/, isSimple = /^.[^:#\[\.,]*$/, rnotwhite = /\S/, rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g, rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, userAgent = navigator.userAgent, browserMatch, readyBound = false, readyList = [], DOMContentLoaded, toString = Object.prototype.toString, hasOwnProperty = Object.prototype.hasOwnProperty, push = Array.prototype.push, slice = Array.prototype.slice, indexOf = Array.prototype.indexOf; jQuery.fn = jQuery.prototype = { init: function(selector, context) { var match, elem, ret, doc; if (!selector) { return this } if (selector.nodeType) { this.context = this[0] = selector; this.length = 1; return this } if (selector === "body" && !context) { this.context = document; this[0] = document.body; this.selector = "body"; this.length = 1; return this } if (typeof selector === "string") { match = quickExpr.exec(selector); if (match && (match[1] || !context)) { if (match[1]) { doc = (context ? context.ownerDocument || context: document); ret = rsingleTag.exec(selector); if (ret) { if (jQuery.isPlainObject(context)) { selector = [document.createElement(ret[1])]; jQuery.fn.attr.call(selector, context, true) } else { selector = [doc.createElement(ret[1])] } } else { ret = buildFragment([match[1]], [doc]); selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes } return jQuery.merge(this, selector) } else { elem = document.getElementById(match[2]); if (elem) { if (elem.id !== match[2]) { return rootjQuery.find(selector) } this.length = 1; this[0] = elem } this.context = document; this.selector = selector; return this } } else { if (!context && /^\w+$/.test(selector)) { this.selector = selector; this.context = document; selector = document.getElementsByTagName(selector); return jQuery.merge(this, selector) } else { if (!context || context.jquery) { return (context || rootjQuery).find(selector) } else { return jQuery(context).find(selector) } } } } else { if (jQuery.isFunction(selector)) { return rootjQuery.ready(selector) } } if (selector.selector !== undefined) { this.selector = selector.selector; this.context = selector.context } return jQuery.makeArray(selector, this) }, selector: "", jquery: "1.4.2", length: 0, size: function() { return this.length }, toArray: function() { return slice.call(this, 0) }, get: function(num) { return num == null ? this.toArray() : (num < 0 ? this.slice(num)[0] : this[num]) }, pushStack: function(elems, name, selector) { var ret = jQuery(); if (jQuery.isArray(elems)) { push.apply(ret, elems) } else { jQuery.merge(ret, elems) } ret.prevObject = this; ret.context = this.context; if (name === "find") { ret.selector = this.selector + (this.selector ? " ": "") + selector } else { if (name) { ret.selector = this.selector + "." + name + "(" + selector + ")" } } return ret }, each: function(callback, args) { return jQuery.each(this, callback, args) }, ready: function(fn) { jQuery.bindReady(); if (jQuery.isReady) { fn.call(document, jQuery) } else { if (readyList) { readyList.push(fn) } } return this }, eq: function(i) { return i === -1 ? this.slice(i) : this.slice(i, +i + 1) }, first: function() { return this.eq(0) }, last: function() { return this.eq( - 1) }, slice: function() { return this.pushStack(slice.apply(this, arguments), "slice", slice.call(arguments).join(",")) }, map: function(callback) { return this.pushStack(jQuery.map(this, function(elem, i) { return callback.call(elem, i, elem) })) }, end: function() { return this.prevObject || jQuery(null) }, push: push, sort: [].sort, splice: [].splice }; jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() { var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy; if (typeof target === "boolean") { deep = target; target = arguments[1] || {}; i = 2 } if (typeof target !== "object" && !jQuery.isFunction(target)) { target = {} } if (length === i) { target = this; --i } for (; i < length; i++) { if ((options = arguments[i]) != null) { for (name in options) { src = target[name]; copy = options[name]; if (target === copy) { continue } if (deep && copy && (jQuery.isPlainObject(copy) || jQuery.isArray(copy))) { var clone = src && (jQuery.isPlainObject(src) || jQuery.isArray(src)) ? src: jQuery.isArray(copy) ? [] : {}; target[name] = jQuery.extend(deep, clone, copy) } else { if (copy !== undefined) { target[name] = copy } } } } } return target }; jQuery.extend({ noConflict: function(deep) { window.$ = _$; if (deep) { window.jQuery = _jQuery } return jQuery }, isReady: false, ready: function() { if (!jQuery.isReady) { if (!document.body) { return setTimeout(jQuery.ready, 13) } jQuery.isReady = true; if (readyList) { var fn, i = 0; while ((fn = readyList[i++])) { fn.call(document, jQuery) } readyList = null } if (jQuery.fn.triggerHandler) { jQuery(document).triggerHandler("ready") } } }, bindReady: function() { if (readyBound) { return } readyBound = true; if (document.readyState === "complete") { return jQuery.ready() } if (document.addEventListener) { document.addEventListener("DOMContentLoaded", DOMContentLoaded, false); window.addEventListener("load", jQuery.ready, false) } else { if (document.attachEvent) { document.attachEvent("onreadystatechange", DOMContentLoaded); window.attachEvent("onload", jQuery.ready); var toplevel = false; try { toplevel = window.frameElement == null } catch(e) {} if (document.documentElement.doScroll && toplevel) { doScrollCheck() } } } }, isFunction: function(obj) { return toString.call(obj) === "[object Function]" }, isArray: function(obj) { return toString.call(obj) === "[object Array]" }, isPlainObject: function(obj) { if (!obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval) { return false } if (obj.constructor && !hasOwnProperty.call(obj, "constructor") && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf")) { return false } var key; for (key in obj) {} return key === undefined || hasOwnProperty.call(obj, key) }, isEmptyObject: function(obj) { for (var name in obj) { return false } return true }, error: function(msg) { throw msg }, parseJSON: function(data) { if (typeof data !== "string" || !data) { return null } data = jQuery.trim(data); if (/^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { return window.JSON && window.JSON.parse ? window.JSON.parse(data) : (new Function("return " + data))() } else { jQuery.error("Invalid JSON: " + data) } }, noop: function() {}, globalEval: function(data) { if (data && rnotwhite.test(data)) { var head = document.getElementsByTagName("head")[0] || document.documentElement, script = document.createElement("script"); script.type = "text/javascript"; if (jQuery.support.scriptEval) { script.appendChild(document.createTextNode(data)) } else { script.text = data } head.insertBefore(script, head.firstChild); head.removeChild(script) } }, nodeName: function(elem, name) { return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase() }, each: function(object, callback, args) { var name, i = 0, length = object.length, isObj = length === undefined || jQuery.isFunction(object); if (args) { if (isObj) { for (name in object) { if (callback.apply(object[name], args) === false) { break } } } else { for (; i < length;) { if (callback.apply(object[i++], args) === false) { break } } } } else { if (isObj) { for (name in object) { if (callback.call(object[name], name, object[name]) === false) { break } } } else { for (var value = object[0]; i < length && callback.call(value, i, value) !== false; value = object[++i]) {} } } return object }, trim: function(text) { return (text || "").replace(rtrim, "") }, makeArray: function(array, results) { var ret = results || []; if (array != null) { if (array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval)) { push.call(ret, array) } else { jQuery.merge(ret, array) } } return ret }, inArray: function(elem, array) { if (array.indexOf) { return array.indexOf(elem) } for (var i = 0, length = array.length; i < length; i++) { if (array[i] === elem) { return i } } return - 1 }, merge: function(first, second) { var i = first.length, j = 0; if (typeof second.length === "number") { for (var l = second.length; j < l; j++) { first[i++] = second[j] } } else { while (second[j] !== undefined) { first[i++] = second[j++] } } first.length = i; return first }, grep: function(elems, callback, inv) { var ret = []; for (var i = 0, length = elems.length; i < length; i++) { if (!inv !== !callback(elems[i], i)) { ret.push(elems[i]) } } return ret }, map: function(elems, callback, arg) { var ret = [], value; for (var i = 0, length = elems.length; i < length; i++) { value = callback(elems[i], i, arg); if (value != null) { ret[ret.length] = value } } return ret.concat.apply([], ret) }, guid: 1, proxy: function(fn, proxy, thisObject) { if (arguments.length === 2) { if (typeof proxy === "string") { thisObject = fn; fn = thisObject[proxy]; proxy = undefined } else { if (proxy && !jQuery.isFunction(proxy)) { thisObject = proxy; proxy = undefined } } } if (!proxy && fn) { proxy = function() { return fn.apply(thisObject || this, arguments) } } if (fn) { proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++ } return proxy }, uaMatch: function(ua) { ua = ua.toLowerCase(); var match = /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version)?[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || !/compatible/.test(ua) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec(ua) || []; return { browser: match[1] || "", version: match[2] || "0" } }, browser: {} }); browserMatch = jQuery.uaMatch(userAgent); if (browserMatch.browser) { jQuery.browser[browserMatch.browser] = true; jQuery.browser.version = browserMatch.version } if (jQuery.browser.webkit) { jQuery.browser.safari = true } if (indexOf) { jQuery.inArray = function(elem, array) { return indexOf.call(array, elem) } } rootjQuery = jQuery(document); if (document.addEventListener) { DOMContentLoaded = function() { document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false); jQuery.ready() } } else { if (document.attachEvent) { DOMContentLoaded = function() { if (document.readyState === "complete") { document.detachEvent("onreadystatechange", DOMContentLoaded); jQuery.ready() } } } } function doScrollCheck() { if (jQuery.isReady) { return } try { document.documentElement.doScroll("left") } catch(error) { setTimeout(doScrollCheck, 1); return } jQuery.ready() } function evalScript(i, elem) { if (elem.src) { jQuery.ajax({ url: elem.src, async: false, dataType: "script" }) } else { jQuery.globalEval(elem.text || elem.textContent || elem.innerHTML || "") } if (elem.parentNode) { elem.parentNode.removeChild(elem) } } function access(elems, key, value, exec, fn, pass) { var length = elems.length; if (typeof key === "object") { for (var k in key) { access(elems, k, key[k], exec, fn, value) } return elems } if (value !== undefined) { exec = !pass && exec && jQuery.isFunction(value); for (var i = 0; i < length; i++) { fn(elems[i], key, exec ? value.call(elems[i], i, fn(elems[i], key)) : value, pass) } return elems } return length ? fn(elems[0], key) : undefined } function now() { return (new Date).getTime() } (function() { jQuery.support = {}; var root = document.documentElement, script = document.createElement("script"), div = document.createElement("div"), id = "script" + now(); div.style.display = "none"; div.innerHTML = "
        a"; var all = div.getElementsByTagName("*"), a = div.getElementsByTagName("a")[0]; if (!all || !all.length || !a) { return } jQuery.support = { leadingWhitespace: div.firstChild.nodeType === 3, tbody: !div.getElementsByTagName("tbody").length, htmlSerialize: !!div.getElementsByTagName("link").length, style: /red/.test(a.getAttribute("style")), hrefNormalized: a.getAttribute("href") === "/a", opacity: /^0.55$/.test(a.style.opacity), cssFloat: !!a.style.cssFloat, checkOn: div.getElementsByTagName("input")[0].value === "on", optSelected: document.createElement("select").appendChild(document.createElement("option")).selected, parentNode: div.removeChild(div.appendChild(document.createElement("div"))).parentNode === null, deleteExpando: true, checkClone: false, scriptEval: false, noCloneEvent: true, boxModel: null }; script.type = "text/javascript"; try { script.appendChild(document.createTextNode("window." + id + "=1;")) } catch(e) {} root.insertBefore(script, root.firstChild); if (window[id]) { jQuery.support.scriptEval = true; delete window[id] } try { delete script.test } catch(e) { jQuery.support.deleteExpando = false } root.removeChild(script); if (div.attachEvent && div.fireEvent) { div.attachEvent("onclick", function click() { jQuery.support.noCloneEvent = false; div.detachEvent("onclick", click) }); div.cloneNode(true).fireEvent("onclick") } div = document.createElement("div"); div.innerHTML = ""; var fragment = document.createDocumentFragment(); fragment.appendChild(div.firstChild); jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; jQuery(function() { var div = document.createElement("div"); div.style.width = div.style.paddingLeft = "1px"; document.body.appendChild(div); jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; document.body.removeChild(div).style.display = "none"; div = null }); var eventSupported = function(eventName) { var el = document.createElement("div"); eventName = "on" + eventName; var isSupported = (eventName in el); if (!isSupported) { el.setAttribute(eventName, "return;"); isSupported = typeof el[eventName] === "function" } el = null; return isSupported }; jQuery.support.submitBubbles = eventSupported("submit"); jQuery.support.changeBubbles = eventSupported("change"); root = script = div = all = a = null })(); jQuery.props = { "for": "htmlFor", "class": "className", readonly: "readOnly", maxlength: "maxLength", cellspacing: "cellSpacing", rowspan: "rowSpan", colspan: "colSpan", tabindex: "tabIndex", usemap: "useMap", frameborder: "frameBorder" }; var expando = "jQuery" + now(), uuid = 0, windowData = {}; jQuery.extend({ cache: {}, expando: expando, noData: { embed: true, object: true, applet: true }, data: function(elem, name, data) { if (elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) { return } elem = elem == window ? windowData: elem; var id = elem[expando], cache = jQuery.cache, thisCache; if (!id && typeof name === "string" && data === undefined) { return null } if (!id) { id = ++uuid } if (typeof name === "object") { elem[expando] = id; thisCache = cache[id] = jQuery.extend(true, {}, name) } else { if (!cache[id]) { elem[expando] = id; cache[id] = {} } } thisCache = cache[id]; if (data !== undefined) { thisCache[name] = data } return typeof name === "string" ? thisCache[name] : thisCache }, removeData: function(elem, name) { if (elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) { return } elem = elem == window ? windowData: elem; var id = elem[expando], cache = jQuery.cache, thisCache = cache[id]; if (name) { if (thisCache) { delete thisCache[name]; if (jQuery.isEmptyObject(thisCache)) { jQuery.removeData(elem) } } } else { if (jQuery.support.deleteExpando) { delete elem[jQuery.expando] } else { if (elem.removeAttribute) { elem.removeAttribute(jQuery.expando) } } delete cache[id] } } }); jQuery.fn.extend({ data: function(key, value) { if (typeof key === "undefined" && this.length) { return jQuery.data(this[0]) } else { if (typeof key === "object") { return this.each(function() { jQuery.data(this, key) }) } } var parts = key.split("."); parts[1] = parts[1] ? "." + parts[1] : ""; if (value === undefined) { var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); if (data === undefined && this.length) { data = jQuery.data(this[0], key) } return data === undefined && parts[1] ? this.data(parts[0]) : data } else { return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() { jQuery.data(this, key, value) }) } }, removeData: function(key) { return this.each(function() { jQuery.removeData(this, key) }) } }); jQuery.extend({ queue: function(elem, type, data) { if (!elem) { return } type = (type || "fx") + "queue"; var q = jQuery.data(elem, type); if (!data) { return q || [] } if (!q || jQuery.isArray(data)) { q = jQuery.data(elem, type, jQuery.makeArray(data)) } else { q.push(data) } return q }, dequeue: function(elem, type) { type = type || "fx"; var queue = jQuery.queue(elem, type), fn = queue.shift(); if (fn === "inprogress") { fn = queue.shift() } if (fn) { if (type === "fx") { queue.unshift("inprogress") } fn.call(elem, function() { jQuery.dequeue(elem, type) }) } } }); jQuery.fn.extend({ queue: function(type, data) { if (typeof type !== "string") { data = type; type = "fx" } if (data === undefined) { return jQuery.queue(this[0], type) } return this.each(function(i, elem) { var queue = jQuery.queue(this, type, data); if (type === "fx" && queue[0] !== "inprogress") { jQuery.dequeue(this, type) } }) }, dequeue: function(type) { return this.each(function() { jQuery.dequeue(this, type) }) }, delay: function(time, type) { time = jQuery.fx ? jQuery.fx.speeds[time] || time: time; type = type || "fx"; return this.queue(type, function() { var elem = this; setTimeout(function() { jQuery.dequeue(elem, type) }, time) }) }, clearQueue: function(type) { return this.queue(type || "fx", []) } }); var rclass = /[\n\t]/g, rspace = /\s+/, rreturn = /\r/g, rspecialurl = /href|src|style/, rtype = /(button|input)/i, rfocusable = /(button|input|object|select|textarea)/i, rclickable = /^(a|area)$/i, rradiocheck = /radio|checkbox/; jQuery.fn.extend({ attr: function(name, value) { return access(this, name, value, true, jQuery.attr) }, removeAttr: function(name, fn) { return this.each(function() { jQuery.attr(this, name, ""); if (this.nodeType === 1) { this.removeAttribute(name) } }) }, addClass: function(value) { if (jQuery.isFunction(value)) { return this.each(function(i) { var self = jQuery(this); self.addClass(value.call(this, i, self.attr("class"))) }) } if (value && typeof value === "string") { var classNames = (value || "").split(rspace); for (var i = 0, l = this.length; i < l; i++) { var elem = this[i]; if (elem.nodeType === 1) { if (!elem.className) { elem.className = value } else { var className = " " + elem.className + " ", setClass = elem.className; for (var c = 0, cl = classNames.length; c < cl; c++) { if (className.indexOf(" " + classNames[c] + " ") < 0) { setClass += " " + classNames[c] } } elem.className = jQuery.trim(setClass) } } } } return this }, removeClass: function(value) { if (jQuery.isFunction(value)) { return this.each(function(i) { var self = jQuery(this); self.removeClass(value.call(this, i, self.attr("class"))) }) } if ((value && typeof value === "string") || value === undefined) { var classNames = (value || "").split(rspace); for (var i = 0, l = this.length; i < l; i++) { var elem = this[i]; if (elem.nodeType === 1 && elem.className) { if (value) { var className = (" " + elem.className + " ").replace(rclass, " "); for (var c = 0, cl = classNames.length; c < cl; c++) { className = className.replace(" " + classNames[c] + " ", " ") } elem.className = jQuery.trim(className) } else { elem.className = "" } } } } return this }, toggleClass: function(value, stateVal) { var type = typeof value, isBool = typeof stateVal === "boolean"; if (jQuery.isFunction(value)) { return this.each(function(i) { var self = jQuery(this); self.toggleClass(value.call(this, i, self.attr("class"), stateVal), stateVal) }) } return this.each(function() { if (type === "string") { var className, i = 0, self = jQuery(this), state = stateVal, classNames = value.split(rspace); while ((className = classNames[i++])) { state = isBool ? state: !self.hasClass(className); self[state ? "addClass": "removeClass"](className) } } else { if (type === "undefined" || type === "boolean") { if (this.className) { jQuery.data(this, "__className__", this.className) } this.className = this.className || value === false ? "": jQuery.data(this, "__className__") || "" } } }) }, hasClass: function(selector) { var className = " " + selector + " "; for (var i = 0, l = this.length; i < l; i++) { if ((" " + this[i].className + " ").replace(rclass, " ").indexOf(className) > -1) { return true } } return false }, val: function(value) { if (value === undefined) { var elem = this[0]; if (elem) { if (jQuery.nodeName(elem, "option")) { return (elem.attributes.value || {}).specified ? elem.value: elem.text } if (jQuery.nodeName(elem, "select")) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type === "select-one"; if (index < 0) { return null } for (var i = one ? index: 0, max = one ? index + 1: options.length; i < max; i++) { var option = options[i]; if (option.selected) { value = jQuery(option).val(); if (one) { return value } values.push(value) } } return values } if (rradiocheck.test(elem.type) && !jQuery.support.checkOn) { return elem.getAttribute("value") === null ? "on": elem.value } return (elem.value || "").replace(rreturn, "") } return undefined } var isFunction = jQuery.isFunction(value); return this.each(function(i) { var self = jQuery(this), val = value; if (this.nodeType !== 1) { return } if (isFunction) { val = value.call(this, i, self.val()) } if (typeof val === "number") { val += "" } if (jQuery.isArray(val) && rradiocheck.test(this.type)) { this.checked = jQuery.inArray(self.val(), val) >= 0 } else { if (jQuery.nodeName(this, "select")) { var values = jQuery.makeArray(val); jQuery("option", this).each(function() { this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0 }); if (!values.length) { this.selectedIndex = -1 } } else { this.value = val } } }) } }); jQuery.extend({ attrFn: { val: true, css: true, html: true, text: true, data: true, width: true, height: true, offset: true }, attr: function(elem, name, value, pass) { if (!elem || elem.nodeType === 3 || elem.nodeType === 8) { return undefined } if (pass && name in jQuery.attrFn) { return jQuery(elem)[name](value) } var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc(elem), set = value !== undefined; name = notxml && jQuery.props[name] || name; if (elem.nodeType === 1) { var special = rspecialurl.test(name); if (name === "selected" && !jQuery.support.optSelected) { var parent = elem.parentNode; if (parent) { parent.selectedIndex; if (parent.parentNode) { parent.parentNode.selectedIndex } } } if (name in elem && notxml && !special) { if (set) { if (name === "type" && rtype.test(elem.nodeName) && elem.parentNode) { jQuery.error("type property can't be changed") } elem[name] = value } if (jQuery.nodeName(elem, "form") && elem.getAttributeNode(name)) { return elem.getAttributeNode(name).nodeValue } if (name === "tabIndex") { var attributeNode = elem.getAttributeNode("tabIndex"); return attributeNode && attributeNode.specified ? attributeNode.value: rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href ? 0: undefined } return elem[name] } if (!jQuery.support.style && notxml && name === "style") { if (set) { elem.style.cssText = "" + value } return elem.style.cssText } if (set) { elem.setAttribute(name, "" + value) } var attr = !jQuery.support.hrefNormalized && notxml && special ? elem.getAttribute(name, 2) : elem.getAttribute(name); return attr === null ? undefined: attr } return jQuery.style(elem, name, value) } }); var rnamespaces = /\.(.*)$/, fcleanup = function(nm) { return nm.replace(/[^\w\s\.\|`]/g, function(ch) { return "\\" + ch }) }; jQuery.event = { add: function(elem, types, handler, data) { if (elem.nodeType === 3 || elem.nodeType === 8) { return } if (elem.setInterval && (elem !== window && !elem.frameElement)) { elem = window } var handleObjIn, handleObj; if (handler.handler) { handleObjIn = handler; handler = handleObjIn.handler } if (!handler.guid) { handler.guid = jQuery.guid++ } var elemData = jQuery.data(elem); if (!elemData) { return } var events = elemData.events = elemData.events || {}, eventHandle = elemData.handle, eventHandle; if (!eventHandle) { elemData.handle = eventHandle = function() { return typeof jQuery !== "undefined" && !jQuery.event.triggered ? jQuery.event.handle.apply(eventHandle.elem, arguments) : undefined } } eventHandle.elem = elem; types = types.split(" "); var type, i = 0, namespaces; while ((type = types[i++])) { handleObj = handleObjIn ? jQuery.extend({}, handleObjIn) : { handler: handler, data: data }; if (type.indexOf(".") > -1) { namespaces = type.split("."); type = namespaces.shift(); handleObj.namespace = namespaces.slice(0).sort().join(".") } else { namespaces = []; handleObj.namespace = "" } handleObj.type = type; handleObj.guid = handler.guid; var handlers = events[type], special = jQuery.event.special[type] || {}; if (!handlers) { handlers = events[type] = []; if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { if (elem.addEventListener) { elem.addEventListener(type, eventHandle, false) } else { if (elem.attachEvent) { elem.attachEvent("on" + type, eventHandle) } } } } if (special.add) { special.add.call(elem, handleObj); if (!handleObj.handler.guid) { handleObj.handler.guid = handler.guid } } handlers.push(handleObj); jQuery.event.global[type] = true } elem = null }, global: {}, remove: function(elem, types, handler, pos) { if (elem.nodeType === 3 || elem.nodeType === 8) { return } var ret, type, fn, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, elemData = jQuery.data(elem), events = elemData && elemData.events; if (!elemData || !events) { return } if (types && types.type) { handler = types.handler; types = types.type } if (!types || typeof types === "string" && types.charAt(0) === ".") { types = types || ""; for (type in events) { jQuery.event.remove(elem, type + types) } return } types = types.split(" "); while ((type = types[i++])) { origType = type; handleObj = null; all = type.indexOf(".") < 0; namespaces = []; if (!all) { namespaces = type.split("."); type = namespaces.shift(); namespace = new RegExp("(^|\\.)" + jQuery.map(namespaces.slice(0).sort(), fcleanup).join("\\.(?:.*\\.)?") + "(\\.|$)") } eventType = events[type]; if (!eventType) { continue } if (!handler) { for (var j = 0; j < eventType.length; j++) { handleObj = eventType[j]; if (all || namespace.test(handleObj.namespace)) { jQuery.event.remove(elem, origType, handleObj.handler, j); eventType.splice(j--, 1) } } continue } special = jQuery.event.special[type] || {}; for (var j = pos || 0; j < eventType.length; j++) { handleObj = eventType[j]; if (handler.guid === handleObj.guid) { if (all || namespace.test(handleObj.namespace)) { if (pos == null) { eventType.splice(j--, 1) } if (special.remove) { special.remove.call(elem, handleObj) } } if (pos != null) { break } } } if (eventType.length === 0 || pos != null && eventType.length === 1) { if (!special.teardown || special.teardown.call(elem, namespaces) === false) { removeEvent(elem, type, elemData.handle) } ret = null; delete events[type] } } if (jQuery.isEmptyObject(events)) { var handle = elemData.handle; if (handle) { handle.elem = null } delete elemData.events; delete elemData.handle; if (jQuery.isEmptyObject(elemData)) { jQuery.removeData(elem) } } }, trigger: function(event, data, elem) { var type = event.type || event, bubbling = arguments[3]; if (!bubbling) { event = typeof event === "object" ? event[expando] ? event: jQuery.extend(jQuery.Event(type), event) : jQuery.Event(type); if (type.indexOf("!") >= 0) { event.type = type = type.slice(0, -1); event.exclusive = true } if (!elem) { event.stopPropagation(); if (jQuery.event.global[type]) { jQuery.each(jQuery.cache, function() { if (this.events && this.events[type]) { jQuery.event.trigger(event, data, this.handle.elem) } }) } } if (!elem || elem.nodeType === 3 || elem.nodeType === 8) { return undefined } event.result = undefined; event.target = elem; data = jQuery.makeArray(data); data.unshift(event) } event.currentTarget = elem; var handle = jQuery.data(elem, "handle"); if (handle) { handle.apply(elem, data) } var parent = elem.parentNode || elem.ownerDocument; try { if (! (elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()])) { if (elem["on" + type] && elem["on" + type].apply(elem, data) === false) { event.result = false } } } catch(e) {} if (!event.isPropagationStopped() && parent) { jQuery.event.trigger(event, data, parent, true) } else { if (!event.isDefaultPrevented()) { var target = event.target, old, isClick = jQuery.nodeName(target, "a") && type === "click", special = jQuery.event.special[type] || {}; if ((!special._default || special._default.call(elem, event) === false) && !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()])) { try { if (target[type]) { old = target["on" + type]; if (old) { target["on" + type] = null } jQuery.event.triggered = true; target[type]() } } catch(e) {} if (old) { target["on" + type] = old } jQuery.event.triggered = false } } } }, handle: function(event) { var all, handlers, namespaces, namespace, events; event = arguments[0] = jQuery.event.fix(event || window.event); event.currentTarget = this; all = event.type.indexOf(".") < 0 && !event.exclusive; if (!all) { namespaces = event.type.split("."); event.type = namespaces.shift(); namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)") } var events = jQuery.data(this, "events"), handlers = events[event.type]; if (events && handlers) { handlers = handlers.slice(0); for (var j = 0, l = handlers.length; j < l; j++) { var handleObj = handlers[j]; if (all || namespace.test(handleObj.namespace)) { event.handler = handleObj.handler; event.data = handleObj.data; event.handleObj = handleObj; var ret = handleObj.handler.apply(this, arguments); if (ret !== undefined) { event.result = ret; if (ret === false) { event.preventDefault(); event.stopPropagation() } } if (event.isImmediatePropagationStopped()) { break } } } } return event.result }, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix: function(event) { if (event[expando]) { return event } var originalEvent = event; event = jQuery.Event(originalEvent); for (var i = this.props.length, prop; i;) { prop = this.props[--i]; event[prop] = originalEvent[prop] } if (!event.target) { event.target = event.srcElement || document } if (event.target.nodeType === 3) { event.target = event.target.parentNode } if (!event.relatedTarget && event.fromElement) { event.relatedTarget = event.fromElement === event.target ? event.toElement: event.fromElement } if (event.pageX == null && event.clientX != null) { var doc = document.documentElement, body = document.body; event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0) } if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode: event.keyCode)) { event.which = event.charCode || event.keyCode } if (!event.metaKey && event.ctrlKey) { event.metaKey = event.ctrlKey } if (!event.which && event.button !== undefined) { event.which = (event.button & 1 ? 1: (event.button & 2 ? 3: (event.button & 4 ? 2: 0))) } return event }, guid: 100000000, proxy: jQuery.proxy, special: { ready: { setup: jQuery.bindReady, teardown: jQuery.noop }, live: { add: function(handleObj) { jQuery.event.add(this, handleObj.origType, jQuery.extend({}, handleObj, { handler: liveHandler })) }, remove: function(handleObj) { var remove = true, type = handleObj.origType.replace(rnamespaces, ""); jQuery.each(jQuery.data(this, "events").live || [], function() { if (type === this.origType.replace(rnamespaces, "")) { remove = false; return false } }); if (remove) { jQuery.event.remove(this, handleObj.origType, liveHandler) } } }, beforeunload: { setup: function(data, namespaces, eventHandle) { if (this.setInterval) { this.onbeforeunload = eventHandle } return false }, teardown: function(namespaces, eventHandle) { if (this.onbeforeunload === eventHandle) { this.onbeforeunload = null } } } } }; var removeEvent = document.removeEventListener ? function(elem, type, handle) { elem.removeEventListener(type, handle, false) }: function(elem, type, handle) { elem.detachEvent("on" + type, handle) }; jQuery.Event = function(src) { if (!this.preventDefault) { return new jQuery.Event(src) } if (src && src.type) { this.originalEvent = src; this.type = src.type } else { this.type = src } this.timeStamp = now(); this[expando] = true }; function returnFalse() { return false } function returnTrue() { return true } jQuery.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = returnTrue; var e = this.originalEvent; if (!e) { return } if (e.preventDefault) { e.preventDefault() } e.returnValue = false }, stopPropagation: function() { this.isPropagationStopped = returnTrue; var e = this.originalEvent; if (!e) { return } if (e.stopPropagation) { e.stopPropagation() } e.cancelBubble = true }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation() }, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse }; var withinElement = function(event) { var parent = event.relatedTarget; try { while (parent && parent !== this) { parent = parent.parentNode } if (parent !== this) { event.type = event.data; jQuery.event.handle.apply(this, arguments) } } catch(e) {} }, delegate = function(event) { event.type = event.data; jQuery.event.handle.apply(this, arguments) }; jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function(orig, fix) { jQuery.event.special[orig] = { setup: function(data) { jQuery.event.add(this, fix, data && data.selector ? delegate: withinElement, orig) }, teardown: function(data) { jQuery.event.remove(this, fix, data && data.selector ? delegate: withinElement) } } }); if (!jQuery.support.submitBubbles) { jQuery.event.special.submit = { setup: function(data, namespaces) { if (this.nodeName.toLowerCase() !== "form") { jQuery.event.add(this, "click.specialSubmit", function(e) { var elem = e.target, type = elem.type; if ((type === "submit" || type === "image") && jQuery(elem).closest("form").length) { return trigger("submit", this, arguments) } }); jQuery.event.add(this, "keypress.specialSubmit", function(e) { var elem = e.target, type = elem.type; if ((type === "text" || type === "password") && jQuery(elem).closest("form").length && e.keyCode === 13) { return trigger("submit", this, arguments) } }) } else { return false } }, teardown: function(namespaces) { jQuery.event.remove(this, ".specialSubmit") } } } if (!jQuery.support.changeBubbles) { var formElems = /textarea|input|select/i, changeFilters, getVal = function(elem) { var type = elem.type, val = elem.value; if (type === "radio" || type === "checkbox") { val = elem.checked } else { if (type === "select-multiple") { val = elem.selectedIndex > -1 ? jQuery.map(elem.options, function(elem) { return elem.selected }).join("-") : "" } else { if (elem.nodeName.toLowerCase() === "select") { val = elem.selectedIndex } } } return val }, testChange = function testChange(e) { var elem = e.target, data, val; if (!formElems.test(elem.nodeName) || elem.readOnly) { return } data = jQuery.data(elem, "_change_data"); val = getVal(elem); if (e.type !== "focusout" || elem.type !== "radio") { jQuery.data(elem, "_change_data", val) } if (data === undefined || val === data) { return } if (data != null || val) { e.type = "change"; return jQuery.event.trigger(e, arguments[1], elem) } }; jQuery.event.special.change = { filters: { focusout: testChange, click: function(e) { var elem = e.target, type = elem.type; if (type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select") { return testChange.call(this, e) } }, keydown: function(e) { var elem = e.target, type = elem.type; if ((e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || type === "select-multiple") { return testChange.call(this, e) } }, beforeactivate: function(e) { var elem = e.target; jQuery.data(elem, "_change_data", getVal(elem)) } }, setup: function(data, namespaces) { if (this.type === "file") { return false } for (var type in changeFilters) { jQuery.event.add(this, type + ".specialChange", changeFilters[type]) } return formElems.test(this.nodeName) }, teardown: function(namespaces) { jQuery.event.remove(this, ".specialChange"); return formElems.test(this.nodeName) } }; changeFilters = jQuery.event.special.change.filters } function trigger(type, elem, args) { args[0].type = type; return jQuery.event.handle.apply(elem, args) } if (document.addEventListener) { jQuery.each({ focus: "focusin", blur: "focusout" }, function(orig, fix) { jQuery.event.special[fix] = { setup: function() { this.addEventListener(orig, handler, true) }, teardown: function() { this.removeEventListener(orig, handler, true) } }; function handler(e) { e = jQuery.event.fix(e); e.type = fix; return jQuery.event.handle.call(this, e) } }) } jQuery.each(["bind", "one"], function(i, name) { jQuery.fn[name] = function(type, data, fn) { if (typeof type === "object") { for (var key in type) { this[name](key, data, type[key], fn) } return this } if (jQuery.isFunction(data)) { fn = data; data = undefined } var handler = name === "one" ? jQuery.proxy(fn, function(event) { jQuery(this).unbind(event, handler); return fn.apply(this, arguments) }) : fn; if (type === "unload" && name !== "one") { this.one(type, data, fn) } else { for (var i = 0, l = this.length; i < l; i++) { jQuery.event.add(this[i], type, handler, data) } } return this } }); jQuery.fn.extend({ unbind: function(type, fn) { if (typeof type === "object" && !type.preventDefault) { for (var key in type) { this.unbind(key, type[key]) } } else { for (var i = 0, l = this.length; i < l; i++) { jQuery.event.remove(this[i], type, fn) } } return this }, delegate: function(selector, types, data, fn) { return this.live(types, data, fn, selector) }, undelegate: function(selector, types, fn) { if (arguments.length === 0) { return this.unbind("live") } else { return this.die(types, null, fn, selector) } }, trigger: function(type, data) { return this.each(function() { jQuery.event.trigger(type, data, this) }) }, triggerHandler: function(type, data) { if (this[0]) { var event = jQuery.Event(type); event.preventDefault(); event.stopPropagation(); jQuery.event.trigger(event, data, this[0]); return event.result } }, toggle: function(fn) { var args = arguments, i = 1; while (i < args.length) { jQuery.proxy(fn, args[i++]) } return this.click(jQuery.proxy(fn, function(event) { var lastToggle = (jQuery.data(this, "lastToggle" + fn.guid) || 0) % i; jQuery.data(this, "lastToggle" + fn.guid, lastToggle + 1); event.preventDefault(); return args[lastToggle].apply(this, arguments) || false })) }, hover: function(fnOver, fnOut) { return this.mouseenter(fnOver).mouseleave(fnOut || fnOver) } }); var liveMap = { focus: "focusin", blur: "focusout", mouseenter: "mouseover", mouseleave: "mouseout" }; jQuery.each(["live", "die"], function(i, name) { jQuery.fn[name] = function(types, data, fn, origSelector) { var type, i = 0, match, namespaces, preType, selector = origSelector || this.selector, context = origSelector ? this: jQuery(this.context); if (jQuery.isFunction(data)) { fn = data; data = undefined } types = (types || "").split(" "); while ((type = types[i++]) != null) { match = rnamespaces.exec(type); namespaces = ""; if (match) { namespaces = match[0]; type = type.replace(rnamespaces, "") } if (type === "hover") { types.push("mouseenter" + namespaces, "mouseleave" + namespaces); continue } preType = type; if (type === "focus" || type === "blur") { types.push(liveMap[type] + namespaces); type = type + namespaces } else { type = (liveMap[type] || type) + namespaces } if (name === "live") { context.each(function() { jQuery.event.add(this, liveConvert(type, selector), { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType }) }) } else { context.unbind(liveConvert(type, selector), fn) } } return this } }); function liveHandler(event) { var stop, elems = [], selectors = [], args = arguments, related, match, handleObj, elem, j, i, l, data, events = jQuery.data(this, "events"); if (event.liveFired === this || !events || !events.live || event.button && event.type === "click") { return } event.liveFired = this; var live = events.live.slice(0); for (j = 0; j < live.length; j++) { handleObj = live[j]; if (handleObj.origType.replace(rnamespaces, "") === event.type) { selectors.push(handleObj.selector) } else { live.splice(j--, 1) } } match = jQuery(event.target).closest(selectors, event.currentTarget); for (i = 0, l = match.length; i < l; i++) { for (j = 0; j < live.length; j++) { handleObj = live[j]; if (match[i].selector === handleObj.selector) { elem = match[i].elem; related = null; if (handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave") { related = jQuery(event.relatedTarget).closest(handleObj.selector)[0] } if (!related || related !== elem) { elems.push({ elem: elem, handleObj: handleObj }) } } } } for (i = 0, l = elems.length; i < l; i++) { match = elems[i]; event.currentTarget = match.elem; event.data = match.handleObj.data; event.handleObj = match.handleObj; if (match.handleObj.origHandler.apply(match.elem, args) === false) { stop = false; break } } return stop } function liveConvert(type, selector) { return "live." + (type && type !== "*" ? type + ".": "") + selector.replace(/\./g, "`").replace(/ /g, "&") } jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" "), function(i, name) { jQuery.fn[name] = function(fn) { return fn ? this.bind(name, fn) : this.trigger(name) }; if (jQuery.attrFn) { jQuery.attrFn[name] = true } }); if (window.attachEvent && !window.addEventListener) { window.attachEvent("onunload", function() { for (var id in jQuery.cache) { if (jQuery.cache[id].handle) { try { jQuery.event.remove(jQuery.cache[id].handle.elem) } catch(e) {} } } }); /* * Sizzle CSS Selector Engine - v1.0 * Copyright 2009, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ } (function() { var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, done = 0, toString = Object.prototype.toString, hasDuplicate = false, baseHasDuplicate = true; [0, 0].sort(function() { baseHasDuplicate = false; return 0 }); var Sizzle = function(selector, context, results, seed) { results = results || []; var origContext = context = context || document; if (context.nodeType !== 1 && context.nodeType !== 9) { return [] } if (!selector || typeof selector !== "string") { return results } var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context), soFar = selector; while ((chunker.exec(""), m = chunker.exec(soFar)) !== null) { soFar = m[3]; parts.push(m[1]); if (m[2]) { extra = m[3]; break } } if (parts.length > 1 && origPOS.exec(selector)) { if (parts.length === 2 && Expr.relative[parts[0]]) { set = posProcess(parts[0] + parts[1], context) } else { set = Expr.relative[parts[0]] ? [context] : Sizzle(parts.shift(), context); while (parts.length) { selector = parts.shift(); if (Expr.relative[selector]) { selector += parts.shift() } set = posProcess(selector, set) } } } else { if (!seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1])) { var ret = Sizzle.find(parts.shift(), context, contextXML); context = ret.expr ? Sizzle.filter(ret.expr, ret.set)[0] : ret.set[0] } if (context) { var ret = seed ? { expr: parts.pop(), set: makeArray(seed) }: Sizzle.find(parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode: context, contextXML); set = ret.expr ? Sizzle.filter(ret.expr, ret.set) : ret.set; if (parts.length > 0) { checkSet = makeArray(set) } else { prune = false } while (parts.length) { var cur = parts.pop(), pop = cur; if (!Expr.relative[cur]) { cur = "" } else { pop = parts.pop() } if (pop == null) { pop = context } Expr.relative[cur](checkSet, pop, contextXML) } } else { checkSet = parts = [] } } if (!checkSet) { checkSet = set } if (!checkSet) { Sizzle.error(cur || selector) } if (toString.call(checkSet) === "[object Array]") { if (!prune) { results.push.apply(results, checkSet) } else { if (context && context.nodeType === 1) { for (var i = 0; checkSet[i] != null; i++) { if (checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i]))) { results.push(set[i]) } } } else { for (var i = 0; checkSet[i] != null; i++) { if (checkSet[i] && checkSet[i].nodeType === 1) { results.push(set[i]) } } } } } else { makeArray(checkSet, results) } if (extra) { Sizzle(extra, origContext, results, seed); Sizzle.uniqueSort(results) } return results }; Sizzle.uniqueSort = function(results) { if (sortOrder) { hasDuplicate = baseHasDuplicate; results.sort(sortOrder); if (hasDuplicate) { for (var i = 1; i < results.length; i++) { if (results[i] === results[i - 1]) { results.splice(i--, 1) } } } } return results }; Sizzle.matches = function(expr, set) { return Sizzle(expr, null, null, set) }; Sizzle.find = function(expr, context, isXML) { var set, match; if (!expr) { return [] } for (var i = 0, l = Expr.order.length; i < l; i++) { var type = Expr.order[i], match; if ((match = Expr.leftMatch[type].exec(expr))) { var left = match[1]; match.splice(1, 1); if (left.substr(left.length - 1) !== "\\") { match[1] = (match[1] || "").replace(/\\/g, ""); set = Expr.find[type](match, context, isXML); if (set != null) { expr = expr.replace(Expr.match[type], ""); break } } } } if (!set) { set = context.getElementsByTagName("*") } return { set: set, expr: expr } }; Sizzle.filter = function(expr, set, inplace, not) { var old = expr, result = [], curLoop = set, match, anyFound, isXMLFilter = set && set[0] && isXML(set[0]); while (expr && set.length) { for (var type in Expr.filter) { if ((match = Expr.leftMatch[type].exec(expr)) != null && match[2]) { var filter = Expr.filter[type], found, item, left = match[1]; anyFound = false; match.splice(1, 1); if (left.substr(left.length - 1) === "\\") { continue } if (curLoop === result) { result = [] } if (Expr.preFilter[type]) { match = Expr.preFilter[type](match, curLoop, inplace, result, not, isXMLFilter); if (!match) { anyFound = found = true } else { if (match === true) { continue } } } if (match) { for (var i = 0; (item = curLoop[i]) != null; i++) { if (item) { found = filter(item, match, i, curLoop); var pass = not ^ !!found; if (inplace && found != null) { if (pass) { anyFound = true } else { curLoop[i] = false } } else { if (pass) { result.push(item); anyFound = true } } } } } if (found !== undefined) { if (!inplace) { curLoop = result } expr = expr.replace(Expr.match[type], ""); if (!anyFound) { return [] } break } } } if (expr === old) { if (anyFound == null) { Sizzle.error(expr) } else { break } } old = expr } return curLoop }; Sizzle.error = function(msg) { throw "Syntax error, unrecognized expression: " + msg }; var Expr = Sizzle.selectors = { order: ["ID", "NAME", "TAG"], match: { ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ }, leftMatch: {}, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function(elem) { return elem.getAttribute("href") } }, relative: { "+": function(checkSet, part) { var isPartStr = typeof part === "string", isTag = isPartStr && !/\W/.test(part), isPartStrNotTag = isPartStr && !isTag; if (isTag) { part = part.toLowerCase() } for (var i = 0, l = checkSet.length, elem; i < l; i++) { if ((elem = checkSet[i])) { while ((elem = elem.previousSibling) && elem.nodeType !== 1) {} checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? elem || false: elem === part } } if (isPartStrNotTag) { Sizzle.filter(part, checkSet, true) } }, ">": function(checkSet, part) { var isPartStr = typeof part === "string"; if (isPartStr && !/\W/.test(part)) { part = part.toLowerCase(); for (var i = 0, l = checkSet.length; i < l; i++) { var elem = checkSet[i]; if (elem) { var parent = elem.parentNode; checkSet[i] = parent.nodeName.toLowerCase() === part ? parent: false } } } else { for (var i = 0, l = checkSet.length; i < l; i++) { var elem = checkSet[i]; if (elem) { checkSet[i] = isPartStr ? elem.parentNode: elem.parentNode === part } } if (isPartStr) { Sizzle.filter(part, checkSet, true) } } }, "": function(checkSet, part, isXML) { var doneName = done++, checkFn = dirCheck; if (typeof part === "string" && !/\W/.test(part)) { var nodeCheck = part = part.toLowerCase(); checkFn = dirNodeCheck } checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML) }, "~": function(checkSet, part, isXML) { var doneName = done++, checkFn = dirCheck; if (typeof part === "string" && !/\W/.test(part)) { var nodeCheck = part = part.toLowerCase(); checkFn = dirNodeCheck } checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML) } }, find: { ID: function(match, context, isXML) { if (typeof context.getElementById !== "undefined" && !isXML) { var m = context.getElementById(match[1]); return m ? [m] : [] } }, NAME: function(match, context) { if (typeof context.getElementsByName !== "undefined") { var ret = [], results = context.getElementsByName(match[1]); for (var i = 0, l = results.length; i < l; i++) { if (results[i].getAttribute("name") === match[1]) { ret.push(results[i]) } } return ret.length === 0 ? null: ret } }, TAG: function(match, context) { return context.getElementsByTagName(match[1]) } }, preFilter: { CLASS: function(match, curLoop, inplace, result, not, isXML) { match = " " + match[1].replace(/\\/g, "") + " "; if (isXML) { return match } for (var i = 0, elem; (elem = curLoop[i]) != null; i++) { if (elem) { if (not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0)) { if (!inplace) { result.push(elem) } } else { if (inplace) { curLoop[i] = false } } } } return false }, ID: function(match) { return match[1].replace(/\\/g, "") }, TAG: function(match, curLoop) { return match[1].toLowerCase() }, CHILD: function(match) { if (match[1] === "nth") { var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || !/\D/.test(match[2]) && "0n+" + match[2] || match[2]); match[2] = (test[1] + (test[2] || 1)) - 0; match[3] = test[3] - 0 } match[0] = done++; return match }, ATTR: function(match, curLoop, inplace, result, not, isXML) { var name = match[1].replace(/\\/g, ""); if (!isXML && Expr.attrMap[name]) { match[1] = Expr.attrMap[name] } if (match[2] === "~=") { match[4] = " " + match[4] + " " } return match }, PSEUDO: function(match, curLoop, inplace, result, not) { if (match[1] === "not") { if ((chunker.exec(match[3]) || "").length > 1 || /^\w/.test(match[3])) { match[3] = Sizzle(match[3], null, null, curLoop) } else { var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); if (!inplace) { result.push.apply(result, ret) } return false } } else { if (Expr.match.POS.test(match[0]) || Expr.match.CHILD.test(match[0])) { return true } } return match }, POS: function(match) { match.unshift(true); return match } }, filters: { enabled: function(elem) { return elem.disabled === false && elem.type !== "hidden" }, disabled: function(elem) { return elem.disabled === true }, checked: function(elem) { return elem.checked === true }, selected: function(elem) { elem.parentNode.selectedIndex; return elem.selected === true }, parent: function(elem) { return !! elem.firstChild }, empty: function(elem) { return ! elem.firstChild }, has: function(elem, i, match) { return !! Sizzle(match[3], elem).length }, header: function(elem) { return /h\d/i.test(elem.nodeName) }, text: function(elem) { return "text" === elem.type }, radio: function(elem) { return "radio" === elem.type }, checkbox: function(elem) { return "checkbox" === elem.type }, file: function(elem) { return "file" === elem.type }, password: function(elem) { return "password" === elem.type }, submit: function(elem) { return "submit" === elem.type }, image: function(elem) { return "image" === elem.type }, reset: function(elem) { return "reset" === elem.type }, button: function(elem) { return "button" === elem.type || elem.nodeName.toLowerCase() === "button" }, input: function(elem) { return /input|select|textarea|button/i.test(elem.nodeName) } }, setFilters: { first: function(elem, i) { return i === 0 }, last: function(elem, i, match, array) { return i === array.length - 1 }, even: function(elem, i) { return i % 2 === 0 }, odd: function(elem, i) { return i % 2 === 1 }, lt: function(elem, i, match) { return i < match[3] - 0 }, gt: function(elem, i, match) { return i > match[3] - 0 }, nth: function(elem, i, match) { return match[3] - 0 === i }, eq: function(elem, i, match) { return match[3] - 0 === i } }, filter: { PSEUDO: function(elem, match, i, array) { var name = match[1], filter = Expr.filters[name]; if (filter) { return filter(elem, i, match, array) } else { if (name === "contains") { return (elem.textContent || elem.innerText || getText([elem]) || "").indexOf(match[3]) >= 0 } else { if (name === "not") { var not = match[3]; for (var i = 0, l = not.length; i < l; i++) { if (not[i] === elem) { return false } } return true } else { Sizzle.error("Syntax error, unrecognized expression: " + name) } } } }, CHILD: function(elem, match) { var type = match[1], node = elem; switch (type) { case "only": case "first": while ((node = node.previousSibling)) { if (node.nodeType === 1) { return false } } if (type === "first") { return true } node = elem; case "last": while ((node = node.nextSibling)) { if (node.nodeType === 1) { return false } } return true; case "nth": var first = match[2], last = match[3]; if (first === 1 && last === 0) { return true } var doneName = match[0], parent = elem.parentNode; if (parent && (parent.sizcache !== doneName || !elem.nodeIndex)) { var count = 0; for (node = parent.firstChild; node; node = node.nextSibling) { if (node.nodeType === 1) { node.nodeIndex = ++count } } parent.sizcache = doneName } var diff = elem.nodeIndex - last; if (first === 0) { return diff === 0 } else { return (diff % first === 0 && diff / first >= 0) } } }, ID: function(elem, match) { return elem.nodeType === 1 && elem.getAttribute("id") === match }, TAG: function(elem, match) { return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match }, CLASS: function(elem, match) { return (" " + (elem.className || elem.getAttribute("class")) + " ").indexOf(match) > -1 }, ATTR: function(elem, match) { var name = match[1], result = Expr.attrHandle[name] ? Expr.attrHandle[name](elem) : elem[name] != null ? elem[name] : elem.getAttribute(name), value = result + "", type = match[2], check = match[4]; return result == null ? type === "!=": type === "=" ? value === check: type === "*=" ? value.indexOf(check) >= 0: type === "~=" ? (" " + value + " ").indexOf(check) >= 0: !check ? value && result !== false: type === "!=" ? value !== check: type === "^=" ? value.indexOf(check) === 0: type === "$=" ? value.substr(value.length - check.length) === check: type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-": false }, POS: function(elem, match, i, array) { var name = match[2], filter = Expr.setFilters[name]; if (filter) { return filter(elem, i, match, array) } } } }; var origPOS = Expr.match.POS; for (var type in Expr.match) { Expr.match[type] = new RegExp(Expr.match[type].source + /(?![^\[]*\])(?![^\(]*\))/.source); Expr.leftMatch[type] = new RegExp(/(^(?:.|\r|\n)*?)/.source + Expr.match[type].source.replace(/\\(\d+)/g, function(all, num) { return "\\" + (num - 0 + 1) })) } var makeArray = function(array, results) { array = Array.prototype.slice.call(array, 0); if (results) { results.push.apply(results, array); return results } return array }; try { Array.prototype.slice.call(document.documentElement.childNodes, 0)[0].nodeType } catch(e) { makeArray = function(array, results) { var ret = results || []; if (toString.call(array) === "[object Array]") { Array.prototype.push.apply(ret, array) } else { if (typeof array.length === "number") { for (var i = 0, l = array.length; i < l; i++) { ret.push(array[i]) } } else { for (var i = 0; array[i]; i++) { ret.push(array[i]) } } } return ret } } var sortOrder; if (document.documentElement.compareDocumentPosition) { sortOrder = function(a, b) { if (!a.compareDocumentPosition || !b.compareDocumentPosition) { if (a == b) { hasDuplicate = true } return a.compareDocumentPosition ? -1: 1 } var ret = a.compareDocumentPosition(b) & 4 ? -1: a === b ? 0: 1; if (ret === 0) { hasDuplicate = true } return ret } } else { if ("sourceIndex" in document.documentElement) { sortOrder = function(a, b) { if (!a.sourceIndex || !b.sourceIndex) { if (a == b) { hasDuplicate = true } return a.sourceIndex ? -1: 1 } var ret = a.sourceIndex - b.sourceIndex; if (ret === 0) { hasDuplicate = true } return ret } } else { if (document.createRange) { sortOrder = function(a, b) { if (!a.ownerDocument || !b.ownerDocument) { if (a == b) { hasDuplicate = true } return a.ownerDocument ? -1: 1 } var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange(); aRange.setStart(a, 0); aRange.setEnd(a, 0); bRange.setStart(b, 0); bRange.setEnd(b, 0); var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange); if (ret === 0) { hasDuplicate = true } return ret } } } } function getText(elems) { var ret = "", elem; for (var i = 0; elems[i]; i++) { elem = elems[i]; if (elem.nodeType === 3 || elem.nodeType === 4) { ret += elem.nodeValue } else { if (elem.nodeType !== 8) { ret += getText(elem.childNodes) } } } return ret } (function() { var form = document.createElement("div"), id = "script" + (new Date).getTime(); form.innerHTML = ""; var root = document.documentElement; root.insertBefore(form, root.firstChild); if (document.getElementById(id)) { Expr.find.ID = function(match, context, isXML) { if (typeof context.getElementById !== "undefined" && !isXML) { var m = context.getElementById(match[1]); return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined: [] } }; Expr.filter.ID = function(elem, match) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return elem.nodeType === 1 && node && node.nodeValue === match } } root.removeChild(form); root = form = null })(); (function() { var div = document.createElement("div"); div.appendChild(document.createComment("")); if (div.getElementsByTagName("*").length > 0) { Expr.find.TAG = function(match, context) { var results = context.getElementsByTagName(match[1]); if (match[1] === "*") { var tmp = []; for (var i = 0; results[i]; i++) { if (results[i].nodeType === 1) { tmp.push(results[i]) } } results = tmp } return results } } div.innerHTML = ""; if (div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#") { Expr.attrHandle.href = function(elem) { return elem.getAttribute("href", 2) } } div = null })(); if (document.querySelectorAll) { (function() { var oldSizzle = Sizzle, div = document.createElement("div"); div.innerHTML = "

        "; if (div.querySelectorAll && div.querySelectorAll(".TEST").length === 0) { return } Sizzle = function(query, context, extra, seed) { context = context || document; if (!seed && context.nodeType === 9 && !isXML(context)) { try { return makeArray(context.querySelectorAll(query), extra) } catch(e) {} } return oldSizzle(query, context, extra, seed) }; for (var prop in oldSizzle) { Sizzle[prop] = oldSizzle[prop] } div = null })() } (function() { var div = document.createElement("div"); div.innerHTML = "
        "; if (!div.getElementsByClassName || div.getElementsByClassName("e").length === 0) { return } div.lastChild.className = "e"; if (div.getElementsByClassName("e").length === 1) { return } Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function(match, context, isXML) { if (typeof context.getElementsByClassName !== "undefined" && !isXML) { return context.getElementsByClassName(match[1]) } }; div = null })(); function dirNodeCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) { for (var i = 0, l = checkSet.length; i < l; i++) { var elem = checkSet[i]; if (elem) { elem = elem[dir]; var match = false; while (elem) { if (elem.sizcache === doneName) { match = checkSet[elem.sizset]; break } if (elem.nodeType === 1 && !isXML) { elem.sizcache = doneName; elem.sizset = i } if (elem.nodeName.toLowerCase() === cur) { match = elem; break } elem = elem[dir] } checkSet[i] = match } } } function dirCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) { for (var i = 0, l = checkSet.length; i < l; i++) { var elem = checkSet[i]; if (elem) { elem = elem[dir]; var match = false; while (elem) { if (elem.sizcache === doneName) { match = checkSet[elem.sizset]; break } if (elem.nodeType === 1) { if (!isXML) { elem.sizcache = doneName; elem.sizset = i } if (typeof cur !== "string") { if (elem === cur) { match = true; break } } else { if (Sizzle.filter(cur, [elem]).length > 0) { match = elem; break } } } elem = elem[dir] } checkSet[i] = match } } } var contains = document.compareDocumentPosition ? function(a, b) { return !! (a.compareDocumentPosition(b) & 16) }: function(a, b) { return a !== b && (a.contains ? a.contains(b) : true) }; var isXML = function(elem) { var documentElement = (elem ? elem.ownerDocument || elem: 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML": false }; var posProcess = function(selector, context) { var tmpSet = [], later = "", match, root = context.nodeType ? [context] : context; while ((match = Expr.match.PSEUDO.exec(selector))) { later += match[0]; selector = selector.replace(Expr.match.PSEUDO, "") } selector = Expr.relative[selector] ? selector + "*": selector; for (var i = 0, l = root.length; i < l; i++) { Sizzle(selector, root[i], tmpSet) } return Sizzle.filter(later, tmpSet) }; jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; jQuery.unique = Sizzle.uniqueSort; jQuery.text = getText; jQuery.isXMLDoc = isXML; jQuery.contains = contains; return; window.Sizzle = Sizzle })(); var runtil = /Until$/, rparentsprev = /^(?:parents|prevUntil|prevAll)/, rmultiselector = /,/, slice = Array.prototype.slice; var winnow = function(elements, qualifier, keep) { if (jQuery.isFunction(qualifier)) { return jQuery.grep(elements, function(elem, i) { return !! qualifier.call(elem, i, elem) === keep }) } else { if (qualifier.nodeType) { return jQuery.grep(elements, function(elem, i) { return (elem === qualifier) === keep }) } else { if (typeof qualifier === "string") { var filtered = jQuery.grep(elements, function(elem) { return elem.nodeType === 1 }); if (isSimple.test(qualifier)) { return jQuery.filter(qualifier, filtered, !keep) } else { qualifier = jQuery.filter(qualifier, filtered) } } } } return jQuery.grep(elements, function(elem, i) { return (jQuery.inArray(elem, qualifier) >= 0) === keep }) }; jQuery.fn.extend({ find: function(selector) { var ret = this.pushStack("", "find", selector), length = 0; for (var i = 0, l = this.length; i < l; i++) { length = ret.length; jQuery.find(selector, this[i], ret); if (i > 0) { for (var n = length; n < ret.length; n++) { for (var r = 0; r < length; r++) { if (ret[r] === ret[n]) { ret.splice(n--, 1); break } } } } } return ret }, has: function(target) { var targets = jQuery(target); return this.filter(function() { for (var i = 0, l = targets.length; i < l; i++) { if (jQuery.contains(this, targets[i])) { return true } } }) }, not: function(selector) { return this.pushStack(winnow(this, selector, false), "not", selector) }, filter: function(selector) { return this.pushStack(winnow(this, selector, true), "filter", selector) }, is: function(selector) { return !! selector && jQuery.filter(selector, this).length > 0 }, closest: function(selectors, context) { if (jQuery.isArray(selectors)) { var ret = [], cur = this[0], match, matches = {}, selector; if (cur && selectors.length) { for (var i = 0, l = selectors.length; i < l; i++) { selector = selectors[i]; if (!matches[selector]) { matches[selector] = jQuery.expr.match.POS.test(selector) ? jQuery(selector, context || this.context) : selector } } while (cur && cur.ownerDocument && cur !== context) { for (selector in matches) { match = matches[selector]; if (match.jquery ? match.index(cur) > -1: jQuery(cur).is(match)) { ret.push({ selector: selector, elem: cur }); delete matches[selector] } } cur = cur.parentNode } } return ret } var pos = jQuery.expr.match.POS.test(selectors) ? jQuery(selectors, context || this.context) : null; return this.map(function(i, cur) { while (cur && cur.ownerDocument && cur !== context) { if (pos ? pos.index(cur) > -1: jQuery(cur).is(selectors)) { return cur } cur = cur.parentNode } return null }) }, index: function(elem) { if (!elem || typeof elem === "string") { return jQuery.inArray(this[0], elem ? jQuery(elem) : this.parent().children()) } return jQuery.inArray(elem.jquery ? elem[0] : elem, this) }, add: function(selector, context) { var set = typeof selector === "string" ? jQuery(selector, context || this.context) : jQuery.makeArray(selector), all = jQuery.merge(this.get(), set); return this.pushStack(isDisconnected(set[0]) || isDisconnected(all[0]) ? all: jQuery.unique(all)) }, andSelf: function() { return this.add(this.prevObject) } }); function isDisconnected(node) { return ! node || !node.parentNode || node.parentNode.nodeType === 11 } jQuery.each({ parent: function(elem) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent: null }, parents: function(elem) { return jQuery.dir(elem, "parentNode") }, parentsUntil: function(elem, i, until) { return jQuery.dir(elem, "parentNode", until) }, next: function(elem) { return jQuery.nth(elem, 2, "nextSibling") }, prev: function(elem) { return jQuery.nth(elem, 2, "previousSibling") }, nextAll: function(elem) { return jQuery.dir(elem, "nextSibling") }, prevAll: function(elem) { return jQuery.dir(elem, "previousSibling") }, nextUntil: function(elem, i, until) { return jQuery.dir(elem, "nextSibling", until) }, prevUntil: function(elem, i, until) { return jQuery.dir(elem, "previousSibling", until) }, siblings: function(elem) { return jQuery.sibling(elem.parentNode.firstChild, elem) }, children: function(elem) { return jQuery.sibling(elem.firstChild) }, contents: function(elem) { return jQuery.nodeName(elem, "iframe") ? elem.contentDocument || elem.contentWindow.document: jQuery.makeArray(elem.childNodes) } }, function(name, fn) { jQuery.fn[name] = function(until, selector) { var ret = jQuery.map(this, fn, until); if (!runtil.test(name)) { selector = until } if (selector && typeof selector === "string") { ret = jQuery.filter(selector, ret) } ret = this.length > 1 ? jQuery.unique(ret) : ret; if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) { ret = ret.reverse() } return this.pushStack(ret, name, slice.call(arguments).join(",")) } }); jQuery.extend({ filter: function(expr, elems, not) { if (not) { expr = ":not(" + expr + ")" } return jQuery.find.matches(expr, elems) }, dir: function(elem, dir, until) { var matched = [], cur = elem[dir]; while (cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery(cur).is(until))) { if (cur.nodeType === 1) { matched.push(cur) } cur = cur[dir] } return matched }, nth: function(cur, result, dir, elem) { result = result || 1; var num = 0; for (; cur; cur = cur[dir]) { if (cur.nodeType === 1 && ++num === result) { break } } return cur }, sibling: function(n, elem) { var r = []; for (; n; n = n.nextSibling) { if (n.nodeType === 1 && n !== elem) { r.push(n) } } return r } }); var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace = /^\s+/, rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g, rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i, rtagName = /<([\w:]+)/, rtbody = /" }, wrapMap = { option: [1, ""], legend: [1, "
        ", "
        "], thead: [1, "", "
        "], tr: [2, "", "
        "], td: [3, "", "
        "], col: [2, "", "
        "], area: [1, "", ""], _default: [0, "", ""] }; wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; if (!jQuery.support.htmlSerialize) { wrapMap._default = [1, "div
        ", "
        "] } jQuery.fn.extend({ text: function(text) { if (jQuery.isFunction(text)) { return this.each(function(i) { var self = jQuery(this); self.text(text.call(this, i, self.text())) }) } if (typeof text !== "object" && text !== undefined) { return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(text)) } return jQuery.text(this) }, wrapAll: function(html) { if (jQuery.isFunction(html)) { return this.each(function(i) { jQuery(this).wrapAll(html.call(this, i)) }) } if (this[0]) { var wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true); if (this[0].parentNode) { wrap.insertBefore(this[0]) } wrap.map(function() { var elem = this; while (elem.firstChild && elem.firstChild.nodeType === 1) { elem = elem.firstChild } return elem }).append(this) } return this }, wrapInner: function(html) { if (jQuery.isFunction(html)) { return this.each(function(i) { jQuery(this).wrapInner(html.call(this, i)) }) } return this.each(function() { var self = jQuery(this), contents = self.contents(); if (contents.length) { contents.wrapAll(html) } else { self.append(html) } }) }, wrap: function(html) { return this.each(function() { jQuery(this).wrapAll(html) }) }, unwrap: function() { return this.parent().each(function() { if (!jQuery.nodeName(this, "body")) { jQuery(this).replaceWith(this.childNodes) } }).end() }, append: function() { return this.domManip(arguments, true, function(elem) { if (this.nodeType === 1) { this.appendChild(elem) } }) }, prepend: function() { return this.domManip(arguments, true, function(elem) { if (this.nodeType === 1) { this.insertBefore(elem, this.firstChild) } }) }, before: function() { if (this[0] && this[0].parentNode) { return this.domManip(arguments, false, function(elem) { this.parentNode.insertBefore(elem, this) }) } else { if (arguments.length) { var set = jQuery(arguments[0]); set.push.apply(set, this.toArray()); return this.pushStack(set, "before", arguments) } } }, after: function() { if (this[0] && this[0].parentNode) { return this.domManip(arguments, false, function(elem) { this.parentNode.insertBefore(elem, this.nextSibling) }) } else { if (arguments.length) { var set = this.pushStack(this, "after", arguments); set.push.apply(set, jQuery(arguments[0]).toArray()); return set } } }, remove: function(selector, keepData) { for (var i = 0, elem; (elem = this[i]) != null; i++) { if (!selector || jQuery.filter(selector, [elem]).length) { if (!keepData && elem.nodeType === 1) { jQuery.cleanData(elem.getElementsByTagName("*")); jQuery.cleanData([elem]) } if (elem.parentNode) { elem.parentNode.removeChild(elem) } } } return this }, empty: function() { for (var i = 0, elem; (elem = this[i]) != null; i++) { if (elem.nodeType === 1) { jQuery.cleanData(elem.getElementsByTagName("*")) } while (elem.firstChild) { elem.removeChild(elem.firstChild) } } return this }, clone: function(events) { var ret = this.map(function() { if (!jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this)) { var html = this.outerHTML, ownerDocument = this.ownerDocument; if (!html) { var div = ownerDocument.createElement("div"); div.appendChild(this.cloneNode(true)); html = div.innerHTML } return jQuery.clean([html.replace(rinlinejQuery, "").replace(/=([^="'>\s]+\/)>/g, '="$1">').replace(rleadingWhitespace, "")], ownerDocument)[0] } else { return this.cloneNode(true) } }); if (events === true) { cloneCopyEvent(this, ret); cloneCopyEvent(this.find("*"), ret.find("*")) } return ret }, html: function(value) { if (value === undefined) { return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(rinlinejQuery, "") : null } else { if (typeof value === "string" && !rnocache.test(value) && (jQuery.support.leadingWhitespace || !rleadingWhitespace.test(value)) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { value = value.replace(rxhtmlTag, fcloseTag); try { for (var i = 0, l = this.length; i < l; i++) { if (this[i].nodeType === 1) { jQuery.cleanData(this[i].getElementsByTagName("*")); this[i].innerHTML = value } } } catch(e) { this.empty().append(value) } } else { if (jQuery.isFunction(value)) { this.each(function(i) { var self = jQuery(this), old = self.html(); self.empty().append(function() { return value.call(this, i, old) }) }) } else { this.empty().append(value) } } } return this }, replaceWith: function(value) { if (this[0] && this[0].parentNode) { if (jQuery.isFunction(value)) { return this.each(function(i) { var self = jQuery(this), old = self.html(); self.replaceWith(value.call(this, i, old)) }) } if (typeof value !== "string") { value = jQuery(value).detach() } return this.each(function() { var next = this.nextSibling, parent = this.parentNode; jQuery(this).remove(); if (next) { jQuery(next).before(value) } else { jQuery(parent).append(value) } }) } else { return this.pushStack(jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value) } }, detach: function(selector) { return this.remove(selector, true) }, domManip: function(args, table, callback) { var results, first, value = args[0], scripts = [], fragment, parent; if (!jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test(value)) { return this.each(function() { jQuery(this).domManip(args, table, callback, true) }) } if (jQuery.isFunction(value)) { return this.each(function(i) { var self = jQuery(this); args[0] = value.call(this, i, table ? self.html() : undefined); self.domManip(args, table, callback) }) } if (this[0]) { parent = value && value.parentNode; if (jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length) { results = { fragment: parent } } else { results = buildFragment(args, this, scripts) } fragment = results.fragment; if (fragment.childNodes.length === 1) { first = fragment = fragment.firstChild } else { first = fragment.firstChild } if (first) { table = table && jQuery.nodeName(first, "tr"); for (var i = 0, l = this.length; i < l; i++) { callback.call(table ? root(this[i], first) : this[i], i > 0 || results.cacheable || this.length > 1 ? fragment.cloneNode(true) : fragment) } } if (scripts.length) { jQuery.each(scripts, evalScript) } } return this; function root(elem, cur) { return jQuery.nodeName(elem, "table") ? (elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody"))) : elem } } }); function cloneCopyEvent(orig, ret) { var i = 0; ret.each(function() { if (this.nodeName !== (orig[i] && orig[i].nodeName)) { return } var oldData = jQuery.data(orig[i++]), curData = jQuery.data(this, oldData), events = oldData && oldData.events; if (events) { delete curData.handle; curData.events = {}; for (var type in events) { for (var handler in events[type]) { jQuery.event.add(this, type, events[type][handler], events[type][handler].data) } } } }) } function buildFragment(args, nodes, scripts) { var fragment, cacheable, cacheresults, doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document); if (args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document && !rnocache.test(args[0]) && (jQuery.support.checkClone || !rchecked.test(args[0]))) { cacheable = true; cacheresults = jQuery.fragments[args[0]]; if (cacheresults) { if (cacheresults !== 1) { fragment = cacheresults } } } if (!fragment) { fragment = doc.createDocumentFragment(); jQuery.clean(args, doc, fragment, scripts) } if (cacheable) { jQuery.fragments[args[0]] = cacheresults ? fragment: 1 } return { fragment: fragment, cacheable: cacheable } } jQuery.fragments = {}; jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function(name, original) { jQuery.fn[name] = function(selector) { var ret = [], insert = jQuery(selector), parent = this.length === 1 && this[0].parentNode; if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) { insert[original](this[0]); return this } else { for (var i = 0, l = insert.length; i < l; i++) { var elems = (i > 0 ? this.clone(true) : this).get(); jQuery.fn[original].apply(jQuery(insert[i]), elems); ret = ret.concat(elems) } return this.pushStack(ret, name, insert.selector) } } }); jQuery.extend({ clean: function(elems, context, fragment, scripts) { context = context || document; if (typeof context.createElement === "undefined") { context = context.ownerDocument || context[0] && context[0].ownerDocument || document } var ret = []; for (var i = 0, elem; (elem = elems[i]) != null; i++) { if (typeof elem === "number") { elem += "" } if (!elem) { continue } if (typeof elem === "string" && !rhtml.test(elem)) { elem = context.createTextNode(elem) } else { if (typeof elem === "string") { elem = elem.replace(rxhtmlTag, fcloseTag); var tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(), wrap = wrapMap[tag] || wrapMap._default, depth = wrap[0], div = context.createElement("div"); div.innerHTML = wrap[1] + elem + wrap[2]; while (depth--) { div = div.lastChild } if (!jQuery.support.tbody) { var hasBody = rtbody.test(elem), tbody = tag === "table" && !hasBody ? div.firstChild && div.firstChild.childNodes: wrap[1] === "" && !hasBody ? div.childNodes: []; for (var j = tbody.length - 1; j >= 0; --j) { if (jQuery.nodeName(tbody[j], "tbody") && !tbody[j].childNodes.length) { tbody[j].parentNode.removeChild(tbody[j]) } } } if (!jQuery.support.leadingWhitespace && rleadingWhitespace.test(elem)) { div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]), div.firstChild) } elem = div.childNodes } } if (elem.nodeType) { ret.push(elem) } else { ret = jQuery.merge(ret, elem) } } if (fragment) { for (var i = 0; ret[i]; i++) { if (scripts && jQuery.nodeName(ret[i], "script") && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript")) { scripts.push(ret[i].parentNode ? ret[i].parentNode.removeChild(ret[i]) : ret[i]) } else { if (ret[i].nodeType === 1) { ret.splice.apply(ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script")))) } fragment.appendChild(ret[i]) } } } return ret }, cleanData: function(elems) { var data, id, cache = jQuery.cache, special = jQuery.event.special, deleteExpando = jQuery.support.deleteExpando; for (var i = 0, elem; (elem = elems[i]) != null; i++) { id = elem[jQuery.expando]; if (id) { data = cache[id]; if (data.events) { for (var type in data.events) { if (special[type]) { jQuery.event.remove(elem, type) } else { removeEvent(elem, type, data.handle) } } } if (deleteExpando) { delete elem[jQuery.expando] } else { if (elem.removeAttribute) { elem.removeAttribute(jQuery.expando) } } delete cache[id] } } } }); var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, ralpha = /alpha\([^)]*\)/, ropacity = /opacity=([^)]*)/, rfloat = /float/i, rdashAlpha = /-([a-z])/ig, rupper = /([A-Z])/g, rnumpx = /^-?\d+(?:px)?$/i, rnum = /^-?\d/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssWidth = ["Left", "Right"], cssHeight = ["Top", "Bottom"], getComputedStyle = document.defaultView && document.defaultView.getComputedStyle, styleFloat = jQuery.support.cssFloat ? "cssFloat": "styleFloat", fcamelCase = function(all, letter) { return letter.toUpperCase() }; jQuery.fn.css = function(name, value) { return access(this, name, value, true, function(elem, name, value) { if (value === undefined) { return jQuery.curCSS(elem, name) } if (typeof value === "number" && !rexclude.test(name)) { value += "px" } jQuery.style(elem, name, value) }) }; jQuery.extend({ style: function(elem, name, value) { if (!elem || elem.nodeType === 3 || elem.nodeType === 8) { return undefined } if ((name === "width" || name === "height") && parseFloat(value) < 0) { value = undefined } var style = elem.style || elem, set = value !== undefined; if (!jQuery.support.opacity && name === "opacity") { if (set) { style.zoom = 1; var opacity = parseInt(value, 10) + "" === "NaN" ? "": "alpha(opacity=" + value * 100 + ")"; var filter = style.filter || jQuery.curCSS(elem, "filter") || ""; style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity } return style.filter && style.filter.indexOf("opacity=") >= 0 ? (parseFloat(ropacity.exec(style.filter)[1]) / 100) + "": "" } if (rfloat.test(name)) { name = styleFloat } name = name.replace(rdashAlpha, fcamelCase); if (set) { style[name] = value } return style[name] }, css: function(elem, name, force, extra) { if (name === "width" || name === "height") { var val, props = cssShow, which = name === "width" ? cssWidth: cssHeight; function getWH() { val = name === "width" ? elem.offsetWidth: elem.offsetHeight; if (extra === "border") { return } jQuery.each(which, function() { if (!extra) { val -= parseFloat(jQuery.curCSS(elem, "padding" + this, true)) || 0 } if (extra === "margin") { val += parseFloat(jQuery.curCSS(elem, "margin" + this, true)) || 0 } else { val -= parseFloat(jQuery.curCSS(elem, "border" + this + "Width", true)) || 0 } }) } if (elem.offsetWidth !== 0) { getWH() } else { jQuery.swap(elem, props, getWH) } return Math.max(0, Math.round(val)) } return jQuery.curCSS(elem, name, force) }, curCSS: function(elem, name, force) { var ret, style = elem.style, filter; if (!jQuery.support.opacity && name === "opacity" && elem.currentStyle) { ret = ropacity.test(elem.currentStyle.filter || "") ? (parseFloat(RegExp.$1) / 100) + "": ""; return ret === "" ? "1": ret } if (rfloat.test(name)) { name = styleFloat } if (!force && style && style[name]) { ret = style[name] } else { if (getComputedStyle) { if (rfloat.test(name)) { name = "float" } name = name.replace(rupper, "-$1").toLowerCase(); var defaultView = elem.ownerDocument.defaultView; if (!defaultView) { return null } var computedStyle = defaultView.getComputedStyle(elem, null); if (computedStyle) { ret = computedStyle.getPropertyValue(name) } if (name === "opacity" && ret === "") { ret = "1" } } else { if (elem.currentStyle) { var camelCase = name.replace(rdashAlpha, fcamelCase); ret = elem.currentStyle[name] || elem.currentStyle[camelCase]; if (!rnumpx.test(ret) && rnum.test(ret)) { var left = style.left, rsLeft = elem.runtimeStyle.left; elem.runtimeStyle.left = elem.currentStyle.left; style.left = camelCase === "fontSize" ? "1em": (ret || 0); ret = style.pixelLeft + "px"; style.left = left; elem.runtimeStyle.left = rsLeft } } } } return ret }, swap: function(elem, options, callback) { var old = {}; for (var name in options) { old[name] = elem.style[name]; elem.style[name] = options[name] } callback.call(elem); for (var name in options) { elem.style[name] = old[name] } } }); if (jQuery.expr && jQuery.expr.filters) { jQuery.expr.filters.hidden = function(elem) { var width = elem.offsetWidth, height = elem.offsetHeight, skip = elem.nodeName.toLowerCase() === "tr"; return width === 0 && height === 0 && !skip ? true: width > 0 && height > 0 && !skip ? false: jQuery.curCSS(elem, "display") === "none" }; jQuery.expr.filters.visible = function(elem) { return ! jQuery.expr.filters.hidden(elem) } } var jsc = now(), rscript = //gi, rselectTextarea = /select|textarea/i, rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i, jsre = /=\?(&|$)/, rquery = /\?/, rts = /(\?|&)_=.*?(&|$)/, rurl = /^(\w+:)?\/\/([^\/?#]+)/, r20 = /%20/g, _load = jQuery.fn.load; jQuery.fn.extend({ load: function(url, params, callback) { if (typeof url !== "string") { return _load.call(this, url) } else { if (!this.length) { return this } } var off = url.indexOf(" "); if (off >= 0) { var selector = url.slice(off, url.length); url = url.slice(0, off) } var type = "GET"; if (params) { if (jQuery.isFunction(params)) { callback = params; params = null } else { if (typeof params === "object") { params = jQuery.param(params, jQuery.ajaxSettings.traditional); type = "POST" } } } var self = this; jQuery.ajax({ url: url, type: type, dataType: "html", data: params, complete: function(res, status) { if (status === "success" || status === "notmodified") { self.html(selector ? jQuery("
        ").append(res.responseText.replace(rscript, "")).find(selector) : res.responseText) } if (callback) { self.each(callback, [res.responseText, status, res]) } } }); return this }, serialize: function() { return jQuery.param(this.serializeArray()) }, serializeArray: function() { return this.map(function() { return this.elements ? jQuery.makeArray(this.elements) : this }).filter(function() { return this.name && !this.disabled && (this.checked || rselectTextarea.test(this.nodeName) || rinput.test(this.type)) }).map(function(i, elem) { var val = jQuery(this).val(); return val == null ? null: jQuery.isArray(val) ? jQuery.map(val, function(val, i) { return { name: elem.name, value: val } }) : { name: elem.name, value: val } }).get() } }); jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(i, o) { jQuery.fn[o] = function(f) { return this.bind(o, f) } }); jQuery.extend({ get: function(url, data, callback, type) { if (jQuery.isFunction(data)) { type = type || callback; callback = data; data = null } return jQuery.ajax({ type: "GET", url: url, data: data, success: callback, dataType: type }) }, getScript: function(url, callback) { return jQuery.get(url, null, callback, "script") }, getJSON: function(url, data, callback) { return jQuery.get(url, data, callback, "json") }, post: function(url, data, callback, type) { if (jQuery.isFunction(data)) { type = type || callback; callback = data; data = {} } return jQuery.ajax({ type: "POST", url: url, data: data, success: callback, dataType: type }) }, ajaxSetup: function(settings) { jQuery.extend(jQuery.ajaxSettings, settings) }, ajaxSettings: { url: location.href, global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ? function() { return new window.XMLHttpRequest() }: function() { try { return new window.ActiveXObject("Microsoft.XMLHTTP") } catch(e) {} }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*" } }, lastModified: {}, etag: {}, ajax: function(origSettings) { var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings); var jsonp, status, data, callbackContext = origSettings && origSettings.context || s, type = s.type.toUpperCase(); if (s.data && s.processData && typeof s.data !== "string") { s.data = jQuery.param(s.data, s.traditional) } if (s.dataType === "jsonp") { if (type === "GET") { if (!jsre.test(s.url)) { s.url += (rquery.test(s.url) ? "&": "?") + (s.jsonp || "callback") + "=?" } } else { if (!s.data || !jsre.test(s.data)) { s.data = (s.data ? s.data + "&": "") + (s.jsonp || "callback") + "=?" } } s.dataType = "json" } if (s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url))) { jsonp = s.jsonpCallback || ("jsonp" + jsc++); if (s.data) { s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1") } s.url = s.url.replace(jsre, "=" + jsonp + "$1"); s.dataType = "script"; window[jsonp] = window[jsonp] || function(tmp) { data = tmp; success(); complete(); window[jsonp] = undefined; try { delete window[jsonp] } catch(e) {} if (head) { head.removeChild(script) } } } if (s.dataType === "script" && s.cache === null) { s.cache = false } if (s.cache === false && type === "GET") { var ts = now(); var ret = s.url.replace(rts, "$1_=" + ts + "$2"); s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&": "?") + "_=" + ts: "") } if (s.data && type === "GET") { s.url += (rquery.test(s.url) ? "&": "?") + s.data } if (s.global && !jQuery.active++) { jQuery.event.trigger("ajaxStart") } var parts = rurl.exec(s.url), remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host); if (s.dataType === "script" && type === "GET" && remote) { var head = document.getElementsByTagName("head")[0] || document.documentElement; var script = document.createElement("script"); script.src = s.url; if (s.scriptCharset) { script.charset = s.scriptCharset } if (!jsonp) { var done = false; script.onload = script.onreadystatechange = function() { if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) { done = true; success(); complete(); script.onload = script.onreadystatechange = null; if (head && script.parentNode) { head.removeChild(script) } } } } head.insertBefore(script, head.firstChild); return undefined } var requestDone = false; var xhr = s.xhr(); if (!xhr) { return } if (s.username) { xhr.open(type, s.url, s.async, s.username, s.password) } else { xhr.open(type, s.url, s.async) } try { if (s.data || origSettings && origSettings.contentType) { xhr.setRequestHeader("Content-Type", s.contentType) } if (s.ifModified) { if (jQuery.lastModified[s.url]) { xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]) } if (jQuery.etag[s.url]) { xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]) } } if (!remote) { xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest") } xhr.setRequestHeader("Accept", s.dataType && s.accepts[s.dataType] ? s.accepts[s.dataType] + ", */*": s.accepts._default) } catch(e) {} if (s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false) { if (s.global && !--jQuery.active) { jQuery.event.trigger("ajaxStop") } xhr.abort(); return false } if (s.global) { trigger("ajaxSend", [xhr, s]) } var onreadystatechange = xhr.onreadystatechange = function(isTimeout) { if (!xhr || xhr.readyState === 0 || isTimeout === "abort") { if (!requestDone) { complete() } requestDone = true; if (xhr) { xhr.onreadystatechange = jQuery.noop } } else { if (!requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout")) { requestDone = true; xhr.onreadystatechange = jQuery.noop; status = isTimeout === "timeout" ? "timeout": !jQuery.httpSuccess(xhr) ? "error": s.ifModified && jQuery.httpNotModified(xhr, s.url) ? "notmodified": "success"; var errMsg; if (status === "success") { try { data = jQuery.httpData(xhr, s.dataType, s) } catch(err) { status = "parsererror"; errMsg = err } } if (status === "success" || status === "notmodified") { if (!jsonp) { success() } } else { jQuery.handleError(s, xhr, status, errMsg) } complete(); if (isTimeout === "timeout") { xhr.abort() } if (s.async) { xhr = null } } } }; try { var oldAbort = xhr.abort; xhr.abort = function() { if (xhr) { oldAbort.call(xhr) } onreadystatechange("abort") } } catch(e) {} if (s.async && s.timeout > 0) { setTimeout(function() { if (xhr && !requestDone) { onreadystatechange("timeout") } }, s.timeout) } try { xhr.send(type === "POST" || type === "PUT" || type === "DELETE" ? s.data: null) } catch(e) { jQuery.handleError(s, xhr, null, e); complete() } if (!s.async) { onreadystatechange() } function success() { if (s.success) { s.success.call(callbackContext, data, status, xhr) } if (s.global) { trigger("ajaxSuccess", [xhr, s]) } } function complete() { if (s.complete) { s.complete.call(callbackContext, xhr, status) } if (s.global) { trigger("ajaxComplete", [xhr, s]) } if (s.global && !--jQuery.active) { jQuery.event.trigger("ajaxStop") } } function trigger(type, args) { (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args) } return xhr }, handleError: function(s, xhr, status, e) { if (s.error) { s.error.call(s.context || s, xhr, status, e) } if (s.global) { (s.context ? jQuery(s.context) : jQuery.event).trigger("ajaxError", [xhr, s, e]) } }, active: 0, httpSuccess: function(xhr) { try { return ! xhr.status && location.protocol === "file:" || (xhr.status >= 200 && xhr.status < 300) || xhr.status === 304 || xhr.status === 1223 || xhr.status === 0 } catch(e) {} return false }, httpNotModified: function(xhr, url) { var lastModified = xhr.getResponseHeader("Last-Modified"), etag = xhr.getResponseHeader("Etag"); if (lastModified) { jQuery.lastModified[url] = lastModified } if (etag) { jQuery.etag[url] = etag } return xhr.status === 304 || xhr.status === 0 }, httpData: function(xhr, type, s) { var ct = xhr.getResponseHeader("content-type") || "", xml = type === "xml" || !type && ct.indexOf("xml") >= 0, data = xml ? xhr.responseXML: xhr.responseText; if (xml && data.documentElement.nodeName === "parsererror") { jQuery.error("parsererror") } if (s && s.dataFilter) { data = s.dataFilter(data, type) } if (typeof data === "string") { if (type === "json" || !type && ct.indexOf("json") >= 0) { data = jQuery.parseJSON(data) } else { if (type === "script" || !type && ct.indexOf("javascript") >= 0) { jQuery.globalEval(data) } } } return data }, param: function(a, traditional) { var s = []; if (traditional === undefined) { traditional = jQuery.ajaxSettings.traditional } if (jQuery.isArray(a) || a.jquery) { jQuery.each(a, function() { add(this.name, this.value) }) } else { for (var prefix in a) { buildParams(prefix, a[prefix]) } } return s.join("&").replace(r20, "+"); function buildParams(prefix, obj) { if (jQuery.isArray(obj)) { jQuery.each(obj, function(i, v) { if (traditional || /\[\]$/.test(prefix)) { add(prefix, v) } else { buildParams(prefix + "[" + (typeof v === "object" || jQuery.isArray(v) ? i: "") + "]", v) } }) } else { if (!traditional && obj != null && typeof obj === "object") { jQuery.each(obj, function(k, v) { buildParams(prefix + "[" + k + "]", v) }) } else { add(prefix, obj) } } } function add(key, value) { value = jQuery.isFunction(value) ? value() : value; s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value) } } }); var elemdisplay = {}, rfxtypes = /toggle|show|hide/, rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/, timerId, fxAttrs = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]]; jQuery.fn.extend({ show: function(speed, callback) { if (speed || speed === 0) { return this.animate(genFx("show", 3), speed, callback) } else { for (var i = 0, l = this.length; i < l; i++) { var old = jQuery.data(this[i], "olddisplay"); this[i].style.display = old || ""; if (jQuery.css(this[i], "display") === "none") { var nodeName = this[i].nodeName, display; if (elemdisplay[nodeName]) { display = elemdisplay[nodeName] } else { var elem = jQuery("<" + nodeName + " />").appendTo("body"); display = elem.css("display"); if (display === "none") { display = "block" } elem.remove(); elemdisplay[nodeName] = display } jQuery.data(this[i], "olddisplay", display) } } for (var j = 0, k = this.length; j < k; j++) { this[j].style.display = jQuery.data(this[j], "olddisplay") || "" } return this } }, hide: function(speed, callback) { if (speed || speed === 0) { return this.animate(genFx("hide", 3), speed, callback) } else { for (var i = 0, l = this.length; i < l; i++) { var old = jQuery.data(this[i], "olddisplay"); if (!old && old !== "none") { jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display")) } } for (var j = 0, k = this.length; j < k; j++) { this[j].style.display = "none" } return this } }, _toggle: jQuery.fn.toggle, toggle: function(fn, fn2) { var bool = typeof fn === "boolean"; if (jQuery.isFunction(fn) && jQuery.isFunction(fn2)) { this._toggle.apply(this, arguments) } else { if (fn == null || bool) { this.each(function() { var state = bool ? fn: jQuery(this).is(":hidden"); jQuery(this)[state ? "show": "hide"]() }) } else { this.animate(genFx("toggle", 3), fn, fn2) } } return this }, fadeTo: function(speed, to, callback) { return this.filter(":hidden").css("opacity", 0).show().end().animate({ opacity: to }, speed, callback) }, animate: function(prop, speed, easing, callback) { var optall = jQuery.speed(speed, easing, callback); if (jQuery.isEmptyObject(prop)) { return this.each(optall.complete) } return this[optall.queue === false ? "each": "queue"](function() { var opt = jQuery.extend({}, optall), p, hidden = this.nodeType === 1 && jQuery(this).is(":hidden"), self = this; for (p in prop) { var name = p.replace(rdashAlpha, fcamelCase); if (p !== name) { prop[name] = prop[p]; delete prop[p]; p = name } if (prop[p] === "hide" && hidden || prop[p] === "show" && !hidden) { return opt.complete.call(this) } if ((p === "height" || p === "width") && this.style) { opt.display = jQuery.css(this, "display"); opt.overflow = this.style.overflow } if (jQuery.isArray(prop[p])) { (opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1]; prop[p] = prop[p][0] } } if (opt.overflow != null) { this.style.overflow = "hidden" } opt.curAnim = jQuery.extend({}, prop); jQuery.each(prop, function(name, val) { var e = new jQuery.fx(self, opt, name); if (rfxtypes.test(val)) { e[val === "toggle" ? hidden ? "show": "hide": val](prop) } else { var parts = rfxnum.exec(val), start = e.cur(true) || 0; if (parts) { var end = parseFloat(parts[2]), unit = parts[3] || "px"; if (unit !== "px") { self.style[name] = (end || 1) + unit; start = ((end || 1) / e.cur(true)) * start; self.style[name] = start + unit } if (parts[1]) { end = ((parts[1] === "-=" ? -1: 1) * end) + start } e.custom(start, end, unit) } else { e.custom(start, val, "") } } }); return true }) }, stop: function(clearQueue, gotoEnd) { var timers = jQuery.timers; if (clearQueue) { this.queue([]) } this.each(function() { for (var i = timers.length - 1; i >= 0; i--) { if (timers[i].elem === this) { if (gotoEnd) { timers[i](true) } timers.splice(i, 1) } } }); if (!gotoEnd) { this.dequeue() } return this } }); jQuery.each({ slideDown: genFx("show", 1), slideUp: genFx("hide", 1), slideToggle: genFx("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" } }, function(name, props) { jQuery.fn[name] = function(speed, callback) { return this.animate(props, speed, callback) } }); jQuery.extend({ speed: function(speed, easing, fn) { var opt = speed && typeof speed === "object" ? speed: { complete: fn || !fn && easing || jQuery.isFunction(speed) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction(easing) && easing }; opt.duration = jQuery.fx.off ? 0: typeof opt.duration === "number" ? opt.duration: jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default; opt.old = opt.complete; opt.complete = function() { if (opt.queue !== false) { jQuery(this).dequeue() } if (jQuery.isFunction(opt.old)) { opt.old.call(this) } }; return opt }, easing: { linear: function(p, n, firstNum, diff) { return firstNum + diff * p }, swing: function(p, n, firstNum, diff) { return (( - Math.cos(p * Math.PI) / 2) + 0.5) * diff + firstNum } }, timers: [], fx: function(elem, options, prop) { this.options = options; this.elem = elem; this.prop = prop; if (!options.orig) { options.orig = {} } } }); jQuery.fx.prototype = { update: function() { if (this.options.step) { this.options.step.call(this.elem, this.now, this) } (jQuery.fx.step[this.prop] || jQuery.fx.step._default)(this); if ((this.prop === "height" || this.prop === "width") && this.elem.style) { this.elem.style.display = "block" } }, cur: function(force) { if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) { return this.elem[this.prop] } var r = parseFloat(jQuery.css(this.elem, this.prop, force)); return r && r > -10000 ? r: parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0 }, custom: function(from, to, unit) { this.startTime = now(); this.start = from; this.end = to; this.unit = unit || this.unit || "px"; this.now = this.start; this.pos = this.state = 0; var self = this; function t(gotoEnd) { return self.step(gotoEnd) } t.elem = this.elem; if (t() && jQuery.timers.push(t) && !timerId) { timerId = setInterval(jQuery.fx.tick, 13) } }, show: function() { this.options.orig[this.prop] = jQuery.style(this.elem, this.prop); this.options.show = true; this.custom(this.prop === "width" || this.prop === "height" ? 1: 0, this.cur()); jQuery(this.elem).show() }, hide: function() { this.options.orig[this.prop] = jQuery.style(this.elem, this.prop); this.options.hide = true; this.custom(this.cur(), 0) }, step: function(gotoEnd) { var t = now(), done = true; if (gotoEnd || t >= this.options.duration + this.startTime) { this.now = this.end; this.pos = this.state = 1; this.update(); this.options.curAnim[this.prop] = true; for (var i in this.options.curAnim) { if (this.options.curAnim[i] !== true) { done = false } } if (done) { if (this.options.display != null) { this.elem.style.overflow = this.options.overflow; var old = jQuery.data(this.elem, "olddisplay"); this.elem.style.display = old ? old: this.options.display; if (jQuery.css(this.elem, "display") === "none") { this.elem.style.display = "block" } } if (this.options.hide) { jQuery(this.elem).hide() } if (this.options.hide || this.options.show) { for (var p in this.options.curAnim) { jQuery.style(this.elem, p, this.options.orig[p]) } } this.options.complete.call(this.elem) } return false } else { var n = t - this.startTime; this.state = n / this.options.duration; var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop]; var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing": "linear"); this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration); this.now = this.start + ((this.end - this.start) * this.pos); this.update() } return true } }; jQuery.extend(jQuery.fx, { tick: function() { var timers = jQuery.timers; for (var i = 0; i < timers.length; i++) { if (!timers[i]()) { timers.splice(i--, 1) } } if (!timers.length) { jQuery.fx.stop() } }, stop: function() { clearInterval(timerId); timerId = null }, speeds: { slow: 600, fast: 200, _default: 400 }, step: { opacity: function(fx) { jQuery.style(fx.elem, "opacity", fx.now) }, _default: function(fx) { if (fx.elem.style && fx.elem.style[fx.prop] != null) { fx.elem.style[fx.prop] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit } else { fx.elem[fx.prop] = fx.now } } } }); if (jQuery.expr && jQuery.expr.filters) { jQuery.expr.filters.animated = function(elem) { return jQuery.grep(jQuery.timers, function(fn) { return elem === fn.elem }).length } } function genFx(type, num) { var obj = {}; jQuery.each(fxAttrs.concat.apply([], fxAttrs.slice(0, num)), function() { obj[this] = type }); return obj } if ("getBoundingClientRect" in document.documentElement) { jQuery.fn.offset = function(options) { var elem = this[0]; if (options) { return this.each(function(i) { jQuery.offset.setOffset(this, options, i) }) } if (!elem || !elem.ownerDocument) { return null } if (elem === elem.ownerDocument.body) { return jQuery.offset.bodyOffset(elem) } var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement, clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, top = box.top + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop) - clientTop, left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft; return { top: top, left: left } } } else { jQuery.fn.offset = function(options) { var elem = this[0]; if (options) { return this.each(function(i) { jQuery.offset.setOffset(this, options, i) }) } if (!elem || !elem.ownerDocument) { return null } if (elem === elem.ownerDocument.body) { return jQuery.offset.bodyOffset(elem) } jQuery.offset.initialize(); var offsetParent = elem.offsetParent, prevOffsetParent = elem, doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement, body = doc.body, defaultView = doc.defaultView, prevComputedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle, top = elem.offsetTop, left = elem.offsetLeft; while ((elem = elem.parentNode) && elem !== body && elem !== docElem) { if (jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed") { break } computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; top -= elem.scrollTop; left -= elem.scrollLeft; if (elem === offsetParent) { top += elem.offsetTop; left += elem.offsetLeft; if (jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName))) { top += parseFloat(computedStyle.borderTopWidth) || 0; left += parseFloat(computedStyle.borderLeftWidth) || 0 } prevOffsetParent = offsetParent, offsetParent = elem.offsetParent } if (jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible") { top += parseFloat(computedStyle.borderTopWidth) || 0; left += parseFloat(computedStyle.borderLeftWidth) || 0 } prevComputedStyle = computedStyle } if (prevComputedStyle.position === "relative" || prevComputedStyle.position === "static") { top += body.offsetTop; left += body.offsetLeft } if (jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed") { top += Math.max(docElem.scrollTop, body.scrollTop); left += Math.max(docElem.scrollLeft, body.scrollLeft) } return { top: top, left: left } } } jQuery.offset = { initialize: function() { var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat(jQuery.curCSS(body, "marginTop", true)) || 0, html = "
        "; jQuery.extend(container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" }); container.innerHTML = html; body.insertBefore(container, body.firstChild); innerDiv = container.firstChild; checkDiv = innerDiv.firstChild; td = innerDiv.nextSibling.firstChild.firstChild; this.doesNotAddBorder = (checkDiv.offsetTop !== 5); this.doesAddBorderForTableAndCells = (td.offsetTop === 5); checkDiv.style.position = "fixed", checkDiv.style.top = "20px"; this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15); checkDiv.style.position = checkDiv.style.top = ""; innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative"; this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5); this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop); body.removeChild(container); body = container = innerDiv = checkDiv = table = td = null; jQuery.offset.initialize = jQuery.noop }, bodyOffset: function(body) { var top = body.offsetTop, left = body.offsetLeft; jQuery.offset.initialize(); if (jQuery.offset.doesNotIncludeMarginInBodyOffset) { top += parseFloat(jQuery.curCSS(body, "marginTop", true)) || 0; left += parseFloat(jQuery.curCSS(body, "marginLeft", true)) || 0 } return { top: top, left: left } }, setOffset: function(elem, options, i) { if (/static/.test(jQuery.curCSS(elem, "position"))) { elem.style.position = "relative" } var curElem = jQuery(elem), curOffset = curElem.offset(), curTop = parseInt(jQuery.curCSS(elem, "top", true), 10) || 0, curLeft = parseInt(jQuery.curCSS(elem, "left", true), 10) || 0; if (jQuery.isFunction(options)) { options = options.call(elem, i, curOffset) } var props = { top: (options.top - curOffset.top) + curTop, left: (options.left - curOffset.left) + curLeft }; if ("using" in options) { options.using.call(elem, props) } else { curElem.css(props) } } }; jQuery.fn.extend({ position: function() { if (!this[0]) { return null } var elem = this[0], offsetParent = this.offsetParent(), offset = this.offset(), parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 }: offsetParent.offset(); offset.top -= parseFloat(jQuery.curCSS(elem, "marginTop", true)) || 0; offset.left -= parseFloat(jQuery.curCSS(elem, "marginLeft", true)) || 0; parentOffset.top += parseFloat(jQuery.curCSS(offsetParent[0], "borderTopWidth", true)) || 0; parentOffset.left += parseFloat(jQuery.curCSS(offsetParent[0], "borderLeftWidth", true)) || 0; return { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left } }, offsetParent: function() { return this.map(function() { var offsetParent = this.offsetParent || document.body; while (offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static")) { offsetParent = offsetParent.offsetParent } return offsetParent }) } }); jQuery.each(["Left", "Top"], function(i, name) { var method = "scroll" + name; jQuery.fn[method] = function(val) { var elem = this[0], win; if (!elem) { return null } if (val !== undefined) { return this.each(function() { win = getWindow(this); if (win) { win.scrollTo(!i ? val: jQuery(win).scrollLeft(), i ? val: jQuery(win).scrollTop()) } else { this[method] = val } }) } else { win = getWindow(elem); return win ? ("pageXOffset" in win) ? win[i ? "pageYOffset": "pageXOffset"] : jQuery.support.boxModel && win.document.documentElement[method] || win.document.body[method] : elem[method] } } }); function getWindow(elem) { return ("scrollTo" in elem && elem.document) ? elem: elem.nodeType === 9 ? elem.defaultView || elem.parentWindow: false } jQuery.each(["Height", "Width"], function(i, name) { var type = name.toLowerCase(); jQuery.fn["inner" + name] = function() { return this[0] ? jQuery.css(this[0], type, false, "padding") : null }; jQuery.fn["outer" + name] = function(margin) { return this[0] ? jQuery.css(this[0], type, false, margin ? "margin": "border") : null }; jQuery.fn[type] = function(size) { var elem = this[0]; if (!elem) { return size == null ? null: this } if (jQuery.isFunction(size)) { return this.each(function(i) { var self = jQuery(this); self[type](size.call(this, i, self[type]())) }) } return ("scrollTo" in elem && elem.document) ? elem.document.compatMode === "CSS1Compat" && elem.document.documentElement["client" + name] || elem.document.body["client" + name] : (elem.nodeType === 9) ? Math.max(elem.documentElement["client" + name], elem.body["scroll" + name], elem.documentElement["scroll" + name], elem.body["offset" + name], elem.documentElement["offset" + name]) : size === undefined ? jQuery.css(elem, type) : this.css(type, typeof size === "string" ? size: size + "px") } }); window.jQuery = window.$ = jQuery })(window); /* * jQuery UI 1.8.4 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI */ (function(A, C) { A.ui = A.ui || {}; if (A.ui.version) { return } A.extend(A.ui, { version: "1.8.4", plugin: { add: function(E, F, H) { var G = A.ui[E].prototype; for (var D in H) { G.plugins[D] = G.plugins[D] || []; G.plugins[D].push([F, H[D]]) } }, call: function(D, F, E) { var H = D.plugins[F]; if (!H || !D.element[0].parentNode) { return } for (var G = 0; G < H.length; G++) { if (D.options[H[G][0]]) { H[G][1].apply(D.element, E) } } } }, contains: function(E, D) { return document.compareDocumentPosition ? E.compareDocumentPosition(D) & 16: E !== D && E.contains(D) }, hasScroll: function(G, E) { if (A(G).css("overflow") === "hidden") { return false } var D = (E && E === "left") ? "scrollLeft": "scrollTop", F = false; if (G[D] > 0) { return true } G[D] = 1; F = (G[D] > 0); G[D] = 0; return F }, isOverAxis: function(E, D, F) { return (E > D) && (E < (D + F)) }, isOver: function(I, E, H, G, D, F) { return A.ui.isOverAxis(I, H, D) && A.ui.isOverAxis(E, G, F) }, keyCode: { ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38, WINDOWS: 91 } }); A.fn.extend({ _focus: A.fn.focus, focus: function(D, E) { return typeof D === "number" ? this.each(function() { var F = this; setTimeout(function() { A(F).focus(); if (E) { E.call(F) } }, D) }) : this._focus.apply(this, arguments) }, enableSelection: function() { return this.attr("unselectable", "off").css("MozUserSelect", "") }, disableSelection: function() { return this.attr("unselectable", "on").css("MozUserSelect", "none") }, scrollParent: function() { var D; if ((A.browser.msie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { D = this.parents().filter(function() { return (/(relative|absolute|fixed)/).test(A.curCSS(this, "position", 1)) && (/(auto|scroll)/).test(A.curCSS(this, "overflow", 1) + A.curCSS(this, "overflow-y", 1) + A.curCSS(this, "overflow-x", 1)) }).eq(0) } else { D = this.parents().filter(function() { return (/(auto|scroll)/).test(A.curCSS(this, "overflow", 1) + A.curCSS(this, "overflow-y", 1) + A.curCSS(this, "overflow-x", 1)) }).eq(0) } return (/fixed/).test(this.css("position")) || !D.length ? A(document) : D }, zIndex: function(G) { if (G !== C) { return this.css("zIndex", G) } if (this.length) { var E = A(this[0]), D, F; while (E.length && E[0] !== document) { D = E.css("position"); if (D === "absolute" || D === "relative" || D === "fixed") { F = parseInt(E.css("zIndex")); if (!isNaN(F) && F != 0) { return F } } E = E.parent() } } return 0 } }); A.each(["Width", "Height"], function(F, D) { var E = D === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], G = D.toLowerCase(), I = { innerWidth: A.fn.innerWidth, innerHeight: A.fn.innerHeight, outerWidth: A.fn.outerWidth, outerHeight: A.fn.outerHeight }; function H(L, K, J, M) { A.each(E, function() { K -= parseFloat(A.curCSS(L, "padding" + this, true)) || 0; if (J) { K -= parseFloat(A.curCSS(L, "border" + this + "Width", true)) || 0 } if (M) { K -= parseFloat(A.curCSS(L, "margin" + this, true)) || 0 } }); return K } A.fn["inner" + D] = function(J) { if (J === C) { return I["inner" + D].call(this) } return this.each(function() { A.style(this, G, H(this, J) + "px") }) }; A.fn["outer" + D] = function(J, K) { if (typeof J !== "number") { return I["outer" + D].call(this, J) } return this.each(function() { A.style(this, G, H(this, J, true, K) + "px") }) } }); function B(D) { return ! A(D).parents().andSelf().filter(function() { return A.curCSS(this, "visibility") === "hidden" || A.expr.filters.hidden(this) }).length } A.extend(A.expr[":"], { data: function(F, E, D) { return !! A.data(F, D[3]) }, focusable: function(F) { var I = F.nodeName.toLowerCase(), D = A.attr(F, "tabindex"); if ("area" === I) { var H = F.parentNode, G = H.name, E; if (!F.href || !G || H.nodeName.toLowerCase() !== "map") { return false } E = A("img[usemap=#" + G + "]")[0]; return !! E && B(E) } return (/input|select|textarea|button|object/.test(I) ? !F.disabled: "a" == I ? F.href || !isNaN(D) : !isNaN(D)) && B(F) }, tabbable: function(E) { var D = A.attr(E, "tabindex"); return (isNaN(D) || D >= 0) && A(E).is(":focusable") } }) })(jQuery); /* * jQuery UI Widget 1.8.4 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Widget */ (function(B, C) { var A = B.fn.remove; B.fn.remove = function(D, E) { return this.each(function() { if (!E) { if (!D || B.filter(D, [this]).length) { B("*", this).add([this]).each(function() { B(this).triggerHandler("remove") }) } } return A.call(B(this), D, E) }) }; B.widget = function(E, G, D) { var F = E.split(".")[0], I; E = E.split(".")[1]; I = F + "-" + E; if (!D) { D = G; G = B.Widget } B.expr[":"][I] = function(J) { return !! B.data(J, E) }; B[F] = B[F] || {}; B[F][E] = function(J, K) { if (arguments.length) { this._createWidget(J, K) } }; var H = new G(); H.options = B.extend(true, {}, H.options); B[F][E].prototype = B.extend(true, H, { namespace: F, widgetName: E, widgetEventPrefix: B[F][E].prototype.widgetEventPrefix || E, widgetBaseClass: I }, D); B.widget.bridge(E, B[F][E]) }; B.widget.bridge = function(E, D) { B.fn[E] = function(H) { var F = typeof H === "string", G = Array.prototype.slice.call(arguments, 1), I = this; H = !F && G.length ? B.extend.apply(null, [true, H].concat(G)) : H; if (F && H.substring(0, 1) === "_") { return I } if (F) { this.each(function() { var J = B.data(this, E), K = J && B.isFunction(J[H]) ? J[H].apply(J, G) : J; if (K !== J && K !== C) { I = K; return false } }) } else { this.each(function() { var J = B.data(this, E); if (J) { if (H) { J.option(H) } J._init() } else { B.data(this, E, new D(H, this)) } }) } return I } }; B.Widget = function(D, E) { if (arguments.length) { this._createWidget(D, E) } }; B.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", options: { disabled: false }, _createWidget: function(E, F) { B.data(F, this.widgetName, this); this.element = B(F); this.options = B.extend(true, {}, this.options, B.metadata && B.metadata.get(F)[this.widgetName], E); var D = this; this.element.bind("remove." + this.widgetName, function() { D.destroy() }); this._create(); this._init() }, _create: function() {}, _init: function() {}, destroy: function() { this.element.unbind("." + this.widgetName).removeData(this.widgetName); this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled ui-state-disabled") }, widget: function() { return this.element }, option: function(F, G) { var E = F, D = this; if (arguments.length === 0) { return B.extend({}, D.options) } if (typeof F === "string") { if (G === C) { return this.options[F] } E = {}; E[F] = G } B.each(E, function(H, I) { D._setOption(H, I) }); return D }, _setOption: function(D, E) { this.options[D] = E; if (D === "disabled") { this.widget()[E ? "addClass": "removeClass"](this.widgetBaseClass + "-disabled ui-state-disabled").attr("aria-disabled", E) } return this }, enable: function() { return this._setOption("disabled", false) }, disable: function() { return this._setOption("disabled", true) }, _trigger: function(E, F, G) { var I = this.options[E]; F = B.Event(F); F.type = (E === this.widgetEventPrefix ? E: this.widgetEventPrefix + E).toLowerCase(); G = G || {}; if (F.originalEvent) { for (var D = B.event.props.length, H; D;) { H = B.event.props[--D]; F[H] = F.originalEvent[H] } } this.element.trigger(F, G); return ! (B.isFunction(I) && I.call(this.element[0], F, G) === false || F.isDefaultPrevented()) } } })(jQuery); /* * jQuery UI Mouse 1.8.4 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Mouse * * Depends: * jquery.ui.widget.js */ (function(A, B) { A.widget("ui.mouse", { options: { cancel: ":input,option", distance: 1, delay: 0 }, _mouseInit: function() { var C = this; this.element.bind("mousedown." + this.widgetName, function(D) { return C._mouseDown(D) }).bind("click." + this.widgetName, function(D) { if (C._preventClickEvent) { C._preventClickEvent = false; D.stopImmediatePropagation(); return false } }); this.started = false }, _mouseDestroy: function() { this.element.unbind("." + this.widgetName) }, _mouseDown: function(E) { E.originalEvent = E.originalEvent || {}; if (E.originalEvent.mouseHandled) { return } (this._mouseStarted && this._mouseUp(E)); this._mouseDownEvent = E; var D = this, F = (E.which == 1), C = (typeof this.options.cancel == "string" ? A(E.target).parents().add(E.target).filter(this.options.cancel).length: false); if (!F || C || !this._mouseCapture(E)) { return true } this.mouseDelayMet = !this.options.delay; if (!this.mouseDelayMet) { this._mouseDelayTimer = setTimeout(function() { D.mouseDelayMet = true }, this.options.delay) } if (this._mouseDistanceMet(E) && this._mouseDelayMet(E)) { this._mouseStarted = (this._mouseStart(E) !== false); if (!this._mouseStarted) { E.preventDefault(); return true } } this._mouseMoveDelegate = function(G) { return D._mouseMove(G) }; this._mouseUpDelegate = function(G) { return D._mouseUp(G) }; A(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate); (A.browser.safari || E.preventDefault()); E.originalEvent.mouseHandled = true; return true }, _mouseMove: function(C) { if (A.browser.msie && !C.button) { return this._mouseUp(C) } if (this._mouseStarted) { this._mouseDrag(C); return C.preventDefault() } if (this._mouseDistanceMet(C) && this._mouseDelayMet(C)) { this._mouseStarted = (this._mouseStart(this._mouseDownEvent, C) !== false); (this._mouseStarted ? this._mouseDrag(C) : this._mouseUp(C)) } return ! this._mouseStarted }, _mouseUp: function(C) { A(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate); if (this._mouseStarted) { this._mouseStarted = false; this._preventClickEvent = (C.target == this._mouseDownEvent.target); this._mouseStop(C) } return false }, _mouseDistanceMet: function(C) { return (Math.max(Math.abs(this._mouseDownEvent.pageX - C.pageX), Math.abs(this._mouseDownEvent.pageY - C.pageY)) >= this.options.distance) }, _mouseDelayMet: function(C) { return this.mouseDelayMet }, _mouseStart: function(C) {}, _mouseDrag: function(C) {}, _mouseStop: function(C) {}, _mouseCapture: function(C) { return true } }) })(jQuery); (function(A, B) { A.widget("ui.draggable", A.ui.mouse, { widgetEventPrefix: "drag", options: { addClasses: true, appendTo: "parent", axis: false, connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, grid: false, handle: false, helper: "original", iframeFix: false, opacity: false, refreshPositions: false, revert: false, revertDuration: 500, scope: "default", scroll: true, scrollSensitivity: 20, scrollSpeed: 20, snap: false, snapMode: "both", snapTolerance: 20, stack: false, zIndex: false }, _create: function() { if (this.options.helper == "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) { this.element[0].style.position = "relative" } (this.options.addClasses && this.element.addClass("ui-draggable")); (this.options.disabled && this.element.addClass("ui-draggable-disabled")); this._mouseInit() }, destroy: function() { if (!this.element.data("draggable")) { return } this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"); this._mouseDestroy(); return this }, _mouseCapture: function(C) { var D = this.options; if (this.helper || D.disabled || A(C.target).is(".ui-resizable-handle")) { return false } this.handle = this._getHandle(C); if (!this.handle) { return false } return true }, _mouseStart: function(C) { var D = this.options; this.helper = this._createHelper(C); this._cacheHelperProportions(); if (A.ui.ddmanager) { A.ui.ddmanager.current = this } this._cacheMargins(); this.cssPosition = this.helper.css("position"); this.scrollParent = this.helper.scrollParent(); this.offset = this.positionAbs = this.element.offset(); this.offset = { top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left }; A.extend(this.offset, { click: { left: C.pageX - this.offset.left, top: C.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }); this.originalPosition = this.position = this._generatePosition(C); this.originalPageX = C.pageX; this.originalPageY = C.pageY; (D.cursorAt && this._adjustOffsetFromHelper(D.cursorAt)); if (D.containment) { this._setContainment() } if (this._trigger("start", C) === false) { this._clear(); return false } this._cacheHelperProportions(); if (A.ui.ddmanager && !D.dropBehaviour) { A.ui.ddmanager.prepareOffsets(this, C) } this.helper.addClass("ui-draggable-dragging"); this._mouseDrag(C, true); return true }, _mouseDrag: function(C, E) { this.position = this._generatePosition(C); this.positionAbs = this._convertPositionTo("absolute"); if (!E) { var D = this._uiHash(); if (this._trigger("drag", C, D) === false) { this._mouseUp({}); return false } this.position = D.position } if (!this.options.axis || this.options.axis != "y") { this.helper[0].style.left = this.position.left + "px" } if (!this.options.axis || this.options.axis != "x") { this.helper[0].style.top = this.position.top + "px" } if (A.ui.ddmanager) { A.ui.ddmanager.drag(this, C) } return false }, _mouseStop: function(D) { var E = false; if (A.ui.ddmanager && !this.options.dropBehaviour) { E = A.ui.ddmanager.drop(this, D) } if (this.dropped) { E = this.dropped; this.dropped = false } if (!this.element[0] || !this.element[0].parentNode) { return false } if ((this.options.revert == "invalid" && !E) || (this.options.revert == "valid" && E) || this.options.revert === true || (A.isFunction(this.options.revert) && this.options.revert.call(this.element, E))) { var C = this; A(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { if (C._trigger("stop", D) !== false) { C._clear() } }) } else { if (this._trigger("stop", D) !== false) { this._clear() } } return false }, cancel: function() { if (this.helper.is(".ui-draggable-dragging")) { this._mouseUp({}) } else { this._clear() } return this }, _getHandle: function(C) { var D = !this.options.handle || !A(this.options.handle, this.element).length ? true: false; A(this.options.handle, this.element).find("*").andSelf().each(function() { if (this == C.target) { D = true } }); return D }, _createHelper: function(D) { var E = this.options; var C = A.isFunction(E.helper) ? A(E.helper.apply(this.element[0], [D])) : (E.helper == "clone" ? this.element.clone() : this.element); if (!C.parents("body").length) { C.appendTo((E.appendTo == "parent" ? this.element[0].parentNode: E.appendTo)) } if (C[0] != this.element[0] && !(/(fixed|absolute)/).test(C.css("position"))) { C.css("position", "absolute") } return C }, _adjustOffsetFromHelper: function(C) { if (typeof C == "string") { C = C.split(" ") } if (A.isArray(C)) { C = { left: +C[0], top: +C[1] || 0 } } if ("left" in C) { this.offset.click.left = C.left + this.margins.left } if ("right" in C) { this.offset.click.left = this.helperProportions.width - C.right + this.margins.left } if ("top" in C) { this.offset.click.top = C.top + this.margins.top } if ("bottom" in C) { this.offset.click.top = this.helperProportions.height - C.bottom + this.margins.top } }, _getParentOffset: function() { this.offsetParent = this.helper.offsetParent(); var C = this.offsetParent.offset(); if (this.cssPosition == "absolute" && this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) { C.left += this.scrollParent.scrollLeft(); C.top += this.scrollParent.scrollTop() } if ((this.offsetParent[0] == document.body) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && A.browser.msie)) { C = { top: 0, left: 0 } } return { top: C.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: C.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function() { if (this.cssPosition == "relative") { var C = this.element.position(); return { top: C.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: C.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() } } else { return { top: 0, left: 0 } } }, _cacheMargins: function() { this.margins = { left: (parseInt(this.element.css("marginLeft"), 10) || 0), top: (parseInt(this.element.css("marginTop"), 10) || 0) } }, _cacheHelperProportions: function() { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() } }, _setContainment: function() { var F = this.options; if (F.containment == "parent") { F.containment = this.helper[0].parentNode } if (F.containment == "document" || F.containment == "window") { this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, A(F.containment == "document" ? document: window).width() - this.helperProportions.width - this.margins.left, (A(F.containment == "document" ? document: window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] } if (! (/^(document|window|parent)$/).test(F.containment) && F.containment.constructor != Array) { var D = A(F.containment)[0]; if (!D) { return } var E = A(F.containment).offset(); var C = (A(D).css("overflow") != "hidden"); this.containment = [E.left + (parseInt(A(D).css("borderLeftWidth"), 10) || 0) + (parseInt(A(D).css("paddingLeft"), 10) || 0) - this.margins.left, E.top + (parseInt(A(D).css("borderTopWidth"), 10) || 0) + (parseInt(A(D).css("paddingTop"), 10) || 0) - this.margins.top, E.left + (C ? Math.max(D.scrollWidth, D.offsetWidth) : D.offsetWidth) - (parseInt(A(D).css("borderLeftWidth"), 10) || 0) - (parseInt(A(D).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, E.top + (C ? Math.max(D.scrollHeight, D.offsetHeight) : D.offsetHeight) - (parseInt(A(D).css("borderTopWidth"), 10) || 0) - (parseInt(A(D).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top] } else { if (F.containment.constructor == Array) { this.containment = F.containment } } }, _convertPositionTo: function(F, H) { if (!H) { H = this.position } var D = F == "absolute" ? 1: -1; var E = this.options, C = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent, G = (/(html|body)/i).test(C[0].tagName); return { top: (H.top + this.offset.relative.top * D + this.offset.parent.top * D - (A.browser.safari && A.browser.version < 526 && this.cssPosition == "fixed" ? 0: (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (G ? 0: C.scrollTop())) * D)), left: (H.left + this.offset.relative.left * D + this.offset.parent.left * D - (A.browser.safari && A.browser.version < 526 && this.cssPosition == "fixed" ? 0: (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : G ? 0: C.scrollLeft()) * D)) } }, _generatePosition: function(F) { var I = this.options, C = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent, J = (/(html|body)/i).test(C[0].tagName); var E = F.pageX; var D = F.pageY; if (this.originalPosition) { if (this.containment) { if (F.pageX - this.offset.click.left < this.containment[0]) { E = this.containment[0] + this.offset.click.left } if (F.pageY - this.offset.click.top < this.containment[1]) { D = this.containment[1] + this.offset.click.top } if (F.pageX - this.offset.click.left > this.containment[2]) { E = this.containment[2] + this.offset.click.left } if (F.pageY - this.offset.click.top > this.containment[3]) { D = this.containment[3] + this.offset.click.top } } if (I.grid) { var H = this.originalPageY + Math.round((D - this.originalPageY) / I.grid[1]) * I.grid[1]; D = this.containment ? (!(H - this.offset.click.top < this.containment[1] || H - this.offset.click.top > this.containment[3]) ? H: (!(H - this.offset.click.top < this.containment[1]) ? H - I.grid[1] : H + I.grid[1])) : H; var G = this.originalPageX + Math.round((E - this.originalPageX) / I.grid[0]) * I.grid[0]; E = this.containment ? (!(G - this.offset.click.left < this.containment[0] || G - this.offset.click.left > this.containment[2]) ? G: (!(G - this.offset.click.left < this.containment[0]) ? G - I.grid[0] : G + I.grid[0])) : G } } return { top: (D - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (A.browser.safari && A.browser.version < 526 && this.cssPosition == "fixed" ? 0: (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (J ? 0: C.scrollTop())))), left: (E - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (A.browser.safari && A.browser.version < 526 && this.cssPosition == "fixed" ? 0: (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : J ? 0: C.scrollLeft()))) } }, _clear: function() { this.helper.removeClass("ui-draggable-dragging"); if (this.helper[0] != this.element[0] && !this.cancelHelperRemoval) { this.helper.remove() } this.helper = null; this.cancelHelperRemoval = false }, _trigger: function(C, D, E) { E = E || this._uiHash(); A.ui.plugin.call(this, C, [D, E]); if (C == "drag") { this.positionAbs = this._convertPositionTo("absolute") } return A.Widget.prototype._trigger.call(this, C, D, E) }, plugins: {}, _uiHash: function(C) { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs } } }); A.extend(A.ui.draggable, { version: "1.8.4" }) })(jQuery); /* * Modernizr JavaScript library 1.5 * http://www.modernizr.com/ * * Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/ * Dual-licensed under the BSD and MIT licenses. * http://www.modernizr.com/license/ * * Featuring major contributions by * Paul Irish - http://paulirish.com */ window.Modernizr = (function(AA, N, X) { var AM = "1.5", u = {}, AG = true, AR = N.documentElement, H = "modernizr", AH = N.createElement(H), L = AH.style, AO = N.createElement("input"), Q = "canvas", AN = "canvastext", AJ = "rgba", J = "hsla", AB = "multiplebgs", E = "backgroundsize", i = "borderimage", p = "borderradius", e = "boxshadow", AL = "opacity", n = "cssanimations", AE = "csscolumns", C = "cssgradients", S = "cssreflections", K = "csstransforms", g = "csstransforms3d", AP = "csstransitions", v = "geolocation", I = "video", l = "audio", F = "input", c = F + "types", G = "svg", R = "smil", P = G + "clippaths", z = "background", B = z + "Color", r = "canPlayType", x = "localStorage", W = "sessionStorage", A = "applicationCache", o = "webworkers", U = "hashchange", y = "crosswindowmessaging", M = "historymanagement", AF = "draganddrop", AK = "websqldatabase", AI = "indexedDB", D = "websockets", AD = ":)", t = Object.prototype.toString, Z = " -o- -moz- -ms- -webkit- -khtml- ".split(" "), a = {}, k = {}, V = {}, O = [], d = (function() { var AS = { select: "input", change: "input", submit: "form", reset: "form", error: "img", load: "img", abort: "img" }, f = {}; function m(AT, AW) { var AV = (arguments.length == 1); if (AV && f[AT]) { return f[AT] } AW = AW || document.createElement(AS[AT] || "div"); AT = "on" + AT; var AU = (AT in AW); if (!AU && AW.setAttribute) { AW.setAttribute(AT, "return;"); AU = typeof AW[AT] == "function" } AW = null; return AV ? (f[AT] = AU) : AU } return m })(); var Y = ({}).hasOwnProperty, T; if (typeof Y !== "undefined" && typeof Y.call !== "undefined") { T = function(f, m) { return Y.call(f, m) } } else { T = function(f, m) { return ((m in f) && typeof f.constructor.prototype[m] === "undefined") } } function j(f) { L.cssText = f } function q(m, f) { return j(Z.join(m + ";") + (f || "")) } function s(m, f) { return ("" + m).indexOf(f) !== -1 } function AQ(m, AS) { for (var f in m) { if (L[m[f]] !== X && (!AS || AS(m[f], AH))) { return true } } } function b(AT, AS) { var m = AT.charAt(0).toUpperCase() + AT.substr(1), f = [AT, "Webkit" + m, "Moz" + m, "O" + m, "ms" + m, "Khtml" + m]; return !! AQ(f, AS) } a[Q] = function() { return !! N.createElement(Q).getContext }; a[AN] = function() { return !! (a[Q]() && typeof N.createElement(Q).getContext("2d").fillText == "function") }; a[v] = function() { return !! navigator.geolocation }; a[y] = function() { return !! AA.postMessage }; a[AK] = function() { var f = !!AA.openDatabase; if (f) { try { f = !!openDatabase("testdb", "1.0", "html5 test db", 200000) } catch(m) { f = false } } return f }; a[AI] = function() { return !! AA[AI] }; a[U] = function() { return d(U, AA) && (document.documentMode === X || document.documentMode > 7) }; a[M] = function() { return !! (AA.history && history.pushState) }; a[AF] = function() { return d("drag") && d("dragstart") && d("dragenter") && d("dragover") && d("dragleave") && d("dragend") && d("drop") }; a[D] = function() { return ("WebSocket" in AA) }; a[AJ] = function() { j(z + "-color:rgba(150,255,150,.5)"); return s(L[B], AJ) }; a[J] = function() { j(z + "-color:hsla(120,40%,100%,.5)"); return s(L[B], AJ) }; a[AB] = function() { j(z + ":url(//:),url(//:),red url(//:)"); return new RegExp("(url\\s*\\(.*?){3}").test(L[z]) }; a[E] = function() { return b(z + "Size") }; a[i] = function() { return b("borderImage") }; a[p] = function() { return b("borderRadius", "", function(f) { return s(f, "orderRadius") }) }; a[e] = function() { return b("boxShadow") }; a[AL] = function() { q("opacity:.5"); return s(L[AL], "0.5") }; a[n] = function() { return b("animationName") }; a[AE] = function() { return b("columnCount") }; a[C] = function() { var AS = z + "-image:", m = "gradient(linear,left top,right bottom,from(#9f9),to(white));", f = "linear-gradient(left top,#9f9, white);"; j((AS + Z.join(m + AS) + Z.join(f + AS)).slice(0, -AS.length)); return s(L.backgroundImage, "gradient") }; a[S] = function() { return b("boxReflect") }; a[K] = function() { return !! AQ(["transformProperty", "WebkitTransform", "MozTransform", "OTransform", "msTransform"]) }; a[g] = function() { var m = !!AQ(["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"]); if (m) { var f = document.createElement("style"), AS = N.createElement("div"); f.textContent = "@media (" + Z.join("transform-3d),(") + "modernizr){#modernizr{height:3px}}"; N.getElementsByTagName("head")[0].appendChild(f); AS.id = "modernizr"; AR.appendChild(AS); m = AS.offsetHeight === 3; f.parentNode.removeChild(f); AS.parentNode.removeChild(AS) } return m }; a[AP] = function() { return b("transitionProperty") }; a[I] = function() { var m = N.createElement(I), f = !!m[r]; if (f) { f = new Boolean(f); f.ogg = m[r]('video/ogg; codecs="theora"'); f.h264 = m[r]('video/mp4; codecs="avc1.42E01E"'); f.webm = m[r]('video/webm; codecs="vp8, vorbis"') } return f }; a[l] = function() { var m = N.createElement(l), f = !!m[r]; if (f) { f = new Boolean(f); f.ogg = m[r]('audio/ogg; codecs="vorbis"'); f.mp3 = m[r]("audio/mpeg;"); f.wav = m[r]('audio/wav; codecs="1"'); f.m4a = m[r]("audio/x-m4a;") || m[r]("audio/aac;") } return f }; a[x] = function() { return ("localStorage" in AA) && AA[x] !== null }; a[W] = function() { try { return ("sessionStorage" in AA) && AA[W] !== null } catch(f) { return false } }; a[o] = function() { return !! AA.Worker }; a[A] = function() { var f = AA[A]; return !! (f && (typeof f.status != "undefined") && (typeof f.update == "function") && (typeof f.swapCache == "function")) }; a[G] = function() { return !! N.createElementNS && !!N.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect }; a[R] = function() { return !! N.createElementNS && /SVG/.test(t.call(N.createElementNS("http://www.w3.org/2000/svg", "animate"))) }; a[P] = function() { return !! N.createElementNS && /SVG/.test(t.call(N.createElementNS("http://www.w3.org/2000/svg", "clipPath"))) }; function AC() { u[F] = (function(AS) { for (var m = 0, f = AS.length; m < f; m++) { V[AS[m]] = !!(AS[m] in AO) } return V })("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")); u[c] = (function(AT) { for (var AS = 0, m, f = AT.length; AS < f; AS++) { AO.setAttribute("type", AT[AS]); m = AO.type !== "text"; if (m) { AO.value = AD; if (/tel|search/.test(AO.type)) {} else { if (/url|email/.test(AO.type)) { m = AO.checkValidity && AO.checkValidity() === false } else { m = AO.value != AD } } } k[AT[AS]] = !!m } return k })("search tel url email datetime date month week time datetime-local number range color".split(" ")) } for (var w in a) { if (T(a, w)) { O.push(((u[w.toLowerCase()] = a[w]()) ? "": "no-") + w.toLowerCase()) } } if (!u[F]) { AC() } u.addTest = function(f, m) { f = f.toLowerCase(); if (u[f]) { return } m = !!(m()); AR.className += " " + (m ? "": "no-") + f; u[f] = m; return u }; j(""); AH = AO = null; if (AG && (function() { var f = N.createElement("div"); f.innerHTML = ""; return f.childNodes.length !== 1 })()) { (function(AU, Ad) { function AT(m, f) { if (Ab[m]) { Ab[m].styleSheet.cssText += f } else { var Ai = AS[AY], Ah = Ad[AZ]("style"); Ah.media = m; Ai.insertBefore(Ah, Ai[AY]); Ab[m] = Ah; AT(m, f) } } function Ag(m, f) { for (var Aj = new RegExp("\\b(" + AX + ")\\b(?!.*[;}])", "gi"), Ai = function(Ak) { return ".iepp_" + Ak }, Ah = -1; ++Ah < m.length;) { f = m[Ah].media || f; Ag(m[Ah].imports, f); AT(f, m[Ah].cssText.replace(Aj, Ai)) } } function Af() { for (var m, f = Ad.getElementsByTagName("*"), Ak, Aj, Ai = new RegExp("^" + AX + "$", "i"), Ah = -1; ++Ah < f.length;) { if ((m = f[Ah]) && (Aj = m.nodeName.match(Ai))) { Ak = new RegExp("^\\s*<" + Aj + "(.*)\\/" + Aj + ">\\s*$", "i"); Aa.innerHTML = m.outerHTML.replace(/\r|\n/g, " ").replace(Ak, m.currentStyle.display == "block" ? "": ""); Ak = Aa.childNodes[0]; Ak.className += " iepp_" + Aj; Ak = Ac[Ac.length] = [m, Ak]; m.parentNode.replaceChild(Ak[1], Ak[0]) } } Ag(Ad.styleSheets, "all") } function Ae() { for (var m = -1, f; ++m < Ac.length;) { Ac[m][1].parentNode.replaceChild(Ac[m][0], Ac[m][1]) } for (f in Ab) { AS[AY].removeChild(Ab[f]) } Ab = {}; Ac = [] } for (var AS = Ad.documentElement, Aa = Ad.createDocumentFragment(), Ab = {}, AX = "abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video", AW = AX.split("|"), Ac = [], AV = -1, AY = "firstChild", AZ = "createElement"; ++AV < AW.length;) { Ad[AZ](AW[AV]); Aa[AZ](AW[AV]) } Aa = Aa.appendChild(Ad[AZ]("div")); AU.attachEvent("onbeforeprint", Af); AU.attachEvent("onafterprint", Ae) })(this, N) } u._enableHTML5 = AG; u._version = AM; AR.className = AR.className.replace(/\bno-js\b/, "") + " js"; return u })(this, this.document); (function(B) { var A = (function() { var E = { select: "input", change: "input", submit: "form", reset: "form", error: "img", load: "img", abort: "img" }, C = {}; function D(F, I) { var H = (arguments.length == 1); if (H && C[F]) { return C[F] } I = I || document.createElement(E[F] || "div"); F = "on" + F; var G = (F in I); if (!G && I.setAttribute) { I.setAttribute(F, "return;"); G = typeof I[F] == "function" } I = null; return H ? (C[F] = G) : G } return D })(); B.fn.hashchange = function(D) { if (A("hashchange", window) && (document.documentMode === undefined || document.documentMode > 7)) { this.bind("hashchange", D) } else { var C = location.hash; setInterval(function() { if (C !== location.hash) { D(B.Event("hashchange")); C = location.hash } }, 250) } return this } })(jQuery); (function(B) { B.hotkeys = { version: "0.8", specialKeys: { 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause", 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111: "/", 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta" }, shiftNums: { "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&", "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": '"', ",": "<", ".": ">", "/": "?", "\\": "|" } }; function A(F) { if (typeof F.data !== "string" && !B.isArray(F.data)) { return } var E = F.handler, G = B.isArray(F.data), D = 0, C = F.data.length; F.handler = function(H) { var I = F.data, Q; if (G) { I = I[D] } Q = I.toLowerCase().split(" "); if (this !== H.target && (/textarea|select/i.test(H.target.nodeName) || H.target.type === "text")) { return } var O = H.type !== "keypress" && B.hotkeys.specialKeys[H.which], N = String.fromCharCode(H.which).toLowerCase(), P, K = "", L = {}; if (H.altKey && O !== "alt") { K += "alt+" } if (H.ctrlKey && O !== "ctrl") { K += "ctrl+" } if (H.metaKey && !H.ctrlKey && O !== "meta") { K += "meta+" } if (H.shiftKey && O !== "shift") { K += "shift+" } if (O) { L[K + O] = true } else { L[K + N] = true; L[K + B.hotkeys.shiftNums[N]] = true; if (K === "shift+") { L[B.hotkeys.shiftNums[N]] = true } } for (var M = 0, J = Q.length; M < J; M++) { if (L[Q[M]]) { if (!G || D === C - 1) { D = 0; return E.apply(this, arguments) } else { D += 1; return true } } } if (G && D !== 0) { Q = F.data[0].toLowerCase().split(" "); for (var M = 0, J = Q.length; M < J; M++) { if (L[Q[M]]) { D = 1; return true } } D = 0 } } } B.each(["keydown", "keyup", "keypress"], function() { B.event.special[this] = { add: A } }) })(jQuery); jQuery.cookie = function(B, I, L) { if (typeof I != "undefined") { L = L || {}; if (I === null) { I = ""; L.expires = -1 } var E = ""; if (L.expires && (typeof L.expires == "number" || L.expires.toUTCString)) { var F; if (typeof L.expires == "number") { F = new Date(); F.setTime(F.getTime() + (L.expires * 24 * 60 * 60 * 1000)) } else { F = L.expires } E = "; expires=" + F.toUTCString() } var K = L.path ? "; path=" + (L.path) : ""; var G = L.domain ? "; domain=" + (L.domain) : ""; var A = L.secure ? "; secure": ""; document.cookie = [B, "=", encodeURIComponent(I), E, K, G, A].join("") } else { var D = null; if (document.cookie && document.cookie != "") { var J = document.cookie.split(";"); for (var H = 0; H < J.length; H++) { var C = jQuery.trim(J[H]); if (C.substring(0, B.length + 1) == (B + "=")) { D = decodeURIComponent(C.substring(B.length + 1)); break } } } return D } }; (function(A) { A.fn.tipsy = function(B) { B = A.extend({}, A.fn.tipsy.defaults, B); return this.each(function() { var C = A.fn.tipsy.elementOptions(this, B); if (C && C.stopThat) { var D = A.data(this, "active.tipsy"); if (D) { D.remove() } A.data(this, "cancel.tipsy", false); return } A(this).hover(function() { A.data(this, "cancel.tipsy", true); var E = A.data(this, "active.tipsy"); if (!E) { E = A('
        '); E.css({ position: "absolute", zIndex: 100000 }); A.data(this, "active.tipsy", E) } if (A(this).attr("title") || typeof(A(this).attr("original-title")) != "string") { A(this).attr("original-title", A(this).attr("title") || "").removeAttr("title") } var G; if (typeof C.title == "string") { G = A(this).attr(C.title == "title" ? "original-title": C.title) } else { if (typeof C.title == "function") { G = C.title.call(this) } } E.find(".tipsy-inner")[C.html ? "html": "text"](G || C.fallback); var J = A.extend({}, A(this).offset(), { width: this.offsetWidth, height: this.offsetHeight }); E.get(0).className = "tipsy"; E.remove().css({ top: 0, left: 0, visibility: "hidden", display: "block" }).appendTo(document.body); var F = E[0].offsetWidth, I = E[0].offsetHeight; var H = (typeof C.gravity == "function") ? C.gravity.call(this) : C.gravity; switch (H.charAt(0)) { case "n": E.css({ top: J.top + J.height, left: J.left + J.width / 2 - F / 2 }).addClass("tipsy-north"); break; case "s": E.css({ top: J.top - I, left: J.left + J.width / 2 - F / 2 }).addClass("tipsy-south"); break; case "e": E.css({ top: J.top + J.height / 2 - I / 2, left: J.left - F }).addClass("tipsy-east"); break; case "w": E.css({ top: J.top + J.height / 2 - I / 2, left: J.left + J.width }).addClass("tipsy-west"); break } if (C.fade) { E.css({ opacity: 0, display: "block", visibility: "visible" }).animate({ opacity: 0.8 }) } else { E.css({ visibility: "visible" }) } }, function() { A.data(this, "cancel.tipsy", false); var E = this; setTimeout(function() { if (A.data(this, "cancel.tipsy")) { return } var F = A.data(E, "active.tipsy"); if (C.fade) { F.stop().fadeOut(function() { A(this).remove() }) } else { F.remove() } }, 100) }) }) }; A.fn.tipsy.elementOptions = function(C, B) { return A.metadata ? A.extend({}, B, A(C).metadata()) : B }; A.fn.tipsy.defaults = { fade: false, fallback: "", gravity: "n", html: false, title: "title" }; A.fn.tipsy.autoNS = function() { return A(this).offset().top > (A(document).scrollTop() + A(window).height() / 2) ? "s": "n" }; A.fn.tipsy.autoWE = function() { return A(this).offset().left > (A(document).scrollLeft() + A(window).width() / 2) ? "e": "w" } })(jQuery); (function(B) { var A = /([A-Z])/g; B.fn.stopCssAnimation = function() { this.each(function() { var D = B(this); var F = D.data("cssAnimatedProps"); var C = window.getComputedStyle(this, null); var E = {}; for (var H in F) { H = H.replace(A, "-$1").toLowerCase(); E[H] = C.getPropertyValue(H) } D.css({ "-moz-transition-property": "none", "-moz-transition-duration": "", "-moz-transition-timing-function": "", "-webkit-transition-property": "none", "-webkit-transition-duration": "", "-webkit-transition-timing-function": "" }); for (var H in E) { D.css(H, E[H]) } D.data("cssAnimatedProps", null); var G = D.data("cssTimeoutId"); if (G != null) { clearTimeout(G); D.data("cssTimeoutId", null) } }) }; B.fn.animateWithCss = function(G, D, F, K) { var I = jQuery.speed(D, F, K); if (jQuery.isEmptyObject(G)) { return this.each(I.complete) } var E = { bounce: "cubic-bezier(0.0, 0.35, .5, 1.3)", linear: "linear", swing: "ease-in-out" }; I.easing = I.easing || "swing"; I.easing = E[I.easing] ? E[I.easing] : I.easing; this.each(function() { B(this).data("cssAnimatedProps", G); var N = window.getComputedStyle(this, null); for (var O in G) { O = O.replace(A, "-$1").toLowerCase(); B(this).css(O, N.getPropertyValue(O)) } }); var M = []; for (var C in G) { M.push(C) } var J = M.length ? M.join(",") : "all"; this.css({ "-moz-transition-property": J, "-moz-transition-duration": I.duration + "ms", "-moz-transition-timing-function": I.easing, "-webkit-transition-property": J, "-webkit-transition-duration": I.duration + "ms", "-webkit-transition-timing-function": I.easing }); this.css(G); var L = this; var H = setTimeout(function() { L.css({ "-moz-transition-property": "none", "-moz-transition-duration": "", "-moz-transition-timing-function": "", "-webkit-transition-property": "none", "-webkit-transition-duration": "", "-webkit-transition-timing-function": "" }); L.data("cssAnimatedProps", null); L.data("cssTimeoutId", null); if (jQuery.isFunction(I.complete)) { I.complete.apply(L) } }, I.duration); this.data("cssTimeoutId", H); return this } })(jQuery); var scrobject = { scribeHost: window.location.hostname, toScribeParams: function(A) { var B = []; for (var C in A) { B[B.length] = encodeURIComponent(C) + "=" + encodeURIComponent(A[C]) } return B.join("&") }, scribeUrl: function(C, B) { var A = "/scribe?"; if (B.host) { A = "http://" + B.host + A } else { if (!/[\/\.]twitter\.com/.test(scrobject.scribeHost) && !/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/.test(scrobject.scribeHost) && scrobject.scribeHost != "localhost") { A = "http://twitter.com" + A } } return A + scrobject.toScribeParams(C) } }; function scribe(A, D, C, B) { C = C || {}; if (window.DARKMODE_SCRIBE) { return this } if (!D) { return this } if (typeof(A) == "function") { A = A.call(this, B) } if (A == null) { return this } if (!A.event_name && !C.bulk) { return this } var E = { log: JSON.stringify(A), ts: (new Date()).getTime() }; if (C.filter) { E.filter = C.filter } if (C.bulk) { E.bulk = true } if (D) { E.category = D } (new Image()).src = scrobject.scribeUrl(E, C); return this } function bulkScribe(B, E) { var D = {}; for (var C = 0, A = B.length; C < A; ++C) { D[C] = B[C] } return scribe(D, E, { bulk: true }) } if (window.jQuery) { (function(A) { A.extend(A.fn, { scribe: function(B, D, C) { C = C || {}; A(this).bind(C.clientEvent || "mousedown", function(E) { window.scribe.call(this, B, D, C, E) }); return this } }) })(jQuery) } twttr.constants = { keyCodes: { enter: 13, escape: 27, esc: 27 }, which: { period: 46 }, charCodes: { space: 32, questionMark: 63 }, placeTypes: { city: 7 }, emailStatus: { GRAND_FATHERED: 0, EXCUSED: 1, UNCONFIRMED: 2, CONFIRMED: 3 }, jQueryEvents: ("blur hover focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" ") }; twttr.klass("twttr.Router", function() { this._routes = []; this.routeMethodsForMustache = {}; this.routeMethods = {}; this.viewedPagesCount = 0; this.pageViewsPerRefresh = 50 }).statics(twttr.EventProvider).statics({ match: function(F, C) { F = this.normalizePath(F); C = this.normalizePath(C); var E = {}; if (F === C) { return E } else { if (F === "") { return false } } var B = F.split("/"), A = C.split("/"); if (B.length !== A.length) { return false } for (var D = 0; D < B.length; D++) { if (A[D].charAt(0) === ":") { if (B[D].match(/^\s*$/)) { return false } E[A[D].slice(1)] = decodeURIComponent(B[D]) } else { if (B[D] !== A[D]) { return false } } } return E }, generatePathFunction: function(A) { var B = this; return function(D) { var C = B.supplantPath(A, D); return C } }, supplantPath: function(F, H) { var B = F.split("#").join("/#").split("/"), A = []; for (var E = 0; E < B.length; E++) { var D = B[E], C = false; if (D.charAt(0) === "#") { D = D.slice(1); C = true } if (D.charAt(0) === ":") { var G = D.slice(1); if (typeof H[G] === "undefined") { return false } else { D = H[G]; if (typeof D === "function") { D = D.call(H) } D = encodeURIComponent(D) } } if (C) { D = "#" + D } A.push(D) } return A.join("/").split("/#").join("#") }, sanitizeRedirectUrl: function(A) { return A.replace(/javascript:/ig, "") }, performRedirect: function(A) { window.location = this._sanitizeRedirectUrl(A) }, getCurrentPath: function() { return this.getPathFromHref(window.location.href) }, getPathFromHref: function(C) { var F = C.split("/").slice(2).join("/"); if (F.indexOf("#") === -1) { F = F + "#" } var B = F.split("#"); var A = B[0]; var E = B[1]; if (A.indexOf("/") === -1) { A = A + "/" } var D = A.split("/").slice(1).join("/"); if (D.indexOf("?") >= 0) { D = D.slice(0, D.indexOf("?")) } if (E.indexOf("?") >= 0) { E = E.slice(0, E.indexOf("?")) } return "/" + D + "#" + E }, getCurrentQueryStringParams: function() { return this.getQueryStringParamsFromHref(window.location.href) }, getQueryStringParamsFromHref: function(C) { var D = C.split("#"), A = D[0].split("?")[1] || "", B = (D[1] || "").split("?")[1] || ""; return twttr.merge(this.parseQueryString(A), this.parseQueryString(B)) }, parseQueryString: function(E) { var D = E.split("&"), A = {}; for (var B = 0; B < D.length; B++) { if (D[B]) { var C = D[B].split("="); A[decodeURIComponent(C[0])] = C[1] ? decodeURIComponent(C[1]) : true } } return A }, getHashUpdate: function(F, E) { var A = this.normalizePath(F), B = this.normalizePath(E); if (A === B) { return false } F = F.split("/#").join("#"); E = E.split("/#").join("#"); if (F.indexOf("#") === -1) { F += "#" } if (E.indexOf("#") === -1) { E += "#" } var C = F.split("#"), D = E.split("#"); if (C[0] === D[0]) { return "#" + D[1] } if (C[1] === "" && D[1] === "") { return "#" + D[0].slice(F.length) } return "#" + B }, normalizePath: function(A) { return this.trimSlashes(A.replace(/\/?#(!|%21)?\/?/g, "/")) }, shouldRedirect: function(D, C) { var B = C.split("#"), A = D.split("#"); if (this.trimSlashes(B[0]) === this.trimSlashes(A[0])) { return false } if (this.trimSlashes(B[1]) === this.trimSlashes(A[0])) { return false } return true }, trimSlashes: function(A) { if (!A) { return A } return A.replace(/^\/*/, "").replace(/\/*$/, "") }, detectHistorySupport: function() { return !! (window.history && history.pushState) } }).methods(twttr.EventProvider).methods({ startRouting: function() { this._callCurrentRoutingAction(); this._listenToUrl() }, route: function(A, C, B) { this._addRouteMethods(A, C); this._routes.push({ name: A, path: C, fn: B }) }, staticRoute: function(B, A) { var C = this; this.route(B, A, function() { C.constructor.performRedirect(A) }) }, redirectRoute: function(A, C, D) { var B = this; this.route(A, C, function(F, E) { B.routeTo(B.routeMethods[D](F, E)) }) }, routeTo: function(A) { if (this.pageViewsPerRefresh <= this.viewedPagesCount) { return this.constructor.performRedirect(A) } this.viewedPagesCount++; if (!this._useHistory() && this.constructor.shouldRedirect(this.constructor.getCurrentPath(), A)) { return this.constructor.performRedirect(A) } this._changeUrlAndCallAction(A) }, shouldRedirectTo: function(A) { if (this._useHistory()) { return false } return this.constructor.shouldRedirect(this.constructor.getCurrentPath(), A) }, findMatchingRoute: function(C) { for (var B = 0; B < this._routes.length; B++) { var A = this.constructor.match(C, this._routes[B].path); if (A) { return { name: this._routes[B].name, fn: this._routes[B].fn, args: A } } } return false }, getCurrentRoute: function() { return this.findMatchingRoute(this.constructor.getCurrentPath()) }, _changeUrlAndCallAction: function(D) { var B = false, E = false, A = this.findMatchingRoute(D); if (this._useHistory()) { window.history.pushState(null, null, D); E = true } var C = this.constructor.getHashUpdate(this.constructor.getCurrentPath(), D); if (C) { window.location.hash = C; B = true; E = true } if (!B) { this._callRoutingActionFor(A) } this.trigger("routed", [A]); if (E) { this.trigger("urlChanged", [A]) } }, _callRoutingActionForPath: function(A) { return this._callRoutingActionFor(this.findMatchingRoute(A)) }, _callCurrentRoutingAction: function() { return this._callRoutingActionForPath(this.constructor.getCurrentPath()) }, _callRoutingActionFor: function(A) { if (!A) { this.trigger("routeNotFound"); return } return A.fn.call(null, A.args, this.constructor.getCurrentQueryStringParams()) }, lookupAndNormalizeRoute: function(B) { var A = this.findMatchingRoute(B); if (A) { return this.routeMethods[A.name](A.args) } return B }, _addRouteMethods: function(B, C) { var A = this.constructor.generatePathFunction(C), D = B + "Path"; this[D] = A; this.routeMethods[B] = A; this.routeMethodsForMustache[twttr.util.underscore(D)] = function() { return A(this) } }, _listenToUrl: function() { var A = this; $(window).hashchange(function(B) { A._callCurrentRoutingAction() }); if (this.constructor.detectHistorySupport()) { $(window).bind("popstate", function(B) { if (A._useHistory()) { A._callCurrentRoutingAction() } }) } }, _useHistory: function() { return twttr.secrets && twttr.secrets.html5Routing && this.constructor.detectHistorySupport() } }); twttr.klass("twttr.Decider", function(B, A) { this._features = B; A = A || this.constructor.DEFAULT_REFRESH_INTERVAL; setInterval(twttr.bind(this, this.updateFeatures), A) }).statics({ DECIDER_URL: "/account/available_features", DEFAULT_REFRESH_INTERVAL: 180000 }).methods({ isAvailable: function(A) { if (this._features) { return !! this._features[A] } return false }, updateFeatures: function() { $.getJSON(this.constructor.DECIDER_URL, twttr.bind(this, function(A) { if (A) { this._features = A } })) }, goodAtCss: function() { return $.support.boxModel && !($.browser.msie && parseFloat($.browser.version) <= 6) } }); twttr.decider = new twttr.Decider(twttr._initialDeciderFeatures); (function() { twttr.router = new twttr.Router(); var A = twttr.bind(twttr.router, twttr.router.route), B = twttr.bind(twttr.router, twttr.router.staticRoute), E = twttr.bind(twttr.router, twttr.router.redirectRoute); D("about", "/about"); D("jobs", "/jobs"); D("tos", "/tos"); D("privacy", "/privacy"); D("settings", "/settings/account"); D("devices", "/devices"); D("findAndFollow", "/invitations"); D("signup", "/signup"); D("becomeUser", "/admin/utils/become_user/:id"); D("adminFind", "/admin/find/:id"); D("logout", "/logout"); D("login", "/login"); D("twitterSuggests", "/invitations/twitter_suggests"); D("invitationsSuggestions", "/invitations/suggestions"); D("findOnContacts", "/invitations/find_on_contacts"); D("campaigns", "/account/campaigns"); D("goodies", "/goodies"); D("devices", "/devices"); D("translate", "/translate"); D("whatsNew", "/newtwitter"); D("turn_phx_off", "/account/use_phx?setting=false"); B("support", "http://support.twitter.com"); B("blog", "http://blog.twitter.com"); B("status", "http://status.twitter.com"); B("developers", "http://dev.twitter.com"); B("businesses", "http://business.twitter.com/"); B("advertisers", "http://lmgtfy.com/?q=twitter+advertisers"); B("partnerships", "http://media.twitter.com"); B("helpPromotedTweets", "http://support.twitter.com/groups/35-business/topics/127-frequently-asked-questions/articles/142101-promoted-tweets"); B("spamLearnMore", "http://support.twitter.com/articles/64986-how-to-report-spam-on-twitter"); B("savedSearchesHelp", "http://support.twitter.com/entries/96646-how-to-save-searches"); B("listsHelp", "http://support.twitter.com/articles/76460-how-to-use-twitter-lists"); B("emailHelp", "http://support.twitter.com/articles/82050-i-m-having-trouble-confirming-my-email"); B("changeEmail", "https://twitter.com/settings/account?change_email=true"); B("suspendedHelp", "http://support.twitter.com/groups/32-something-s-not-working/topics/116-account-settings-problems/articles/15790-how-to-contest-account-suspension"); B("mobile", "http://mobile.twitter.com"); A("index", "/", C("home").action("home")); A("home", "/", C("home").action("home")); A("mentions", "/#!/mentions", C("home").action("mentions")); A("replies", "/#!/replies", C("home").action("mentions")); A("retweets", "/#!/retweets", C("home").action("retweetsByYou")); A("retweetsByOthers", "/#!/retweets_by_others", C("home").action("retweetsByOthers")); A("retweetsOfMine", "/#!/retweeted_of_mine", C("home").action("retweetsOfYourTweets")); A("listInHome", "/#!/list/:screen_name/:list_slug", C("home").action("listInHome")); A("savedSearch", "/#!/saved-search/:query", C("home").action("savedSearch")); A("rateLimit", "/#!/twttr/rate_limit", C("rateLimit").action("tooMuch")); A("searchLinks", "/#!/search/links/:query", C("search").action("links")); A("formSearchLinks", "/#!/search/links", C("search").action("links")); A("searchNearby", "/#!/search/nearby/:query", C("search").action("nearby")); A("formSearchNearby", "/#!/search/nearby", C("search").action("nearby")); A("userSearch", "/#!/search/users/:query", C("search").action("people")); A("placeTweetSearch", "/#!/search/place_tweets/:place_id/:place_name", C("search").action("placeTweetSearch")); A("searchResults", "/#!/search/:query", C("search").action("search")); A("formSearchResults", "/#!/search", C("search").action("search")); A("place", "/#!/places/:place_id", C("place").action("tweets")); A("placeLinks", "/#!/places/:place_id/links", C("place").action("links")); A("placeNearby", "/#!/places/:place_id/nearby", C("place").action("nearby")); A("placeUsers", "/#!/places/:place_id/users", C("placeUsers").action("all")); A("placeUsersFollowing", "/#!/places/:place_id/users/following", C("placeUsers").action("following")); A("messages", "/#!/messages", C("messages").action("messages")); A("inbox", "/#!/inbox", C("messages").action("messages")); A("sent", "/#!/sent", C("messages").action("messages")); A("createDm", "/direct_messages/create/:screen_name", C("profile").action("message")); A("permalink", "/#!/:screen_name/status/:id", C("permalink").action("permalink")); A("permalinkOld", "/#!/:screen_name/statuses/:id", C("permalink").action("permalink")); A("followers", "/#!/followers", C("profile").action("followers")); A("following", "/#!/following", C("profile").action("following")); A("favorites", "/#!/favorites", C("profile").action("favorites")); A("friends", "/#!/friends", C("profile").action("following")); A("lists", "/#!/lists", C("profile").action("lists")); A("profile", "/#!/:screen_name", C("profile").action("profile")); A("userFavorites", "/#!/:screen_name/favorites", C("profile").action("favorites")); A("userFollowers", "/#!/:screen_name/followers", C("profile").action("followers")); A("userFollowing", "/#!/:screen_name/following", C("profile").action("following")); A("userLists", "/#!/:screen_name/lists", C("profile").action("lists")); A("memberships", "/#!/:screen_name/lists/memberships", C("profile").action("memberships")); A("subscriptions", "/#!/:screen_name/lists/subscriptions", C("profile").action("subscriptions")); A("followerRequests", "/#!/:screen_name/follower_requests", C("profile").action("followerRequests")); A("userList", "/#!/:screen_name/:list_slug", C("list").action("list")); A("listMembers", "/#!/:screen_name/:list_slug/members", C("list").action("members")); A("listSubscribers", "/#!/:screen_name/:list_slug/subscribers", C("list").action("followers")); A("userListFull", "/#!/:screen_name/lists/:list_slug", C("list").action("list")); function C(F) { var H; function G(J) { var I = twttr.app.switchToPage(F); if (H) { I[H].apply(I, arguments) } } G.action = function(I) { H = I; return G }; return G } function D(F, G) { A(F, G, function() {}) } } ()); twttr.stream = function(C, B) { var A = twttr.klass(C, B); return A }; twttr.klass("twttr.streams.Stream", function(B, A) { this.params = B || {}; A = A || []; if (A instanceof twttr.API.util.BaseCollection) { A = A.array } this.items = A; this.screenName = this.params.screenName; this.newItemsCount = this.items.length; this.oldItemsCount = 0; this._page = 1; this.focusedItemId = null; this.highlightedItemId = null; this.$node = new twttr.views.Stream({}).$html() }).methods(twttr.EventProvider).methods({ NEW_ITEMS_COUNT_MAX: 100, NEW_ITEMS_COUNT_CUTOFF: 40, _shouldCache: true, itemViewClass: null, afterSwitchingToAgain: function() {}, afterFirstSwitchingTo: function() {}, beforeSwitchingAway: function() {}, _setTitle: function() {}, getMoreOldItems: function(B) { var A = this; if (this._getMoreOldItemsLock || this.noMoreOldItems || this._errorComponent) { return } this._getMoreOldItemsLock = true; this.isLoadingMore(); this._fetchItems(twttr.bind(this, function(D, C) { if (C !== twttr.streams.SUCCESS) { this._showError(C) } else { this._showOldItems(); this._page++ } this.doneLoadingMore(); this._getMoreOldItemsLock = false; if (B) { B(D, C) } })) }, getCurrentlyFocusedItem: function() { return this.focusedItemId ? this.$streamItems().find(this.itemSelector(this.focusedItemId)) : null }, getCurrentlyHighlightedItem: function() { return this.highlightedItemId ? this.$streamItems().find(this.itemSelector(this.highlightedItemId)) : null }, getFirstItem: function() { return this.$streamItems().find(".stream-item:first") }, getItemId: function(A) { return parseInt(A.closest(".stream-item").attr("data-item-id"), 10) }, focusItem: function(A) { this.focusedItemId = A.attr("data-item-id"); A.focus() }, unfocusItem: function(A) { this.focusedItemId = null; A.blur() }, highlightItem: function(A) { var B = this.getCurrentlyHighlightedItem(); if (B) { B.removeClass("hovered-stream-item") } this.highlightedItemId = A.attr("data-item-id"); A.addClass("hovered-stream-item") }, highlightNext: function() { this.shiftHighlight(false) }, highlightPrevious: function() { this.shiftHighlight(true) }, shiftHighlight: function(B) { var C = this.getCurrentlyHighlightedItem(); if (!C) { this.highlightItem(this.getFirstItem()); return } var A = B ? C.prev() : C.next(); if (A.length) { this.highlightItem(A); this.scrollStreamTo(A) } }, scrollStreamTo: function(A) { var B = A.offset().top + (A.height() / 2), C = B - (twttr.$win.height() / 2); twttr.$win.scrollTop(C) }, dom: function() { return this.$node }, $streamItems: function() { return this.$find(".stream-items") }, $find: function() { var A = this.dom(); return A.find.apply(A, arguments) }, itemSelector: function(A) { return ".stream-item[data-item-id=" + A + "]" }, selectedItem: function(A) { return this.$streamItems().find(this.itemSelector(A)) }, unshift: function(A) { if (twttr.is.array(A)) { this.newItemsCount += A.length; this.items.unshift.apply(this.items, A) } else { this.newItemsCount += arguments.length; this.items.unshift(arguments) } this.trigger("newItemsCountChanged", [this.newItemsCount]) }, push: function(A) { if (twttr.is.array(A)) { this.oldItemsCount += A.length; this.items.push.apply(this.items, A) } else { this.oldItemsCount += arguments.length; this.items.push(arguments) } }, isDuplicate: function(A) { var B = this.streamItemId ? this.streamItemId(A) : A.id; this.itemIds = this.itemIds || {}; return !! this.itemIds[B] }, _renderItemHtml: function(A) { this.itemIds = this.itemIds || {}; var B = this.streamItemId ? this.streamItemId(A) : A.id; this.itemIds[B] = 1; A.query = this.params.query; if (A.attributes) { A.attributes.query = this.params.query } return new twttr.views.StreamItem({ item_html: new twttr.views[this.itemViewClass](A).html(), item_id: B, item_type: this.streamItemType }).html() }, _renderItemsHtml: function(A) { var B = this; return twttr.inject(A, "", function(E, C, D) { if (!B.isDuplicate(D)) { E += B._renderItemHtml(D) } return E }) }, _renderItems: function(A) { return $(this._renderItemsHtml(A)) }, remove: function(A) { this.selectedItem(A).remove() }, rerenderItem: function(B, A) { this.selectedItem(B).replaceWith(this._renderItemHtml(A)) }, _showNewItems: function() { var B = this.$streamItems(); if (this.newItemsCount > this.NEW_ITEMS_COUNT_MAX) { B.empty(); this.items = this.items.slice(0, this.NEW_ITEMS_COUNT_CUTOFF); this.newItemsCount = this.NEW_ITEMS_COUNT_CUTOFF } var A = this._renderItems(this.items.slice(0, this.newItemsCount)); B.prepend(A); this.newItemsCount = 0; this.onShowNewItems(A); this.trigger("newItemsCountChanged", [0]) }, _showOldItems: function() { var A = this.$streamItems(); var B = this._renderItems(this.items.slice(this.items.length - this.oldItemsCount)); A.append(B); this.oldItemsCount = 0; this.onShowOldItems(B) }, render: function() { this._showNewItems(); this._showOldItems() }, isEmpty: function() { return this.items.length === 0 }, reachedTheEnd: function() { if (!this.noMoreOldItems) { this.noMoreOldItems = true; this.markStreamEnd(); this.trigger("streamEnd") } }, markStreamEnd: function() { if (this._alreadyMarkedEnd) { return } this._alreadyMarkedEnd = true; var A = this.isEmpty() ? this._getEmptyStreamComponent() : this._getStreamEndComponent(); A.$node.appendTo(this.dom()) }, _showError: function(A) { var C = this; if (this._errorComponent) { this._errorComponent.destroy(); delete this._errorComponent } var B = this._getStreamErrorComponent(A); B.bind("tryAgain", function(D) { B.destroy(); delete C._errorComponent; C.getMoreOldItems() }); this._errorComponent = B; B.$node.appendTo(this.dom()) }, _getStreamEndComponent: function() { return new twttr.components.StreamEnd(this._getStreamEndHtml()) }, _getEmptyStreamComponent: function() { return new twttr.components.StreamEnd(this._getEmptyStreamHtml()) }, _getStreamErrorComponent: function(A) { if (A === twttr.streams.DECIDER) { return new twttr.components.StreamEnd(this._getStreamErrorHtml(A)) } else { return new twttr.components.StreamWhaleEnd(this._getStreamWhaleText()) } }, _getStreamWhaleText: function() { return _("Loading seems to be taking a while.") }, _getEmptyStreamHtml: function() {}, _getStreamEndHtml: function() { if (this.items.length < 20) { return "" } else { return _("Back to top ↑") } }, _getStreamErrorHtml: function(A) { return _("This feature is temporarily unavailable.") }, isLoadingMore: function() { var A = this.dom(); if (A.find(".stream-loading").length === 0) { new twttr.views.StreamLoading().render(A, "append") } }, stream_user_is_current_user: function() { return twttr.currentUser && this.screenName && twttr.currentUser.screenName === this.screenName }, doneLoadingMore: function() { this.dom().find(".stream-loading").remove() }, onShowNewItems: function() {}, onShowOldItems: function() {} }); twttr.aug(twttr.streams, { SUCCESS: 1, ERROR: 2, PROTECTED: 3, DECIDER: 4, WHALE: 5, TIMEOUT: 6 }); twttr.magic("twttr.scribbles", { logViewProfileDetails: function(D) { var C = $(this); var B = {}; var A = $(D.target); if (A.is("img")) { B.target = "image" } else { if (A.is("a")) { B.target = "link" } } if (C.is(".dashboard .user-profile-link")) { B.component = "dashboard"; if (C.is(".new-followers .user-profile-link")) { B.subcomponent = "new-followers" } } else { if (C.is(".details-pane .user-profile-link, .details-pane .twitter-atreply")) { B.component = "details-pane"; if (C.is(".related-tweets .user-profile-link")) { B.subcomponent = "related-tweets" } } else { if (C.is(".stream-tweet .user-profile-link, .stream-tweet .twitter-atreply")) { B.component = "stream" } else { if (C.is(".twttr-dialog .user-profile-link")) { B.component = "dialog"; B.dialog_type = C.closest(".twttr-dialog").attr("type") } } } } B.input = "click"; B.tweet_id = C.closest(".tweet").attr("data-tweet-id") || ""; B.user_id = C.attr("data-user-id"); scribble("view-profile", B) } }); twttr.klass("twttr.MessageThread", function(B, A) { this.threadId = B; this.messages = A }); twttr.klass("twttr.MessageManager", function() { var A = this; this._fetchMessages(function() { A._sort(); A.trigger("firstMessagesReceived") }) }).methods(twttr.EventProvider).methods({ setupContinuousPoll: function() { var B = this; if (this._pollId) { return } if (this.threads) { A.call(this) } else { this.one("firstMessagesReceived", function() { A.call(B) }) } function A() { this._pollInterval = 90000; this.bind("messagesArrived", function(D, C) { C.each(function(E) { B.addMessage(E) }) }); this._pollId = setInterval((function(C) { return function() { C._fetchMessages() } })(this), this._pollInterval) } }, stopContinuousPoll: function() { if (this._pollId) { clearInterval(this._pollId); delete this._pollId } }, getAllThreads: function(B) { var A = this; if (this.threads) { B(this.threads) } else { this.one("firstMessagesReceived", function() { B(A.threads) }) } }, getThread: function(C, B) { for (var A = 0; A < this.threads.length; A++) { if (this.threads[A].threadId === C) { return B(this.threads[A]) } } return B() }, addMessage: function(B) { var A = this; this.getThread(B.threadId, function(D) { if (D) { if (B.sender.screenName === twttr.currentUser.screenName) { for (var F = 0, C = D.messages, E = C.length; F < E; F++) { var G = C[F].id; if (G < B.id) { break } else { if (G === B.id) { return } } } } D.messages.unshift(B) } else { D = new twttr.MessageThread(B.threadId, [B]); A.threads.unshift(D) } A.trigger("updatedThread", [D, "prepend"]); A.trigger("newMessage." + B.threadId, [B]) }) }, deleteMessage: function(A, C) { var B = this; this.getThread(C, function(E) { if (E) { for (var H = 0, D = E.messages, F = D.length; H < F; H++) { if (D[H].id === A) { var I = D.splice(H, 1)[0]; I.destroy({ error: function() { B.addMessage(I) }, success: function(J) {} }); break } } if (E.messages.length === 0) { for (var G = 0; G < B.threads.length; G++) { if (B.threads[G].threadId === C) { B.threads.splice(G, 1); break } } B.trigger("deletedThread", [C]) } else { B.trigger("updatedThread", [E, "delete"]) } } B.trigger("deletedMessage." + C, [A]) }) }, _fetchMessages: function(G) { var D = this; var C = 0; function F() { C++; if (C === 2 && G) { G() } } var A; var E = { count: 50, success: function(H) { if (H.length() > 0) { if (!D.receivedMessages) { D.receivedMessages = H } else { D.receivedMessages.concat(H) } D.trigger("messagesArrived", [H]); D._receivedSinceID = H.first().id } A = H; F() }, cancel: function() {}, error: function(I, H) { if (I.status === 502) { H.retry() } } }; if (D._receivedSinceID) { E.since_id = D._receivedSinceID } twttr.currentUser.receivedMessages(E); var B = { count: 50, success: function(H) { if (H.length() > 0) { if (!D.sentMessages) { D.sentMessages = H } else { D.sentMessages.concat(H) } D.trigger("messagesArrived", [H]); D._sentSinceID = H.first().id } F() }, cancel: function() {}, error: function(I, H) { if (I.status === 502) { H.retry() } } }; if (D._sentSinceID) { B.since_id = D._sentSinceID } twttr.currentUser.sentMessages(B) }, _sort: function() { this.allMessages = []; if (this.sentMessages) { this.allMessages = this.allMessages.concat(this.sentMessages.array) } if (this.receivedMessages) { this.allMessages = this.allMessages.concat(this.receivedMessages.array) } this.allMessages.sort(function(G, F) { return G.id > F.id ? -1: 1 }); var D = {}; var E = []; for (var B = 0; B < this.allMessages.length; B++) { var C = this.allMessages[B], A = C.threadId; if (!D[A]) { D[A] = []; E.push(A) } D[A].push(C) } this.threads = []; for (var B = 0; B < E.length; B++) { this.threads.push(new twttr.MessageThread(E[B], D[E[B]])) } } }); twttr.stream("twttr.streams.UserStream", function(D, C) { var B = this; twttr.streams.Stream.apply(this, arguments); this.cursor = -1; var A = twttr.bind(this, function(E, F) { this.rerenderItem(E.id, E) }); twttr.API.User.bind("follow", function(F, E) { A(E, true) }); twttr.API.User.bind("unfollow", function(F, E) { A(E, false) }); this.dom().delegate(".pending-request a", "click", function(F) { var E = B.getItemId($(this)); twttr.API.User.find(E).unfollow({ error: function(G) { twttr.showError(JSON.parse(G.reason).error) } }); F.preventDefault() }) }).superclass(twttr.streams.Stream).methods({ itemViewClass: "StreamUser", streamItemType: "user" }).methods({ onShowNewItems: function(A) { this.onShowItems(A) }, onShowOldItems: function(A) { this.onShowItems(A) }, onShowItems: function(A) { A.find(".follow-button").tipsy({ gravity: "s", html: true, title: function() { var B = $(this).closest(".user-content-medium"); var D = B.find(".protected-icon").length; var C = B.attr("data-screen-name"); return D ? _("Send follow request to {{screenName}}", { screenName: C }) : _("Follow {{screenName}}", { screenName: C }) } }); A.find(".unfollow-button").tipsy({ gravity: "s", html: true, title: function() { var B = $(this).closest(".user-content-medium").attr("data-screen-name"); return _("Unfollow {{screenName}}", { screenName: B }) } }); A.find(".pending-request").tipsy({ gravity: "s", html: true, title: function() { var B = $(this).closest(".user-content-medium").attr("data-screen-name"); return _("Follow request sent to {{screenName}}", { screenName: B }) } }) }, update: function(A) {}, _fetchItems: function(A) { var B = this; if (!twttr.decider.isAvailable("people_streams") || (this.constructor._deciderKey && !twttr.decider.isAvailable(this.constructor._deciderKey))) { A(this, twttr.streams.DECIDER); return } this.update({ cursor: B.cursor, success: function(D, C) { B.push(D.array); B.cursor = C.response.next_cursor; A(B, twttr.streams.SUCCESS); if (!B.cursor) { B.reachedTheEnd() } }, error: function(C) { if (C.status === 502) { A(B, twttr.streams.WHALE) } else { A(B, twttr.streams.ERROR) } }, timeout: function(C) { C.retry() }, cancel: function() { A(B, twttr.streams.TIMEOUT) } }) }, afterFirstSwitchingTo: function() { this.getMoreOldItems() } }); twttr.stream("twttr.streams.PlaceUsers", function(B, A) { twttr.streams.UserStream.apply(this, arguments) }).superclass(twttr.streams.UserStream).methods({ update: function(B) { var C = this; var A = B.success; B.rpp = 100; B.success = function(D, E) { var F = {}; var G = []; D.each(function(H) { if (H.user && !(H.user.id in F) && (!C.params.onlyFollowing || H.user.following)) { F[H.user.id] = true; G.push(H.user) } }); A(new twttr.anywhere.api.util.BaseCollection(G), E) }; twttr.API.Status.search("place:" + this.params.placeId, B) }, _getEmptyStreamHtml: function() { return this.params.onlyFollowing ? _("No recent tweets from people you follow.") : _("No recent tweets.") } }).statics({ _deciderKey: "place_users_stream" }); twttr.stream("twttr.streams.Friends", function(D, B) { twttr.streams.UserStream.apply(this, arguments); var A = this; function C(F) { var H = F ? 1: -1; var E = A.$node.parent().siblings(".stream-title").find("h2"); var G = A._countString(parseInt(E.html().match(/\d+/)[0], 10) + H); E.html(G) } twttr.API.User.bind("follow.FriendsStream", function(F, E) { C(true) }); twttr.API.User.bind("unfollow.FriendsStream", function(F, E) { C(false) }) }).superclass(twttr.streams.UserStream).methods({ update: function(A) { twttr.API.User.find(this.screenName).friends(A) }, _countString: function(A) { if (A === 1) { return _("You follow 1 person") } else { return _("You follow {{friendsCount}} people", { friendsCount: twttr.util.addCommas(A) }) } }, _setTitle: function(C) { if (this.stream_user_is_current_user()) { var A = twttr.currentUser.friendsCount; var B; C(this._countString(A)) } else { twttr.API.User.find(this.screenName, twttr.bind(this, function(D) { var E; if (D.friendsCount === 1) { E = _("{{username}} follows 1 person", { username: this.screenName }) } else { E = _("{{username}} follows {{friendsCount}} people", { username: this.screenName, friendsCount: twttr.util.addCommas(D.friendsCount) }) } C(E) })) } }, _getEmptyStreamHtml: function() { if (this.stream_user_is_current_user()) { return _("You aren't following anyone yet.") } else { return _("@{{screen_name}} isn't following anyone yet.", { screen_name: this.screenName }) } } }).statics({ _deciderKey: "people_stream_friends" }); twttr.stream("twttr.streams.FollowerRequests", function(B, A) { this.constructor.uber.constructor.apply(this, arguments) }).superclass(twttr.streams.UserStream).methods({ itemViewClass: "StreamFollowerRequest", streamItemType: "user", update: function(A) { twttr.currentUser.friends.pending(function(D, C) { var B = A.success; A.success = function(E) { B(E, C) }; twttr.API.User.findAll(D, A) }) }, _setTitle: function(A) { A(_("Your pending follower requests")) }, rerenderItem: function(C, B) { var A = this.itemViewClass; this.itemViewClass = "StreamUser"; this.constructor.uber.rerenderItem.apply(this, arguments); this.itemViewClass = A } }).statics({ _deciderKey: "people_stream_follower_requests" }); twttr.stream("twttr.streams.Followers", function(B, A) { twttr.streams.UserStream.apply(this, arguments) }).superclass(twttr.streams.UserStream).methods({ update: function(A) { twttr.API.User.find(this.screenName).followers(A) }, _setTitle: function(B) { if (this.stream_user_is_current_user()) { var A = _("Your {{followersCount}} followers", { followersCount: twttr.util.addCommas(twttr.currentUser.followersCount) }); B(A) } else { twttr.API.User.find(this.screenName, twttr.bind(this, function(C) { var D = _("{{username}}'s {{followersCount}} followers", { username: this.screenName, followersCount: twttr.util.addCommas(C.followersCount) }); B(D) })) } }, _getEmptyStreamHtml: function() { if (this.stream_user_is_current_user()) { return _("You don't have any followers yet.") } else { return _("@{{screen_name}} doesn't have any followers yet.", { screen_name: this.screenName }) } } }).statics({ _deciderKey: "people_stream_followers" }); twttr.klass("twttr.streams.PeopleSearch", function(B, A) { twttr.streams.UserStream.apply(this, arguments); this.query = B.query; this.page = 1 }).superclass(twttr.streams.UserStream).methods({ scribeData: function() { return twttr.merge(twttr.streams.Stream.prototype.scribeData.apply(this), { name: "Search", query: this.params.query, type: "people" }) }, update: function(A) { twttr.API.User.search(this.query, A) }, _fetchItems: function(A) { var B = this; this.update({ page: this.page++, success: function(D, C) { if (D.length() === 0) { B.reachedTheEnd() } B.push(D.array); A(B, twttr.streams.SUCCESS) } }) }, _getEmptyStreamHtml: function() { return _("No people results for {{query}}.", { query: this.params.query }) }, getStreamEndHtml: function() { return _("No more people results for {{query}}.", { query: this.params.query }) } }).statics({ _deciderKey: "people_stream_people_search" }); twttr.stream("twttr.streams.ListFollowers", function(B, A) { twttr.streams.UserStream.apply(this, arguments) }).superclass(twttr.streams.UserStream).methods({ update: function(A) { var B = this; twttr.API.User.find(this.screenName).lists(function(C) { C.find(function(D) { return D.slug === B.params.listSlug }).followers(A) }) }, _setTitle: function(A) { A(_("People following this list")) } }).statics({ _deciderKey: "people_stream_list_followers" }); twttr.stream("twttr.streams.ListMembers", function(B, A) { twttr.streams.UserStream.apply(this, arguments) }).superclass(twttr.streams.UserStream).methods({ update: function(A) { var B = this; twttr.API.User.find(this.screenName).lists(function(C) { C.find(function(D) { return D.slug === B.params.listSlug }).members(A) }) }, _setTitle: function(A) { A(_("People this list follows")) } }).statics({ _deciderKey: "people_stream_list_members" }); twttr.klass("twttr.streams.MessageStream", function(B, A) { twttr.streams.Stream.apply(this, arguments) }).superclass(twttr.streams.Stream).methods({ itemViewClass: "MessageThreadPreview", streamItemType: "message_thread", streamItemId: function(A) { return A.threadId } }).methods({ _fetchItems: function(A) { var B = this; if (!twttr.decider.isAvailable("message_stream")) { A(this, twttr.streams.DECIDER); return } twttr.messageManager.getAllThreads(function(C) { B.push(C); A(B, twttr.streams.SUCCESS); B.reachedTheEnd() }) }, afterFirstSwitchingTo: function(A) { this.getMoreOldItems(A) }, updateThread: function(A, D) { var C = this.$find(".stream-item[data-item-id=" + A.threadId + "]"), B = new twttr.views.MessageThreadPreview(A).html(); if (!C.length) { C = new twttr.views.StreamItem({ item_html: B, item_id: this.streamItemId(A), item_type: this.streamItemType }).$html() } else { C.find(".message-thread-preview").replaceWith(B) } if (D === "prepend") { this.dom().prepend(C) } }, removeThread: function(B) { var A = this.$find(".stream-item[data-item-id=" + B + "]"); if (A.hasClass("focused-stream-item")) { if (A.prev().length) { A.prev().focus() } else { if (A.next().length) { A.next().focus() } } } A.remove() }, _getEmptyStreamHtml: function() { return _("You can privately message someone on Twitter by sending a direct message.") } }); twttr.klass.mixin("twttr.mixins.streamablePage", function(A) { A.click({ ".stream .tweet-actions": function(C, B) { C.stopPropagation(); C.preventDefault(); return false }, ".details-pane .stream-item": function(F, B) { if ($(F.target).is(".twitter-timeline-link")) { return } var E = B.find(".tweet"); var G = parseInt(E.attr("data-tweet-id"), 10); var C = { component: "details-pane" }; if (B.is(".related-tweets .stream-item")) { C.subcomponent = "related-tweets" } else { if (B.is(".in-reply-to .stream-item")) { C.subcomponent = "in-reply-to" } } C.embedded_media_types = E.find(".icons .media").map(function(H, I) { return I.getAttribute("data-media-type") }).get(); var D = E.attr("data-impression-id"); this.loadItemInDetailsPane(G, "tweet", { log: C, push: true, impressionId: D }) }, ".details-pane .user-detailed-list-item .user-screen-name": function(C, B) { var D = parseInt(B.attr("data-user-id"), 10); this.loadItemInDetailsPane(D, "user", { push: true }); C.stopPropagation(); C.preventDefault(); return false }, ".stream .stream-item": function(D, B) { var F = $(D.target).is(".stream-item a.tweet-timestamp, .stream-item a.tweet-timestamp *"); var E = $(D.target).is(".stream-item a.twitter-timeline-link"); var C = $(D.target).is(".stream-user-buttons *"); if (F || E || C) { return } this.toggleFocus(B) }, ".stream .user-profile-link, .stream .twitter-atreply, .details-pane .user-profile-link, .details-pane .twitter-atreply": function(F, B) { var E = twttr.helpers.getUserIdentifier(B); var C = {}; if (B.is(".details-pane .user-profile-link, .details-pane .twitter-atreply")) { C.push = true } var D = B.closest(".promoted-tweet").attr("data-impression-id"); if (B.is(".details-pane .user-profile-link, .stream .user-profile-link")) { C.impressionId = D } else { if (B.is(".stream .twitter-atreply, .details-pane .twitter-atreply")) { if (D) { twttr.API.Status.logUserMentionClick(D, B.text()) } } } this.loadItemInDetailsPane(E, "user", C); twttr.scribbles.logViewProfileDetails.call(B, F); F.stopPropagation(); F.preventDefault(); return false }, ".stream .twitter-hashtag, .details-pane .twitter-hashtag": function(D, B) { var C = B.closest(".promoted-tweet").attr("data-impression-id"); if (C) { twttr.API.Status.logHashtagClick(C, B.text()) } }, ".stream .twitter-timeline-link, .details-pane .twitter-timeline-link": function(D, B) { var C = B.closest(".promoted-tweet").attr("data-impression-id"); if (C) { twttr.API.Status.logUrlClick(C, B.text()) } }, ".stream .twitter-listname": function(C, B) { twttr.router.routeTo(twttr.router.lookupAndNormalizeRoute($this.attr("href"))); C.stopPropagation(); C.preventDefault(); return false }, ".tweet-geo-text, .details-pane .geo_map_tweets_at_this_place_link": function(D, B) { var E = parseInt(B.attr("data-tweet-id"), 10); var C = {}; if (B.is(".details-pane .geo_map_tweets_at_this_place_link")) { C.push = true } this.loadItemInDetailsPane(E, "tweet_geo", C); D.stopPropagation(); D.preventDefault(); return false }, ".pane-toolbar a.pane-close": function(C, B) { this.unfocusStreamItem(); C.stopPropagation(); C.preventDefault(); return false }, ".pane-toolbar a.pane-back": function(C, B) { this.panes.pop(); C.stopPropagation(); C.preventDefault(); return false } }).focus({ ".stream .tweet-actions": function(C, B) { C.stopPropagation(); return false } }).methods({ _detailsPaneDisabled: function() { return ! twttr.decider.goodAtCss() }, toggleFocus: function(B) { if (B.hasClass("focused-stream-item") && this.panes.size() <= 1) { this.streamManager.getCurrent().unfocusItem(B); this.unfocusStreamItem() } else { this.streamManager.getCurrent().focusItem(B); this.focusStreamItem(B) } }, focusStreamItem: function(B) { B.addClass("focused-stream-item").siblings().removeClass("focused-stream-item").removeClass("light"); var F, E = B.attr("data-item-type"); if (E === "list" || E === "message_thread") { F = B.attr("data-item-id") } else { F = parseInt(B.attr("data-item-id"), 10) } var C = { component: "stream", page_number: this.streamManager.getCurrent()._page }; var D = B.find(".tweet").attr("data-impression-id"); if (E === "tweet") { C.embedded_media_types = B.find(".icons .media").map(function(G, H) { return H.getAttribute("data-media-type") }).get() } B.addClass("focused-stream-item").siblings().removeClass("focused-stream-item"); this.loadItemInDetailsPane(F, E, { log: C, impressionId: D }) }, unfocusStreamItem: function() { if (this.closeDetailsPane() !== false) { this.$node.find(".stream-item").removeClass("focused-stream-item") } }, loadItemInDetailsPane: function(F, E, B) { var C = this, D = {}, B = B || {}; if (B.log) { twttr.merge(D, B.log) } if (E === "tweet") { this.loadTweetInDetailsPane(F, B); this.openDetailsPane(); D.details_type = "tweet" } else { if (E === "user") { this.loadUserInDetailsPane(F, B); this.openDetailsPane(); D.details_type = "user" } else { if (E === "tweet_geo") { this.loadTweetGeoInDetailsPane(F, B); this.openDetailsPane(); D.details_type = "tweet_geo" } else { if (E === "list") { twttr.router.routeTo(twttr.router.lookupAndNormalizeRoute(F)); D.details_type = "list" } else { if (E === "message_thread") { this.loadMessageThreadInDetailsPane(F, B); this.resizeDetailsPane(); D.details_type = "message_thread" } } } } } D.item_id = F; D.input = "click"; scribble("load-details-pane", D) }, loadTweetInDetailsPane: function(H, J) { var E = this, D = J.impressionId, I = "tweet_pane_" + H + (D ? "_" + D: ""), F = new twttr.views.DetailsPane(I), C = this.panes.cached(I); var G = J.push ? this.panes.push(F) : this.panes.reset(F); var B = G.$dom; if (!C) { twttr.API.Status.find(H, function(L) { G._backLabel = _("@{{screen_name}}'s Tweet", { screen_name: L.user.screenName }); if (D) { L = twttr.API.Status.getPromotedInstance(L, D); twttr.API.Status.logShowDetails(D) } var K = new twttr.components.TweetPane(L); K.bind("deleted", function() { if (E.panes.contains(G)) { E.panes.remove(G); E.panes.reset(); E.closeDetailsPane() } }); E.addComponentsToDetailsPane(B, [new twttr.components.InReplyTo(L), K, new twttr.components.Media(L, E.$find(".details-pane").width() - 40), new twttr.components.MachineTranslatedTweet(L), new twttr.components.TweetGeoSmall(L), new twttr.components.Retweeters(L), new twttr.components.MentionedInTweet(L), new twttr.components.RelatedTweets(L, E.streamManager.getCurrent())]) }) } else { B.find(".map_canvas:visible").trigger("refreshMap") } }, loadUserInDetailsPane: function(G, K) { var E = "user_pane_by_id_"; if (twttr.is.string(G)) { E = "user_pane_by_screen_name_" } var F = this, D = K.impressionId, J = E + G + (D ? "_" + D: ""), H = new twttr.views.DetailsPane(J), C = this.panes.cached(J); var I = K.push ? this.panes.push(H) : this.panes.reset(H); var B = I.$dom; if (!C) { twttr.ui.toggleSpinner(B, true); twttr.API.User.find(G, { success: function(L) { twttr.ui.toggleSpinner(B); I._backLabel = _("@{{screen_name}}'s profile", { screen_name: L.screenName }); if (D) { L = twttr.API.User.getPromotedInstance(L, D) } F.addComponentsToDetailsPane(B, [new twttr.components.ProfilePane(L), new twttr.components.RecentTweets(L)]) }, error: function(L) { F.addComponentsToDetailsPane(B, [new twttr.components.NoUserExists()]) } }) } }, loadTweetGeoInDetailsPane: function(I, E) { var H = this, B = "tweet_geo_pane_" + I, D = new twttr.views.DetailsPane(B), F = this.panes.cached(B); var C = E.push ? this.panes.push(D) : this.panes.reset(D); var G = C.$dom; if (!F) { twttr.API.Status.find(I, function(K) { C._backLabel = _("@{{screen_name}}'s Tweet location", { screen_name: K.user.screenName }); var J = [new twttr.components.TweetGeoBig(K)]; if (K.place && K.place.id) { J.push(new twttr.components.PlaceTweets(K.place)) } H.addComponentsToDetailsPane(G, J) }) } else { G.find(".map_canvas:visible").trigger("refreshMap") } }, loadMessageThreadInDetailsPane: function(E) { if (!twttr.loggedIn) { throw "Something went wrong. You're not supposed to be able to load a message pane while logged out..." } var H = this, B = "message_thread_pane_" + E, D = new twttr.views.DetailsPane(B, { closable: false }), F = H.panes.cached(B), C = H.panes.reset(D), G = C.$dom; if (!F) { twttr.messageManager.getThread(E, function(I) { var K = new twttr.components.SendMessageBox(E), J = new twttr.components.MessageThread(I); C._backLabel = _("Conversation with {{screen_name}}", { screen_name: I.threadId }); K.bind("sentMessage", function(M, L) { twttr.messageManager.addMessage(L) }); K.$node.appendTo(G.find(".pane-toolbar")); H.addComponentsToDetailsPane(G, [J]) }) } }, focusStreamTab: function(B) { this.$node.find(".stream-tabs li.stream-tab-" + B).addClass("active").siblings().removeClass("active"); this._activeTab = B; scribble("subnav", { item: B }) }, openDetailsPane: function() { if (this._detailsPaneDisabled()) { return false } var B = this.$node.find(".details-pane"); if (!B.hasClass("opened")) { B.show(); this._slideDetailsPaneTo(this.$node.find(".main-content").width()); this.$node.find(".dashboard").hide(); B.addClass("opened") } this.resizeDetailsPane() }, _slideDetailsPaneTo: function(C, B) { this.$find(".details-pane")[Modernizr.csstransitions ? "animateWithCss": "animate"]({ left: C }, 250, Modernizr.csstransitions ? "ease-out": "linear", B) }, closeDetailsPane: function() { if (this._detailsPaneDisabled()) { return false } var B = this.$node.find(".details-pane"); if (B.hasClass("opened")) { this.$node.find(".dashboard").show(); this._slideDetailsPaneTo(0, function() { $(this).hide() }); B.removeClass("opened"); scribble("close-details-pane", { input: "click", current_tweet_id: this.streamManager.getCurrent().focusedItemId }) } }, resizeDetailsPane: function() { var H = this.$find(".details-pane"), F = $("#page-outer"), D = parseInt(F.css("padding-top"), 10); if (H.length > 0) { var E = $("#page-container"), C = this.$find(".main-content"), J = $("#page-container").width(), B = C.width(), G = J - B, I = twttr.$win.height() - D, K = I - H[0].offsetTop - 8; C.css("min-height", I); H.height(K); H.width(G - 10); H.find(".pane-components").height(K - H.find(".inner-pane.active .pane-toolbar").outerHeight()) } this.$find(".details-pane-outer").css("top", D) }, repositionDetailsPane: function() { if (!twttr.decider.goodAtCss()) { return } var C = twttr.$win.width(), D = twttr.$win.scrollTop(), B = this.$find(".details-pane-outer"); if (C < 1000) { B.addClass("tracking-vertically"); B.css("margin-top", D) } else { B.removeClass("tracking-vertically"); B.css("margin-top", null) } }, addComponentToDetailsPane: function(D, C, B) { B = B || "append"; D.find(".pane-components")[B](C.$node) }, addComponentsToDetailsPane: function(D, C) { for (var B = 0; B < C.length; B++) { this.addComponentToDetailsPane(D, C[B]) } }, onListFollowingChange: function(C) { var B = new twttr.views.StreamList(C); this.$node.find(".stream-item[data-item-id=/" + C.user.screenName + "/" + C.slug + "]").html(B.html()) } }).addViewData(function() { var B = {}; B["active_tab_" + this._activeTab] = 1; return B }).addAfterRender(function() { this.resizeDetailsPane(); if (!this.streamManager) { this.streamManager = new twttr.streams.StreamManager(); this.streamManager.bind("newItemsCountChanged", twttr.bind(this, function(C, B) { this.hasNewItems(B) })); this.streamManager.bind("notFound", twttr.bind(this, function(B) { this.trigger("notFound") })); this.streamManager.bind("switchTo", twttr.bind(this, function(B) { this.closeDetailsPane() })) } this.streamManager.$node.appendTo(this.$node.find(".stream-manager")); this.panes = new twttr.ViewStack(this.$node.find(".details-pane"), "append") }).addOnSwitchAway(function() { if (this.streamManager) { this.streamManager.onSwitchAway() } }).addOnSwitchTo(function() { this.resizeDetailsPane() }).keydown({ f: function(B) { if ($(B.target).is(":not(input)")) { B.preventDefault(); var C = this.streamManager.getCurrent(); if (!C.focusedItemId) { return } C.tweetActionFavorite(C.getCurrentlyFocusedItem().find(".tweet"), "keyboard") } }, r: function(B) { if ($(B.target).is(":not(input)")) { B.preventDefault(); var C = this.streamManager.getCurrent(); if (!C.focusedItemId) { return } C.tweetActionReply(C.getCurrentlyFocusedItem().find(".tweet"), "keyboard") } }, t: function(B) { if ($(B.target).is(":not(input)")) { B.preventDefault(); var C = this.streamManager.getCurrent(); if (!C.focusedItemId) { return } C.tweetActionRetweet(C.getCurrentlyFocusedItem().find(".tweet"), "keyboard") } } }).keypress({ "return": function(C) { var D = this.streamManager.getCurrent(); C.preventDefault(); var B = this.$find(".stream-item[data-item-id=" + D.highlightedItemId + "]"); this.toggleFocus(B) }, period: function(B) { twttr.$win.scrollTop(0); var C = this.streamManager.getCurrent(); C.fetchTweets(twttr.bind(this, function(F) { var D = F.newItemsCount; if (F.newItemsCount > 0) { F._showNewItems(); F.restartFetcher() } var E = F.getFirstItem(); F.highlightItem(E); F.scrollStreamTo(E) })) } }).keypress({ k: function(B) { this.streamManager.getCurrent().highlightPrevious(); B.preventDefault() }, j: function(B) { this.streamManager.getCurrent().highlightNext(); B.preventDefault() } }); return A }); twttr.klass.mixin("twttr.mixins.userActionable", function(A) { A.methods({ _doUserActionAndUpadateView: function(E, B, F, G) { G = G || []; var D = this; var C = twttr.helpers.getUserIdentifier(B); G.push({}); twttr.API.User.find(C, function(H) { H[F].apply(H, G) }); E.stopPropagation(); return false } }).click({ ".follow-button, .follow-action": function(C, B) { return this._doUserActionAndUpadateView(C, B, "follow") }, ".unfollow-link, .unfollow-action, .unfollow-button": function(C, B) { return this._doUserActionAndUpadateView(C, B, "unfollow") }, ".deny-follower-action": function(D, B) { var C = parseInt(B.closest(".stream-item").attr("data-item-id"), 10); twttr.currentUser.friends.deny(C, function(E) { B.closest(".stream-item").remove() }); D.stopImmediatePropagation(); return false }, ".accept-follower-action": function(D, B) { var C = parseInt(B.closest(".stream-item").attr("data-item-id"), 10); twttr.currentUser.friends.accept(C, function(E) { new twttr.views.StreamUser(E).render(B.closest(".user-content-medium"), "replaceWith") }); D.stopImmediatePropagation(); return false } }).addAfterRender(function() { var B = twttr.bind(this, function(C, D) { var E = this; twttr.API.User.find(C, function(F) { F.data("following", D); F.data("recently_followed", D); var G; if ((G = E.$find(".user-small-list-item[data-user-id=" + F.id + "]")).size()) { G.replaceWith(new twttr.views.UserSmallListItem(F).html()) } else { if ((G = E.$find(".user-detailed-list-item[data-user-id=" + F.id + "]")).size()) { G.replaceWith(new twttr.views.UserDetailedListItem(F).html()) } } F.data("recently_followed", null) }) }); twttr.API.User.bind("follow", { before: function(F, E) { var D = E.requestParameters[0]; var C = D.user_id; B(C, true) }, error: function(G, C, F) { var E = F.requestParameters[0], D = E.user_id; B(D, false) } }); twttr.API.User.bind("unfollow", { before: function(F, E) { var D = E.requestParameters[0]; var C = D.user_id; B(C, false) }, error: function(G, C, F) { var E = F.requestParameters[0], D = E.user_id; B(D, true) } }) }); return A }); twttr.klass.mixin("twttr.mixins.listActionable", function(A) { A.methods({ listDeleted: function() {}, listUpdated: function() {}, _setListFollowing: function(B, F, E) { var D = E ? "subscribe": "unsubscribe"; var C = this; twttr.API.User.find(B, function(G) { G.lists.find(F, function(H) { H[D]({ success: function() { H.following = E; H.attributes.following = E; C.onListFollowingChange(H) }, error: function() { twttr.showError(_("There was an error " + (E ? "": "un") + "subscribing to the list")); H.following = !E; H.attributes.following = !E; C.onListFollowingChange(H) } }) }) }) }, unfollowList: function(B, C) { this._setListFollowing(B, C, false) }, followList: function(B, C) { this._setListFollowing(B, C, true) }, onListFollowingChange: function() {} }).click({ ".stream .list-action-button": function(E, B) { var D = this; var C = twttr.helpers.getUserIdentifier(B); if (B.attr("data-opened")) { return } B.attr("data-opened", true); twttr.API.User.find(C, function(F) { twttr.viewHelpers.openListDropDown(F, B, function(G) { G.render(B, "after", { id: F.id, key: "lists" }).open() }) }); E.stopPropagation(); return false }, ".delete-list-button": function(C, B) { new twttr.widget.Prompt({ modal: true, template: { title: _("Are you sure you want to delete this list?") }, callback: function(D) { if (D) { twttr.currentUser.lists.find(parseInt(B.attr("data-list-id"), 10), function(E) { twttr.app.currentPage().listDeleted(E); E.destroy({ error: function() { twttr.showError(_("There was an error deleting the list")) }, success: function() { twttr.app.currentPage().listDeleted(E) } }) }) } } }).open(); C.stopPropagation(); return false }, ".edit-list-button": function(C, B) { twttr.currentUser.lists.find(parseInt(B.attr("data-list-id"), 10), function(D) { new twttr.widget.ListDialog({ list: D, onSuccess: function() { twttr.app.currentPage().listUpdated() } }).open() }); C.stopPropagation(); return false }, ".unfollow-list-button, .unfollow-list-link, .unfollow-list-action": function(C, B) { this.unfollowList(B.attr("data-screen-name"), B.attr("data-list-id")); C.stopPropagation(); return false }, ".follow-list-button, .follow-list-action": function(C, B) { this.followList(B.attr("data-screen-name"), B.attr("data-list-id")); C.stopPropagation(); return false } }); return A }); twttr.klass.mixin("twttr.mixins.tweetActionable", function(A) { A.methods({ deletedTweetCacheDuration: 1000 * 60 * 10, _updateTweetDisplay: function(D, C) { var B = this; if (C === "delete") { twttr.showMessage(_("Your tweet has been deleted.")); B.onTweetActionDelete(D) } else { twttr.API.Status.find(D, function(H) { var E = B.$find(".tweet[data-tweet-id=" + D + "]"); switch (C) { case "favorite": H.sync("favorited", true); E.addClass("tweet-favorited"); break; case "unfavorite": H.sync("favorited", false); E.removeClass("tweet-favorited"); break; case "retweet": H.sync("current_user_retweet", true); E.addClass("tweet-retweeted"); break; case "unretweet": H.sync("current_user_retweet", false); E.removeClass("tweet-retweeted"); break; case "hide": B.onTweetActionHide(D); break; case "show": B.onTweetActionShow(D); break } var F = new twttr.views.TweetDogear(H), G = new twttr.views.TweetActions(H); if (C === "unretweet") { F.retweeted = false; G.retweeted = false } E.find(".tweet-dogear").replaceWith(F.html()); E.find(".tweet-actions").replaceWith(G.html()) }) } }, onTweetActionDelete: function(B) { this.$find(".tweet[data-tweet-id=" + B + "]").remove() }, onTweetActionHide: function(B) { this.$find(".tweet[data-tweet-id=" + B + "]").hide() }, onTweetActionShow: function(B) { this.$find(".tweet[data-tweet-id=" + B + "]").show() }, getTweetId: function(B) { return parseInt(B.attr("data-tweet-id"), 10) }, getScreenName: function(B) { return B.attr("data-screen-name") }, getImpressionId: function(B) { return B.attr("data-impression-id") }, getScribeComponent: function(B) { return B.is(".tweet-pane .tweet") ? "details-pane": B.is(".stream .tweet") ? "stream": "generic-component" }, tweetActionFavorite: function(E, B) { if (!E || E.length === 0) { return } var F = this.getTweetId(E), D = E.hasClass("tweet-favorited"), G = D ? "unfavorite": "favorite", C = this.getImpressionId(E); twttr.API.Status[G](F, { impression_id: C, cacheOptions: { skipOverwrite: true } }); scribble("favorite-tweet", { input: B, tweet_id: F, favorited: !D, component: this.getScribeComponent(E) }) }, tweetActionRetweet: function(H, D) { if (!H || H.length === 0) { return } var I = this.getTweetId(H), G = this.getScreenName(H), F = this.getImpressionId(H), C = H.hasClass("tweet-retweeted"), E = this.getScribeComponent(H); if (G === twttr.currentUser.screenName || H.find(".protected-icon").length) { return } if (C) { var B = H.attr("data-my-retweet-id"); if (B) { twttr.API.Status.unretweet(B) } } else { twttr.dialogs.retweet(I, function(J) { if (J) { twttr.API.Status.retweet(I, { impression_id: F }); scribble("tweet", { tweet_type: "retweet", origin: "tweet-action-retweet", input: D, component: E }) } }).open() } scribble("retweet-tweet-opened", { input: D, tweet_id: I, component: E }) }, tweetActionReply: function(F, B) { if (!F || F.length === 0) { return } var G = this.getTweetId(F), E = this.getImpressionId(F), D = F.attr("data-screen-name"), C = this.getScribeComponent(F); twttr.dialogs.reply({ $tweet: F, tweetId: G, impressionId: E, screenName: D, origin: "tweet-action-reply", input: B, component: C }).open(); scribble("reply-to-tweet-opened", { input: B, tweet_id: G, component: C }) }, tweetActionDelete: function(D, B) { var C = this; if (!D || D.length === 0) { return } var E = this.getTweetId(D), D = D.closest(".stream-item"); new twttr.widget.Prompt({ template: { title: _("Are you sure you want to delete this tweet?") }, callback: function(F) { if (F) { twttr.API.Status.find(E).destroy(function() { twttr.app.caches.deletedTweets.set(E, true, C.deletedTweetCacheDuration) }) } } }).open(); scribble("delete-tweet-opened", { input: B, tweet_id: E, component: this.getScribeComponent(D) }) }, _registerTweetActionAPIListeners: function() { var B = this; twttr.API.Status.bind("favorite", { before: function(D, C) { var E = C.requestParameters[0]; B._updateTweetDisplay(E, "favorite") }, error: function(E, C, D) { var F = D.requestParameters[0]; B._updateTweetDisplay(F, "unfavorite"); twttr.showError(_("Whoops, we couldn't favorite that Tweet.")) } }); twttr.API.Status.bind("unfavorite", { before: function(D, C) { var E = C.requestParameters[0]; B._updateTweetDisplay(E, "unfavorite") }, error: function(E, C, D) { var F = D.requestParameters[0]; B._updateTweetDisplay(F, "favorite"); twttr.showError(_("Whoops, we couldn't unfavorite that Tweet.")) } }); twttr.API.Status.bind("retweet", { before: function(D, C) { var E = C.requestParameters[0]; B._updateTweetDisplay(E, "retweet") }, error: function(E, C, D) { var F = D.requestParameters[0]; B._updateTweetDisplay(F, "unretweet"); twttr.showError(_("Whoops, we couldn't retweet that Tweet.")) }, success: function(E, D) { var C = D.retweetingStatus.id, F = D.id; D.sync("current_user_retweet", { id: C }); B.$find(".tweet[data-tweet-id=" + F + "]").attr("data-my-retweet-id", C) } }); twttr.API.Status.bind("unretweet", { before: function(F, E) { var C = E.requestParameters[0].id; var D = B.$find(".tweet[data-my-retweet-id=" + C + "]"); var G = D.attr("data-tweet-id"); B._updateTweetDisplay(G, "unretweet") }, error: function(G, D, F) { var C = F.requestParameters[0].id; var E = B.$find(".tweet[data-my-retweet-id=" + C + "]"); var H = E.attr("data-tweet-id"); B._updateTweetDisplay(H, "retweet") }, success: function(F, D, E) { var G = D.id; var C = D.retweetingStatus.id; B._updateTweetDisplay(G, "unretweet"); B.$find(".tweet[data-tweet-id=" + G + "]").attr("data-my-retweet-id", null) } }); twttr.API.Status.bind("delete", { before: function(D, C) { var E = C.requestParameters[0].id; B._updateTweetDisplay(E, "hide") }, error: function(E, C, D) { var F = D.requestParameters[0].id; B._updateTweetDisplay(F, "show") }, success: function(E, C, D) { var F = C.id; B._updateTweetDisplay(F, "delete") } }) }, registerTweetActionEvents: function() { var B = this; this.$node.delegate(".tweet-actions .favorite-action, .tweet-actions .unfavorite-action", "click", function(C) { B.tweetActionFavorite($(this).closest(".tweet"), "click"); C.preventDefault(); C.stopPropagation(); return false }); this.$node.delegate(".tweet-actions .reply-action", "click", function(C) { B.tweetActionReply($(this).closest(".tweet"), "click"); C.preventDefault(); C.stopPropagation(); return false }); this.$node.delegate(".tweet-actions .delete-action", "click", function(C) { B.tweetActionDelete($(this).closest(".tweet"), "click"); C.preventDefault(); C.stopPropagation(); return false }); this.$node.delegate(".tweet-actions .retweet-action, .tweet-actions .unretweet-action", "click", function(C) { B.tweetActionRetweet($(this).closest(".tweet"), "click"); C.preventDefault(); C.stopPropagation(); return false }); this._registerTweetActionAPIListeners() } }); return A }); twttr.klass.mixin("twttr.mixins.whoToFollowHelper", function(A) { A.methods({ isWTFAvailable: function(B) { if (twttr.loggedIn) { return B ? twttr.decider.isAvailable("whotofollow_similarities") : twttr.decider.isAvailable("whotofollow_recommendations") } else { return twttr.decider.isAvailable("whotofollow_logged_out_similarities") } }, trackImpressions: function(F, B, C, E) { var D = F.map(function(G, H) { return G.id }); if (E) { this.currentRecommendations = this.currentRecommendations.map(function(H, G) { if (H == E) { return D.first() } else { return H } }) } else { this.currentRecommendations = D } C = C || {}; scribe($.extend(this.mergeProfileId({ event_name: B, recommended_users: D.array, recommended_users_count: F.length(), token: this.feedbackToken }), C), "whotofollow") }, mergeProfileId: function(B) { if (this.screenName) { $.extend(B, { to_user_id: twttr.profileUser.id }) } return B }, recsToUsers: function(C) { var B = this; if (C.length()) { this.feedbackToken = C.first().token } return C.map(function(G, F) { G.user.attributes.dismissable = !B.screenName || twttr.currentUser.id == twttr.profileUser.id; var D = ""; if (G.attributes.connections && G.attributes.connections.length > 0) { var E = G.attributes.connections.length; D = '' + _("{{usersCount}} in common", { usersCount: (E >= 10) ? "10+": "" + E }) + "" } G.user.attributes.socialcontext = D; return G.user }) }, fetch: function(B) { if (this.screenName) { twttr.profileUser.similarUsers(B) } else { twttr.currentUser.recommendedUsers(B) } }, attachWTFProfileEvents: function(B, D) { var C = this; D.delegate(".user-small-list-item .user-screen-name, .user-small-list-item .user-thumb", "click", function(H) { var F = $(this).closest(".user-small-list-item"), G = F.attr("data-user-id"), E = C.mergeProfileId({ rating: 6, recommended_user_id: G, token: C.feedbackToken }); twttr.API.UserRecommendation.rate(E); scribe($.extend({ event_name: B }, E), "whotofollow"); scribble("view-profile", { profile_user_id: G, component: "dashboard", subcomponent: "who-to-follow", target: $(H.target).is("a") ? "link": "image" }) }) }, attachWTFFollowEvents: function(B, D) { var C = this; D.delegate(".user-follow-link", "click", function(H) { var F = $(this).closest(".user-small-list-item"), G = F.attr("data-user-id"), E = C.mergeProfileId({ rating: 1, recommended_user_id: G, token: C.feedbackToken }); twttr.API.UserRecommendation.rate(E); scribe($.extend({ event_name: B }, E), "whotofollow"); scribble("follow-user", { profile_user_id: G, component: "dashboard", subcomponent: "who-to-follow" }) }) }, attachWTFDismissEvents: function(B, D) { var C = this; D.delegate(".user-small-list-item .dismiss", "click", function(K) { var J = $(this).closest(".user-small-list-item"); var E = parseInt(J.attr("data-user-id")); J.animate({ opacity: 0 }, 300); var G = function(L) { if (L && L.length()) { var O = C.recsToUsers(L); var N = O.first(); if (N) { var M = $((new twttr.views.UserSmallListItem(N)).html()); C.trackImpressions(O, B, I, E); M.css({ opacity: 0 }); J.replaceWith(M); M.animate({ opacity: 1 }, 300) } } else { J.fadeOut(200, function() { J.animate({ height: 1 }, 100, null, function() { J.remove(); if (C.$find("ul.recommended-followers > li.user-small-list-item").length == 0) { C.trigger("notRendered", "noMoreRecommendations"); C.$node.empty() } }) }) } }; var I = C.mergeProfileId({ excluded: C.currentRecommendations.join(","), success: G, error: F }); var H = twttr.merge({ user_id: I.to_user_id }, I); var F = function() { twttr.showError(_("Whoops! Something went wrong. Please try again!")); J.css({ opacity: 1 }) }; if (J.hasClass("following")) { C.fetch(twttr.merge(H, { limit: 1 })) } else { twttr.API.UserRecommendation.hide(E, C.feedbackToken, H) } }) }, attachWTFHideEvents: function() { var B = this; this.$find(".profile-actions > .dismiss").click(function() { B.$find(".wtf-dropdown").fadeOut(300) }) } }) }); twttr.klass("twttr.Editor", function(A, B) { var D = this; $(A).addClass("twttr-editor"); this.options = B || {}; this._ghostText = this.options.ghostText || ""; this._defaultContent = this.options.defaultContent || ""; var C = this.options.width || "100%", F = this.options.height || "auto"; this.$editor = $("