Commit 23220c5e authored by 神楽坂玲奈's avatar 神楽坂玲奈

mycard

parent 9902f595
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
# Ignore bundler config
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/nbproject/
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
/config/database.yml
\ No newline at end of file
source 'http://rubygems.org' source 'https://rubygems.org'
gem 'rails', '3.0.3'
gem 'rails', '3.2.2'
gem "activerecord-import", ">= 0.2.0"
gem 'will_paginate'
gem 'will-paginate-i18n'
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git' # gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql' gem 'mysql2'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
unless RUBY_PLATFORM["mswin"] or RUBY_PLATFORM["ming"]
gem 'therubyracer'
end
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the web server # Use unicorn as the app server
# gem 'unicorn' # gem 'unicorn'
# Deploy with Capistrano # Deploy with Capistrano
# gem 'capistrano' # gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+) # To use debugger
# gem 'ruby-debug' # gem 'ruby-debug19', :require => 'ruby-debug'
# gem 'ruby-debug19'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
GEM GEM
remote: http://rubygems.org/ remote: https://rubygems.org/
specs: specs:
abstract (1.0.0) actionmailer (3.2.2)
actionmailer (3.0.3) actionpack (= 3.2.2)
actionpack (= 3.0.3) mail (~> 2.4.0)
mail (~> 2.2.9) actionpack (3.2.2)
actionpack (3.0.3) activemodel (= 3.2.2)
activemodel (= 3.0.3) activesupport (= 3.2.2)
activesupport (= 3.0.3) builder (~> 3.0.0)
builder (~> 2.1.2) erubis (~> 2.7.0)
erubis (~> 2.6.6) journey (~> 1.0.1)
i18n (~> 0.4) rack (~> 1.4.0)
rack (~> 1.2.1) rack-cache (~> 1.1)
rack-mount (~> 0.6.13) rack-test (~> 0.6.1)
rack-test (~> 0.5.6) sprockets (~> 2.1.2)
tzinfo (~> 0.3.23) activemodel (3.2.2)
activemodel (3.0.3) activesupport (= 3.2.2)
activesupport (= 3.0.3) builder (~> 3.0.0)
builder (~> 2.1.2) activerecord (3.2.2)
i18n (~> 0.4) activemodel (= 3.2.2)
activerecord (3.0.3) activesupport (= 3.2.2)
activemodel (= 3.0.3) arel (~> 3.0.2)
activesupport (= 3.0.3) tzinfo (~> 0.3.29)
arel (~> 2.0.2) activerecord-import (0.2.9)
tzinfo (~> 0.3.23) activerecord (~> 3.0)
activeresource (3.0.3) activerecord (~> 3.0)
activemodel (= 3.0.3) activeresource (3.2.2)
activesupport (= 3.0.3) activemodel (= 3.2.2)
activesupport (3.0.3) activesupport (= 3.2.2)
arel (2.0.6) activesupport (3.2.2)
builder (2.1.2) i18n (~> 0.6)
erubis (2.6.6) multi_json (~> 1.0)
abstract (>= 1.0.0) arel (3.0.2)
i18n (0.5.0) builder (3.0.0)
mail (2.2.12) coffee-rails (3.2.2)
activesupport (>= 2.3.6) coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
erubis (2.7.0)
execjs (1.3.0)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.1)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.6.5)
mail (2.4.3)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
mime-types (1.16) mime-types (1.17.2)
mysql (2.8.1-x86-mingw32) multi_json (1.1.0)
mysql (2.8.1-x86-mswin32) mysql2 (0.3.11)
polyglot (0.3.1) mysql2 (0.3.11-x86-mingw32)
rack (1.2.1) polyglot (0.3.3)
rack-mount (0.6.13) rack (1.4.1)
rack (>= 1.0.0) rack-cache (1.2)
rack-test (0.5.6) rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0) rack (>= 1.0)
rails (3.0.3) rails (3.2.2)
actionmailer (= 3.0.3) actionmailer (= 3.2.2)
actionpack (= 3.0.3) actionpack (= 3.2.2)
activerecord (= 3.0.3) activerecord (= 3.2.2)
activeresource (= 3.0.3) activeresource (= 3.2.2)
activesupport (= 3.0.3) activesupport (= 3.2.2)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.0.3) railties (= 3.2.2)
railties (3.0.3) railties (3.2.2)
actionpack (= 3.0.3) actionpack (= 3.2.2)
activesupport (= 3.0.3) activesupport (= 3.2.2)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (~> 0.14.4) rdoc (~> 3.4)
rake (0.8.7) thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
sass (3.1.15)
sass-rails (3.2.4)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.14.6) thor (0.14.6)
treetop (1.4.9) tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.23) tzinfo (0.3.32)
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
will-paginate-i18n (0.1.1)
will_paginate (3.0.3)
PLATFORMS PLATFORMS
ruby
x86-mingw32 x86-mingw32
x86-mswin32
DEPENDENCIES DEPENDENCIES
mysql activerecord-import (>= 0.2.0)
rails (= 3.0.3) coffee-rails (~> 3.2.1)
jquery-rails
mysql2
rails (= 3.2.2)
sass-rails (~> 3.2.3)
uglifier (>= 1.0.3)
will-paginate-i18n
will_paginate
...@@ -91,7 +91,7 @@ mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example: ...@@ -91,7 +91,7 @@ mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
class WeblogController < ActionController::Base class WeblogController < ActionController::Base
def index def index
@posts = Post.find(:all) @posts = Post.all
debugger debugger
end end
end end
...@@ -139,7 +139,7 @@ To reload your controllers and models after launching the console run ...@@ -139,7 +139,7 @@ To reload your controllers and models after launching the console run
<tt>reload!</tt> <tt>reload!</tt>
More information about irb can be found at: More information about irb can be found at:
link:http://www.rubycentral.com/pickaxe/irb.html link:http://www.rubycentral.org/pickaxe/irb.html
== dbconsole == dbconsole
...@@ -156,6 +156,10 @@ PostgreSQL and SQLite 3. ...@@ -156,6 +156,10 @@ PostgreSQL and SQLite 3.
The default directory structure of a generated Ruby on Rails application: The default directory structure of a generated Ruby on Rails application:
|-- app |-- app
| |-- assets
| |-- images
| |-- javascripts
| `-- stylesheets
| |-- controllers | |-- controllers
| |-- helpers | |-- helpers
| |-- mailers | |-- mailers
...@@ -172,9 +176,6 @@ The default directory structure of a generated Ruby on Rails application: ...@@ -172,9 +176,6 @@ The default directory structure of a generated Ruby on Rails application:
| `-- tasks | `-- tasks
|-- log |-- log
|-- public |-- public
| |-- images
| |-- javascripts
| `-- stylesheets
|-- script |-- script
|-- test |-- test
| |-- fixtures | |-- fixtures
...@@ -188,11 +189,16 @@ The default directory structure of a generated Ruby on Rails application: ...@@ -188,11 +189,16 @@ The default directory structure of a generated Ruby on Rails application:
| |-- sessions | |-- sessions
| `-- sockets | `-- sockets
`-- vendor `-- vendor
|-- assets
`-- stylesheets
`-- plugins `-- plugins
app app
Holds all the code that's specific to this particular application. Holds all the code that's specific to this particular application.
app/assets
Contains subdirectories for images, stylesheets, and JavaScript files.
app/controllers app/controllers
Holds controllers that should be named like weblogs_controller.rb for Holds controllers that should be named like weblogs_controller.rb for
automated URL mapping. All controllers should descend from automated URL mapping. All controllers should descend from
...@@ -237,8 +243,7 @@ lib ...@@ -237,8 +243,7 @@ lib
the load path. the load path.
public public
The directory available for the web server. Contains subdirectories for The directory available for the web server. Also contains the dispatchers and the
images, stylesheets, and javascripts. Also contains the dispatchers and the
default HTML files. This should be set as the DOCUMENT_ROOT of your web default HTML files. This should be set as the DOCUMENT_ROOT of your web
server. server.
......
#!/usr/bin/env rake
#encoding: UTF-8
# Add your own tasks in files placed in lib/tasks ending in .rake, # Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require 'rake/dsl_definition'
require File.expand_path('../config/application', __FILE__) require File.expand_path('../config/application', __FILE__)
require 'rake'
Reliz::Application.load_tasks MycardServerHttp::Application.load_tasks
if RUBY_PLATFORM["mswin"] or RUBY_PLATFORM["ming"]
STDOUT.set_encoding "GBK", "UTF-8", :invalid => :replace, :undef => :replace
#STDERR.set_encoding "GBK", "UTF-8"
end
def connect_fh(db='1.accdb')
puts '连接数据库...'
require 'win32ole'
conn = WIN32OLE.new('ADODB.connection')
conn.Open('Provider = Microsoft.ACE.OlEDB.12.0;Data Source=1.accdb')
rs = WIN32OLE.new('ADODB.Recordset')
[conn, rs]
end
task :load_from_fh => :environment do
conn, rs = connect_fh
puts '读取决斗信息...'
rs.Open("select d.*, w.getcount as winner_credits, l.getcount as loser_credits
from duel d, duelcount w, duelcount l
where d.id*2-1 = w.id and d.id*2 = l.id
and d.id not in (#{Duel.all.collect{|duel|duel.id}.push(0).join(',')})", conn)
columns = [:id,:user1_id,:user2_id,:winner_id,:winreason,:replay,:user1_credits,:user2_credits]#,created_at,updated_at
values = []
while !rs.EOF
duel = [
rs.Fields["id"].value,
User.find_or_create_by_name(rs.Fields["dueluser1"].value).id,
User.find_or_create_by_name(rs.Fields["dueluser2"].value).id,
:winner_id,
rs.Fields["winreason"].value,
rs.Fields["duelname"].value,
:user1_credits,
:user2_credits#,
#time,
#time
]
if rs.Fields["winnerpos"].value == 0
duel[3] = duel[1]
duel[6] = rs.Fields["winner_credits"].value
duel[7] = rs.Fields["loser_credits"].value
else
duel[3] = duel[2]
duel[6] = rs.Fields["loser_credits"].value
duel[7] = rs.Fields["winner_credits"].value
end
puts "#{duel[0]}: #{rs.Fields["dueluser1"].value} - #{rs.Fields["dueluser2"].value}"
values << duel
rs.MoveNext
end
rs.Close
puts '导入决斗信息...'
Duel.import columns, values, :validate => false
puts '读取玩家卡组信息...'
rs.Open("select count(*) as _count from deck", conn)
count = rs.Fields["_count"].value
rs.Close
columns = [:id, :duel_id, :user_id, :card_id, :main]
values = []
rs.Open("select * from deck where id not in (#{DuelUserCard.all.collect{|duel_user_card|duel_user_card.id}.push(0).join(',')})", conn)
while !rs.EOF
duel = Duel.find_or_create_by_id(rs.Fields["duelid"].value)
card = Card.find_by_number(rs.Fields["decknumber"].value)
duel_user_card = [
rs.Fields["ID"].value,
duel.id,
:user_id,
card ? card.id : p(card = (Card.create :number => rs.Fields["decknumber"].value, :name => rs.Fields["decknumber"].value.to_s)),
rs.Fields["deckpos"].value % 2,
]
duel_user_card[2] = rs.Fields["deckpos"].value <= 2 ? duel.user1_id : duel.user2_id
values << duel_user_card
puts "(#{duel_user_card[0]}/#{count})#{duel_user_card[2] || 'unknown'} - #{card.name}"
rs.MoveNext
end
rs.Close
puts '导入玩家卡组信息...'
DuelUserCard.import columns, values, :validate => false
puts '运行完毕'
end
#"update users u, duels_users_cards duc, duels d set u.credits = SUM()"
#select
task :refresh_user_count => :environment do
count = User.maximum(:id)
User.find_each do |user|
user.update_attributes :credits => Duel.where(:user1_id => user.id).sum(:user1_credits) + Duel.where(:user2_id => user.id).sum(:user2_credits),
:win => user.wins.count,
:lost => user.losts.count
puts "(#{user.id}/#{count})#{user.name}"
end
end
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
var BROWSER = {};var USERAGENT = navigator.userAgent.toLowerCase();BROWSER.ie = window.ActiveXObject && USERAGENT.indexOf('msie') != -1 && USERAGENT.substr(USERAGENT.indexOf('msie') + 5, 3);BROWSER.firefox = document.getBoxObjectFor && USERAGENT.indexOf('firefox') != -1 && USERAGENT.substr(USERAGENT.indexOf('firefox') + 8, 3);BROWSER.chrome = window.MessageEvent && !document.getBoxObjectFor && USERAGENT.indexOf('chrome') != -1 && USERAGENT.substr(USERAGENT.indexOf('chrome') + 7, 10);BROWSER.opera = window.opera && opera.version();BROWSER.safari = window.openDatabase && USERAGENT.indexOf('safari') != -1 && USERAGENT.substr(USERAGENT.indexOf('safari') + 7, 8);BROWSER.other = !BROWSER.ie && !BROWSER.firefox && !BROWSER.chrome && !BROWSER.opera && !BROWSER.safari;BROWSER.firefox = BROWSER.chrome ? 1 : BROWSER.firefox;var DISCUZCODE = [];DISCUZCODE['num'] = '-1';DISCUZCODE['html'] = [];var CSSLOADED = [];var JSMENU = [];JSMENU['active'] = [];JSMENU['timer'] = [];JSMENU['drag'] = [];JSMENU['layer'] = 0;JSMENU['zIndex'] = {'win':200,'menu':300,'prompt':400,'dialog':500};JSMENU['float'] = '';var AJAX = [];AJAX['debug'] = 0;AJAX['url'] = [];AJAX['stack'] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];var clipboardswfdata = '';var CURRENTSTYPE = null;var discuz_uid = isUndefined(discuz_uid) ? 0 : discuz_uid;var creditnotice = isUndefined(creditnotice) ? '' : creditnotice;var cookiedomain = isUndefined(cookiedomain) ? '' : cookiedomain;var cookiepath = isUndefined(cookiepath) ? '' : cookiepath;if(BROWSER.firefox && window.HTMLElement) {HTMLElement.prototype.__defineSetter__('outerHTML', function(sHTML) {var r = this.ownerDocument.createRange();r.setStartBefore(this);var df = r.createContextualFragment(sHTML);this.parentNode.replaceChild(df,this);return sHTML;});HTMLElement.prototype.__defineGetter__('outerHTML', function() {var attr;var attrs = this.attributes;var str = '<' + this.tagName.toLowerCase();for(var i = 0;i < attrs.length;i++){attr = attrs[i];if(attr.specified)str += ' ' + attr.name + '="' + attr.value + '"';}if(!this.canHaveChildren) {return str + '>';}return str + '>' + this.innerHTML + '</' + this.tagName.toLowerCase() + '>';});HTMLElement.prototype.__defineGetter__('canHaveChildren', function() {switch(this.tagName.toLowerCase()) {case 'area':case 'base':case 'basefont':case 'col':case 'frame':case 'hr':case 'img':case 'br':case 'input':case 'isindex':case 'link':case 'meta':case 'param':return false;}return true;});HTMLElement.prototype.click = function(){var evt = this.ownerDocument.createEvent('MouseEvents');evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);this.dispatchEvent(evt);};}function $(id) {return document.getElementById(id);}function display(id) {$(id).style.display = $(id).style.display == '' ? 'none' : '';}function isUndefined(variable) {return typeof variable == 'undefined' ? true : false;}function in_array(needle, haystack) {if(typeof needle == 'string' || typeof needle == 'number') {for(var i in haystack) {if(haystack[i] == needle) {return true;}}}return false;}function trim(str) {return (str + '').replace(/(\s+)$/g, '').replace(/^\s+/g, '');}function strlen(str) {return (BROWSER.ie && str.indexOf('\n') != -1) ? str.replace(/\r?\n/g, '_').length : str.length;}function mb_strlen(str) {var len = 0;for(var i = 0; i < str.length; i++) {len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? (charset == 'utf-8' ? 3 : 2) : 1;}return len;}function mb_cutstr(str, maxlen, dot) {var len = 0;var ret = '';var dot = !dot ? '...' : '';maxlen = maxlen - dot.length;for(var i = 0; i < str.length; i++) {len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? (charset == 'utf-8' ? 3 : 2) : 1;if(len > maxlen) {ret += dot;break;}ret += str.substr(i, 1);}return ret;}function checkall(form, prefix, checkall) {var checkall = checkall ? checkall : 'chkall';count = 0;for(var i = 0; i < form.elements.length; i++) {var e = form.elements[i];if(e.name && e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {e.checked = form.elements[checkall].checked;if(e.checked) {count++;}}}return count;}function doane(event) {e = event ? event : window.event;if(!e) return;if(BROWSER.ie) {e.returnValue = false;e.cancelBubble = true;} else if(e) {e.stopPropagation();e.preventDefault();}}function _attachEvent(obj, evt, func, eventobj) {eventobj = !eventobj ? obj : eventobj;if(obj.addEventListener) {obj.addEventListener(evt, func, false);} else if(eventobj.attachEvent) {obj.attachEvent('on' + evt, func);}}function _detachEvent(obj, evt, func, eventobj) {eventobj = !eventobj ? obj : eventobj;if(obj.removeEventListener) {obj.removeEventListener(evt, func, false);} else if(eventobj.detachEvent) {obj.detachEvent('on' + evt, func);}}function setcookie(cookieName, cookieValue, seconds, path, domain, secure) {var expires = new Date();expires.setTime(expires.getTime() + seconds * 1000);domain = !domain ? cookiedomain : domain;path = !path ? cookiepath : path;document.cookie = escape(cookieName) + '=' + escape(cookieValue)+ (expires ? '; expires=' + expires.toGMTString() : '')+ (path ? '; path=' + path : '/')+ (domain ? '; domain=' + domain : '')+ (secure ? '; secure' : '');}function getcookie(name) {var cookie_start = document.cookie.indexOf(name);var cookie_end = document.cookie.indexOf(";", cookie_start);return cookie_start == -1 ? '' : unescape(document.cookie.substring(cookie_start + name.length + 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length)));}function thumbImg(obj, method) {if(!obj) {return;}obj.onload = null;file = obj.src;zw = obj.offsetWidth;zh = obj.offsetHeight;if(zw < 2) {if(!obj.id) {obj.id = 'img_' + Math.random();}setTimeout("thumbImg($('" + obj.id + "'), " + method + ")", 100);return;}zr = zw / zh;method = !method ? 0 : 1;if(method) {fixw = obj.getAttribute('_width');fixh = obj.getAttribute('_height');if(zw > fixw) {zw = fixw;zh = zw / zr;}if(zh > fixh) {zh = fixh;zw = zh * zr;}} else {var widthary = imagemaxwidth.split('%');if(widthary.length > 1) {fixw = $('wrap').clientWidth - 200;if(widthary[0]) {fixw = fixw * widthary[0] / 100;} else if(widthary[1]) {fixw = fixw < widthary[1] ? fixw : widthary[1];}} else {fixw = widthary[0];}if(zw > fixw) {zw = fixw;zh = zw / zr;obj.style.cursor = 'pointer';if(!obj.onclick) {obj.onclick = function() {zoom(obj, obj.src);};}}}obj.width = zw;obj.height = zh;}function imgzoom() {}function attachimg() {}function setCopy(text, msg){if(BROWSER.ie) {clipboardData.setData('Text', text);if(msg) {showDialog(msg, 'notice');}} else {var msg = '<div style="text-decoration:underline;">点此复制到剪贴板</div>' +AC_FL_RunContent('id', 'clipboardswf', 'name', 'clipboardswf', 'devicefont', 'false', 'width', '120', 'height', '40', 'src', 'images/common/clipboard.swf', 'menu', 'false', 'allowScriptAccess', 'sameDomain', 'swLiveConnect', 'true', 'wmode', 'transparent', 'style' , 'margin-top:-20px');showDialog(msg, 'info');text = text.replace(/[\xA0]/g, ' ');clipboardswfdata = text;}}function getClipboardData() {window.document.clipboardswf.SetVariable('str', clipboardswfdata);}function saveData(ignoreempty) {var ignoreempty = isUndefined(ignoreempty) ? 0 : ignoreempty;var obj = $('postform') && (($('fwin_newthread') && $('fwin_newthread').style.display == '') || ($('fwin_reply') && $('fwin_reply').style.display == '')) ? $('postform') : ($('fastpostform') ? $('fastpostform') : $('postform'));if(!obj) return;var data = subject = message = '';for(var i = 0; i < obj.elements.length; i++) {var el = obj.elements[i];if(el.name != '' && (el.tagName == 'TEXTAREA' || el.tagName == 'INPUT' && (el.type == 'text' || el.type == 'checkbox' || el.type == 'radio')) && el.name.substr(0, 6) != 'attach') {var elvalue = el.value;if(el.name == 'subject') {subject = trim(elvalue);} else if(el.name == 'message') {if(typeof wysiwyg != 'undefined' && wysiwyg == 1) {elvalue = html2bbcode(editdoc.body.innerHTML);}message = trim(elvalue);}if((el.type == 'checkbox' || el.type == 'radio') && !el.checked) {continue;}if(trim(elvalue)) {data += el.name + String.fromCharCode(9) + el.tagName + String.fromCharCode(9) + el.type + String.fromCharCode(9) + elvalue + String.fromCharCode(9, 9);}}}if(!subject && !message && !ignoreempty) {return;}if(BROWSER.ie){with(document.documentElement) {setAttribute("value", data);save('Discuz');}} else if(window.sessionStorage){sessionStorage.setItem('Discuz', data);}}function switchAdvanceMode(url) {var obj = $('postform') && (($('fwin_newthread') && $('fwin_newthread').style.display == '') || ($('fwin_reply') && $('fwin_reply').style.display == '')) ? $('postform') : $('fastpostform');if(obj && obj.message.value != '') {saveData();url += '&cedit=yes';}location.href = url;return false;}function updatestring(str1, str2, clear) {str2 = '_' + str2 + '_';return clear ? str1.replace(str2, '') : (str1.indexOf(str2) == -1 ? str1 + str2 : str1);}function toggle_collapse(objname, noimg, complex, lang) {var obj = $(objname);if(obj) {obj.style.display = obj.style.display == '' ? 'none' : '';var collapsed = getcookie('discuz_collapse');collapsed = updatestring(collapsed, objname, !obj.style.display);setcookie('discuz_collapse', collapsed, (collapsed ? 2592000 : -2592000));}if(!noimg) {var img = $(objname + '_img');if(img.tagName != 'IMG') {if(img.className.indexOf('_yes') == -1) {img.className = img.className.replace(/_no/, '_yes');if(lang) {img.innerHTML = lang[0];}} else {img.className = img.className.replace(/_yes/, '_no');if(lang) {img.innerHTML = lang[1];}}} else {img.src = img.src.indexOf('_yes.gif') == -1 ? img.src.replace(/_no\.gif/, '_yes\.gif') : img.src.replace(/_yes\.gif/, '_no\.gif');}img.blur();}if(complex) {var objc = $(objname + '_c');if(objc) {objc.className = objc.className == 'c_header' ? 'c_header closenode' : 'c_header';}}}function sidebar_collapse(lang) {if(lang[0]) {toggle_collapse('sidebar', null, null, lang);$('wrap').className = $('wrap').className == 'wrap with_side s_clear' ? 'wrap s_clear' : 'wrap with_side s_clear';} else {var collapsed = getcookie('discuz_collapse');collapsed = updatestring(collapsed, 'sidebar', 1);setcookie('discuz_collapse', collapsed, (collapsed ? 2592000 : -2592000));location.reload();}}function loadcss(cssname) {if(!CSSLOADED[cssname]) {css = document.createElement('link');css.type = 'text/css';css.rel = 'stylesheet';css.href = 'forumdata/cache/style_' + STYLEID + '_' + cssname + '.css?' + VERHASH;var headNode = document.getElementsByTagName("head")[0];headNode.appendChild(css);CSSLOADED[cssname] = 1;}}function showMenu(v) {var ctrlid = isUndefined(v['ctrlid']) ? v : v['ctrlid'];var showid = isUndefined(v['showid']) ? ctrlid : v['showid'];var menuid = isUndefined(v['menuid']) ? showid + '_menu' : v['menuid'];var ctrlObj = $(ctrlid);var menuObj = $(menuid);if(!menuObj) return;var mtype = isUndefined(v['mtype']) ? 'menu' : v['mtype'];var evt = isUndefined(v['evt']) ? 'mouseover' : v['evt'];var pos = isUndefined(v['pos']) ? '43' : v['pos'];var layer = isUndefined(v['layer']) ? 1 : v['layer'];var duration = isUndefined(v['duration']) ? 2 : v['duration'];var timeout = isUndefined(v['timeout']) ? 250 : v['timeout'];var maxh = isUndefined(v['maxh']) ? 500 : v['maxh'];var cache = isUndefined(v['cache']) ? 1 : v['cache'];var drag = isUndefined(v['drag']) ? '' : v['drag'];var dragobj = drag && $(drag) ? $(drag) : menuObj;var fade = isUndefined(v['fade']) ? 0 : v['fade'];var cover = isUndefined(v['cover']) ? 0 : v['cover'];var zindex = isUndefined(v['zindex']) ? JSMENU['zIndex']['menu'] : v['zindex'];if(typeof JSMENU['active'][layer] == 'undefined') {JSMENU['active'][layer] = [];}if(evt == 'click' && in_array(menuid, JSMENU['active'][layer]) && mtype != 'win') {hideMenu(menuid, mtype);return;}if(mtype == 'menu') {hideMenu(layer, mtype);}if(ctrlObj) {if(!ctrlObj.initialized) {ctrlObj.initialized = true;ctrlObj.unselectable = true;ctrlObj.outfunc = typeof ctrlObj.onmouseout == 'function' ? ctrlObj.onmouseout : null;ctrlObj.onmouseout = function() {if(this.outfunc) this.outfunc();if(duration < 3 && !JSMENU['timer'][menuid]) JSMENU['timer'][menuid] = setTimeout('hideMenu(\'' + menuid + '\', \'' + mtype + '\')', timeout);};ctrlObj.overfunc = typeof ctrlObj.onmouseover == 'function' ? ctrlObj.onmouseover : null;ctrlObj.onmouseover = function(e) {doane(e);if(this.overfunc) this.overfunc();if(evt == 'click') {clearTimeout(JSMENU['timer'][menuid]);JSMENU['timer'][menuid] = null;} else {for(var i in JSMENU['timer']) {if(JSMENU['timer'][i]) {clearTimeout(JSMENU['timer'][i]);JSMENU['timer'][i] = null;}}}};}}var dragMenu = function(menuObj, e, op) {e = e ? e : window.event;if(op == 1) {if(in_array(BROWSER.ie ? e.srcElement.tagName : e.target.tagName, ['TEXTAREA', 'INPUT', 'BUTTON', 'SELECT'])) {return;}JSMENU['drag'] = [e.clientX, e.clientY];JSMENU['drag'][2] = parseInt(menuObj.style.left);JSMENU['drag'][3] = parseInt(menuObj.style.top);document.onmousemove = function(e) {try{dragMenu(menuObj, e, 2);}catch(err){}};document.onmouseup = function(e) {try{dragMenu(menuObj, e, 3);}catch(err){}};doane(e);} else if(op == 2 && JSMENU['drag'][0]) {var menudragnow = [e.clientX, e.clientY];menuObj.style.left = (JSMENU['drag'][2] + menudragnow[0] - JSMENU['drag'][0]) + 'px';menuObj.style.top = (JSMENU['drag'][3] + menudragnow[1] - JSMENU['drag'][1]) + 'px';doane(e);} else if(op == 3) {JSMENU['drag'] = [];document.onmousemove = null;document.onmouseup = null;}};if(!menuObj.initialized) {menuObj.initialized = true;menuObj.ctrlkey = ctrlid;menuObj.mtype = mtype;menuObj.layer = layer;menuObj.cover = cover;if(ctrlObj && ctrlObj.getAttribute('fwin')) {menuObj.scrolly = true;}menuObj.style.position = 'absolute';menuObj.style.zIndex = zindex + layer;menuObj.onclick = function(e) {if(!e || BROWSER.ie) {window.event.cancelBubble = true;return window.event;} else {e.stopPropagation();return e;}};if(duration < 3) {if(duration > 1) {menuObj.onmouseover = function() {clearTimeout(JSMENU['timer'][menuid]);JSMENU['timer'][menuid] = null;};}if(duration != 1) {menuObj.onmouseout = function() {JSMENU['timer'][menuid] = setTimeout('hideMenu(\'' + menuid + '\', \'' + mtype + '\')', timeout);};}}if(drag) {dragobj.style.cursor = 'move';dragobj.onmousedown = function(event) {try{dragMenu(menuObj, event, 1);}catch(e){}};}if(cover) {var coverObj = document.createElement('div');coverObj.id = menuid + '_cover';coverObj.style.position = 'absolute';coverObj.style.zIndex = menuObj.style.zIndex - 1;coverObj.style.left = coverObj.style.top = '0px';coverObj.style.width = '100%';coverObj.style.height = document.body.scrollHeight + 'px';coverObj.style.backgroundColor = '#000';coverObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=50)';coverObj.style.opacity = 0.5;$('append_parent').appendChild(coverObj);}}menuObj.style.display = '';if(cover) $(menuid + '_cover').style.display = '';if(fade) {var O = 0;var fadeIn = function(O) {if(O == 100) {clearTimeout(fadeInTimer);return;}menuObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + O + ')';menuObj.style.opacity = O / 100;O += 10;var fadeInTimer = setTimeout(function () {fadeIn(O);}, 50);};fadeIn(O);menuObj.fade = true;} else {menuObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=100)';menuObj.style.opacity = 1;menuObj.fade = false;}setMenuPosition(showid, menuid, pos);if(maxh && menuObj.scrollHeight > maxh) {menuObj.style.height = maxh + 'px';if(BROWSER.opera) {menuObj.style.overflow = 'auto';} else {menuObj.style.overflowY = 'auto';}}if(!duration) {setTimeout('hideMenu(\'' + menuid + '\', \'' + mtype + '\')', timeout);}if(!in_array(menuid, JSMENU['active'][layer])) JSMENU['active'][layer].push(menuid);menuObj.cache = cache;if(layer > JSMENU['layer']) {JSMENU['layer'] = layer;}}function setMenuPosition(showid, menuid, pos) {var showObj = $(showid);var menuObj = menuid ? $(menuid) : $(showid + '_menu');if(isUndefined(pos)) pos = '43';var basePoint = parseInt(pos.substr(0, 1));var direction = parseInt(pos.substr(1, 1));var sxy = sx = sy = sw = sh = ml = mt = mw = mcw = mh = mch = bpl = bpt = 0;if(!menuObj || (basePoint > 0 && !showObj)) return;if(showObj) {sxy = fetchOffset(showObj);sx = sxy['left'];sy = sxy['top'];sw = showObj.offsetWidth;sh = showObj.offsetHeight;}mw = menuObj.offsetWidth;mcw = menuObj.clientWidth;mh = menuObj.offsetHeight;mch = menuObj.clientHeight;switch(basePoint) {case 1:bpl = sx;bpt = sy;break;case 2:bpl = sx + sw;bpt = sy;break;case 3:bpl = sx + sw;bpt = sy + sh;break;case 4:bpl = sx;bpt = sy + sh;break;}switch(direction) {case 0:menuObj.style.left = (document.body.clientWidth - menuObj.clientWidth) / 2 + 'px';mt = (document.documentElement.clientHeight - menuObj.clientHeight) / 2;break;case 1:ml = bpl - mw;mt = bpt - mh;break;case 2:ml = bpl;mt = bpt - mh;break;case 3:ml = bpl;mt = bpt;break;case 4:ml = bpl - mw;mt = bpt;break;}if(in_array(direction, [1, 4]) && ml < 0) {ml = bpl;if(in_array(basePoint, [1, 4])) ml += sw;} else if(ml + mw > document.documentElement.scrollLeft + document.body.clientWidth && sx >= mw) {ml = bpl - mw;if(in_array(basePoint, [2, 3])) ml -= sw;}if(in_array(direction, [1, 2]) && mt < 0) {mt = bpt;if(in_array(basePoint, [1, 2])) mt += sh;} else if(mt + mh > document.documentElement.scrollTop + document.documentElement.clientHeight && sy >= mh) {mt = bpt - mh;if(in_array(basePoint, [3, 4])) mt -= sh;}if(pos == '210') {ml += 69 - sw / 2;mt -= 5;if(showObj.tagName == 'TEXTAREA') {ml -= sw / 2;mt += sh / 2;}}if(direction == 0 || menuObj.scrolly) {if(BROWSER.ie && BROWSER.ie < 7) {if(direction == 0) mt += Math.max(document.documentElement.scrollTop, document.body.scrollTop);} else {if(menuObj.scrolly) mt -= Math.max(document.documentElement.scrollTop, document.body.scrollTop);menuObj.style.position = 'fixed';}}if(ml) menuObj.style.left = ml + 'px';if(mt) menuObj.style.top = mt + 'px';if(direction == 0 && BROWSER.ie && !document.documentElement.clientHeight) {menuObj.style.position = 'absolute';menuObj.style.top = (document.body.clientHeight - menuObj.clientHeight) / 2 + 'px';}if(menuObj.style.clip && !BROWSER.opera) {menuObj.style.clip = 'rect(auto, auto, auto, auto)';}}function fetchOffset(obj) {var left_offset = 0, top_offset = 0;if(obj.getBoundingClientRect){var rect = obj.getBoundingClientRect();var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);if(document.documentElement.dir == 'rtl') {scrollLeft = scrollLeft + document.documentElement.clientWidth - document.documentElement.scrollWidth;}left_offset = rect.left + scrollLeft - document.documentElement.clientLeft;top_offset = rect.top + scrollTop - document.documentElement.clientTop;}if(left_offset <= 0 || top_offset <= 0) {left_offset = obj.offsetLeft;top_offset = obj.offsetTop;while((obj = obj.offsetParent) != null) {left_offset += obj.offsetLeft;top_offset += obj.offsetTop;}}return { 'left' : left_offset, 'top' : top_offset };}function hideMenu(attr, mtype) {attr = isUndefined(attr) ? '' : attr;mtype = isUndefined(mtype) ? 'menu' : mtype;if(attr == '') {for(var i = 1; i <= JSMENU['layer']; i++) {hideMenu(i, mtype);}return;} else if(typeof attr == 'number') {for(var j in JSMENU['active'][attr]) {hideMenu(JSMENU['active'][attr][j], mtype);}return;} else if(typeof attr == 'string') {var menuObj = $(attr);if(!menuObj || (mtype && menuObj.mtype != mtype)) return;clearTimeout(JSMENU['timer'][attr]);var hide = function() {if(menuObj.cache) {menuObj.style.display = 'none';if(menuObj.cover) $(attr + '_cover').style.display = 'none';} else {menuObj.parentNode.removeChild(menuObj);if(menuObj.cover) $(attr + '_cover').parentNode.removeChild($(attr + '_cover'));}var tmp = [];for(var k in JSMENU['active'][menuObj.layer]) {if(attr != JSMENU['active'][menuObj.layer][k]) tmp.push(JSMENU['active'][menuObj.layer][k]);}JSMENU['active'][menuObj.layer] = tmp;};if(menuObj.fade) {var O = 100;var fadeOut = function(O) {if(O == 0) {clearTimeout(fadeOutTimer);hide();return;}menuObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + O + ')';menuObj.style.opacity = O / 100;O -= 10;var fadeOutTimer = setTimeout(function () {fadeOut(O);}, 50);};fadeOut(O);} else {hide();}}}function showPrompt(ctrlid, evt, msg, timeout, negligible) {var menuid = ctrlid ? ctrlid + '_pmenu' : 'ntcwin';var duration = timeout ? 0 : 3;if(!$(menuid)) {var div = document.createElement('div');div.id = menuid;div.className = ctrlid ? 'promptmenu up' : 'ntcwin';div.style.display = 'none';$('append_parent').appendChild(div);if(ctrlid) {msg = '<div id="' + ctrlid + '_prompt" class="promptcontent"><ul><li>' + msg + '</li></ul></div>';} else {msg = negligible ? msg : '<span style="font-style: normal;">' + msg + '</span>';msg = '<table cellspacing="0" cellpadding="0" class="popupcredit"><tr><td class="pc_l">&nbsp;</td><td class="pc_c"><div class="pc_inner">' + msg +(negligible ? '<a class="pc_btn" href="javascript:;" onclick="display(\'ntcwin\');setcookie(\'discuz_creditnoticedisable\', 1, 31536000);" title="不要再提示我"><img src="' + IMGDIR + '/popupcredit_btn.gif" alt="不要再提示我" /></a>' : '') +'</td><td class="pc_r">&nbsp;</td></tr></table>';}div.innerHTML = msg;}if(ctrlid) {if($(ctrlid).evt !== false) {var prompting = function() {showMenu({'mtype':'prompt','ctrlid':ctrlid,'evt':evt,'menuid':menuid,'pos':'210'});};if(evt == 'click') {$(ctrlid).onclick = prompting;} else {$(ctrlid).onmouseover = prompting;}}showMenu({'mtype':'prompt','ctrlid':ctrlid,'evt':evt,'menuid':menuid,'pos':'210','duration':duration,'timeout':timeout,'fade':1,'zindex':JSMENU['zIndex']['prompt']});$(ctrlid).unselectable = false;} else {showMenu({'mtype':'prompt','pos':'00','menuid':menuid,'duration':duration,'timeout':timeout,'fade':1,'zindex':JSMENU['zIndex']['prompt']});}}function showCreditPrompt() {var notice = getcookie('discuz_creditnotice').split('D');if(notice.length < 2 || notice[9] != discuz_uid || getcookie('discuz_creditnoticedisable')) {return;}var creditnames = creditnotice.split(',');var creditinfo = [];var s = '';var e;for(var i in creditnames) {e = creditnames[i].split('|');creditinfo[e[0]] = [e[1], e[2]];}for(i = 1; i <= 8; i++) {if(notice[i] != 0 && creditinfo[i]) {s += '<span>' + creditinfo[i][0] + (notice[i] > 0 ? '<em>+' : '<em class="desc">') + notice[i] + '</em>' + creditinfo[i][1] + '</span>';}}s && showPrompt(null, null, s, 2000, 1);setcookie('discuz_creditnotice', '', -2592000);}function showDialog(msg, mode, t, func, cover) {cover = isUndefined(cover) ? (mode == 'info' ? 0 : 1) : cover;mode = in_array(mode, ['confirm', 'notice', 'info']) ? mode : 'alert';var menuid = 'fwin_dialog';var menuObj = $(menuid);if(menuObj) hideMenu('fwin_dialog', 'dialog');menuObj = document.createElement('div');menuObj.style.display = 'none';menuObj.className = 'fwinmask';menuObj.id = menuid;$('append_parent').appendChild(menuObj);var s = '<table cellpadding="0" cellspacing="0" class="fwin"><tr><td class="t_l"></td><td class="t_c"></td><td class="t_r"></td></tr><tr><td class="m_l"></td><td class="m_c"><div class="fcontent' + (mode == 'info' ? '' : ' alert_win') + '"><h3 class="float_ctrl"><em>';s += t ? t : '提示信息';s += '</em><span><a href="javascript:;" class="float_close" onclick="hideMenu(\'' + menuid + '\', \'dialog\')" title="关闭">关闭</a></span></h3>';if(mode == 'info') {s += msg ? msg : '';} else {s += '<hr class="shadowline" />';s += '<div class="postbox"><div class="' + (mode == 'alert' ? 'alert_error' : 'alert_info') + '"><p>' + msg + '</p></div>';s += '<div class="alert_btn"><input type="button" id="fwin_dialog_submit" value="&nbsp;确定&nbsp;" />';s += mode == 'confirm' ? '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" onclick="hideMenu(\'' + menuid + '\', \'dialog\')" value="&nbsp;取消&nbsp;" />' : '';s += '</div></div>';}s += '</div></td><td class="m_r"></td></tr><tr><td class="b_l"></td><td class="b_c"></td><td class="b_r"></td></tr></table>';menuObj.innerHTML = s;if($('fwin_dialog_submit')) $('fwin_dialog_submit').onclick = function() {if(typeof func == 'function') func();else eval(func);hideMenu(menuid, 'dialog')};showMenu({'mtype':'dialog','menuid':menuid,'duration':3,'pos':'00','zindex':JSMENU['zIndex']['dialog'],'cache':0,'cover':cover});}function showWindow(k, url, mode, cache) {mode = isUndefined(mode) ? 'get' : mode;cache = isUndefined(cache) ? 1 : cache;var menuid = 'fwin_' + k;var menuObj = $(menuid);if(disallowfloat && disallowfloat.indexOf(k) != -1) {if(BROWSER.ie) url += (url.indexOf('?') != -1 ? '&' : '?') + 'referer=' + escape(location.href);location.href = url;return;}var fetchContent = function() {if(mode == 'get') {menuObj.url = url;url += (url.search(/\?/) > 0 ? '&' : '?') + 'infloat=yes&handlekey=' + k;ajaxget(url, 'fwin_content_' + k, null, '', '', function() {initMenu();show();});} else if(mode == 'post') {menuObj.act = $(url).action;ajaxpost(url, 'fwin_content_' + k, '', '', '', function() {initMenu();show();});}showDialog('', 'info', '<img src="' + IMGDIR + '/loading.gif"> 加载中...');};var initMenu = function() {var objs = menuObj.getElementsByTagName('*');for(var i = 0; i < objs.length; i++) {if(objs[i].id) {objs[i].setAttribute('fwin', k);}if(objs[i].className == 'float_ctrl') {if(!objs[i].id) objs[i].id = 'fctrl_' + k;drag = objs[i].id;}}};var show = function() {hideMenu('fwin_dialog', 'dialog');showMenu({'mtype':'win','menuid':menuid,'duration':3,'pos':'00','zindex':JSMENU['zIndex']['win'],'drag':typeof drag == 'undefined' ? '' : drag,'cache':cache});};if(!menuObj) {menuObj = document.createElement('div');menuObj.id = menuid;menuObj.className = 'fwinmask';menuObj.style.display = 'none';$('append_parent').appendChild(menuObj);menuObj.innerHTML = '<table cellpadding="0" cellspacing="0" class="fwin"><tr><td class="t_l"></td><td class="t_c"></td><td class="t_r"></td></tr><tr><td class="m_l"></td><td class="m_c" id="fwin_content_' + k + '">'+ '</td><td class="m_r"></td></tr><tr><td class="b_l"></td><td class="b_c"></td><td class="b_r"></td></tr></table>';fetchContent();} else if((mode == 'get' && url != menuObj.url) || (mode == 'post' && $(url).action != menuObj.act)) {fetchContent();} else {show();}doane();}function hideWindow(k) {hideMenu('fwin_' + k, 'win');hideMenu();hideMenu('', 'prompt');}function Ajax(recvType, waitId) {for(var stackId = 0; stackId < AJAX['stack'].length && AJAX['stack'][stackId] != 0; stackId++);AJAX['stack'][stackId] = 1;var aj = new Object();aj.loading = '加载中...';aj.recvType = recvType ? recvType : 'XML';aj.waitId = waitId ? $(waitId) : null;aj.resultHandle = null;aj.sendString = '';aj.targetUrl = '';aj.stackId = 0;aj.stackId = stackId;aj.setLoading = function(loading) {if(typeof loading !== 'undefined' && loading !== null) aj.loading = loading;};aj.setRecvType = function(recvtype) {aj.recvType = recvtype;};aj.setWaitId = function(waitid) {aj.waitId = typeof waitid == 'object' ? waitid : $(waitid);};aj.createXMLHttpRequest = function() {var request = false;if(window.XMLHttpRequest) {request = new XMLHttpRequest();if(request.overrideMimeType) {request.overrideMimeType('text/xml');}} else if(window.ActiveXObject) {var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0', 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP'];for(var i=0; i<versions.length; i++) {try {request = new ActiveXObject(versions[i]);if(request) {return request;}} catch(e) {}}}return request;};aj.XMLHttpRequest = aj.createXMLHttpRequest();aj.showLoading = function() {if(aj.waitId && (aj.XMLHttpRequest.readyState != 4 || aj.XMLHttpRequest.status != 200)) {aj.waitId.style.display = '';aj.waitId.innerHTML = '<span><img src="' + IMGDIR + '/loading.gif"> ' + aj.loading + '</span>';}};aj.processHandle = function() {if(aj.XMLHttpRequest.readyState == 4 && aj.XMLHttpRequest.status == 200) {for(k in AJAX['url']) {if(AJAX['url'][k] == aj.targetUrl) {AJAX['url'][k] = null;}}if(aj.waitId) {aj.waitId.style.display = 'none';}if(aj.recvType == 'HTML') {aj.resultHandle(aj.XMLHttpRequest.responseText, aj);} else if(aj.recvType == 'XML') {if(aj.XMLHttpRequest.responseXML.lastChild) {aj.resultHandle(aj.XMLHttpRequest.responseXML.lastChild.firstChild.nodeValue, aj);} else {if(AJAX['debug']) {var error = mb_cutstr(aj.XMLHttpRequest.responseText.replace(/\r?\n/g, '\\n').replace(/"/g, '\\\"'), 200);aj.resultHandle('<root>ajaxerror<script type="text/javascript" reload="1">showDialog(\'Ajax Error: \\n' + error + '\');</script></root>', aj);}}}AJAX['stack'][aj.stackId] = 0;}};aj.get = function(targetUrl, resultHandle) {setTimeout(function(){aj.showLoading()}, 250);if(in_array(targetUrl, AJAX['url'])) {return false;} else {AJAX['url'].push(targetUrl);}aj.targetUrl = targetUrl;aj.XMLHttpRequest.onreadystatechange = aj.processHandle;aj.resultHandle = resultHandle;var attackevasive = isUndefined(attackevasive) ? 0 : attackevasive;var delay = attackevasive & 1 ? (aj.stackId + 1) * 1001 : 100;if(window.XMLHttpRequest) {setTimeout(function(){aj.XMLHttpRequest.open('GET', aj.targetUrl);aj.XMLHttpRequest.send(null);}, delay);} else {setTimeout(function(){aj.XMLHttpRequest.open("GET", targetUrl, true);aj.XMLHttpRequest.send();}, delay);}};aj.post = function(targetUrl, sendString, resultHandle) {setTimeout(function(){aj.showLoading()}, 250);if(in_array(targetUrl, AJAX['url'])) {return false;} else {AJAX['url'].push(targetUrl);}aj.targetUrl = targetUrl;aj.sendString = sendString;aj.XMLHttpRequest.onreadystatechange = aj.processHandle;aj.resultHandle = resultHandle;aj.XMLHttpRequest.open('POST', targetUrl);aj.XMLHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');aj.XMLHttpRequest.send(aj.sendString);};return aj;}function newfunction(func){var args = [];for(var i=1; i<arguments.length; i++) args.push(arguments[i]);return function(event){doane(event);window[func].apply(window, args);return false;}}function evalscript(s) {if(s.indexOf('<script') == -1) return s;var p = /<script[^\>]*?>([^\x00]*?)<\/script>/ig;var arr = [];while(arr = p.exec(s)) {var p1 = /<script[^\>]*?src=\"([^\>]*?)\"[^\>]*?(reload=\"1\")?(?:charset=\"([\w\-]+?)\")?><\/script>/i;var arr1 = [];arr1 = p1.exec(arr[0]);if(arr1) {appendscript(arr1[1], '', arr1[2], arr1[3]);} else {p1 = /<script(.*?)>([^\x00]+?)<\/script>/i;arr1 = p1.exec(arr[0]);appendscript('', arr1[2], arr1[1].indexOf('reload=') != -1);}}return s;}function appendscript(src, text, reload, charset) {var id = hash(src + text);var evalscripts = [];if(!reload && in_array(id, evalscripts)) return;if(reload && $(id)) {$(id).parentNode.removeChild($(id));}evalscripts.push(id);var scriptNode = document.createElement("script");scriptNode.type = "text/javascript";scriptNode.id = id;scriptNode.charset = charset ? charset : (BROWSER.firefox ? document.characterSet : document.charset);try {if(src) {scriptNode.src = src;} else if(text){scriptNode.text = text;}$('append_parent').appendChild(scriptNode);} catch(e) {}}function stripscript(s) {return s.replace(/<script.*?>.*?<\/script>/ig, '');}function ajaxupdateevents(obj, tagName) {tagName = tagName ? tagName : 'A';var objs = obj.getElementsByTagName(tagName);for(k in objs) {var o = objs[k];ajaxupdateevent(o);}}function ajaxupdateevent(o) {if(typeof o == 'object' && o.getAttribute) {if(o.getAttribute('ajaxtarget')) {if(!o.id) o.id = Math.random();var ajaxevent = o.getAttribute('ajaxevent') ? o.getAttribute('ajaxevent') : 'click';var ajaxurl = o.getAttribute('ajaxurl') ? o.getAttribute('ajaxurl') : o.href;_attachEvent(o, ajaxevent, newfunction('ajaxget', ajaxurl, o.getAttribute('ajaxtarget'), o.getAttribute('ajaxwaitid'), o.getAttribute('ajaxloading'), o.getAttribute('ajaxdisplay')));if(o.getAttribute('ajaxfunc')) {o.getAttribute('ajaxfunc').match(/(\w+)\((.+?)\)/);_attachEvent(o, ajaxevent, newfunction(RegExp.$1, RegExp.$2));}}}}function ajaxget(url, showid, waitid, loading, display, recall) {waitid = typeof waitid == 'undefined' || waitid === null ? showid : waitid;var x = new Ajax();x.setLoading(loading);x.setWaitId(waitid);x.display = typeof display == 'undefined' || display == null ? '' : display;x.showId = $(showid);if(x.showId) x.showId.orgdisplay = typeof x.showId.orgdisplay === 'undefined' ? x.showId.style.display : x.showId.orgdisplay;if(url.substr(strlen(url) - 1) == '#') {url = url.substr(0, strlen(url) - 1);x.autogoto = 1;}var url = url + '&inajax=1&ajaxtarget=' + showid;x.get(url, function(s, x) {var evaled = false;if(s.indexOf('ajaxerror') != -1) {evalscript(s);evaled = true;}if(!evaled && (typeof ajaxerror == 'undefined' || !ajaxerror)) {if(x.showId) {x.showId.style.display = x.showId.orgdisplay;x.showId.style.display = x.display;x.showId.orgdisplay = x.showId.style.display;ajaxinnerhtml(x.showId, s);ajaxupdateevents(x.showId);if(x.autogoto) scroll(0, x.showId.offsetTop);}}ajaxerror = null;if(typeof recall == 'function') {recall();} else {eval(recall);}if(!evaled) evalscript(s);});}function ajaxpost(formid, showid, waitid, showidclass, submitbtn, recall) {var waitid = typeof waitid == 'undefined' || waitid === null ? showid : (waitid !== '' ? waitid : '');var showidclass = !showidclass ? '' : showidclass;var ajaxframeid = 'ajaxframe';var ajaxframe = $(ajaxframeid);var formtarget = $(formid).target;var handleResult = function() {var s = '';var evaled = false;showloading('none');try {if(BROWSER.ie) {s = $(ajaxframeid).contentWindow.document.XMLDocument.text;} else {s = $(ajaxframeid).contentWindow.document.documentElement.firstChild.nodeValue;}} catch(e) {if(AJAX['debug']) {var error = mb_cutstr($(ajaxframeid).contentWindow.document.body.innerText.replace(/\r?\n/g, '\\n').replace(/"/g, '\\\"'), 200);s = '<root>ajaxerror<script type="text/javascript" reload="1">showDialog(\'Ajax Error: \\n' + error + '\');</script></root>';}}if(s != '' && s.indexOf('ajaxerror') != -1) {evalscript(s);evaled = true;}if(showidclass) {$(showid).className = showidclass;if(submitbtn) {submitbtn.disabled = false;}}if(!evaled && (typeof ajaxerror == 'undefined' || !ajaxerror)) {ajaxinnerhtml($(showid), s);}ajaxerror = null;if($(formid)) $(formid).target = formtarget;if(typeof recall == 'function') {recall();} else {eval(recall);}if(!evaled) evalscript(s);ajaxframe.loading = 0;$('append_parent').removeChild(ajaxframe);};if(!ajaxframe) {if (BROWSER.ie) {ajaxframe = document.createElement('<iframe name="' + ajaxframeid + '" id="' + ajaxframeid + '"></iframe>');} else {ajaxframe = document.createElement('iframe');ajaxframe.name = ajaxframeid;ajaxframe.id = ajaxframeid;}ajaxframe.style.display = 'none';ajaxframe.loading = 1;$('append_parent').appendChild(ajaxframe);} else if(ajaxframe.loading) {return false;}_attachEvent(ajaxframe, 'load', handleResult);showloading();$(formid).target = ajaxframeid;$(formid).action += '&inajax=1';$(formid).submit();return false;}function ajaxmenu(ctrlObj, timeout, cache, duration, pos, recall) {var ctrlid = ctrlObj.id;if(!ctrlid) {ctrlid = ctrlObj.id = 'ajaxid_' + Math.random();}var menuid = ctrlid + '_menu';var menu = $(menuid);if(isUndefined(timeout)) timeout = 3000;if(isUndefined(cache)) cache = 1;if(isUndefined(pos)) pos = '43';if(isUndefined(duration)) duration = timeout > 0 ? 0 : 3;var func = function() {showMenu({'ctrlid':ctrlid,'duration':duration,'timeout':timeout,'pos':pos,'cache':cache,'layer':2});if(typeof recall == 'function') {recall();} else {eval(recall);}};if(menu) {if(menu.style.display == '') {hideMenu(menuid);} else {func();}} else {menu = document.createElement('div');menu.id = menuid;menu.style.display = 'none';menu.className = 'popupmenu_popup';menu.innerHTML = '<div class="popupmenu_option" id="' + menuid + '_content"></div>';$('append_parent').appendChild(menu);ajaxget(!isUndefined(ctrlObj.href) ? ctrlObj.href : ctrlObj.attributes['href'].value, menuid + '_content', 'ajaxwaitid', '', '', func);}}function hash(string, length) {var length = length ? length : 32;var start = 0;var i = 0;var result = '';filllen = length - string.length % length;for(i = 0; i < filllen; i++){string += "0";}while(start < string.length) {result = stringxor(result, string.substr(start, length));start += length;}return result;}function stringxor(s1, s2) {var s = '';var hash = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';var max = Math.max(s1.length, s2.length);for(var i=0; i<max; i++) {var k = s1.charCodeAt(i) ^ s2.charCodeAt(i);s += hash.charAt(k % 52);}return s;}function showloading(display, waiting) {var display = display ? display : 'block';var waiting = waiting ? waiting : '页面加载中...';$('ajaxwaitid').innerHTML = waiting;$('ajaxwaitid').style.display = display;}function ajaxinnerhtml(showid, s) {if(showid.tagName != 'TBODY') {showid.innerHTML = s;} else {while(showid.firstChild) {showid.firstChild.parentNode.removeChild(showid.firstChild);}var div1 = document.createElement('DIV');div1.id = showid.id+'_div';div1.innerHTML = '<table><tbody id="'+showid.id+'_tbody">'+s+'</tbody></table>';$('append_parent').appendChild(div1);var trs = div1.getElementsByTagName('TR');var l = trs.length;for(var i=0; i<l; i++) {showid.appendChild(trs[0]);}var inputs = div1.getElementsByTagName('INPUT');var l = inputs.length;for(var i=0; i<l; i++) {showid.appendChild(inputs[0]);}div1.parentNode.removeChild(div1);}}function AC_GetArgs(args, classid, mimeType) {var ret = new Object();ret.embedAttrs = new Object();ret.params = new Object();ret.objAttrs = new Object();for (var i = 0; i < args.length; i = i + 2){var currArg = args[i].toLowerCase();switch (currArg){case "classid":break;case "pluginspage":ret.embedAttrs[args[i]] = 'http://www.macromedia.com/go/getflashplayer';break;case "src":ret.embedAttrs[args[i]] = args[i+1];ret.params["movie"] = args[i+1];break;case "codebase":ret.objAttrs[args[i]] = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0';break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblclick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":case "id":ret.objAttrs[args[i]] = args[i+1];break;case "width":case "height":case "align":case "vspace": case "hspace":case "class":case "title":case "accesskey":case "name":case "tabindex":ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];break;default:ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];}}ret.objAttrs["classid"] = classid;if(mimeType) {ret.embedAttrs["type"] = mimeType;}return ret;}function AC_DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {var versionStr = -1;if(navigator.plugins != null && navigator.plugins.length > 0 && (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])) {var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;var descArray = flashDescription.split(" ");var tempArrayMajor = descArray[2].split(".");var versionMajor = tempArrayMajor[0];var versionMinor = tempArrayMajor[1];var versionRevision = descArray[3];if(versionRevision == "") {versionRevision = descArray[4];}if(versionRevision[0] == "d") {versionRevision = versionRevision.substring(1);} else if(versionRevision[0] == "r") {versionRevision = versionRevision.substring(1);if(versionRevision.indexOf("d") > 0) {versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));}}versionStr = versionMajor + "." + versionMinor + "." + versionRevision;} else if(BROWSER.ie && !BROWSER.opera) {try {var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");versionStr = axo.GetVariable("$version");} catch (e) {}}if(versionStr == -1 ) {return false;} else if(versionStr != 0) {if(BROWSER.ie && !BROWSER.opera) {tempArray = versionStr.split(" ");tempString = tempArray[1];versionArray = tempString.split(",");} else {versionArray = versionStr.split(".");}var versionMajor = versionArray[0];var versionMinor = versionArray[1];var versionRevision = versionArray[2];return versionMajor > parseFloat(reqMajorVer) || (versionMajor == parseFloat(reqMajorVer)) && (versionMinor > parseFloat(reqMinorVer) || versionMinor == parseFloat(reqMinorVer) && versionRevision >= parseFloat(reqRevision));}}function AC_FL_RunContent() {var str = '';if(AC_DetectFlashVer(9,0,124)) {var ret = AC_GetArgs(arguments, "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash");if(BROWSER.ie && !BROWSER.opera) {str += '<object ';for (var i in ret.objAttrs) {str += i + '="' + ret.objAttrs[i] + '" ';}str += '>';for (var i in ret.params) {str += '<param name="' + i + '" value="' + ret.params[i] + '" /> ';}str += '</object>';} else {str += '<embed ';for (var i in ret.embedAttrs) {str += i + '="' + ret.embedAttrs[i] + '" ';}str += '></embed>';}} else {str = '此内容需要 Adobe Flash Player 9.0.124 或更高版本<br /><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="下载 Flash Player" /></a>';}return str;}function simulateSelect(selectId) {var selectObj = $(selectId);var defaultopt = defaultv = '';var menuObj = document.createElement('div');var ul = document.createElement('ul');var handleKeyDown = function(e) {e = BROWSER.ie ? event : e;if(e.keyCode == 40 || e.keyCode == 38) doane(e);};for(var i = 0; i < selectObj.options.length; i++) {var li = document.createElement('li');li.innerHTML = selectObj.options[i].innerHTML;li.k_id = i;li.k_value = selectObj.options[i].value;if(selectObj.options[i].selected) {defaultopt = selectObj.options[i].innerHTML;defaultv = selectObj.options[i].value;li.className = 'current';selectObj.setAttribute('selecti', i);}li.onclick = function() {if($(selectId + '_ctrl').innerHTML != this.innerHTML) {var lis = menuObj.getElementsByTagName('li');lis[$(selectId).getAttribute('selecti')].className = '';this.className = 'current';$(selectId + '_ctrl').innerHTML = this.innerHTML;$(selectId).setAttribute('selecti', this.k_id);$(selectId).options.length = 0;$(selectId).options[0] = new Option('', this.k_value);eval(selectObj.getAttribute('change'));}hideMenu(menuObj.id);return false;};ul.appendChild(li);}selectObj.options.length = 0;selectObj.options[0]= new Option('', defaultv);selectObj.style.display = 'none';selectObj.outerHTML += '<a href="javascript:;" hidefocus="true" id="' + selectId + '_ctrl" tabindex="1">' + defaultopt + '</a>';menuObj.id = selectId + '_ctrl_menu';menuObj.className = 'select_menu';menuObj.style.display = 'none';menuObj.appendChild(ul);$('append_parent').appendChild(menuObj);$(selectId + '_ctrl').onclick = function(e) {$(selectId + '_ctrl_menu').style.width = (BROWSER.ie ? Math.max($(selectId + '_ctrl').clientWidth, parseInt($(selectId + '_ctrl').currentStyle.width)) : $(selectId + '_ctrl').clientWidth) + 'px';showMenu({'ctrlid':(selectId == 'loginfield' ? 'account' : selectId + '_ctrl'),'menuid':selectId + '_ctrl_menu','evt':'click','pos':'13'});doane(e);};$(selectId + '_ctrl').onfocus = menuObj.onfocus = function() {_attachEvent(document.body, 'keydown', handleKeyDown);};$(selectId + '_ctrl').onblur = menuObj.onblur = function() {_detachEvent(document.body, 'keydown', handleKeyDown);};$(selectId + '_ctrl').onkeyup = function(e) {e = e ? e : window.event;value = e.keyCode;if(value == 40 || value == 38) {if(menuObj.style.display == 'none') {$(selectId + '_ctrl').click();} else {lis = menuObj.getElementsByTagName('li');selecti = selectObj.getAttribute('selecti');lis[selecti].className = '';if(value == 40) {selecti = parseInt(selecti) + 1;} else if(value == 38) {selecti = parseInt(selecti) - 1;}if(selecti < 0) {selecti = lis.length - 1} else if(selecti > lis.length - 1) {selecti = 0;}lis[selecti].className = 'current';selectObj.setAttribute('selecti', selecti);lis[selecti].parentNode.scrollTop = lis[selecti].offsetTop;}} else if(value == 13) {var lis = menuObj.getElementsByTagName('li');lis[selectObj.getAttribute('selecti')].click();} else if(value == 27) {hideMenu(menuObj.id);}};}function detectCapsLock(e, obj) {var valueCapsLock = e.keyCode ? e.keyCode : e.which;var valueShift = e.shiftKey ? e.shiftKey : (valueCapsLock == 16 ? true : false);this.clearDetect = function () {obj.className = 'txt';};obj.className = (valueCapsLock >= 65 && valueCapsLock <= 90 && !valueShift || valueCapsLock >= 97 && valueCapsLock <= 122 && valueShift) ? 'capslock txt' : 'txt';if(BROWSER.ie) {event.srcElement.onblur = this.clearDetect;} else {e.target.onblur = this.clearDetect;}}function switchTab(prefix, current, total) {for(i = 1; i <= total;i++) {$(prefix + '_' + i).className = '';$(prefix + '_c_' + i).style.display = 'none';}$(prefix + '_' + current).className = 'current';$(prefix + '_c_' + current).style.display = '';}function keyPageScroll(e, prev, next, url, page) {e = e ? e : window.event;var tagname = BROWSER.ie ? e.srcElement.tagName : e.target.tagName;if(tagname == 'INPUT' || tagname == 'TEXTAREA') return;actualCode = e.keyCode ? e.keyCode : e.charCode;if(next && actualCode == 39) {window.location = url + '&page=' + (page + 1);}if(prev && actualCode == 37) {window.location = url + '&page=' + (page - 1);}}function showselect(obj, inpid, t, rettype) {if(!obj.id) {var t = !t ? 0 : t;var rettype = !rettype ? 0 : rettype;obj.id = 'calendarexp_' + Math.random();div = document.createElement('div');div.id = obj.id + '_menu';div.style.display = 'none';div.className = 'showselect_menu';$('append_parent').appendChild(div);s = '';if(!t) {s += showselect_row(inpid, '一天', 1, 0, rettype);s += showselect_row(inpid, '一周', 7, 0, rettype);s += showselect_row(inpid, '一个月', 30, 0, rettype);s += showselect_row(inpid, '三个月', 90, 0, rettype);s += showselect_row(inpid, '自定义', -2);} else {if($(t)) {var lis = $(t).getElementsByTagName('LI');for(i = 0;i < lis.length;i++) {s += '<a href="javascript:;" onclick="$(\'' + inpid + '\').value = this.innerHTML">' + lis[i].innerHTML + '</a><br />';}s += showselect_row(inpid, '自定义', -1);} else {s += '<a href="javascript:;" onclick="$(\'' + inpid + '\').value = \'0\'">永久</a><br />';s += showselect_row(inpid, '7 天', 7, 1, rettype);s += showselect_row(inpid, '14 天', 14, 1, rettype);s += showselect_row(inpid, '一个月', 30, 1, rettype);s += showselect_row(inpid, '三个月', 90, 1, rettype);s += showselect_row(inpid, '半年', 182, 1, rettype);s += showselect_row(inpid, '一年', 365, 1, rettype);s += showselect_row(inpid, '自定义', -1);}}$(div.id).innerHTML = s;}showMenu({'ctrlid':obj.id,'evt':'click'});if(BROWSER.ie && BROWSER.ie < 7) {doane(event);}}function showselect_row(inpid, s, v, notime, rettype) {if(v >= 0) {if(!rettype) {var notime = !notime ? 0 : 1;t = today.getTime();t += 86400000 * v;d = new Date();d.setTime(t);return '<a href="javascript:;" onclick="$(\'' + inpid + '\').value = \'' + d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + (!notime ? ' ' + d.getHours() + ':' + d.getMinutes() : '') + '\'">' + s + '</a><br />';} else {return '<a href="javascript:;" onclick="$(\'' + inpid + '\').value = \'' + v + '\'">' + s + '</a><br />';}} else if(v == -1) {return '<a href="javascript:;" onclick="$(\'' + inpid + '\').focus()">' + s + '</a><br />';} else if(v == -2) {return '<a href="javascript:;" onclick="$(\'' + inpid + '\').onclick()">' + s + '</a><br />';}}function showColorBox(ctrlid, layer, k) {if(!$(ctrlid + '_menu')) {var menu = document.createElement('div');menu.id = ctrlid + '_menu';menu.className = 'popupmenu_popup colorbox';menu.unselectable = true;menu.style.display = 'none';var coloroptions = ['Black', 'Sienna', 'DarkOliveGreen', 'DarkGreen', 'DarkSlateBlue', 'Navy', 'Indigo', 'DarkSlateGray', 'DarkRed', 'DarkOrange', 'Olive', 'Green', 'Teal', 'Blue', 'SlateGray', 'DimGray', 'Red', 'SandyBrown', 'YellowGreen','SeaGreen', 'MediumTurquoise','RoyalBlue', 'Purple', 'Gray', 'Magenta', 'Orange', 'Yellow', 'Lime', 'Cyan', 'DeepSkyBlue', 'DarkOrchid', 'Silver', 'Pink', 'Wheat', 'LemonChiffon', 'PaleGreen', 'PaleTurquoise', 'LightBlue', 'Plum', 'White'];var str = '';for(var i = 0; i < 40; i++) {str += '<input type="button" style="background-color: ' + coloroptions[i] + '" onclick="'+ (typeof wysiwyg == 'undefined' ? 'seditor_insertunit(\'' + k + '\', \'[color=' + coloroptions[i] + ']\', \'[/color]\')' : (ctrlid == editorid + '_cmd_table_param_4' ? '$(\'' + ctrlid + '\').value=\'' + coloroptions[i] + '\';hideMenu(2)' : 'discuzcode(\'forecolor\', \'' + coloroptions[i] + '\')'))+ '" title="' + coloroptions[i] + '" />' + (i < 39 && (i + 1) % 8 == 0 ? '<br />' : '');}menu.innerHTML = str;$('append_parent').appendChild(menu);}showMenu({'ctrlid':ctrlid,'evt':'click','layer':layer});}function announcement() {var ann = new Object();ann.anndelay = 3000;ann.annst = 0;ann.annstop = 0;ann.annrowcount = 0;ann.anncount = 0;ann.annlis = $('annbody').getElementsByTagName("LI");ann.annrows = new Array();ann.announcementScroll = function () {if(this.annstop) { this.annst = setTimeout(function () { ann.announcementScroll(); }, this.anndelay);return; }if(!this.annst) {var lasttop = -1;for(i = 0;i < this.annlis.length;i++) {if(lasttop != this.annlis[i].offsetTop) {if(lasttop == -1) lasttop = 0;this.annrows[this.annrowcount] = this.annlis[i].offsetTop - lasttop;this.annrowcount++;}lasttop = this.annlis[i].offsetTop;}if(this.annrows.length == 1) {$('ann').onmouseover = $('ann').onmouseout = null;} else {this.annrows[this.annrowcount] = this.annrows[1];$('annbodylis').innerHTML += $('annbodylis').innerHTML;this.annst = setTimeout(function () { ann.announcementScroll(); }, this.anndelay);$('ann').onmouseover = function () { ann.annstop = 1; };$('ann').onmouseout = function () { ann.annstop = 0; };}this.annrowcount = 1;return;}if(this.annrowcount >= this.annrows.length) {$('annbody').scrollTop = 0;this.annrowcount = 1;this.annst = setTimeout(function () { ann.announcementScroll(); }, this.anndelay);} else {this.anncount = 0;this.announcementScrollnext(this.annrows[this.annrowcount]);}};ann.announcementScrollnext = function (time) {$('annbody').scrollTop++;this.anncount++;if(this.anncount != time) {this.annst = setTimeout(function () { ann.announcementScrollnext(time); }, 10);} else {this.annrowcount++;this.annst = setTimeout(function () { ann.announcementScroll(); }, this.anndelay);}};ann.announcementScroll();}function removeindexheats() {return confirm('您确认要把此主题从热点主题中移除么?');}function smilies_show(id, smcols, seditorkey) {if(seditorkey && !$(seditorkey + 'smilies_menu')) {var div = document.createElement("div");div.id = seditorkey + 'smilies_menu';div.style.display = 'none';div.className = 'smilieslist';$('append_parent').appendChild(div);var div = document.createElement("div");div.id = id;div.style.overflow = 'hidden';$(seditorkey + 'smilies_menu').appendChild(div);}if(typeof smilies_type == 'undefined') {var scriptNode = document.createElement("script");scriptNode.type = "text/javascript";scriptNode.charset = charset ? charset : (BROWSER.firefox ? document.characterSet : document.charset);scriptNode.src = 'forumdata/cache/smilies_var.js?' + VERHASH;$('append_parent').appendChild(scriptNode);if(BROWSER.ie) {scriptNode.onreadystatechange = function() {smilies_onload(id, smcols, seditorkey);};} else {scriptNode.onload = function() {smilies_onload(id, smcols, seditorkey);};}} else {smilies_onload(id, smcols, seditorkey);}}function smilies_onload(id, smcols, seditorkey) {seditorkey = !seditorkey ? '' : seditorkey;smile = getcookie('smile').split('D');if(typeof smilies_type == 'object') {if(smile[0] && smilies_array[smile[0]]) {CURRENTSTYPE = smile[0];} else {for(i in smilies_array) {CURRENTSTYPE = i; break;}}smiliestype = '<div class="smiliesgroup"><ul>';for(i in smilies_type) {if(smilies_type[i][0]) {smiliestype += '<li><a href="javascript:;" hidefocus="true" ' + (CURRENTSTYPE == i ? 'class="current"' : '') + ' id="'+seditorkey+'stype_'+i+'" onclick="smilies_switch(\'' + id + '\', \'' + smcols + '\', '+i+', 1, \'' + seditorkey + '\');if(CURRENTSTYPE) {$(\''+seditorkey+'stype_\'+CURRENTSTYPE).className=\'\';}this.className=\'current\';CURRENTSTYPE='+i+';doane(event);">'+smilies_type[i][0]+'</a></li>';}}smiliestype += '</ul></div>';$(id).innerHTML = smiliestype + '<div id="' + id + '_data"></div><div class="smilieslist_page" id="' + id + '_page"></div>';smilies_switch(id, smcols, CURRENTSTYPE, smile[1], seditorkey);}}function smilies_switch(id, smcols, type, page, seditorkey) {page = page ? page : 1;if(!smilies_array[type] || !smilies_array[type][page]) return;setcookie('smile', type + 'D' + page, 31536000);smiliesdata = '<table id="' + id + '_table" cellpadding="0" cellspacing="0"><tr>';j = k = 0;img = [];for(i in smilies_array[type][page]) {if(j >= smcols) {smiliesdata += '<tr>';j = 0;}s = smilies_array[type][page][i];smilieimg = 'images/smilies/' + smilies_type[type][1] + '/' + s[2];img[k] = new Image();img[k].src = smilieimg;smiliesdata += s && s[0] ? '<td onmouseover="smilies_preview(\'' + seditorkey + '\', \'' + id + '\', this, ' + s[5] + ')" onclick="' + (typeof wysiwyg != 'undefined' ? 'insertSmiley(' + s[0] + ')': 'seditor_insertunit(\'' + seditorkey + '\', \'' + s[1].replace(/'/, '\\\'') + '\')') +'" id="' + seditorkey + 'smilie_' + s[0] + '_td"><img id="smilie_' + s[0] + '" width="' + s[3] +'" height="' + s[4] +'" src="' + smilieimg + '" alt="' + s[1] + '" />' : '<td>';j++;k++;}smiliesdata += '</table>';smiliespage = '';if(smilies_array[type].length > 2) {prevpage = ((prevpage = parseInt(page) - 1) < 1) ? smilies_array[type].length - 1 : prevpage;nextpage = ((nextpage = parseInt(page) + 1) == smilies_array[type].length) ? 1 : nextpage;smiliespage = '<div class="pags_act"><a href="javascript:;" onclick="smilies_switch(\'' + id + '\', \'' + smcols + '\', ' + type + ', ' + prevpage + ', \'' + seditorkey + '\');doane(event);">上页</a>' +'<a href="javascript:;" onclick="smilies_switch(\'' + id + '\', \'' + smcols + '\', ' + type + ', ' + nextpage + ', \'' + seditorkey + '\');doane(event);">下页</a></div>' +page + '/' + (smilies_array[type].length - 1);}$(id + '_data').innerHTML = smiliesdata;$(id + '_page').innerHTML = smiliespage;}function smilies_preview(seditorkey, id, obj, w) {var menu = $('smilies_preview');if(!menu) {menu = document.createElement('div');menu.id = 'smilies_preview';menu.className = 'smilies_preview';menu.style.display = 'none';$('append_parent').appendChild(menu);}menu.innerHTML = '<img width="' + w + '" src="' + obj.childNodes[0].src + '" />';mpos = fetchOffset($(id + '_data'));spos = fetchOffset(obj);pos = spos['left'] >= mpos['left'] + $(id + '_data').offsetWidth / 2 ? '13' : '24';showMenu({'ctrlid':obj.id,'showid':id + '_data','menuid':menu.id,'pos':pos,'layer':3});}function seditor_ctlent(event, script) {if(event.ctrlKey && event.keyCode == 13 || event.altKey && event.keyCode == 83) {eval(script);}}function seditor_insertunit(key, text, textend, moveend) {$(key + 'message').focus();textend = isUndefined(textend) ? '' : textend;moveend = isUndefined(textend) ? 0 : moveend;startlen = strlen(text);endlen = strlen(textend);if(!isUndefined($(key + 'message').selectionStart)) {var opn = $(key + 'message').selectionStart + 0;if(textend != '') {text = text + $(key + 'message').value.substring($(key + 'message').selectionStart, $(key + 'message').selectionEnd) + textend;}$(key + 'message').value = $(key + 'message').value.substr(0, $(key + 'message').selectionStart) + text + $(key + 'message').value.substr($(key + 'message').selectionEnd);if(!moveend) {$(key + 'message').selectionStart = opn + strlen(text) - endlen;$(key + 'message').selectionEnd = opn + strlen(text) - endlen;}} else if(document.selection && document.selection.createRange) {var sel = document.selection.createRange();if(textend != '') {text = text + sel.text + textend;}sel.text = text.replace(/\r?\n/g, '\r\n');if(!moveend) {sel.moveStart('character', -endlen);sel.moveEnd('character', -endlen);}sel.select();} else {$(key + 'message').value += text;}hideMenu(2);if(BROWSER.ie) {doane();}}function parseurl(str, mode, parsecode) {if(isUndefined(parsecode)) parsecode = true;if(parsecode) str= str.replace(/\s*\[code\]([\s\S]+?)\[\/code\]\s*/ig, function($1, $2) {return codetag($2);});str = str.replace(/([^>=\]"'\/]|^)((((https?|ftp):\/\/)|www\.)([\w\-]+\.)*[\w\-\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!]*)+\.(jpg|gif|png|bmp))/ig, mode == 'html' ? '$1<img src="$2" border="0">' : '$1[img]$2[/img]');str = str.replace(/([^>=\]"'\/@]|^)((((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k|thunder|synacast):\/\/))([\w\-]+\.)*[:\.@\-\w\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!#]*)*)/ig, mode == 'html' ? '$1<a href="$2" target="_blank">$2</a>' : '$1[url]$2[/url]');str = str.replace(/([^\w>=\]"'\/@]|^)((www\.)([\w\-]+\.)*[:\.@\-\w\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!#]*)*)/ig, mode == 'html' ? '$1<a href="$2" target="_blank">$2</a>' : '$1[url]$2[/url]');str = str.replace(/([^\w->=\]:"'\.\/]|^)(([\-\.\w]+@[\.\-\w]+(\.\w+)+))/ig, mode == 'html' ? '$1<a href="mailto:$2">$2</a>' : '$1[email]$2[/email]');if(parsecode) {for(var i = 0; i <= DISCUZCODE['num']; i++) {str = str.replace("[\tDISCUZ_CODE_" + i + "\t]", DISCUZCODE['html'][i]);}}return str;}function codetag(text) {DISCUZCODE['num']++;if(typeof wysiwyg != 'undefined' && wysiwyg) text = text.replace(/<br[^\>]*>/ig, '\n').replace(/<(\/|)[A-Za-z].*?>/ig, '');DISCUZCODE['html'][DISCUZCODE['num']] = '[code]' + text + '[/code]';return '[\tDISCUZ_CODE_' + DISCUZCODE['num'] + '\t]';}function pmchecknew() {ajaxget('pm.php?checknewpm=' + Math.random(), 'myprompt_check', 'ajaxwaitid');}function showimmestatus(imme) {var lang = {'Online':'MSN 在线','Busy':'MSN 忙碌','Away':'MSN 离开','Offline':'MSN 脱机'};$('imme_status_' + imme.id.substr(0, imme.id.indexOf('@'))).innerHTML = lang[imme.statusText];}if(typeof IN_ADMINCP == 'undefined') {if(discuz_uid && !getcookie('checkpm')) {_attachEvent(window, 'load', pmchecknew, document);}if(creditnotice != '' && getcookie('discuz_creditnotice') && !getcookie('discuz_creditnoticedisable')) {_attachEvent(window, 'load', showCreditPrompt, document);}}if(BROWSER.ie) {document.documentElement.addBehavior("#default#userdata");}
\ No newline at end of file
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.x
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2011 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ----------------------------------------------------------------------------
(function($) {
$.fn.markItUp = function(settings, extraSettings) {
var options, ctrlKey, shiftKey, altKey;
ctrlKey = shiftKey = altKey = false;
options = { id: '',
nameSpace: '',
root: '',
previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes'
previewAutoRefresh: true,
previewPosition: 'after',
previewTemplatePath: '~/templates/preview.html',
previewParser: false,
previewParserPath: '',
previewParserVar: 'data',
resizeHandle: true,
beforeInsert: '',
afterInsert: '',
onEnter: {},
onShiftEnter: {},
onCtrlEnter: {},
onTab: {},
markupSet: [ { /* set */ } ]
};
$.extend(options, settings, extraSettings);
// compute markItUp! path
if (!options.root) {
$('script').each(function(a, tag) {
miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
if (miuScript !== null) {
options.root = miuScript[1];
}
});
}
return this.each(function() {
var $$, textarea, levels, scrollPosition, caretPosition, caretOffset,
clicked, hash, header, footer, previewWindow, template, iFrame, abort;
$$ = $(this);
textarea = this;
levels = [];
abort = false;
scrollPosition = caretPosition = 0;
caretOffset = -1;
options.previewParserPath = localize(options.previewParserPath);
options.previewTemplatePath = localize(options.previewTemplatePath);
// apply the computed path to ~/
function localize(data, inText) {
if (inText) {
return data.replace(/("|')~\//g, "$1"+options.root);
}
return data.replace(/^~\//, options.root);
}
// init and build editor
function init() {
id = ''; nameSpace = '';
if (options.id) {
id = 'id="'+options.id+'"';
} else if ($$.attr("id")) {
id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"';
}
if (options.nameSpace) {
nameSpace = 'class="'+options.nameSpace+'"';
}
$$.wrap('<div '+nameSpace+'></div>');
$$.wrap('<div '+id+' class="markItUp"></div>');
$$.wrap('<div class="markItUpContainer"></div>');
$$.addClass("markItUpEditor");
// add the header before the textarea
header = $('<div class="markItUpHeader"></div>').insertBefore($$);
$(dropMenus(options.markupSet)).appendTo(header);
// add the footer after the textarea
footer = $('<div class="markItUpFooter"></div>').insertAfter($$);
// add the resize handle after textarea
if (options.resizeHandle === true && $.browser.safari !== true) {
resizeHandle = $('<div class="markItUpResizeHandle"></div>')
.insertAfter($$)
.bind("mousedown", function(e) {
var h = $$.height(), y = e.clientY, mouseMove, mouseUp;
mouseMove = function(e) {
$$.css("height", Math.max(20, e.clientY+h-y)+"px");
return false;
};
mouseUp = function(e) {
$("html").unbind("mousemove", mouseMove).unbind("mouseup", mouseUp);
return false;
};
$("html").bind("mousemove", mouseMove).bind("mouseup", mouseUp);
});
footer.append(resizeHandle);
}
// listen key events
$$.keydown(keyPressed).keyup(keyPressed);
// bind an event to catch external calls
$$.bind("insertion", function(e, settings) {
if (settings.target !== false) {
get();
}
if (textarea === $.markItUp.focused) {
markup(settings);
}
});
// remember the last focus
$$.focus(function() {
$.markItUp.focused = this;
});
}
// recursively build header with dropMenus from markupset
function dropMenus(markupSet) {
var ul = $('<ul></ul>'), i = 0;
$('li:hover > ul', ul).css('display', 'block');
$.each(markupSet, function() {
var button = this, t = '', title, li, j;
title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');
key = (button.key) ? 'accesskey="'+button.key+'"' : '';
if (button.separator) {
li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
} else {
i++;
for (j = levels.length -1; j >= 0; j--) {
t += levels[j]+"-";
}
li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>')
.bind("contextmenu", function() { // prevent contextmenu on mac and allow ctrl+click
return false;
}).click(function() {
return false;
}).bind("focusin", function(){
$$.focus();
}).mouseup(function() {
if (button.call) {
eval(button.call)();
}
setTimeout(function() { markup(button) },1);
return false;
}).hover(function() {
$('> ul', this).show();
$(document).one('click', function() { // close dropmenu if click outside
$('ul ul', header).hide();
}
);
}, function() {
$('> ul', this).hide();
}
).appendTo(ul);
if (button.dropMenu) {
levels.push(i);
$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
}
}
});
levels.pop();
return ul;
}
// markItUp! markups
function magicMarkups(string) {
if (string) {
string = string.toString();
string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,
function(x, a) {
var b = a.split('|!|');
if (altKey === true) {
return (b[1] !== undefined) ? b[1] : b[0];
} else {
return (b[1] === undefined) ? "" : b[0];
}
}
);
// [![prompt]!], [![prompt:!:value]!]
string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,
function(x, a) {
var b = a.split(':!:');
if (abort === true) {
return false;
}
value = prompt(b[0], (b[1]) ? b[1] : '');
if (value === null) {
abort = true;
}
return value;
}
);
return string;
}
return "";
}
// prepare action
function prepare(action) {
if ($.isFunction(action)) {
action = action(hash);
}
return magicMarkups(action);
}
// build block to insert
function build(string) {
var openWith = prepare(clicked.openWith);
var placeHolder = prepare(clicked.placeHolder);
var replaceWith = prepare(clicked.replaceWith);
var closeWith = prepare(clicked.closeWith);
var openBlockWith = prepare(clicked.openBlockWith);
var closeBlockWith = prepare(clicked.closeBlockWith);
var multiline = clicked.multiline;
if (replaceWith !== "") {
block = openWith + replaceWith + closeWith;
} else if (selection === '' && placeHolder !== '') {
block = openWith + placeHolder + closeWith;
} else {
string = string || selection;
var lines = selection.split(/\r?\n/), blocks = [];
for (var l=0; l < lines.length; l++) {
line = lines[l];
var trailingSpaces;
if (trailingSpaces = line.match(/ *$/)) {
blocks.push(openWith + line.replace(/ *$/g, '') + closeWith + trailingSpaces);
} else {
blocks.push(openWith + line + closeWith);
}
}
block = blocks.join("\n");
}
block = openBlockWith + block + closeBlockWith;
return { block:block,
openWith:openWith,
replaceWith:replaceWith,
placeHolder:placeHolder,
closeWith:closeWith
};
}
// define markup to insert
function markup(button) {
var len, j, n, i;
hash = clicked = button;
get();
$.extend(hash, { line:"",
root:options.root,
textarea:textarea,
selection:(selection||''),
caretPosition:caretPosition,
ctrlKey:ctrlKey,
shiftKey:shiftKey,
altKey:altKey
}
);
// callbacks before insertion
prepare(options.beforeInsert);
prepare(clicked.beforeInsert);
if ((ctrlKey === true && shiftKey === true) || button.multiline === true) {
prepare(clicked.beforeMultiInsert);
}
$.extend(hash, { line:1 });
if ((ctrlKey === true && shiftKey === true)) {
lines = selection.split(/\r?\n/);
for (j = 0, n = lines.length, i = 0; i < n; i++) {
if ($.trim(lines[i]) !== '') {
$.extend(hash, { line:++j, selection:lines[i] } );
lines[i] = build(lines[i]).block;
} else {
lines[i] = "";
}
}
string = { block:lines.join('\n')};
start = caretPosition;
len = string.block.length + (($.browser.opera) ? n-1 : 0);
} else if (ctrlKey === true) {
string = build(selection);
start = caretPosition + string.openWith.length;
len = string.block.length - string.openWith.length - string.closeWith.length;
len = len - (string.block.match(/ $/) ? 1 : 0);
len -= fixIeBug(string.block);
} else if (shiftKey === true) {
string = build(selection);
start = caretPosition;
len = string.block.length;
len -= fixIeBug(string.block);
} else {
string = build(selection);
start = caretPosition + string.block.length ;
len = 0;
start -= fixIeBug(string.block);
}
if ((selection === '' && string.replaceWith === '')) {
caretOffset += fixOperaBug(string.block);
start = caretPosition + string.openWith.length;
len = string.block.length - string.openWith.length - string.closeWith.length;
caretOffset = $$.val().substring(caretPosition, $$.val().length).length;
caretOffset -= fixOperaBug($$.val().substring(0, caretPosition));
}
$.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } );
if (string.block !== selection && abort === false) {
insert(string.block);
set(start, len);
} else {
caretOffset = -1;
}
get();
$.extend(hash, { line:'', selection:selection });
// callbacks after insertion
if ((ctrlKey === true && shiftKey === true) || button.multiline === true) {
prepare(clicked.afterMultiInsert);
}
prepare(clicked.afterInsert);
prepare(options.afterInsert);
// refresh preview if opened
if (previewWindow && options.previewAutoRefresh) {
refreshPreview();
}
// reinit keyevent
shiftKey = altKey = ctrlKey = abort = false;
}
// Substract linefeed in Opera
function fixOperaBug(string) {
if ($.browser.opera) {
return string.length - string.replace(/\n*/g, '').length;
}
return 0;
}
// Substract linefeed in IE
function fixIeBug(string) {
if ($.browser.msie) {
return string.length - string.replace(/\r*/g, '').length;
}
return 0;
}
// add markup
function insert(block) {
if (document.selection) {
var newSelection = document.selection.createRange();
newSelection.text = block;
} else {
textarea.value = textarea.value.substring(0, caretPosition) + block + textarea.value.substring(caretPosition + selection.length, textarea.value.length);
}
}
// set a selection
function set(start, len) {
if (textarea.createTextRange){
// quick fix to make it work on Opera 9.5
if ($.browser.opera && $.browser.version >= 9.5 && len == 0) {
return false;
}
range = textarea.createTextRange();
range.collapse(true);
range.moveStart('character', start);
range.moveEnd('character', len);
range.select();
} else if (textarea.setSelectionRange ){
textarea.setSelectionRange(start, start + len);
}
textarea.scrollTop = scrollPosition;
textarea.focus();
}
// get the selection
function get() {
textarea.focus();
scrollPosition = textarea.scrollTop;
if (document.selection) {
selection = document.selection.createRange().text;
if ($.browser.msie) { // ie
var range = document.selection.createRange(), rangeCopy = range.duplicate();
rangeCopy.moveToElementText(textarea);
caretPosition = -1;
while(rangeCopy.inRange(range)) {
rangeCopy.moveStart('character');
caretPosition ++;
}
} else { // opera
caretPosition = textarea.selectionStart;
}
} else { // gecko & webkit
caretPosition = textarea.selectionStart;
selection = textarea.value.substring(caretPosition, textarea.selectionEnd);
}
return selection;
}
// open preview window
function preview() {
if (!previewWindow || previewWindow.closed) {
if (options.previewInWindow) {
previewWindow = window.open('', 'preview', options.previewInWindow);
$(window).unload(function() {
previewWindow.close();
});
} else {
iFrame = $('<iframe class="markItUpPreviewFrame"></iframe>');
if (options.previewPosition == 'after') {
iFrame.insertAfter(footer);
} else {
iFrame.insertBefore(header);
}
previewWindow = iFrame[iFrame.length - 1].contentWindow || frame[iFrame.length - 1];
}
} else if (altKey === true) {
if (iFrame) {
iFrame.remove();
} else {
previewWindow.close();
}
previewWindow = iFrame = false;
}
if (!options.previewAutoRefresh) {
refreshPreview();
}
if (options.previewInWindow) {
previewWindow.focus();
}
}
// refresh Preview window
function refreshPreview() {
renderPreview();
}
function renderPreview() {
var phtml;
if (options.previewParser && typeof options.previewParser === 'function') {
var data = options.previewParser( $$.val() );
writeInPreview( localize(data, 1) );
} else if (options.previewParserPath !== '') {
$.ajax({
type: 'POST',
dataType: 'text',
global: false,
url: options.previewParserPath,
data: options.previewParserVar+'='+encodeURIComponent($$.val()),
success: function(data) {
writeInPreview( localize(data, 1) );
}
});
} else {
if (!template) {
$.ajax({
url: options.previewTemplatePath,
dataType: 'text',
global: false,
success: function(data) {
writeInPreview( localize(data, 1).replace(/<!-- content -->/g, $$.val()) );
}
});
}
}
return false;
}
function writeInPreview(data) {
if (previewWindow.document) {
try {
sp = previewWindow.document.documentElement.scrollTop
} catch(e) {
sp = 0;
}
previewWindow.document.open();
previewWindow.document.write(data);
previewWindow.document.close();
previewWindow.document.documentElement.scrollTop = sp;
}
}
// set keys pressed
function keyPressed(e) {
shiftKey = e.shiftKey;
altKey = e.altKey;
ctrlKey = (!(e.altKey && e.ctrlKey)) ? (e.ctrlKey || e.metaKey) : false;
if (e.type === 'keydown') {
if (ctrlKey === true) {
li = $('a[accesskey="'+String.fromCharCode(e.keyCode)+'"]', header).parent('li');
if (li.length !== 0) {
ctrlKey = false;
setTimeout(function() {
li.triggerHandler('mouseup');
},1);
return false;
}
}
if (e.keyCode === 13 || e.keyCode === 10) { // Enter key
if (ctrlKey === true) { // Enter + Ctrl
ctrlKey = false;
markup(options.onCtrlEnter);
return options.onCtrlEnter.keepDefault;
} else if (shiftKey === true) { // Enter + Shift
shiftKey = false;
markup(options.onShiftEnter);
return options.onShiftEnter.keepDefault;
} else { // only Enter
markup(options.onEnter);
return options.onEnter.keepDefault;
}
}
if (e.keyCode === 9) { // Tab key
if (shiftKey == true || ctrlKey == true || altKey == true) {
return false;
}
if (caretOffset !== -1) {
get();
caretOffset = $$.val().length - caretOffset;
set(caretOffset, 0);
caretOffset = -1;
return false;
} else {
markup(options.onTab);
return options.onTab.keepDefault;
}
}
}
}
init();
});
};
$.fn.markItUpRemove = function() {
return this.each(function() {
var $$ = $(this).unbind().removeClass('markItUpEditor');
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
}
);
};
$.markItUp = function(settings) {
var options = { target:false };
$.extend(options, settings);
if (options.target) {
return $(options.target).each(function() {
$(this).focus();
$(this).trigger('insertion', [options]);
});
} else {
$('textarea').trigger('insertion', [options]);
}
};
})(jQuery);
Markup language:
BBCode
Description:
A basic BBCode markup set with Bold, Italic, Underline, Picture, Link, Size, List, Quotes, Code, Clean button, Preview button.
Install:
- Download the zip file
- Unzip it in your markItUp! sets folder
- Modify your JS link to point at this set.js
- Modify your CSS link to point at this style.css
\ No newline at end of file
// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// BBCode tags example
// http://en.wikipedia.org/wiki/Bbcode
// ----------------------------------------------------------------------------
// Feel free to add more tags
// ----------------------------------------------------------------------------
mySettings = {
previewParserPath: '', // path to your BBCode parser
markupSet: [
{name:'Bold', key:'B', openWith:'[b]', closeWith:'[/b]'},
{name:'Italic', key:'I', openWith:'[i]', closeWith:'[/i]'},
{name:'Underline', key:'U', openWith:'[u]', closeWith:'[/u]'},
{separator:'---------------' },
{name:'Picture', key:'P', replaceWith:'[img][![Url]!][/img]'},
{name:'Link', key:'L', openWith:'[url=[![Url]!]]', closeWith:'[/url]', placeHolder:'Your text to link here...'},
{separator:'---------------' },
{name:'Size', key:'S', openWith:'[size=[![Text size]!]]', closeWith:'[/size]',
dropMenu :[
{name:'Big', openWith:'[size=200]', closeWith:'[/size]' },
{name:'Normal', openWith:'[size=100]', closeWith:'[/size]' },
{name:'Small', openWith:'[size=50]', closeWith:'[/size]' }
]},
{separator:'---------------' },
{name:'Bulleted list', openWith:'[list]\n', closeWith:'\n[/list]'},
{name:'Numeric list', openWith:'[list=[![Starting number]!]]\n', closeWith:'\n[/list]'},
{name:'List item', openWith:'[*] '},
{separator:'---------------' },
{name:'Quotes', openWith:'[quote]', closeWith:'[/quote]'},
{name:'Code', openWith:'[code]', closeWith:'[/code]'},
{separator:'---------------' },
{name:'Clean', className:"clean", replaceWith:function(markitup) { return markitup.selection.replace(/\[(.*?)\]/g, "") } },
{name:'Preview', className:"preview", call:'preview' }
]
}
\ No newline at end of file
/* -------------------------------------------------------------------
// markItUp!
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp .markItUpButton1 a {
background-image:url(images/bold.png);
}
.markItUp .markItUpButton2 a {
background-image:url(images/italic.png);
}
.markItUp .markItUpButton3 a {
background-image:url(images/underline.png);
}
.markItUp .markItUpButton4 a {
background-image:url(images/picture.png);
}
.markItUp .markItUpButton5 a {
background-image:url(images/link.png);
}
.markItUp .markItUpButton6 a {
background-image:url(images/fonts.png);
}
.markItUp .markItUpButton7 a {
background-image:url(images/list-bullet.png);
}
.markItUp .markItUpButton8 a {
background-image:url(images/list-numeric.png);
}
.markItUp .markItUpButton9 a {
background-image:url(images/list-item.png);
}
.markItUp .markItUpButton10 a {
background-image:url(images/quotes.png);
}
.markItUp .markItUpButton11 a {
background-image:url(images/code.png);
}
.markItUp .clean a {
background-image:url(images/clean.png);
}
.markItUp .preview a {
background-image:url(images/preview.png);
}
\ No newline at end of file
// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2011 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Html tags
// http://en.wikipedia.org/wiki/html
// ----------------------------------------------------------------------------
// Basic set. Feel free to add more tags
// ----------------------------------------------------------------------------
var mySettings = {
onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'},
onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>'},
onTab: {keepDefault:false, replaceWith:' '},
markupSet: [
{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },
{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' },
{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },
{separator:'---------------' },
{name:'Bulleted List', openWith:' <li>', closeWith:'</li>', multiline:true, openBlockWith:'<ul>\n', closeBlockWith:'\n</ul>'},
{name:'Numeric List', openWith:' <li>', closeWith:'</li>', multiline:true, openBlockWith:'<ol>\n', closeBlockWith:'\n</ol>'},
{separator:'---------------' },
{name:'Picture', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />' },
{name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
{separator:'---------------' },
{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
{name:'Preview', className:'preview', call:'preview'}
]
}
/* -------------------------------------------------------------------
// markItUp!
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp .markItUpButton1 a {
background-image:url(images/bold.png);
}
.markItUp .markItUpButton2 a {
background-image:url(images/italic.png);
}
.markItUp .markItUpButton3 a {
background-image:url(images/stroke.png);
}
.markItUp .markItUpButton4 a {
background-image:url(images/list-bullet.png);
}
.markItUp .markItUpButton5 a {
background-image:url(images/list-numeric.png);
}
.markItUp .markItUpButton6 a {
background-image:url(images/picture.png);
}
.markItUp .markItUpButton7 a {
background-image:url(images/link.png);
}
.markItUp .markItUpButton8 a {
background-image:url(images/clean.png);
}
.markItUp .preview a {
background-image:url(images/preview.png);
}
/* -------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp * {
margin:0px; padding:0px;
outline:none;
}
.markItUp a:link,
.markItUp a:visited {
color:#000;
text-decoration:none;
}
.markItUp {
width:700px;
margin:5px 0 5px 0;
border:5px solid #F5F5F5;
}
.markItUpContainer {
border:1px solid #3C769D;
background:#FFF url(images/bg-container.png) repeat-x top left;
padding:5px 5px 2px 5px;
font:11px Verdana, Arial, Helvetica, sans-serif;
}
.markItUpEditor {
font:12px 'Courier New', Courier, monospace;
padding:5px 5px 5px 35px;
border:3px solid #3C769D;
width:643px;
height:320px;
background:#FFF url(images/bg-editor.png) no-repeat;
clear:both;
line-height:18px;
overflow:auto;
}
.markItUpPreviewFrame {
overflow:auto;
background-color:#FFFFFF;
border:1px solid #3C769D;
width:99.9%;
height:300px;
margin:5px 0;
}
.markItUpFooter {
width:100%;
cursor:n-resize;
}
.markItUpResizeHandle {
overflow:hidden;
width:22px; height:5px;
margin-left:auto;
margin-right:auto;
background-image:url(images/handle.png);
cursor:n-resize;
}
/***************************************************************************************/
/* first row of buttons */
.markItUpHeader ul li {
list-style:none;
float:left;
position:relative;
}
.markItUpHeader ul li ul{
display:none;
}
.markItUpHeader ul li:hover > ul{
display:block;
}
.markItUpHeader ul .markItUpDropMenu {
background:transparent url(images/menu.png) no-repeat 115% 50%;
margin-right:5px;
}
.markItUpHeader ul .markItUpDropMenu li {
margin-right:0px;
}
.markItUpHeader ul .markItUpSeparator {
margin:0 10px;
width:1px;
height:16px;
overflow:hidden;
background-color:#CCC;
}
.markItUpHeader ul ul .markItUpSeparator {
width:auto; height:1px;
margin:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul {
display:none;
position:absolute;
top:18px; left:0px;
background:#F5F5F5;
border:1px solid #3C769D;
height:inherit;
}
.markItUpHeader ul ul li {
float:none;
border-bottom:1px solid #3C769D;
}
.markItUpHeader ul ul .markItUpDropMenu {
background:#F5F5F5 url(images/submenu.png) no-repeat 100% 50%;
}
/* next rows of buttons */
.markItUpHeader ul ul ul {
position:absolute;
top:-1px; left:150px;
}
.markItUpHeader ul ul ul li {
float:none;
}
.markItUpHeader ul a {
display:block;
width:16px; height:16px;
text-indent:-10000px;
background-repeat:no-repeat;
padding:3px;
margin:0px;
}
.markItUpHeader ul ul a {
display:block;
padding-left:0px;
text-indent:0;
width:120px;
padding:5px 5px 5px 25px;
background-position:2px 50%;
}
.markItUpHeader ul ul a:hover {
color:#FFF;
background-color:#3C769D;
}
/***************************************************************************************/
.html .markItUpEditor {
background-image:url(images/bg-editor-html.png);
}
.markdown .markItUpEditor {
background-image:url(images/bg-editor-markdown.png);
}
.textile .markItUpEditor {
background-image:url(images/bg-editor-textile.png);
}
.bbcode .markItUpEditor {
background-image:url(images/bg-editor-bbcode.png);
}
.wiki .markItUpEditor,
.dotclear .markItUpEditor {
background-image:url(images/bg-editor-wiki.png);
}
\ No newline at end of file
/* -------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp * {
margin:0px; padding:0px;
outline:none;
}
.markItUp a:link,
.markItUp a:visited {
color:#000;
text-decoration:none;
}
.markItUp {
width:700px;
margin:5px 0 5px 0;
}
.markItUpContainer {
font:11px Verdana, Arial, Helvetica, sans-serif;
}
.markItUpEditor {
font:12px 'Courier New', Courier, monospace;
padding:5px;
width:690px;
height:320px;
clear:both;
line-height:18px;
overflow:auto;
}
.markItUpPreviewFrame {
overflow:auto;
background-color:#FFF;
width:99.9%;
height:300px;
margin:5px 0;
}
.markItUpFooter {
width:100%;
}
.markItUpResizeHandle {
overflow:hidden;
width:22px; height:5px;
margin-left:auto;
margin-right:auto;
background-image:url(images/handle.png);
cursor:n-resize;
}
/***************************************************************************************/
/* first row of buttons */
.markItUpHeader ul li {
list-style:none;
float:left;
position:relative;
}
.markItUpHeader ul li:hover > ul{
display:block;
}
.markItUpHeader ul .markItUpDropMenu {
background:transparent url(images/menu.png) no-repeat 115% 50%;
margin-right:5px;
}
.markItUpHeader ul .markItUpDropMenu li {
margin-right:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul {
display:none;
position:absolute;
top:18px; left:0px;
background:#FFF;
border:1px solid #000;
}
.markItUpHeader ul ul li {
float:none;
border-bottom:1px solid #000;
}
.markItUpHeader ul ul .markItUpDropMenu {
background:#FFF url(images/submenu.png) no-repeat 100% 50%;
}
.markItUpHeader ul .markItUpSeparator {
margin:0 10px;
width:1px;
height:16px;
overflow:hidden;
background-color:#CCC;
}
.markItUpHeader ul ul .markItUpSeparator {
width:auto; height:1px;
margin:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul ul {
position:absolute;
top:-1px; left:150px;
}
.markItUpHeader ul ul ul li {
float:none;
}
.markItUpHeader ul a {
display:block;
width:16px; height:16px;
text-indent:-10000px;
background-repeat:no-repeat;
padding:3px;
margin:0px;
}
.markItUpHeader ul ul a {
display:block;
padding-left:0px;
text-indent:0;
width:120px;
padding:5px 5px 5px 25px;
background-position:2px 50%;
}
.markItUpHeader ul ul a:hover {
color:#FFF;
background-color:#000;
}
/* preview style examples */
body {
background-color:#EFEFEF;
font:70% Verdana, Arial, Helvetica, sans-serif;
}
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>markItUp! preview template</title>
<link rel="stylesheet" type="text/css" href="~/templates/preview.css" />
</head>
<body>
<!-- content -->
</body>
</html>
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
$(document).ready(function(){
$('.main1').show(500);
})
function test(){
}
\ No newline at end of file
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree
*/
// Place all the styles related to the cards controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
* {
word-wrap:break-word;
}
html,body {
border:0 !important;
}
body {
background:#EBEBEB image-url("common/bodybg.gif") repeat-x 0 90px;
text-align:center;
}
body,td,input,textarea,select,button {
color:#444;
font:12px/1.6em Verdana,Helvetica,Arial,sans-serif;
}
input,select,button {
vertical-align:middle;
}
textarea {
resize:none;
}
body,ul,li,dl,dd,p,h1,h2,h3,h4,h5,h6,form,fieldset {
margin:0;
padding:0;
}
h1,h2,h3,h4,h5,h6 {
font-size:1em;
}
ul li {
list-style:none;
}
a {
text-decoration:none;
color:#000;
}
a:hover {
text-decoration:underline;
}
.lightlink,.lightlink a {
color:#09C;
}
a img {
border:none;
}
em,cite,strong,th {
text-align:left;
font-style:normal;
}
.emfont {
color:#F60;
}
table {
empty-cells:show;
border-collapse:collapse;
}
th {
font-weight:400;
}
.txt,.txtarea {
padding:2px;
*padding:0 2px;
height:16px;
*height:20px;
border:1px solid;
border-color:#999 #CCC #CCC #999;
background:#FFF;
}
.txtarea {
height:auto;
}
.checkbox,.radio {
margin:0;
width:15px;
}
.pipe {
margin:0 5px;
}
.lighttxt,.lighttxt a,.pipe {
color:#999;
}
.smalltext {
font-size:0.83em;
font-family:Verdana,Helvetica,Arial,sans-serif;
}
.noborder,.noborder td {
border:none !important;
}
.nobg {
background:none !important;
}
.right {
float:right;
}
.left {
float:left;
}
.onerror,.onright {
clear:both;
padding:2px 2px 2px 22px;
background:image-url("check_error.gif") no-repeat 2px 2px;
}
.onright {
background:image-url("check_right.gif") no-repeat 2px 2px;
}
.notice {
clear:both;
margin:5px 0;
padding:3px 5px 3px 20px;
background:image-url("common/notice.gif") no-repeat 2px 6px;
}
.nodata {
margin:99px auto;
text-align:center;
color:#999;
font-size:16px;
font-weight:700;
}
#ajaxwaitid {
display:none;
position:absolute;
z-index:100;
top:0;
right:0;
width:100px;
height:1.6em;
background:#D00;
line-height:1.6em;
color:#FFF;
overflow:hidden;
}
#checksecanswer img,#checksecanswer3 img,#checkseccodeverify img,#checkseccodeverify3 img,.warning img {
vertical-align:middle;
}
.s_clear:after {
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}
.s_clear {
zoom:1;
}
hr {
clear:both;
margin:1em 0;
border:0 solid #E6E7E1;
background:transparent;
}
.solidline {
border-top:1px solid #FFF;
border-bottom-width:1px;
}
.dashline {
height:0px;
border-bottom-width:1px;
border-style:dashed;
}
.shadowline {
*margin:2px 0;
border-width:1px 0;
border-top-color:#C8DCEC;
border-bottom-color:#FFF;
}
.side .shadowline {
margin:5px 0;
*margin:2px 0;
}
.cornerlayger {
padding:6px 8px;
border:1px solid #09C;
background:#EBF2F8;
line-height:1.6em;
}
.minicorner {
margin-top:-1px;
height:6px;
background:image-url("common/attachinfobg.gif") no-repeat 50% 0;
}
.wrap {
text-align:left;
margin:0 auto;
}
#wrap {
padding-bottom:10px;
min-height:450px;
border:0 solid #00B2E8;
background-color:#FFF;
clear:both;
}
* html #wrap {
height:450px;
}
.wrap,#nav {
width:1024px;
}
#header {
margin-bottom:8px;
min-width:1024px;
width:100%;
border-bottom:1px solid #00B2E8;
background:#00A2D2 image-url("common/header.gif") repeat-x 0 100%;
}
#header .wrap {
position:relative;
padding:24px 0 22px;
}
#header h2 {
float:left;
}
#umenu {
position:absolute;
right:0;
top:0;
line-height:20px;
}
#umenu a {
margin:0 6px;
}
#umenu cite {
font-weight:700;
}
#umenu cite span a {
margin:0;
font-weight:400;
}
#myprompt.new {
padding-left:22px;
background:image-url("common/notice_newpm.gif") no-repeat 0 50%;
}
#myprompt_menu a.new {
color:#F60;
}
#myprompt_menu li {
float:left;
width:50%;
}
.promptmenu {
margin-left:-27px;
padding-top:10px;
width:250px;
background:transparent image-url("common/pm_ntc.gif") no-repeat 0 0;
text-align:left;
opacity:0.98;
}
.promptcontent {
padding-bottom:10px;
background:transparent image-url("common/pm_ntc.gif") no-repeat -250px 100%;
}
.promptmenu ul {
padding:0 10px;
border:solid #91C8E2;
border-width:0 2px;
background:#FEFEFE;
}
.promptmenu li {
border-bottom:1px solid #F4F4F4;
line-height:29px;
display:block;
width:100%;
color:#999;
overflow:hidden;
text-overflow:ellipsis;
-webkit-text-overflow:ellipsis;
-moz-text-overflow:ellipsis;
-o-text-overflow:ellipsis;
}
.promptmenu a:hover {
text-decoration:none;
color:#09C;
}
.up {
padding-top:0;
padding-bottom:10px;
width:150px;
background-position:-500px 100%;
}
.up .promptcontent {
padding-top:5px;
padding-bottom:0;
background-position:-650px 0;
}
.up li {
border-bottom:none;
line-height:160%;
}
#uchome_ntc {
padding:1px 10px 3px 15px;
*padding:2px 10px 2px 15px;
background:image-url("common/notify_bg_m.gif") no-repeat 0 50%;
color:#FFF !important;
}
#uchome_ntc a {
margin:0;
}
#umenu,#umenu a,#umenu .pipe {
color:#97F2FF;
}
#footer {
padding:1em 0;
}
#rightinfo {
float:left;
}
#footlink {
float:right;
text-align:right;
}
#footer,#footer a {
color:#8691A2;
}
.content {
padding:20px 25px;
}
.content h1 {
margin-bottom:10px;
font-size:16px;
font-weight:400;
}
#menu {
position:absolute;
right:0;
bottom:0;
_bottom:-2px;
height:26px;
}
#menu li {
display:inline;
float:left;
margin-left:5px;
}
#menu a {
float:left;
padding:0 14px;
height:25px;
border:solid #B0E4EF;
border-width:1px 1px 0;
background:transparent none;
line-height:25px;
color:#FFF;
text-decoration:none;
overflow:hidden;
}
#menu a.dropmenu {
padding-right:20px;
background-image:image-url("common/arrow_down.gif");
background-repeat:no-repeat;
background-position:95% 50%;
}
#menu a:hover {
border-color:#00B2E8;
color:#333;
}
#menu li.current a {
height:26px;
border-color:#00B2E8;
color:#333;
}
#nav {
margin:-8px auto 0;
background:image-url("common/icon_nav.gif") no-repeat 0 50%;
text-align:left;
text-indent:25px;
line-height:3em;
}
#nav,#nav a {
color:#333;
}
.mainbox table {
width:100%;
}
.blocktitle {
margin-bottom:0.5em;
font-size:16px;
font-weight:700;
}
.channelinfo {
clear:both;
margin:5px 0;
color:#666;
}
.channelinfo img {
vertical-align:middle;
}
.channelinfo .onerror {
* background-position:2px 0;
}
.pages_btns {
padding:5px 0 1em;
line-height:30px;
}
.pages,.pageback {
float:right;
padding:2px 0;
}
.pages a,.pages strong,.pageback a {
float:left;
padding:0 6px;
margin-right:2px;
height:26px;
border:1px solid;
line-height:26px;
overflow:hidden;
}
.pages a,.pageback a {
border-color:#E6E7E1;
background-color:#FFF;
color:#09C;
}
.pages a:hover,.pageback a:hover {
text-decoration:none;
}
.pages strong {
border-color:#09C;
background-color:#09C;
color:#FFF;
font-weight:700;
}
.pages a.prev,.pages a.next {
background-repeat:no-repeat;
}
.pages a.prev {
background-image:image-url("common/arrow_left.gif");
background-position:30% 50%;
padding:0;
width:22px;
overflow:hidden;
text-indent:-9999px;
}
.pages a.next {
padding-right:16px;
background-image:image-url("common/arrow_right.gif");
background-position:90% 50%;
}
.pageback a {
padding-left:16px;
background:#FFF image-url("common/arrow_left.gif") no-repeat 0 50%;
}
.pages a:hover,.pageback a,.pages a.next {
border-color:#09C;
}
.formtable {
width:100%;
}
.formtable th {
padding:5px 2px;
width:100px;
}
.formtable th a {
font-weight:400;
color:#09C;
text-decoration:underline;
}
.formtable td {
padding:5px 2px;
}
.formtable .sep_space th {
height:40px;
}
.formtable .txt {
width:270px;
}
.formtable .txtarea {
float:left;
margin:-1px 8px 0 0;
width:270px;
height:60px;
border-top-color:#CCC;
}
.float_typeid {
float:left;
margin-right:6px;
}
.float_typeid select {
float:left;
height:20px;
}
.float_typeid a {
display:block;
overflow:hidden;
padding:0 17px 0 4px;
width:73px;
height:20px;
text-decoration:none !important;
color:#444 !important;
border:1px solid;
border-color:#999 #CCC #CCC #999;
background:#FFF image-url("common/newarow.gif") no-repeat 100% 0;
}
* html .float_typeid a {
height:18px;
padding-top:2px;
}
.float_typeid a:hover,.float_typeid a:focus {
border:1px solid #09C;
background-position:100% -20px;
}
.float_typeid select {
width:94px;
}
.short_select a {
width:39px;
}
.short_select select {
width:60px;
}
.select_menu {
border:1px solid #09C;
background:#FFF image-url("common/newarow.gif") no-repeat 100% -20px;
text-align:left;
}
.select_menu ul {
margin:0 4px;
}
.select_menu li {
color:#444;
cursor:pointer;
}
.select_menu li:hover {
color:#09C;
}
.select_menu li.current {
color:#F60;
}
.commonlist li {
margin:4px 0;
}
.inlinelist li {
float:left;
width:33%;
}
.inlinelist li.wide {
width:49.5%;
}
.datalist {
zoom:1;
}
.datalist table {
margin-bottom:30px;
width:100%;
border:1px solid #E6E7E1;
}
.datalist th,.datalist td {
padding:4px 5px;
border:1px solid #E6E7E1;
font-weight:400;
}
.datalist th img {
vertical-align:top;
}
.datalist table .stat_subject {
border-right:none;
}
.datalist table .stat_num {
padding-right:15px;
text-align:right;
border-left:none;
}
.datalist .datatable {
margin-bottom:10px;
}
.datalist .datatable,.datalist .datatable th,.datalist .datatable td {
border-width:1px 0;
}
.datalist .fixtable {
table-layout:fixed;
}
.colplural,.colplural th,.colplural td,th.highlight,td.highlight {
background-color:#F5F5F5;
}
.avt_list li {
float:left;
margin-right:9px;
width:64px;
height:54px;
text-align:center;
}
.side .avt_list li {
margin:0;
width:33.3%
}
.postmessage .avt_list li {
height:70px;
}
.avt_uname li {
height:80px;
}
.avt_list img {
display:block;
margin:0 auto;
}
.avt_list p {
width:96%;
white-space:nowrap;
overflow:hidden;
}
.avt_list .cornerlayger p {
white-space:normal;
text-align:left;
}
.avt_list .minicorner {
background:image-url("common/attachinfobg.gif") no-repeat -30px 0;
}
.avt_title {
margin:8px;
}
.list {
border-top:3px solid #E6E7E1;
}
.content .list h3 {
padding-left:6px;
color:#666;
line-height:35px;
}
.list td,.list th {
height:50px;
padding:6px 0;
border-top:1px dashed #E6E7E1;
color:#666;
}
.list th {
background:image-url("common/forum.gif") 5px 10px no-repeat;
padding-left:45px !important;
}
.narrowlist th {
vertical-align:top;
}
.list th.new {
background-image:image-url("common/forum_new.gif");
}
.list th h2 em {
font-weight:400;
}
.list th h2 em strong {
color:#F60
}
.feed {
margin-bottom:10px;
}
.feed h3 {
margin:10px 0 10px 30px;
font-size:14px;
color:#999;
}
.feed a {
color:#09C;
}
.feed li {
border-bottom:1px dashed #E6E7E1;
}
.feed div {
padding:10px 30px;
background:image-url("common/alert.gif") no-repeat 0 12px;
position:relative;
}
.feed div div {
padding:0;
background:none;
}
.feed .f_icon {
background:none;
}
.feed .apptype {
position:absolute;
float:left;
display:inline;
margin:3px 0 0 -30px;
}
.feed .f_thread {
background-image:image-url("common/folder_new.gif");
}
.feed .f_reply {
background-image:image-url("topic/fastreply.gif");
}
.feed .f_quote {
background-image:image-url("topic/repquote.gif");
}
.feed .f_buddy {
background-image:image-url("common/user_link.gif");
}
.feed .f_pin {
background-image:image-url("common/pin_1.gif");
background-position:0 9px;
}
.feed .f_digest {
background-image:image-url("common/digest_1.gif");
}
.feed .f_rate {
background-image:image-url("common/agree.gif");
}
.feed .f_manage {
background-image:image-url("common/icon_manage.gif");
}
.feed .f_magic {
background-image:image-url("common/magic.gif");
}
.feed .f_trade {
background-image:image-url("common/tradesmall.gif");
}
.feed .f_activity {
background-image:image-url("common/activitysmall.gif");
}
.feed .f_reward {
background-image:image-url("common/rewardsmall.gif");
}
.feed .f_task {
background-image:image-url("common/icon_task.gif");
background-position:0 14px;
}
.feed .f_credit {
background-image:image-url("common/viewpay.gif");
}
.feed dfn {
position:absolute;
right:0;
top:14px;
*top:12px;
font-style:normal;
}
.feed dfn .deloption {
float:right;
margin:0;
}
.feed em,.feed em a,.feed .summary {
color:#999;
}
.feed .summary {
margin:12px 2em 6px;
}
.feed dt {
float:left;
color:#444;
}
.feed dd {
margin-bottom:6px;
}
.feed .il {
margin-left:2em;
white-space:nowrap;
}
a.to {
padding-right:1em;
background:image-url("common/arrow_right.gif") no-repeat 100% 50%;
}
.feed i {
margin:0 5px;
color:#999;
}
.f_thumb {
margin:5px 0;
}
.f_thumb img {
margin-right:4px;
padding:2px;
max-width:100px;
max-height:70px;
border:1px solid #E6E7E1
}
* html .f_thumb img {
width:100px;
height:70px;
}
.feed fieldset {
margin:10px 0;
padding:0 0 0 20px;
border:none;
background:image-url("common/icon_quote_m_s.gif") no-repeat 0 0;
}
.feed ins {
margin:0;
padding:0 20px 0 0;
display:inline;
background:image-url("common/icon_quote_m_e.gif") no-repeat 100% 100%;
line-height:1.6em;
color:#999;
text-decoration:none;
}
.folder {
width:25px;
text-align:center;
}
td.icon {
width:20px;
text-align:center;
}
.icon .solved {
filter:alpha(opacity=30);
opacity:0.3;
}
.subject label {
float:right;
}
.threadlist th a:hover,.subject a:hover {
color:#09C;
}
.datatable .subject {
padding:8px 5px;
}
.threadpages {
white-space:nowrap;
}
.threadpages a {
padding:2px 4px;
color:#444;
}
.threadpages a:hover {
background-color:#EBF2F8;
}
.forum,.author,.lastpost {
width:110px;
}
.lastpost,.lastpost cite,.lastpost em {
text-align:right;
}
.author cite,.lastpost cite {
display:block;
margin-bottom:-5px;
width:105px;
height:1.6em;
overflow:hidden;
}
thead .lastpost cite {
margin-bottom:0;
}
.author em,.lastpost em,.lastpost em a {
font-size:9px;
font-family:Arial,sans-serif;
color:#999;
}
.lastpost cite,.lastpost em {
display:block;
margin-right:5px;
}
.nums {
width:80px;
color:#999;
text-align:center;
}
thead .nums {
color:#444;
}
.nums strong {
padding-right:2px;
color:#09C;
font-weight:400;
}
.nums em {
padding-left:2px;
color:#444;
}
.forumnums {
width:90px;
padding-right:10px !important;
color:#999;
text-align:center;
}
.forumnums em {
color:#09C;
}
.forumlast {
width:225px;
text-align:left;
}
.num {
width:120px;
text-align:center;
color:red;
}
.threadlist td {
padding:0 !important;
}
.threadlist .colplural th,.threadlist .colplural td {
padding:7px 0 !important;
background:#EBF2F8;
}
.threadlist .colplural th {
padding:7px 5px !important;
}
.threadlist .colplural a {
color:#09C;
font-family:Tahoma,sans-serif;
}
.threadlist .colplural a:hover {
text-decoration:underline;
}
.threadlist .colplural .order_active {
padding-right:8px;
background:image-url("common/order.gif") no-repeat 100% 50%;
}
.itemfilter {
line-height:18px;
}
.itemfilter * {
float:left;
height:18px;
overflow:hidden;
}
.itemfilter li {
margin-right:5px;
}
.itemfilter .current a {
margin-right:2px;
background:image-url("common/btn_block.gif") no-repeat 0 -161px;
}
.itemfilter .current a:hover {
text-decoration:none;
}
.itemfilter span {
cursor:pointer;
}
.itemfilter .current span {
padding:0 5px;
background:image-url("common/btn_block.gif") no-repeat 100% -179px;
color:#FFF;
}
.threadlist th em {
margin-right:4px;
}
.threadlist th em,.threadlist th em a {
color:#09C;
}
.threadlist th .attach {
vertical-align:middle;
}
* html .threadlist th .attach {
vertical-align:baseline;
}
.threadlist th a {
text-decoration:none;
}
.dropmenu {
padding-right:15px;
background:image-url("common/arrow_down.gif") 100% 50% no-repeat;
cursor:pointer;
}
.popupmenu_popup {
overflow:hidden;
padding:10px;
text-align:left;
border:1px solid #CBD8E4;
background:#FEFEFE;
}
.popupmenu_popup li {
margin:3px 0;
line-height:20px;
}
.headermenu_popup {
width:100px;
}
.headermenu_popup li {
width:100px;
border-bottom:1px solid #E6E7E1;
}
.headermenu_popup a:hover {
text-decoration:none;
color:#09C;
}
.headermenu_popup .active {
font-weight:700;
}
.titlemenu_popup {
padding:0;
}
.titlemenu_popup li {
margin:0;
}
.titlemenu_popup a {
display:block;
padding:3px 8px;
}
* html .titlemenu_popup a {
display:inline-block;
}
.titlemenu_popup .current a {
background:#F1F5FA;
}
.filter_popup {
width:5em;
}
.filter_popup li {
width:60px;
}
.showselect_menu {
margin-bottom:0.8em;
padding:5px;
text-align:left;
border:1px solid #CBD8E4;
background:#FEFEFE;
}
.headactions .popupmenu_popup a,.headactions .popupmenu_popup strong {
color:#666;
background:none;
white-space:nowrap;
}
.headactions .popupmenu_popup {
overflow:visible;
}
.hasdropdownbtn {
}.hasdropdownbtn input {
float:left;
width:129px;
}
.hasdropdownbtn .spmediuminput {
width:115px;
}
.dropdownbtn {
float:left;
overflow:hidden;
text-indent:-9999px;
width:20px;
height:20px;
border-width:1px 1px 1px 0;
border-style:solid;
border-color:#999 #CCC #CCC #999;
background:#FFF image-url("common/newarow.gif") no-repeat 0 0;
}
.dropdownbtn:hover {
background-position:0 -20px;
}
#style_switch {
position:absolute;
right:0px;
bottom:-25px;
}
#style_switch li {
float:left;
padding-left:5px;
}
#style_switch a {
float:left;
width:8px;
height:8px;
border:1px solid #DDD;
background:#FFF;
line-height:100px;
overflow:hidden;
}
#style_switch a:hover,#style_switch .current a {
border-color:#FFF;
}
#style_switch .current a {
margin-top:-1px;
border-width:2px;
}
#ad_headerbanner {
float:right;
margin:5px 0 10px;
}
.ad_text {
margin:0 auto 5px;
padding:10px 0;
width:1024px;
background:#FFF;
}
.ad_text table {
width:100%;
}
.ad_text td {
padding:3px 20px;
text-align:left;
}
.ad_textlink1,.ad_textlink2 {
margin:10px 0;
padding-left:20px;
background:image-url("common/icon_ad.gif") no-repeat 0 50%;
}
.ad_pip {
clear:right;
float:right;
padding:10px;
background:#FFF;
color:#999;
line-height:130%;
}
.ad_pip li {
margin-bottom:1em;
}
.ad_pip a {
color:#09C;
}
.ad_topicrelated {
clear:both;
float:right;
display:inline;
margin:0 10px 10px;
padding:10px 10px 10px 30px;
border:1px solid #78A73D;
background:#CAEEC0;
}
.ad_column {
text-align:center;
}
.ad_footerbanner {
text-align:center;
clear:both;
margin:5px;
}
.ad_float_left,.ad_float_right {
float:right;
position:fixed;
top:350px;
z-index:300;
}
* html .ad_float_left,* html .ad_float_right {
position:absolute;
top:expression(offsetParent.scrollTop+350);
}
.ad_float_left {
left:5px;
}
.ad_float_right {
right:5px;
}
.ad_couplebanner {
top:5px
}
* html .ad_couplebanner {
top:expression(offsetParent.scrollTop+5);
}
.headactions {
float:right;
line-height:1em;
padding:12px 0 0;
}
.headactions img {
vertical-align:middle;
cursor:pointer;
padding:0 5px;
}
.headactions a {
margin-left:4px;
}
.mainbox .headactions {
color:#999;
}
.mainbox .headactions strong {
font-weight:700;
}
.msgfix {
overflow:hidden;
}
.side {
width:170px;
}
.postauthor .avatar img {
background:image-url("common/midavt_shadow.gif") repeat-x scroll 0 100% #FFFFFF;
padding:5px 5px 8px;
max-height:160px;
max-width:130px;
}
.sideinner .txt {
margin:6px 0;
}
.side li.current a {
font-weight:700;
color:#444;
text-decoration:none;
}
.with_side {
background:#FFF url("/images/common/sidebg.gif") repeat-y 100% 0;
}
.with_side .main {
float:left;
overflow:hidden;
margin-left:-180px;
width:100%;
}
.with_side .content {
margin-left:180px;
width:auto;
}
.with_side .side {
float:right;
padding-bottom:20px;
width:180px;
}
.with_side .side h2 {
margin:20px 25px 10px;
color:#999;
font-size:14px;
}
.with_side .side a {
color:#09C;
text-decoration:underline;
}
.sideinner {
padding:0 25px;
}
.sideinner .tabs {
margin:5px 0;
}
.sideinner .tabs li {
line-height:2em;
}
.numbg {
float:right;
text-align:center;
width:35px;
height:2em;
background:image-url("common/numbg.gif") no-repeat 0 50%;
color:#FFF;
font-weight:700;
}
.special {
background:none;
}
.special .main {
float:right;
}
.special .side {
float:left;
}
.sidebox {
overflow:hidden;
margin:5px 10px 10px;
}
.sidebox h4 {
margin-bottom:4px;
color:#09C;
}
.fwinmask {
}.fwin {
overflow-x:hidden;
margin:0 auto;
text-align:left;
}
.t_l,.t_c,.t_r,.m_l,.m_r,.b_l,.b_c,.b_r {
overflow:hidden;
opacity:0.9;
filter:alpha(opacity=90);
background:#CBD8E4;
}
.t_l,.t_r,.b_l,.b_r {
width:8px;
height:8px;
}
.t_c,.b_c {
height:8px;
}
.m_l,.m_r {
width:8px;
}
.m_c {
background:#F1F5FA;
}
.fcontent {
margin:15px;
}
.float_ctrl {
margin-bottom:15px;
height:20px;
line-height:20px;
}
.float_ctrl em {
float:left;
font-size:14px;
font-weight:700;
color:#09C;
}
.float_ctrl em a {
text-decoration:none;
}
.float_ctrl .needverify {
margin-left:8px;
padding-left:13px;
width:45px;
height:21px;
line-height:21px;
background:image-url("common/re_unsolved.gif") no-repeat 0 0;
font-size:12px;
color:#666;
font-weight:400;
}
.float_ctrl .onerror,.float_ctrl .onright {
white-space:nowrap;
height:auto;
line-height:140%;
color:#444;
font-size:12px;
font-weight:400;
}
.float_ctrl span {
float:right;
color:#999;
}
.float_ctrl span a,.float_ctrl strong {
float:left;
text-decoration:none;
margin-left:8px;
font-weight:400;
color:#444;
}
.float_ctrl span a:hover {
color:#999;
}
.float_close {
float:left;
width:20px;
height:20px;
overflow:hidden;
text-indent:-9999px;
background:image-url("common/newclose.gif") no-repeat 0 0;
}
.float_close:hover {
background-position:0 -20px;
}
.floatwrap {
overflow:auto;
overflow-x:hidden;
margin-bottom:10px;
height:280px;
}
.fcontent li {
list-style:none;
}
.fcontent a {
color:#09C;
text-decoration:underline;
}
.fcontent .list {
margin:0 auto;
width:570px;
border-top:3px solid #E6E7E1;
border-bottom:3px solid #E6E7E1;
}
.fcontent .list th,.fcontent .list td {
padding:3px !important;
height:auto;
border-bottom:1px dashed #E6E7E1;
}
.fcontent .list .btns th,.fcontent .list .btns td {
border-bottom:none;
}
.fcontent .list th {
width:150px;
background:none;
}
.postbox {
clear:both;
}
.moreconf {
margin-top:10px;
}
.moreconf button,.moreconf a {
margin-right:3px;
}
.loginform {
float:left;
margin-bottom:10px;
*margin-bottom:-10px;
padding:20px 0;
width:280px;
border-right:1px solid #D3E8F2;
}
.regsec {
margin-bottom:10px;
}
.channelinfo .onerror,.channelinfo .onright {
background-position:2px 0;
}
.loginform label {
clear:both;
overflow:hidden;
display:block;
margin:0 0 10px;
line-height:22px;
}
.loginform .txt {
width:170px;
}
.loginform select {
width:175px;
}
.fsubmit {
clear:both;
margin-top:8px;
}
.fsubmit .submit {
margin-right:8px;
}
.loginform label em,.fsubmit em {
float:left;
width:60px;
}
.fsubmit .regpre {
*margin-top:4px;
}
.nolabelform .txt {
width:230px;
}
.clause {
overflow:auto;
margin-bottom:10px;
width:470px;
height:240px;
}
.selectinput {
float:none;
margin:0 0 10px;
width:234px;
height:20px;
background-color:#FFF;
border:1px solid;
border-color:#999 #CCC #CCC #999;
}
.selectinput a {
float:left;
padding-right:0;
width:61px;
border:none;
}
.selectinput a:hover,.selectinput a:focus {
border:none;
}
.selectinput .txt {
float:left;
width:160px;
border:none;
}
.selecttype {
float:none;
margin:10px 0;
clear:both;
}
.selecttype a,.selecttype a:hover,.selecttype a:focus {
padding-right:0;
width:230px;
background-color:transparent;
border-color:#F1F5FA;
color:#999 !important;
}
.loginpsw label {
float:left;
padding-left:4px;
width:61px;
line-height:150%;
}
.capslock {
background:image-url("common/capslock.gif") no-repeat 98% 50%;
}
.logininfo {
float:left;
overflow:visible;
margin:87px 25px 10px 40px;
}
.logininfo h4 {
margin-bottom:10px;
font-weight:400;
font-size:14px;
}
.multinfo {
margin-top:53px;
}
.switchnav {
float:left;
white-space:nowrap;
overflow:hidden;
width:480px;
}
.postboardlist {
overflow:hidden;
margin:9px 0;
width:597px;
border-width:1px 0 1px 1px;
border-style:solid;
border-color:#CBD8E4;
background:#FFF;
}
.postboardlist li {
float:left;
overflow-x:hidden;
overflow-y:auto;
padding:5px;
width:188px;
height:300px;
border-right:1px solid #CBD8E4;
}
.postboardlist p {
height:25px;
line-height:25px;
}
.postboardlist a {
display:block;
white-space:nowrap;
overflow:hidden;
padding:0 4px;
text-decoration:none;
color:#444;
}
.postboardlist a:hover {
text-decoration:none;
background-color:#F5F5F5;
}
.postboardlist .highlightlink {
color:#09C;
}
.hassubboard {
background:image-url("common/arrow_right.gif") right center no-repeat;
}
.pbl_selected a,.pbl_selected a:hover {
background-color:#09C;
color:#FFF !important;
font-weight:700;
}
.nofloat {
height:auto !important;
height:410px;
min-height:410px;
background-color:#EBF2F8;
}
.nofloat .fcontent {
margin:15px auto;
width:600px;
}
.nofloat .loginform {
height:auto;
}
.nofloat .clause {
width:auto;
height:auto;
}
.fcontent .float_postinfo {
width:568px;
}
.c_header {
overflow:hidden;
margin-bottom:10px;
}
* html .c_header {
zoom:1;
}
.c_header h2,.c_header h3 {
float:left;
padding-right:15px;
background:#FFF;
font-size:14px;
cursor:pointer;
}
.c_header h3 {
background:#FFF image-url("common/arrow_down_big.gif") no-repeat 100% 5px;
color:#09C;
}
.searchfaq h3 {
background:none;
cursor:auto;
}
.c_header .noarrow {
background:none;
cursor:auto;
}
.c_header h3 a {
color:#09C;
}
.c_header h3 span {
font-size:12px;
font-weight:400;
color:#666;
}
.c_header h2 em,.c_header h3 em {
margin-left:8px;
font-size:12px;
color:#999;
font-weight:400;
}
.c_header_action {
float:right;
}
.c_header .c_header_ctrlbtn {
display:none;
}
.c_header .c_header_ext {
display:block;
}
.closenode {
background:image-url("common/dashline.gif") repeat-x 0 10px;
}
.closenode h3 {
background-image:image-url("common/arrow_right_big.gif");
}
.closenode .c_header_ctrlbtn {
display:block;
background-color:#FFF;
color:#666;
cursor:pointer;
}
.closenode .c_header_ext {
display:none;
}
.itemtitle {
clear:both;
overflow:hidden;
margin-bottom:10px;
line-height:23px;
}
.itemtitle h1 {
float:left;
margin:0 20px 0 0;
}
.itemtitle ul {
float:left;
}
.itemtitle li {
float:left;
margin-right:5px;
}
.itemtitle li.pipe {
margin-left:0;
}
.itemtitle ul a {
display:block;
overflow:hidden;
height:23px;
cursor:pointer;
}
* html .itemtitle ul a {
float:left;
}
.itemtitle ul a span {
display:block;
padding:0 7px;
*padding:1px 7px 0;
*line-height:22px;
}
.itemtitle ul a:hover {
background:#F5F5F5 image-url("common/btn_block.gif") no-repeat 0 -46px;
text-decoration:none;
}
.itemtitle ul a:hover span {
background:image-url("common/btn_block.gif") no-repeat 100% -69px;
}
.itemtitle ul a.dropmenu {
padding-right:0;
background-position:0 -161px;
}
.itemtitle ul a.dropmenu span {
padding-right:12px;
background:image-url("common/btn_block.gif") no-repeat 100% -138px;
}
.itemtitle ul a.dropmenu:hover {
background-position:0 -46px;
}
.itemtitle ul a.dropmenu:hover span {
background-position:100% -115px;
}
.itemtitle ul .current a,.itemtitle ul .current a:hover,.itemtitle ul .current a.dropmenu:hover {
background:#09C image-url("common/btn_block.gif") no-repeat 0 0;
}
.itemtitle ul .current a span,.itemtitle ul .current a:hover span {
background:image-url("common/btn_block.gif") no-repeat 100% -23px;
color:#FFF;
}
.itemtitle ul .current a.dropmenu span,.itemtitle ul .current a.dropmenu:hover span {
background-position:100% -92px;
}
.float_postinfo {
}.float_postinfo em {
float:left;
margin-right:5px;
padding-left:3px;
height:20px;
border:1px solid;
border-color:#999 #CCC #CCC #999;
background-color:#FFF;
cursor:pointer;
}
.float_postinfo em img {
margin-top:2px;
}
.float_postinfo input {
float:left;
}
.float_postinfo #subject {
width:358px;
}
.float_postinfo .float_typeid {
display:inline;
margin-right:0;
margin-left:6px;
}
.viewpoint {
margin:9px 0;
}
.colorbox input {
margin:2px;
padding:0px;
float:left;
cursor:pointer;
width:12px;
height:12px;
border:0;
}
.smilieslist {
padding:10px;
border:1px solid #CBD8E4;
background:#FEFEFE;
}
.smilieslist td {
padding:8px;
border:none;
cursor:pointer;
}
.smilieslist_page {
*float:left;
text-align:right;
}
.smilieslist_page a {
margin-right:5px;
color:#09C;
text-decoration:underline;
}
.pags_act {
float:left;
}
.smilies_preview {
margin-top:5px;
padding:8px;
background:#FFF;
border:1px solid #CBD8E4;
}
.smiliesgroup {
height:33px;
*height:34px;
overflow:hidden;
width:expression(this.parentNode.offsetWidth);
}
.smiliesgroup ul,.imguptype {
margin:6px 0;
padding:0 0 26px 8px;
border-bottom:1px solid #D3E8F2;
}
.smiliesgroup li,.imguptype li {
display:inline;
}
* html .smiliesgroup li,* html .imguptype li {
line-height:18px;
}
.smiliesgroup li a,.imguptype li a {
float:left;
margin:2px 6px 0 0;
padding:2px 10px;
height:19px;
border:1px solid #D3E8F2;
color:#09C;
text-decoration:none;
}
.smiliesgroup li a:focus,.imguptype li a:focus {
outline:none;
}
.smiliesgroup li a.current,.imguptype li a.current {
border-bottom-color:#FEFEFE;
font-weight:700;
color:#444;
}
.alert_win {
margin:0;
width:350px;
}
.alert_win .float_ctrl {
margin-bottom:0;
padding:8px;
}
.alert_win .shadowline {
margin:0;
*margin:-8px 0;
}
.alert_win .postbox {
*margin-top:-15px;
padding:15px;
}
.alert_right,.alert_error,.alert_info {
padding:6px 0 6px 58px;
line-height:160%;
background:image-url("common/right_big.gif") no-repeat 8px 50%;
font-size:14px;
}
.alert_error {
background-image:image-url("common/error_big.gif");
}
.alert_info {
background-image:image-url("common/info_big.gif");
}
.alert_btnleft {
margin-top:8px;
}
.alert_btn {
margin-top:20px;
text-align:center;
}
.alert_act {
margin-top:20px;
padding-left:58px;
}
.popupcredit {
}.pc_l,.pc_c,.pc_inner,.pc_r {
width:29px;
height:56px;
line-height:56px;
background:image-url("common/popupcredit_bg.gif") no-repeat 0 0;
}
.pc_c {
width:200px;
background-position:0 -56px;
background-repeat:repeat-x;
}
.pc_inner {
white-space:nowrap;
text-align:center;
width:auto;
background-position:50% -112px;
}
.pc_inner span {
margin-right:15px;
color:#FFEA97;
font-size:14px;
font-weight:700;
}
* html .pc_inner span {
display:inline-block;
}
.pc_inner span a {
color:#FFEA97;
text-decoration:underline;
}
.pc_inner span em {
color:#FFF;
font-size:18px;
font-weight:400;
}
.pc_inner span em.desc {
color:#930;
}
.pc_btn img {
opacity:0.5;
}
.pc_btn:hover img {
opacity:1;
}
.pc_r {
background-position:-30px 0;
}
.optionbar {
float:left;
overflow:hidden;
margin:3px 4px 0 -6px;
background:#09C image-url("common/header.gif") repeat-x;
height:14px;
}
.deloption {
float:left;
margin:4px;
width:12px;
height:12px;
background:image-url("common/close.gif") no-repeat 0 0;
overflow:hidden;
text-indent:-9999px;
}
.deloption:hover {
background-position:0 -12px;
}
.color_menu {
overflow:hidden;
width:63px;
}
.color_menu a {
overflow:hidden;
float:left;
width:20px;
height:20px;
}
.chosemagic {
margin-bottom:9px;
width:220px;
}
.topicadminhigh {
height:200px;
}
.topicadminhigh .tah_body {
margin:5px 0 15px;
}
.topicadminhigh .tah_body select {
width:217px;
}
.topicadminlow {
height:50px;
}
.topicadminlow table {
width:100%;
}
.topicadminlow td {
padding:0 5px;
}
.topicadminlow .txt {
width:100px;
}
.topicadminlow .wide .txt {
width:50px;
}
.topicadminlog {
}.topicadminlog h4 {
font-weight:400;
}
.topicadminlog .dropdownbtn {
border-left-width:1px;
}
.topicadminlog .txtarea {
margin:5px 0;
width:212px;
height:40px;
}
body {
font-size:12px;
color:#555;
font-family:Arial,Tahoma,Verdana,Serif;
padding:0;
height:100%;
margin:0;
background:#ebebeb;
}
table,tr,td {
font-family:Tahoma,Verdana,Georgia,Simsun,Serif;
font-size:12px;
background-color:inherit;
color:#666;
}
em,cite,strong,th {
font-style:normal;
font-weight:normal;
}
img {
border-width:0px;
outline:none;
}
img.inline {
vertical-align:middle;
outline:none;
}
h1,h2,h3,h4,h5,h6 {
font-size:1em;
}
img.inline {
vertical-align:middle;
outline:none;
}
#topbar {
width:100%;
height:34px;
background:image-url("common/tbg.gif") repeat-x;
position:relative;
}
.topanel {
width:1024px;
height:34px;
margin:auto;
}
#memberp {
width:630px;
float:left;
height:32px;
line-height:33px;
}
#memberp a {
color:#D0D0D0;
padding:0 4px;
}
#searchform {
background-color:inherit;
width:190px;
height:25px;
margin-top:3px;
float:right;
}
#searchform #srchtxt {
margin-right:3px;
padding:4px 7px 1px 5px;
background:#FFF image-url("common/form-field-bg.gif") no-repeat;
width:120px;
color:#999;
height:17px;
border:0;
}
#searchform #searchsubmit {
background:image-url("common/t_go.gif") no-repeat;
width:29px;
text-indent:-999%;
line-height:1px;
height:23px;
cursor:pointer;
margin-top:2px;
border:0;
}
.searchsub {
background:image-url("common/t_go.gif");
width:29px;
height:23px;
margin:0px;
border:0px;
padding:0px;
font-size:0.1em;
}
#headerbg {
width:100%;
height:174px;
background:image-url("common/bg.gif") repeat-x;
}
.header {
width:1024px;
height:116px;
margin:auto;
}
#dmenu {
width:1024px;
height:58px;
margin:auto;
}
.bg-dmenuleft {
width:76px;
height:58px;
background:image-url("common/bg_cat.gif") no-repeat;
float:left;
}
.bg-dmenu {
width:822px;
height:58px;
background:#DCE1E8 image-url("common/bg_dmenu.gif") no-repeat;
float:left;
}
#nav {
width:1024px;
height:53px;
margin:0 auto;
background:image-url("common/bg_areabar.gif") no-repeat center bottom;
clear:both;
color:#999;
}
#body {
width:1024px;
min-height:450px;
margin:auto;
background:#ebebeb image-url("common/cbg.gif") repeat-y;
clear:both;
}
.wrap {
width:95% !important;
}
#footer {
width:1024px;
height:200px;
font-size:11px;
color:#717275;
background:#ebebeb image-url("common/bg_bottom.gif") no-repeat;
clear:both;
margin:auto;
}
.footerc {
width:900px;
height:150px;
margin:auto;
text-align:left;
}
#ftop {
width:80px;
height:25px;
text-align:center;
}
#ftop a {
text-decoration:none;
color:#406a78;
background-color:inherit;
font-size:11px;
}
#footlink {
width:900px;
margin:20px auto;
height:60px;
clear:both;
text-align:left;
}
.fmenu {
width:430px;
height:16px;
margin:10px;
list-style:none;
clear:both;
}
.fmenu li {
width:65px;
height:16px;
float:left;
}
.fmenu li a {
text-decoration:none;
color:#a6a6a6;
background-color:inherit;
}
.fmenu li a:hover {
text-decoration:none;
color:#bdbdbd;
background-color:inherit;
}
.bhoge {
float:right;
width:110px;
height:60px;
background:image-url("common/b_hoge.gif") no-repeat 30% 80%;
text-align:left;
line-height:23px;
}
.bw3c {
float:right;
width:110px;
height:60px;
background:image-url("common/b_w3c.gif") no-repeat 30% 80%;
text-align:left;
line-height:23px;
}
.bexa {
float:right;
width:120px;
height:60px;
background:image-url("common/b_exa.gif") no-repeat 40% 80%;
text-align:left;
line-height:23px;
}
#menu {
padding:0;
width:700px;
height:36px;
position:absolute;
left:100px;
bottom:0;
}
#menu a {
float:left;
width:88px;
height:36px;
border:0;
background:transparent image-url("common/menu_bg.gif") no-repeat;
line-height:45px;
color:#FFF;
text-align:center;
overflow:hidden;
padding:0;
}
#menu a.dropmenu {
float:left;
width:88px;
height:36px;
border:0;
background:transparent image-url("common/menu_bg.gif") no-repeat;
line-height:45px;
color:#FFF;
text-align:center;
overflow:hidden;
padding:0;
}
#menu li.current a {
background:image-url("common/menu_h_bg.gif") no-repeat;
color:#333;
height:36px;
font-weight:bold;
font-size:14px;
}
.postattachlist {
width:600px !important;
}
.clearbar {
overflow:hidden;
height:10px;
clear:both;
}
.muban_price {
padding:10px 15px;
border:1px solid #FADC80;
background:#FFFBDB;
color:#965432;
line-height:24px !important;
}
strong.price {
color:#FF6600;
font-size:18px;
}
.minifont {
color:#A2A7AB;
font-family:arial,tahoma,verdana;
font-size:11px;
}
.nums {
color:#999999;
font-size:10px;
text-align:right;
width:150px;
}
.main h4 {
font-size:14px;
height:38px;
line-height:38px;
padding-left:5px;
color:#000;
}
.main h1 {
margin-bottom:10px;
font-size:16px;
font-weight:400;
}
.main .list h3 {
padding-left:6px;
color:#666;
line-height:35px;
}
.itemtitle .l {
float:left;
}
.itemtitle .r {
float:right;
}
.itemtitle .r li {
float:left;
width:50px;
list-style:none;
text-align:left;
padding-left:17px;
}
.itemtitle .r li.tposts {
background:image-url("common/boy.gif") no-repeat left center;
}
.itemtitle .r li.pdata {
background:image-url("common/girl.gif") no-repeat left center;
}
.itemtitle .r li.tmembers {
background:image-url("common/baom.gif") no-repeat left center;
}
.dotbar {
width:574px;
height:10px;
text-align:center;
margin:0 auto;
clear:both;
background:image-url("common/dot1.gif") repeat-x bottom;
}
.wbar {
width:560px;
color:#806C80;
height:33px;
margin:0 auto;
line-height:32px;
text-align:center;
clear:both;
background:image-url("common/dot1.gif") repeat-x bottom;
}
.wbar .l {
float:left;
padding-left:12px;
}
.wbar .r {
float:right;
width:220px;
}
.wbar li {
float:left;
width:50px;
padding-left:17px;
list-style:none;
text-align:left;
}
.wbar .newthread {
background:image-url("common/newthread.gif") no-repeat left center;
width:240px;
}
.news_box {
clear:both;
position:relative;
width:560px;
margin:0 auto;
}
.news_box ul {
padding:0;
margin:0;
list-style:none;
}
.news_box li {
height:30px;
line-height:30px;
border-bottom:1px dashed #E5E5E5;
clear:both;
overflow:hidden;
}
.news_box li.bai {
background:#FFF;
}
.news_box li .icon {
width:30px;
height:30px;
background:image-url("common/slisticon.gif") no-repeat center center;
float:left;
}
.img_box {
clear:both;
position:relative;
width:560px;
margin:0 auto;
border-top:1px solid #EBEBEB;
background:#F4F4F4;
height:110px;
}
.img_box ul {
padding:8px 0 0 4px;
margin:0;
overflow:hidden;
}
.img_box li {
width:168px;
height:95px;
background:image-url("common/mob_img_bg.gif") repeat-x bottom;
float:left;
margin:0 7px;
}
.img_box img {
width:166px;
height:88px;
border:1px solid #EBEBEB;
background:#333;
display:block;
}
.img_box a {
position:relative;
display:block;
}
.img_box span {
width:43px;
height:43px;
position:absolute;
right:0;
top:0;
display:block;
background:image-url("common/hot/free.gif") no-repeat right top;
}
.img_box span.free {
background:image-url("common/hot/free.gif") no-repeat right top;
}
.img_box span.unfree {
background:image-url("common/hot/unfree.gif") no-repeat right top;
}
.img_box span.yugao {
background:image-url("common/hot/yugao.gif") no-repeat right top;
}
.taolun_box {
clear:both;
position:relative;
width:560px;
margin:0 auto;
}
.list th {
padding-left:55px !important;
background-image:image-url("common/forum.gif");
background-position:13px 10px;
}
.list th.new {
background-image:image-url("common/forum_new.gif");
}
.side h4 {
height:32px;
background:url(/images/common/side_title_bg.png) repeat-x;
line-height:32px;
border:1px solid #D6E3E9;
padding-left:10px;
}
.sbox {
padding:8px;
overflow:hidden;
}
.login_box,.event_box,.caifu_box {
padding:8px;
background:#FFF;
border:1px solid #F2F2F2;
overflow:hidden;
clear:both;
}
.login_ava {
width:80px;
height:58px;
background:image-url("common/avatar_bg.gif") no-repeat;
float:left;
}
.login_ava img {
padding:5px;
}
.login_text {
width:140px;
float:left;
}
.login_join {
width:60px;
float:right;
}
.announcement {
height:30px;
background:url(/images/common/side_title_bg.png) repeat-x 0 -34px;
line-height:30px;
border:1px solid #E7E6C8;
padding-left:20px;
}
.announcement .laba {
padding-left:22px;
background:url(/images/common/announcement.png) no-repeat left center;
}
.announcement .laba a {
color:#8B0000 !important;
text-decoration:none !important;
}
.event_box {
height:230px;
overflow:hidden;
}
.event_box ul {
padding:0;
margin:0;
}
.event_box li {
float:left;
width:142px;
height:118px;
text-align:center;
}
.event_box li img {
width:135px;
height:110px;
border:1px solid #F2F2F2;
}
.caifu_box .info {
border:1px solid #E7E6C8;
background:#FCFBE7;
padding:2px 4px;
clear:both;
}
.caifu_box .paihang {
clear:both;
}
.caifu_box ul {
padding:0;
margin:0;
}
.caifu_box li {
clear:both;
height:64px;
border-bottom:1px dashed #E5E5E5
}
.caifu_box li p {
clear:both;
overflow:hidden;
height:6px;
padding:0;
margin:0;
}
.caifu_box li div {
height:52px;
float:left;
color:#999999;
}
.caifu_box li span {
color:#666;
}
.caifu_box li .caifu_num {
width:42px;
background:image-url("common/paihang_bg.gif") no-repeat center 22px;
text-align:center;
line-height:54px;
font-size:10px;
color:#FFF;
}
.caifu_box li .caifu_ava {
width:60px;
}
.caifu_box li .caifu_ava img {
border:2px solid #E1E9EF;
}
.caifu_box li .caifu_point {
line-height:20px;
overflow:hidden;
width:180px;
}
.caifu_box li.no1 .caifu_num {
background:image-url("common/paihang_bg.gif") no-repeat center -82px;
font-size:14px;
font-weight:bold;
}
.caifu_box li.no1 span {
color:#FF8176;
font-size:14px;
}
.caifu_box li.no2 .caifu_num {
background:image-url("common/paihang_bg.gif") no-repeat center -27px;
font-size:12px;
font-weight:bold;
}
.caifu_box li.no2 span {
color:#80B94B;
}
.threadv {
background:image-url("common/slisticon.gif") no-repeat 5px center;
padding-left:30px;
}
.photoshow {
width:574px;
height:174px;
background:image-url("common/photo_bg.gif");
margin:0 auto;
}
#slideshow {
list-style:none;
color:#fff;
}
#slideshow span {
display:none
}
#psbar {
overflow:hidden;
height:7px;
clear:both;
}
#slidephoto {
width:560px;
margin:0;
margin:0 auto;
display:none
}
#slidephoto * {
margin:0;
padding:0
}
#s_fullsize {
position:relative;
width:560px;
height:160px;
padding:0;
background:#000
}
#s_information {
position:absolute;
bottom:0;
width:560px;
height:0;
background:#000;
color:#fff;
overflow:hidden;
z-index:200;
opacity:.7;
filter:alpha(opacity=70)
}
#s_information h3 {
padding:4px 8px 3px;
font-size:12px;
color:#CCC;
}
#s_information p {
padding:0 8px 8px;
font-size:12px;
color:#7b7b7b;
}
#s_image {
width:560px
}
#s_image img {
position:absolute;
z-index:25;
width:auto
}
.imgnav {
position:absolute;
width:25%;
height:160px;
cursor:pointer;
z-index:150
}
#imgprev {
left:0;
background:image-url("common/photo/s_left.gif") left center no-repeat
}
#imgnext {
right:0;
background:image-url("common/photo/s_right.gif") right center no-repeat
}
#imglink {
position:absolute;
height:160px;
width:100%;
z-index:100;
opacity:.4;
filter:alpha(opacity=40)
}
.linkhover {
background:url(../../images/ahmengv2/link.gif) center center no-repeat
}
#slideleft {
float:left;
width:20px;
height:81px;
background:image-url("common/photo/scroll-left.gif") center center no-repeat;
background-color:#222
}
#slideleft:hover {
background-color:#333
}
#slideright {
float:right;
width:20px;
height:81px;
background:#222 image-url("common/photo/scroll-right.gif") center center no-repeat
}
#slideright:hover {
background-color:#333
}
#slidearea {
float:left;
position:relative;
width:540px;
margin-left:3px;
height:81px;
overflow:hidden
}
#slider {
position:absolute;
left:0;
height:81px
}
#slider img {
cursor:pointer;
border:1px solid #666;
padding:2px
}
#ad_headerbanner {
position:absolute;
right:30px;
top:60px;
}
.ad_text {
margin:0 auto 5px;
padding:10px 0;
width:95%;
background:#FFF;
}
// Place all the styles related to the duels controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
body{
background:black image-url("background.png");
font-family:"Microsoft Yahei";
}
a{
text-decoration:none;
}
a:visited{
color:black;
}
a:link{
color:black;
}
.main{
width:900px;
margin: 0 auto;
}
FOOTER .main{
font-size:10px;
color:white;
padding-left:480px;
}
#nav{
width:100%;
height:35px;
background:rgba(189,159,136,0.7);
box-shadow:0 0 10px #a28a76;
padding-top:10px;
}
#nav a {
display:block;
width:100px;
font-size:17px;
float:left;
}
#mainbody {
margin-top:0px;
}
#mainbody .main{
background:rgba(255,255,255,0.2);
margin-top:0px;
padding:20px;
border-radius:0 0 10px 10px;
box-shadow:0 0 4px #2f2f2f;
color:white;
height:200px;
}
#roombox{
margin-top:15px;
width:700px;
float:left;
height:620px;
overflow:auto;
}
#bar{
float:right;
width:200px;
}
.online{
font-size:13px;
border-bottom:1px dashed #5c5c5c;
display:block;
margin-top:4px;
}
.room{
width:30%;
height:100px;
background:rgba(189,173,161,0.5);
float:left;
margin:5px;
}
.roomname{
display:block;
font-size:20px;
text-align:center;
margin-top:15px;
}
.playername{
font-size:13px;
color:#ffcda8;
display:block;
text-align:center;
}
.roominfo{
font-size:10px;
color:#ffad6e;
display:block;
text-align:center;
}
\ No newline at end of file
// Place all the styles related to the mycard controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
// Place all the styles related to the rooms controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
// Place all the styles related to the users controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
body {
background: url(http://sh.convnet.net:7955/images/duel%20ranking.jpg) no-repeat top center #000000;
margin: 0px;
font-size:14px;
color: white
}
\ No newline at end of file
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
Themes_Dir = 'app/themes' Themes_Dir = File.expand_path 'app/themes', Rails.root
protect_from_forgery protect_from_forgery
before_filter :load_settings before_filter :load_settings
before_filter :load_user before_filter :load_user
...@@ -12,34 +12,34 @@ class ApplicationController < ActionController::Base ...@@ -12,34 +12,34 @@ class ApplicationController < ActionController::Base
end end
def load_user def load_user
if session[:user_id] if session[:user_id]
@corrent_user = User.find session[:user_id] @current_user = User.find_by_id session[:user_id]
end end
unless @corrent_user unless @current_user
@corrent_user = User::Guest @current_user = User::Guest
end end
end end
def load_locale def load_locale
locale = @corrent_user.locale || ( #locale = @current_user.locale || (
request_language = # request_language =
request_language && request_language['HTTP_ACCEPT_LANGUAGE'][/[^,;]+/] # request_language && request_language['HTTP_ACCEPT_LANGUAGE'][/[^,;]+/]
) #)
I18n.locale = locale if File.exist?("#{::Rails.root}/config/locales/#{request_language}.yml") I18n.locale = 'zh-CN'#locale if File.exist?("#{::Rails.root}/config/locales/#{request_language}.yml")
User::Guest.name = t 'user.guest' User::Guest.name = t 'user.guest'
#IE && FF are BANNED #IE && FF are not support
end end
def load_theme def load_theme
case #TODO: DRY case #TODO: DRY
when @site[:themes].has_key?(cookies[:theme]) when @site[:themes].has_key?(cookies[:theme])
prepend_view_path File.join Themes_Dir, cookies[:theme] prepend_view_path File.join Themes_Dir, cookies[:theme]
when @site[:themes].has_key?(@corrent_user.theme) when @site[:themes].has_key?(@current_user.theme)
prepend_view_path File.join Themes_Dir, @corrent_user.theme prepend_view_path File.join Themes_Dir, @current_user.theme
when @site[:themes].has_key?(@site.theme) when @site[:themes].has_key?(@site.theme)
prepend_view_path File.join Themes_Dir, @site.theme prepend_view_path File.join Themes_Dir, @site.theme
end end
end end
def load_settings def load_settings
@site = { @site = {
:name => "Reliz", :name => "Mycard",
:theme => nil, :theme => nil,
} }
def @site.method_missing(method, *args) def @site.method_missing(method, *args)
...@@ -50,6 +50,7 @@ class ApplicationController < ActionController::Base ...@@ -50,6 +50,7 @@ class ApplicationController < ActionController::Base
end end
#cache #cache
@site[:themes] = {'default' => {}} @site[:themes] = {'default' => {}}
Dir.foreach(Themes_Dir) do |file| Dir.foreach(Themes_Dir) do |file|
theme_config_file = File.join Themes_Dir, file, "theme.yml" theme_config_file = File.join Themes_Dir, file, "theme.yml"
if File.file? theme_config_file if File.file? theme_config_file
......
...@@ -5,8 +5,7 @@ class BoardsController < ApplicationController ...@@ -5,8 +5,7 @@ class BoardsController < ApplicationController
# GET /boards # GET /boards
# GET /boards.xml # GET /boards.xml
def index def index
@root = Board.root @boards = Board.where(:superboard_id => 0)
@boards = @root.subboards
@links = Link.all @links = Link.all
@actions = [] @actions = []
respond_to do |format| respond_to do |format|
...@@ -18,11 +17,12 @@ class BoardsController < ApplicationController ...@@ -18,11 +17,12 @@ class BoardsController < ApplicationController
# GET /boards/1 # GET /boards/1
# GET /boards/1.xml # GET /boards/1.xml
def show def show
@page = params[:page] && !params[:page].empty? ? params[:page].to_i : 1
@board = Board.find(params[:id]) @board = Board.find(params[:id])
@actions = [@board] @actions = [@board]
order = 'displayorder DESC, updated_at DESC' if params[:order].blank? order = params[:order].blank? ? 'displayorder DESC, updated_at DESC' : params[:order]
@topics = @board.topics.all(:offset => 20*@page-20, :limit => 20, :order => order) @topics = @board.topics.page(params[:page]).order(order)
#@topics = @board.topics.all(:offset => 20*@page-20, :limit => 20, :order => order)
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
format.xml { render :xml => params[:page] && !params[:page].empty? ? @topics : @board} format.xml { render :xml => params[:page] && !params[:page].empty? ? @topics : @board}
......
class CardsController < ApplicationController
layout 'ygo'
# GET /cards
# GET /cards.json
def index
@cards = Card.joins(:duel_user_cards)
respond_to do |format|
format.html # index.html.erb
format.json { render json: @cards }
end
end
# GET /cards/1
# GET /cards/1.json
def show
@card = Card.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @card }
format.png { redirect_to @card.image }
end
end
# GET /cards/new
# GET /cards/new.json
def new
@card = Card.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @card }
end
end
# GET /cards/1/edit
def edit
@card = Card.find(params[:id])
end
# POST /cards
# POST /cards.json
def create
@card = Card.new(params[:card])
respond_to do |format|
if @card.save
format.html { redirect_to @card, notice: 'Card was successfully created.' }
format.json { render json: @card, status: :created, location: @card }
else
format.html { render action: "new" }
format.json { render json: @card.errors, status: :unprocessable_entity }
end
end
end
# PUT /cards/1
# PUT /cards/1.json
def update
@card = Card.find(params[:id])
respond_to do |format|
if @card.update_attributes(params[:card])
format.html { redirect_to @card, notice: 'Card was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @card.errors, status: :unprocessable_entity }
end
end
end
# DELETE /cards/1
# DELETE /cards/1.json
def destroy
@card = Card.find(params[:id])
@card.destroy
respond_to do |format|
format.html { redirect_to cards_url }
format.json { head :no_content }
end
end
end
#encoding: UTF-8
class DuelsController < ApplicationController
layout 'ygo'
# GET /duels
# GET /duels.json
def index
if params[:user_id]
@user = User.find params[:user_id]
@duels = @user.duels
else
@duels = Duel
end
@duels = @duels.reverse_order.page(params[:page])
@actions = [@user, '对战明细']
respond_to do |format|
format.html # index.html.erb
format.json { render json: @duels }
end
end
# GET /duels/1
# GET /duels/1.json
def show
@duel = Duel.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @duel }
end
end
# GET /duels/new
# GET /duels/new.json
def new
@duel = Duel.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @duel }
end
end
# GET /duels/1/edit
def edit
@duel = Duel.find(params[:id])
end
# POST /duels
# POST /duels.json
def create
@duel = Duel.new(params[:duel])
respond_to do |format|
if @duel.save
format.html { redirect_to @duel, notice: 'Duel was successfully created.' }
format.json { render json: @duel, status: :created, location: @duel }
else
format.html { render action: "new" }
format.json { render json: @duel.errors, status: :unprocessable_entity }
end
end
end
# PUT /duels/1
# PUT /duels/1.json
def update
@duel = Duel.find(params[:id])
case @current_user
when @duel.user1
params[:duel] = {:user1_public => params[:duel][:user1_public]}
when @duel.user2
params[:duel] = {:user2_public => params[:duel][:user2_public]}
else
params[:duel] = {}
end
respond_to do |format|
if @duel.update_attributes(params[:duel])
format.html { redirect_to @duel, notice: 'Duel was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @duel.errors, status: :unprocessable_entity }
end
end
end
# DELETE /duels/1
# DELETE /duels/1.json
def destroy
@duel = Duel.find(params[:id])
@duel.destroy
respond_to do |format|
format.html { redirect_to duels_url }
format.json { head :no_content }
end
end
def user_deck(user_pos)
@duel = Duel.find(params[:duel_id])
unless (user_pos and @duel.user1_public or @duel.user1 == @current_user) or (!user_pos and @duel.user2_public or @duel.user2 == @current_user)
return respond_to do |format|
format.ydk { redirect_to :format => :html}
format.html{ render :text => "卡组未公开"}
end
end
if user_pos
main = @duel.user1_main
extra = @duel.user1_extra
else
main = @duel.user2_main
extra = @duel.user2_extra
end
respond_to do |format|
format.html{ render :text => (["#created by ...", "#main"] + main.collect{|card|card.number} + ["#extra"] + extra.collect{|card|card.number} + ["!side"]).join("\r\n")}
format.ydk { render :text => (["#created by ...", "#main"] + main.collect{|card|card.number} + ["#extra"] + extra.collect{|card|card.number} + ["!side"]).join("\r\n")}
end
end
def user1_deck
user_deck(true)
end
def user2_deck
user_deck(false)
end
end
...@@ -41,7 +41,7 @@ class ModerationsController < ApplicationController ...@@ -41,7 +41,7 @@ class ModerationsController < ApplicationController
# POST /moderations.xml # POST /moderations.xml
def create def create
@moderation = Moderation.new(params[:moderation]) @moderation = Moderation.new(params[:moderation])
@moderation.user = @corrent_user @moderation.user = @current_user
case params[:moderation][:assocation_type] case params[:moderation][:assocation_type]
when "topic" when "topic"
#@moderation.association_ = Topic.find params[:moderation][:assocation_id] #@moderation.association_ = Topic.find params[:moderation][:assocation_id]
......
class MycardController < ApplicationController
def update
result = []
version = params[:version]
Dir.glob('public/mycard/mycard-update-*-*.zip') do |file|
if file =~ /mycard-update-(.+?)-(.+?).zip/
if $1 <= version and $2 > version
result << "http://card.touhou.cc/mycard/#{$&}"
end
end
end
respond_to do |format|
format.json { render json: result }
end
end
end
\ No newline at end of file
...@@ -3,7 +3,7 @@ class PmsController < ApplicationController ...@@ -3,7 +3,7 @@ class PmsController < ApplicationController
# GET /pms.xml # GET /pms.xml
def index def index
@actions = [:pm] @actions = [:pm]
@pms = Pm.find_all_by_to_user_id @corrent_user.id @pms = Pm.find_all_by_to_user_id @current_user.id
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
...@@ -15,10 +15,10 @@ class PmsController < ApplicationController ...@@ -15,10 +15,10 @@ class PmsController < ApplicationController
# GET /pms/1.xml # GET /pms/1.xml
def show def show
@pm = Pm.find(params[:id]) @pm = Pm.find(params[:id])
if @pm.from_user != @corrent_user && @pm.to_user != @corrent_user if @pm.from_user != @current_user && @pm.to_user != @current_user
return render :text => "pm unexisted" return render :text => "pm unexisted"
end end
#@pms = PM.find(:all, ["from_user_id =? or to_user_id =?", @corrent_user.id]) #@pms = PM.find(:all, ["from_user_id =? or to_user_id =?", @current_user.id])
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
...@@ -48,7 +48,7 @@ class PmsController < ApplicationController ...@@ -48,7 +48,7 @@ class PmsController < ApplicationController
def create def create
params[:pm][:to_user] = User.find_by_name params[:pm][:to_user][:name] params[:pm][:to_user] = User.find_by_name params[:pm][:to_user][:name]
@pm = Pm.new(params[:pm]) @pm = Pm.new(params[:pm])
@pm.from_user = @corrent_user @pm.from_user = @current_user
respond_to do |format| respond_to do |format|
if @pm.save if @pm.save
format.html { redirect_to(@pm, :notice => 'Pm was successfully created.') } format.html { redirect_to(@pm, :notice => 'Pm was successfully created.') }
......
...@@ -53,7 +53,7 @@ class PostsController < ApplicationController ...@@ -53,7 +53,7 @@ class PostsController < ApplicationController
if @post.topic.nil? or @post.topic.locked if @post.topic.nil? or @post.topic.locked
return render :text => "Topic not found or locked." return render :text => "Topic not found or locked."
end end
@post.user = @corrent_user @post.user = @current_user
@post.displayorder = @post.topic.floor @post.displayorder = @post.topic.floor
respond_to do |format| respond_to do |format|
if @post.save if @post.save
......
#encoding: UTF-8
class RoomsController < ApplicationController
User_Filter = /\[(\d+),(.+?),(-1|0)\]/
Room_Filter = /\[(\d+),(.+?),(wait|start)(#{User_Filter}+?)\]/
require 'open-uri'
layout 'losses'
def index
@rooms = []
@actions = ["在线大厅"]
respond_to do |format|
format.html # index.html.erb
format.json do
open('http://sh.convnet.net:7922/?operation=getroom') do |file|
file.set_encoding("GBK")
file.read.encode("UTF-8").scan(Room_Filter) do |id, name, status, users|
room = {id: id.to_i, name: name, status: status}
room[:users] = []
users.scan(User_Filter) do |player, name, certified|
if certified=="-1"
user = User.find_by_name(name)
user = {player: player.to_i, id: user ? user.id : 0, name: name, certified: true}
else
user = {player: player.to_i, id: 0, name: name, certified: certified=="-1"}
end
room[:users] << user
end
@rooms << room
end
end
render json: @rooms
end
end
end
end
...@@ -50,7 +50,7 @@ class TopicsController < ApplicationController ...@@ -50,7 +50,7 @@ class TopicsController < ApplicationController
@posts = Post.find_all_by_topic_id(params[:id], :offset => 10*@page-10, :limit => 10, :order => :displayorder) @posts = Post.find_all_by_topic_id(params[:id], :offset => 10*@page-10, :limit => 10, :order => :displayorder)
@topic.update_attribute(:viewnum, @topic.viewnum + 1) @topic.update_attribute(:viewnum, @topic.viewnum + 1)
@corrent_user.update_attribute(:viewnum, @corrent_user.viewnum + 1) @current_user.update_attribute(:viewnum, @current_user.viewnum + 1)
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
format.xml { render :xml => params[:page] && !params[:page].empty? ? @posts : @topic } format.xml { render :xml => params[:page] && !params[:page].empty? ? @posts : @topic }
...@@ -84,13 +84,13 @@ class TopicsController < ApplicationController ...@@ -84,13 +84,13 @@ class TopicsController < ApplicationController
#TODO: 验证category_id有效性 #TODO: 验证category_id有效性
@topic = Topic.new(params[:topic]) @topic = Topic.new(params[:topic])
#@topic.category_id = Board.find(params[:topic][:category_id]) #@topic.category_id = Board.find(params[:topic][:category_id])
@topic.user = @corrent_user @topic.user = @current_user
@topic.displayorder = 0 @topic.displayorder = 0
@post = Post.new(params[:post]) @post = Post.new(params[:post])
@post.displayorder = 1 @post.displayorder = 1
@post.topic = @topic @post.topic = @topic
@post.user = @corrent_user @post.user = @current_user
respond_to do |format| respond_to do |format|
if @topic.save && @post.save if @topic.save && @post.save
......
#encoding: UTF-8
class UsersController < ApplicationController class UsersController < ApplicationController
require 'open-uri'
layout 'ygo'
#ApplicationHelper::addon_header.push "zh_header" #ApplicationHelper::addon_header.push "zh_header"
#ApplicationHelper::addon_top.push "zh_top" #ApplicationHelper::addon_top.push "zh_top"
#ApplicationHelper::addon_footer.push "zh_footer" #ApplicationHelper::addon_footer.push "zh_footer"
...@@ -17,7 +20,7 @@ class UsersController < ApplicationController ...@@ -17,7 +20,7 @@ class UsersController < ApplicationController
# GET /users/1.xml # GET /users/1.xml
def show def show
@user = User.find(params[:id]) @user = User.find(params[:id])
@actions = [@user.name] @actions = [@user.name]
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
format.xml { render :xml => @user } format.xml { render :xml => @user }
...@@ -46,10 +49,26 @@ class UsersController < ApplicationController ...@@ -46,10 +49,26 @@ class UsersController < ApplicationController
def create def create
@user = User.new(params[:user]) @user = User.new(params[:user])
#验证ygocore服务器是否可注册,true为成功,false为重名,nil为异常
success = open("http://140.113.242.66:7922/?userregist=NEW&username=#{CGI.escape @user.name}&password=#{CGI.escape @user.password}") do |file|
file.set_encoding("GBK")
case file.read.encode("UTF-8")
when "注册成功"
open("http://140.113.242.66:7922/?pass=zh99998&operation=saveuser"){} rescue nil
true
when "用户已存在"
@user.errors.add :name, "用户已存在"
false
else
nil
end
end rescue nil
@user.errors.add :name, "注册失败,可能是服务器故障,请与管理员联系 Email/GT/QQ: zh99998@gmail.com" if success.nil?
respond_to do |format| respond_to do |format|
if @user.save if success and @user.save
session[:user_id] = @user.id session[:user_id] = @user.id
format.html { redirect_to(:root, :notice => 'User was successfully created.') } format.html { redirect_to(@user, :notice => '注册成功') }
format.xml { render :xml => @user, :status => :created, :location => @user } format.xml { render :xml => @user, :status => :created, :location => @user }
else else
format.html { render :action => "new" } format.html { render :action => "new" }
...@@ -57,7 +76,6 @@ class UsersController < ApplicationController ...@@ -57,7 +76,6 @@ class UsersController < ApplicationController
end end
end end
end end
# PUT /users/1 # PUT /users/1
# PUT /users/1.xml # PUT /users/1.xml
def update def update
...@@ -93,7 +111,26 @@ class UsersController < ApplicationController ...@@ -93,7 +111,26 @@ class UsersController < ApplicationController
end end
def login_do def login_do
@actions = [:login] @actions = [:login]
@user = User.find_by_name_and_password(params[:user][:name], params[:user][:password]) user = User.find_by_name(params[:user][:name])
if user and params[:user][:password] == user.password
@user = user
elsif user.nil? or user.password.nil?
username = params[:user][:name]
password = params[:user][:password]
open("http://140.113.242.66:7922/?operation=passcheck&username=#{CGI.escape username}&pass=#{CGI.escape password}") do |file|
file.set_encoding("GBK")
case file.read.encode("UTF-8")
when "true"
if user
user.password = password
@user = user
@user.save
else
@user = User.create(:name => username, :password => password)
end
end
end rescue nil
end
respond_to do |format| respond_to do |format|
if @user if @user
session[:user_id] = @user.id session[:user_id] = @user.id
...@@ -121,10 +158,10 @@ class UsersController < ApplicationController ...@@ -121,10 +158,10 @@ class UsersController < ApplicationController
#p params[:theme], @site[:themes].has_key?(params[:theme]) #p params[:theme], @site[:themes].has_key?(params[:theme])
if params[:theme].blank? if params[:theme].blank?
cookies[:theme] = nil cookies[:theme] = nil
@corrent_user.update_attribute(:theme, nil) @current_user.update_attribute(:theme, nil)
elsif @site[:themes].has_key? params[:theme] elsif @site[:themes].has_key? params[:theme]
cookies[:theme] = params[:theme] cookies[:theme] = params[:theme]
@corrent_user.update_attribute(:theme, params[:theme]) @current_user.update_attribute(:theme, params[:theme])
end end
respond_to do |format| respond_to do |format|
format.html { redirect_to :back } format.html { redirect_to :back }
......
module ApplicationHelper module ApplicationHelper
def logged? def logged?
@corrent_user != User::Guest @current_user != User::Guest
end end
end end
\ No newline at end of file
module CardsHelper
end
module DuelsHelper
end
module MycardHelper
end
module PostsHelper module PostsHelper
Tags = {
:literal => [ /\[\[(.+?)\]\]/im, '&#91\1&#93' ],
:start_code => [ /\[code\](\r\n?)?/i, '<pre><code>' ],
:end_code => [ /(\r\n?)?\[\/code\]/i, '</code></pre>' ],
:start_list => [ /\[list\](\r\n?)?/i, '<ul>' ],
:start_li => [ /\[li\](\r\n?)?/i, '<li>' ],
:end_li => [ /(\r\n?)?\[\/li\](\r\n?)?/i, '</li>' ],
:end_list => [ /(\r\n?)?\[\/list\]/i, '</ul>' ],
:start_quote => [ /\[quote(?:=.*?)?\](\r\n?)?/i, '<blockquote>' ],
:start_quote_with_cite => [ /\[quote=(.*?)\](\r\n?)?/i, '<blockquote><p><cite>\1 wrote:</cite></p>' ],
:start_quote_sans_cite => [ /\[quote\](\r\n?)?/i, '<blockquote>' ],
:end_quote => [ /(\r\n?)?\[\/quote\]/i, '</blockquote>' ],
:bold => [ /\[b\](.+?)\[\/b\]/im, '<strong>\1</strong>' ],
:italic => [ /\[i\](.+?)\[\/i\]/im, '<em>\1</em>' ],
:underline => [ /\[u\](.+?)\[\/u\]/im, '<u>\1</u>' ],
:del => [ /\[del\](.+?)\[\/del\]/im, '<del>\1</del>' ],
:strike => [ /\[strike\](.+?)\[\/strike\]/im, '<del>\1</del>' ],
:email_with_name => [ /\[email=(.+?)\](.+?)\[\/email\]/i, '<a href="mailto:\1">\2</a>' ],
:email_sans_name => [ /\[email\](.+?)\[\/email\]/i, '<a href="mailto:\1">\1</a>' ],
:url_with_title => [ /\[url=(.+?)\](.+?)\[\/url\]/i, '<a href="\1" target="_blank">\2</a>' ],
:url_sans_title => [ /\[url\](.+?)\[\/url\]/i, '<a href="\1" target="_blank">\1</a>' ],
:image => [ /\[img\](.+?)\[\/img\]/i, '<img src="\1" alt="\1" />' ],
:size => [ /\[size=(\d{1,2})\](.+?)\[\/size\]/im, '<span style="font-size: \1px">\2</span>' ],
:color => [ /\[color=([^;]+?)\](.+?)\[\/color\]/im, '<span style="color: \1">\2</span>' ],
:youtube => [ /\[youtube\](.+?)youtube.com\/watch\?v=(.+?)\[\/youtube\]/i, '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\2?fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/\2?fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="350"></embed></object>' ],
:googlevid => [ /\[googlevid\](.+?)video.google.com\/videoplay\?docid=(.*?)\[\/googlevid\]/i, '<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\2&amp;hl=en"></embed>' ],
:flash => [ /\[flash\](.+?)\[\/flash\]/i, '<object width="100%" height="100%"><param name="movie" value="\1"></param><embed src="\1" type="application/x-shockwave-flash" width="100%" height="100%"></embed></object>' ],
:spoiler => [ /\[spoiler\](.+?)\[\/spoiler\]/im, '<a href="#" class="spoiler-link" onclick="$(\'_RANDOM_ID_\').toggle(); return false;">SPOILER</a><div id="_RANDOM_ID_" class="spoiler" style="display:none;">\1</div>' ],
:nsfw => [ /\[nsfw\](.+?)\[\/nsfw\]/im, '<a href="#" class="nsfw-link" onclick="$(\'_RANDOM_ID_\').toggle(); return false;">NSFW</a><div id="_RANDOM_ID_" class="nsfw" style="display:none;">\1</div>' ],
:hide => [ /\[hide=(.+?)\](.+?)\[\/hide\]/im, '<a href="#" class="hide-link" onclick="$(\'_RANDOM_ID_\').toggle(); return false;">\1</a><div id="_RANDOM_ID_" class="hide" style="display:none;">\2</div>' ],
:mp3 => [ /\[mp3\](.+?)\[\/mp3\]/i, '<script language="JavaScript" src="/javascripts/audio-player.js"></script><object type="application/x-shockwave-flash" data="/flash/player.swf" id="_RANDOM_ID_" height="24" width="290"><param name="movie" value="/flash/player.swf"><param name="FlashVars" value="playerID=_RANDOM_ID_&amp;soundFile=\1"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object>' ],
:superdeluxe => [ /\[superdeluxe\](.+?)superdeluxe.com\/sd\/contentDetail.do\?id=(.+?)\[\/superdeluxe\]/i, '<object width="400" height="350"><param name="allowFullScreen" value="true" /><param name="movie" value="http://www.superdeluxe.com/static/swf/share_vidplayer.swf" /><param name="FlashVars" value="id=\2" /><embed src="http://www.superdeluxe.com/static/swf/share_vidplayer.swf" FlashVars="id=\2" type="application/x-shockwave-flash" width="400" height="350" allowFullScreen="true" ></embed></object>' ],
:comedycentral => [ /\[comedycentral\](.+?)comedycentral.com(.+?)?(.+?)=(.+?)\[\/comedycentral\]/i, '<embed FlashVars="config=http://www.comedycentral.com/motherload/xml/data_synd.jhtml?vid=\4%26myspace=false" src="http://www.comedycentral.com/motherload/syndicated_player/index.jhtml" quality="high" bgcolor="#006699" width="340" height="325" name="comedy_player" align="middle" allowScriptAccess="always" allownetworking="external" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>' ],
:revver => [ /\[revver\](.+?)revver.com\/video\/(.+?)\/(.+?)\[\/revver\]/i, '<embed type="application/x-shockwave-flash" src="http://flash.revver.com/player/1.0/player.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="noScale" salign="TL" bgcolor="#000000" flashvars="mediaId=\2&affiliateId=0&allowFullScreen=true" allowfullscreen="true" height="392" width="480"></embed>' ],
:myspacetv => [ /\[myspacetv\](.+?)myspace(.+?)videoid=(.+?)\[\/myspacetv\]/i, '<embed src="http://lads.myspace.com/videos/vplayer.swf" flashvars="m=\3&v=2&type=video" type="application/x-shockwave-flash" width="430" height="346"></embed>' ],
:collegehumor => [ /\[collegehumor\](.+?)collegehumor.com\/video:(.+?)\[\/collegehumor\]/i, '<embed src="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=\2" quality="best" width="400" height="300" type="application/x-shockwave-flash"></embed>' ],
:hulu => [ /\[hulu\](.+?)\[\/hulu\]/i, '<object width="512" height="296"><param name="movie" value="http://www.hulu.com/embed/\1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.hulu.com/embed/\1" type="application/x-shockwave-flash" allowFullScreen="true" width="512" height="296"></embed></object>' ],
:metacafe => [ /\[metacafe\](.+?)metacafe.com\/watch\/(.+?)\/(.+?)\/\[\/metacafe\]/i, '<embed src="http://www.metacafe.com/fplayer/\2/\3.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>' ],
:yahoovid => [ /\[yahoovid\](.+?)video.yahoo.com\/watch\/(.+?)\/(.+?)\[\/yahoovid\]/i, '<object width="512" height="323"><param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.2" /><param name="allowFullScreen" value="true" /><param name="flashVars" value="id=\3&vid=\2&lang=en-us&intl=us&embed=1" /><embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.2" type="application/x-shockwave-flash" width="512" height="323" allowFullScreen="true" flashVars="id=\3&vid=\2&lang=en-us&intl=us&embed=1" ></embed></object>' ],
:flickr => [ /\[flickr\](.+?)\/photos\/(.+?)\/(.+?)\[\/flickr\]/i, '<object type="application/x-shockwave-flash" width="400" height="300" data="http://www.flickr.com/apps/video/stewart.swf?v=1.162"><param name="flashvars" value="intl_lang=en-us&amp;photo_id=\3&amp;show_info_box=true"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=1.162"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=1.162" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&amp;photo_id=\3&amp;flickr_show_info_box=true" height="300" width="400"></embed></object>' ],
:gametrailers => [ /\[gametrailers\](.+?)gametrailers.com\/player\/(.+?)\.(.+?)\[\/gametrailers\]/i, '<object codebase="http://download.macromedia.com/pub/shockwave/ca...=8,0,0,0" id="gtembed" width="480" height="392"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid=\2"/> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid=\2" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="392"></embed> </object>' ], :slideshare => [ /\[slideshare id=(.+?)&(.+?)=(.+?)&(.+?)=(.+?)\]/i, '<object type="application/x-shockwave-flash" wmode="transparent" data="https://s3.amazonaws.com:443/slideshare/ssplayer.swf?id=\1&#038;doc=\3" width="\5" height="348"><param name="movie" value="https://s3.amazonaws.com:443/slideshare/ssplayer.swf?id=\1&#038;doc=\3" /></object>' ],
:funnyordie => [ /\[funnyordie\](.+?)funnyordie.com\/videos\/([^\/]+)(.*)\[\/funnyordie\]/i, '<object width="464" height="388"><param name="movie" value="http://www2.funnyordie.com/public/flash/fodplayer.swf?6045" /><param name="flashvars" value="key=\2" /><param name="allowfullscreen" value="true" /><embed width="464" height="388" flashvars="key=\2" allowfullscreen="true" quality="high" src="http://www2.funnyordie.com/public/flash/fodplayer.swf?6045" type="application/x-shockwave-flash"></embed></object>' ],
:atomfilms => [ /\[atomfilms\](.+?)atomfilms.com\/film\/(.+?)\[\/atomfilms\]/i, '<embed src="http://www.atomfilms.com:80/a/autoplayer/shareEmbed.swf?keyword=\2" width="426" height="350"></embed>' ],
:current => [ /\[current\](.+?)current.com\/items\/(.+?)\/(.+?)\[\/current\]/i, '<object width="400" height="400"><param name="movie" value="http://current.com/e/\2/en_US"></param><param name="wmode" value="transparent"></param><param name="allowfullscreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://current.com/e/\2/en_US" type="application/x-shockwave-flash" width="400" height="400" wmode="transparent" allowfullscreen="true" allowscriptaccess="always"></embed></object>' ],
:vimeo => [ /\[vimeo\](.+?)vimeo.com\/(.+?)\[\/vimeo\]/i, '<object type="application/x-shockwave-flash" width="400" height="300" data="http://www.vimeo.com/moogaloop.swf?clip_id=\2&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color="> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=\2&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=" /></object>' ],
:grooveshark => [ /\[grooveshark\](.+?)\[\/grooveshark\]/i, '<object width="250" height="40"> <param name="movie" value="http://listen.grooveshark.com/songWidget.swf"></param> <param name="wmode" value="window"></param> <param name="allowScriptAccess" value="always"></param> <param name="flashvars" value="hostname=cowbell.grooveshark.com&widgetID=\1&style=grass&p=0"></param> <embed src="http://listen.grooveshark.com/songWidget.swf" type="application/x-shockwave-flash" width="250" height="40" flashvars="hostname=cowbell.grooveshark.com&widgetID=\1&style=grass&p=0" allowScriptAccess="always" wmode="window"></embed></object>'],
:sup => [ /\[sup\](.+?)\[\/sup\]/im, '<sup>\1</sup>' ],
:sub => [ /\[sub\](.+?)\[\/sub\]/im, '<sub>\1</sub>' ],
:auto_link => [ /(\A|\s|>)((https?:\/\/|www\.)[^\s<]+)/, '\1<a href="\2" target="_blank">\2</a>' ],
}
# Tags in this list are invoked. To deactivate a particular tag, call BBCodeizer.deactivate.
# These names correspond to either names above or methods in this module.
# The ':literal' tag MUST be first for it to work correctly
TagList = [ :literal, :bold, :italic, :underline, :del, :strike, :email_with_name,
:email_sans_name, :image, :size, :color, :code, :quote, :youtube, :googlevid,
:flash, :spoiler, :nsfw, :hide, :mp3, :superdeluxe, :comedycentral, :revver,
:myspacetv, :collegehumor, :hulu, :metacafe, :yahoovid, :flickr, :gametrailers,
:slideshare, :funnyordie, :atomfilms, :vimeo, :li, :list, :current, :auto_link,
:url_with_title, :url_sans_title ]
TagGroups = { :video => [ :youtube, :googlevid, :flash, :superdeluxe, :comedycentral, :revver,
:myspacetv, :collegehumor, :hulu, :metacafe, :yahoovid, :gametrailers,
:funnyordie, :atomfilms, :vimeo ],
:image => [ :image, :flickr ] }
# Parses all bbcode in +text+ and returns a new HTML-formatted string.
def bbcodeize(text, options = Hash.new)
text = text.dup
disabled = Array.new
disabled += @deactivated if @deactivated
disabled += decode_tags(options[:disabled]) if options[:disabled]
(TagList - disabled).each do |tag|
if Tags.has_key?(tag)
apply_tag(text, tag)
else
self.send(tag, text)
end
# Replace the matching random ids for the following tags: spoiler, nsfw, mp3
@random_id = random_string
2.times { text = text.sub('_RANDOM_ID_', @random_id) }
end
text.html_safe
end
# Configuration option to deactivate particular +tags+.
def deactivate(*tags)
@deactivated ||= Array.new
@deactivated += decode_tags(*tags)
end
# Configuration option to reactivate particular +tags+.
def activate(*tags)
@deactivated ||= Array.new
@deactivated -= decode_tags(*tags)
end
# Configuration option to change the replacement string used for a particular +tag+. The source
# code should be referenced to determine what an appropriate replacement +string+ would be.
def replace_using(tag, string)
Tags[tag][1] = string
end
private
def code(string)
# code tags must match, else don't do any replacing.
if string.scan(Tags[:start_code].first).size == string.scan(Tags[:end_code].first).size
apply_tags(string, :start_code, :end_code)
# strip out newlines from within the tags and replace them with '<br />', otherwise
# simple_format will simply append a '<br />' to the newlines, creating double spaces
string.gsub!(/#{Tags[:start_code].last}.+?#{Tags[:end_code].last}/im) { |s| s.gsub(/\r\n?/, '<br />') }
end
end
def li(string)
# list tags must match, else don't do any replacing.
if string.scan(Tags[:start_li].first).size == string.scan(Tags[:end_li].first).size
apply_tags(string, :start_li, :end_li)
# strip out newlines from within the tags and replace them with '<br />', otherwise
# simple_format will simply append a '<br />' to the newlines, creating double spaces
string.gsub!(/#{Tags[:start_li].last}.+?#{Tags[:end_li].last}/im) { |s| s.gsub(/\r\n?/, '<br />') }
end
end
def list(string)
# list tags must match, else don't do any replacing.
if string.scan(Tags[:start_list].first).size == string.scan(Tags[:end_list].first).size
apply_tags(string, :start_list, :end_list)
# strip out newlines from within the tags and replace them with '<br />', otherwise
# simple_format will simply append a '<br />' to the newlines, creating double spaces
string.gsub!(/#{Tags[:start_list].last}.+?#{Tags[:end_list].last}/im) { |s| s.gsub(/\r\n?/, '<br />') }
end
end
def quote(string)
# quotes must match, else don't do any replacing
if string.scan(Tags[:start_quote].first).size == string.scan(Tags[:end_quote].first).size
apply_tags(string, :start_quote_with_cite, :start_quote_sans_cite, :end_quote)
# strip out newlines from within the tags and replace them with '<br />', otherwise
# simple_format will simply append a '<br />' to the newlines, creating double spaces
string.gsub!(/#{Tags[:start_quote].last}.+?#{Tags[:end_quote].last}/im) { |s| s.gsub(/\r\n?/, '<br />') }
end
end
def apply_tags(string, *tags)
tags.each do |tag|
string.gsub!(*Tags[tag])
end
end
alias_method :apply_tag, :apply_tags
def decode_tags(*tags)
tags.inject(Array.new) do |decoded_tags, tag|
decoded_tag = TagGroups.key?(tag) ? TagGroups[tag] : tag
decoded_tags + Array(decoded_tag)
end
end
# http://stackoverflow.com/questions/88311/how-best-to-generate-a-random-string-in-ruby
def random_string
(0...16).map{ ('a'..'z').to_a[rand(26)] }.join
end
end end
module RoomsHelper
end
class Board < ActiveRecord::Base class Board < ActiveRecord::Base
belongs_to :superboard, :class_name => "::Board" belongs_to :superboard, :class_name => "Board"
has_many :subboards, :foreign_key => :superboard_id, :class_name => "::Board" has_many :subboards, :foreign_key => :superboard_id, :class_name => "Board"
has_many :topics, :foreign_key => :category_id has_many :topics, :foreign_key => :category_id
has_many :posts, :through =>:topics has_many :posts, :through =>:topics
default_scope order(:displayorder) default_scope order(:displayorder)
......
#encoding: UTF-8
class Card < ActiveRecord::Base
self.inheritance_column = :inheritance_type #数据库中有type字段与系统冲突,把系统的改名
has_many :duel_user_cards
has_many :users, :through => :duel_user_card
has_many :duels, :through => :duel_user_card
scope :monsters, where(:card_type => [:融合怪兽, :同调怪兽, :超量怪兽, :通常怪兽, :效果怪兽, :调整怪兽, :仪式怪兽])
scope :magics, where(:card_type => [:通常魔法, :速攻魔法, :装备魔法, :场地魔法, :仪式魔法, :永续魔法])
scope :traps, where(:card_type => [:通常陷阱, :反击陷阱, :永续陷阱])
scope :extra, where(:card_type => [:融合怪兽, :同调怪兽, :超量怪兽])
scope :main_monsters, where(:card_type => [:通常怪兽, :效果怪兽, :调整怪兽, :仪式怪兽])
def image
"http://card.touhou.cc/images/cards/#{id}.jpg"
end
def card_type
super.to_sym
end
def self.top(count)
#要使用这个方法,必须先joins(:duel_user_cards),没把这个直接写进来的原因是,如果关系链是从用户调用过来的,那么已经join过了。
group('cards.id').order("COUNT(cards.id) DESC, cards.id").limit(count)
end
def level_name
if card_type == :超量怪兽
"阶级"
else
"星级"
end
end
def monster?
[:融合怪兽, :同调怪兽, :超量怪兽, :通常怪兽, :效果怪兽, :调整怪兽, :仪式怪兽].include? card_type
end
def trap?
[:通常陷阱, :反击陷阱, :永续陷阱].include? card_type
end
def spell?
[:通常魔法, :速攻魔法, :装备魔法, :场地魔法, :仪式魔法, :永续魔法].include? card_type
end
def extra?
[:融合怪兽, :同调怪兽, :超量怪兽].include? card_type
end
end
\ No newline at end of file
#encoding: UTF-8
class Duel < ActiveRecord::Base
belongs_to :user1, :class_name => "User"
belongs_to :user2, :class_name => "User"
belongs_to :winner, :class_name => "User"
self.per_page = 20
has_many :duel_user_cards
has_many :cards, :through => :duel_user_cards
def user_cards(user, main)
main_order = [:通常怪兽, :仪式怪兽, :效果怪兽, :调整怪兽, :通常魔法, :速攻魔法, :装备魔法, :场地魔法, :仪式魔法, :永续魔法, :通常陷阱, :反击陷阱, :永续陷阱]
extra_order = [:融合怪兽, :同调怪兽, :超量怪兽]
result = cards.where('user_id=? and main = ?', user, main)
result.order("field(card_type, #{(main ? main_order : extra_order).collect{|type|"'#{type}'"}.join(',')})", 'cards.id')
end
def user1_main
user_cards(user1, true)
end
def user1_extra
user_cards(user1, false)
end
def user2_main
user_cards(user2, true)
end
def user2_extra
user_cards(user2, false)
end
end
class DuelUserCard < ActiveRecord::Base
self.table_name = :duels_users_cards
belongs_to :duel
belongs_to :user
belongs_to :card
end
class Navigation < ActiveRecord::Base class Navigation < ActiveRecord::Base
belongs_to :super, :class_name => "::Navigation" belongs_to :super, :class_name => "::Navigation"
has_many :subs, :class_name => "::Navigation", :foreign_key => :super_id has_many :subs, :class_name => "::Navigation", :foreign_key => :super_id
default_scope order(:displayorder)
end end
...@@ -2,6 +2,9 @@ class Post < ActiveRecord::Base ...@@ -2,6 +2,9 @@ class Post < ActiveRecord::Base
belongs_to :topic belongs_to :topic
belongs_to :user belongs_to :user
has_many :comments has_many :comments
def user
super || User::Guest
end
def self.today def self.today
Post.where(['created_at > ?', Date.today ]) Post.where(['created_at > ?', Date.today ])
end end
......
...@@ -3,8 +3,13 @@ class Topic < ActiveRecord::Base ...@@ -3,8 +3,13 @@ class Topic < ActiveRecord::Base
#belongs_to :type #belongs_to :type
belongs_to :board, :foreign_key => :category_id belongs_to :board, :foreign_key => :category_id
has_many :posts has_many :posts
default_scope where(:deleted => false) default_scope where(:deleted => false).order(:id).reverse_order
self.per_page = 20
alias category board alias category board
def user
super || User::Guest
end
def to_s def to_s
result = name result = name
if color? if color?
......
#encoding: UTF-8
class User < ActiveRecord::Base class User < ActiveRecord::Base
#has_and_belongs_to_many :cards, :table_name => :duels_users_cards
has_many :duel_user_cards
has_many :cards, :through => :duel_user_cards
has_many :wins, :class_name => "Duel", :foreign_key => :winner_id
belongs_to :role belongs_to :role
validates :name, :presence => true, validates :name, :presence => true,
:length => {:minimum => 1, :maximum => 254} :length => {:minimum => 1, :maximum => 254}
validates :email, :presence => true, # validates :email, :presence => true,
:length => {:minimum => 3, :maximum => 254}, # :length => {:minimum => 3, :maximum => 254},
:uniqueness => true, # :uniqueness => true,
:format => {:with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i} # :format => {:with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i}
has_many :topics has_many :topics
has_many :posts, :through => :topics has_many :posts, :through => :topics
def top_duels(count = 20)
duels.reverse_order.limit(count)
end
def duels
Duel.where("user1_id=? or user2_id=?", id,id)
end
def losts
duels - wins
end
def to_s
"<a href=\"/users/#{id}\">#{name}</a>".html_safe
end
def avatar(size=nil)
size = case size
when :small
48
when Integer
size
else
120
end
"<a href=\"/users/#{id}\"><img src=\"http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(email.strip.downcase)}?size=#{size}\" /></a>".html_safe
end
class <<self #TODO class <<self #TODO
alias old_find find alias old_find find
def find(*args) def find(*args)
...@@ -20,43 +52,24 @@ class User < ActiveRecord::Base ...@@ -20,43 +52,24 @@ class User < ActiveRecord::Base
end end
end end
end end
def to_s Guest = User.new :name => 'guest',
"<a href=\"/users/#{id}\">#{name}</a>".html_safe :nickname => '',
end :password => '',
def avatar(size=nil) :email => '',
size = case size :role_id => 6,
when :small :regip => '127.0.0.1',
48 :lastloginip => '127.0.0.1',
when Integer :viewnum => 0,
size :onlinetime => 0,
else :credit1 => 0,
120 :credit2 => 0,
end :credit3 => 0,
"<a href=\"/users/#{id}\"><img src=\"http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(email.strip.downcase)}?size=#{size}\" /></a>".html_safe :credit4 => 0,
end :credit5 => 0,
def credit :credit6 => 0,
credit1 :credit7 => 0,
:credit8 => 0
Guest.id = 0
def Guest.create
end end
Guest = User.new do |user| end
user.id = 0 \ No newline at end of file
user.name = 'guest'
user.nickname = ''
user.password = ''
user.email = ''
user.role_id = 6
user.regip = '127.0.0.1'
user.lastloginip = '127.0.0.1'
user.viewnum = 0
user.onlinetime = 0
user.credit1 = 0
user.credit2 = 0
user.credit3 = 0
user.credit4 = 0
user.credit5 = 0
user.credit6 = 0
user.credit7 = 0
user.credit8 = 0
def user.create
end
end
end
<!DOCTYPE html>
<html>
<head>
<title> <%= @site.name %><% if @actions && !@actions.empty? %> - <%= @actions.last.respond_to?(:name) ? @actions.last.name : @actions.last %> <% end %> </title>
<%= stylesheet_link_tag 'application' %>
<%= stylesheet_link_tag params[:controller] %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag params[:controller] %>
<%= csrf_meta_tags %>
<%= render 'layouts/header' %>
</head>
<body>
<%= render 'layouts/top' %>
<div id="body">
<%= yield %>
</div>
<%= render 'layouts/footer' %>
</body>
</html>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<p class="channelinfo"><%= @board.notice %></p><p id="modedby"> <p class="channelinfo"><%= @board.notice %></p><p id="modedby">
版主: *空缺中*</p> 版主: *空缺中*</p>
</div> </div>
<%= image_tag @board.banner %>
<div class="pages_btns s_clear"> <div class="pages_btns s_clear">
<%= render 'entries/page', :count => @board.topics.count %> <%= render 'entries/page', :count => @board.topics.count %>
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
<td class="lastpost"><cite><a href="boarddisplay.php?fid=68&amp;filter=&amp;orderby=lastpost" class="order order_active"><%= t 'topic.post_last' %></a></cite></td> <td class="lastpost"><cite><a href="boarddisplay.php?fid=68&amp;filter=&amp;orderby=lastpost" class="order order_active"><%= t 'topic.post_last' %></a></cite></td>
</tr> </tr>
</thead> </thead>
<% @topics.each do |topic| %> <% @topics.each do |topic| %>
<tbody id="normalthread_<%= topic.id %>"> <tbody id="normalthread_<%= topic.id %>">
...@@ -71,11 +70,11 @@ ...@@ -71,11 +70,11 @@
<label>&nbsp;</label> <label>&nbsp;</label>
<span id="thread_<%= topic.id %>"><%= topic %></span> <span id="thread_<%= topic.id %>"><%= topic %></span>
<%= link_to(t('topic.control.delete'), control_topics_path(topic, :deleted => 1)) if @corrent_user.role.topic_delete %> <%= link_to(t('topic.control.delete'), control_topics_path(topic, :deleted => 1)) if @current_user.role.topic_delete %>
<%= link_to(t('topic.control.digest'), control_topics_path(topic, :digest => 1)) if @corrent_user.role.topic_digest > 0 %> <%= link_to(t('topic.control.digest'), control_topics_path(topic, :digest => 1)) if @current_user.role.topic_digest > 0 %>
<%= link_to(t('topic.control.displayorder'), control_topics_path(topic, :displayorder => 1)) if @corrent_user.role.topic_displayorder > 0 %> <%= link_to(t('topic.control.displayorder'), control_topics_path(topic, :displayorder => 1)) if @current_user.role.topic_displayorder > 0 %>
<%= link_to(t('topic.control.lock'), control_topics_path(topic, :locked => 1)) if @corrent_user.role.topic_lock %> <%= link_to(t('topic.control.lock'), control_topics_path(topic, :locked => 1)) if @current_user.role.topic_lock %>
<%= link_to(t('topic.control.highlight'), control_topics_path(topic, :highlight => 0xFF0000)) if @corrent_user.role.topic_highlight %> <%= link_to(t('topic.control.highlight'), control_topics_path(topic, :highlight => 0xFF0000)) if @current_user.role.topic_highlight %>
</th> </th>
<td class="author"> <td class="author">
...@@ -92,7 +91,8 @@ ...@@ -92,7 +91,8 @@
</td> </td>
</tr> </tr>
</tbody> </tbody>
<% end %></table> <% end %>
</table>
</form> </form>
</div> </div>
...@@ -100,11 +100,11 @@ ...@@ -100,11 +100,11 @@
<%= render 'entries/page', :count => @board.topics.count %> <%= render 'entries/page', :count => @board.topics.count %>
<span id="visitedboards" onmouseover="$('visitedboards').id = 'visitedboardstmp';this.id = 'visitedboards';showMenu({'ctrlid':this.id})" class="pageback"><a href="index.php">返回首页</a></span> <span id="visitedboards" onmouseover="$('visitedboards').id = 'visitedboardstmp';this.id = 'visitedboards';showMenu({'ctrlid':this.id})" class="pageback"><a href="index.php">返回首页</a></span>
<span class="postbtn" id="newspecialtmp" ><%= link_to t('topic.new'), new_topic_path(:board_id => @board.id) %></span> <span class="postbtn" id="newspecialtmp" ><%= link_to t('topic.new'), new_topic_path(:board_id => @board.id) %></span>
<%= will_paginate @topics %>
</div> </div>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<%# fast newtopic %> <!--快速发帖-->
<%= form_tag :controller => :topics do %> <%= form_tag :controller => :topics do %>
<p> <p>
......
<div class="card">
<%= link_to image_tag(card.image), card %>
<%= link_to card.name, card %>
</div>
\ No newline at end of file
<%= form_for(@card) do |f| %>
<% if @card.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@card.errors.count, "error") %> prohibited this card from being saved:</h2>
<ul>
<% @card.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :number %><br />
<%= f.number_field :number %>
</div>
<div class="field">
<%= f.label :name %><br />
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :card_type %><br />
<%= f.text_field :card_type %>
</div>
<div class="field">
<%= f.label :monster_type %><br />
<%= f.text_field :monster_type %>
</div>
<div class="field">
<%= f.label :monster_atk %><br />
<%= f.number_field :monster_atk %>
</div>
<div class="field">
<%= f.label :monster_def %><br />
<%= f.number_field :monster_def %>
</div>
<div class="field">
<%= f.label :monster_attribute %><br />
<%= f.text_field :monster_attribute %>
</div>
<div class="field">
<%= f.label :type %><br />
<%= f.text_field :type %>
</div>
<div class="field">
<%= f.label :monster_level %><br />
<%= f.number_field :monster_level %>
</div>
<div class="field">
<%= f.label :lore %><br />
<%= f.text_area :lore %>
</div>
<div class="field">
<%= f.label :status %><br />
<%= f.number_field :status %>
</div>
<div class="field">
<%= f.label :stats %><br />
<%= f.text_field :stats %>
</div>
<div class="field">
<%= f.label :archetypes %><br />
<%= f.text_field :archetypes %>
</div>
<div class="field">
<%= f.label :mediums %><br />
<%= f.text_field :mediums %>
</div>
<div class="field">
<%= f.label :tokens %><br />
<%= f.number_field :tokens %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
<h1>Editing card</h1>
<%= render 'form' %>
<%= link_to 'Show', @card %> |
<%= link_to 'Back', cards_path %>
<h1>热门卡排行</h1>
<p>
<b>常用怪兽:</b>
<%= render @cards.main_monsters.top(10) %>
</p>
<p>
<b>常用额外:</b>
<%= render @cards.extra.top(5) %>
</p>
<p>
<b>常用魔法:</b>
<%= render @cards.magics.top(5) %>
</p>
<p>
<b>常用陷阱:</b>
<%= render @cards.traps.top(5) %>
</p>
</div>
\ No newline at end of file
<h1>New card</h1>
<%= render 'form' %>
<%= link_to 'Back', cards_path %>
<%= image_tag(@card.image) %>
<%= @card.name %>
<p>
<b>编号:</b>
<%= @card.number %>
</p>
<p>
<b>卡类:</b>
<%= @card.card_type %>
</p>
<% if @card.monster? %>
<% if !@card.monster_type.blank? %>
<p>
<b>Monster type:</b>
<%= @card.monster_type %>
</p>
<% end %>
<p>
<b>攻击力:</b>
<%= @card.monster_atk %>
</p>
<p>
<b>守备力:</b>
<%= @card.monster_def %>
</p>
<p>
<b>属性:</b>
<%= @card.monster_attribute %>
</p>
<p>
<b>种族:</b>
<%= @card.type %>
</p>
<p>
<b><% if @card.card_type == :超量怪兽 %>阶级<% else %>星级<% end %> :</b>
<%= @card.monster_level %>
</p>
<% end %>
<p>
<b>效果:</b>
<%= @card.lore %>
</p>
<!--<p>
<b>Status:</b>
<%= @card.status %>
</p>
<p>
<b>Stats:</b>
<%= @card.stats %>
</p>
<p>
<b>Archetypes:</b>
<%= @card.archetypes %>
</p>
<p>
<b>Mediums:</b>
<%= @card.mediums %>
</p>
<p>
<b>Tokens:</b>
<%= @card.tokens %>
</p>-->
\ No newline at end of file
<%= form_for(@duel) do |f| %>
<% if @duel.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@duel.errors.count, "error") %> prohibited this duel from being saved:</h2>
<ul>
<% @duel.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :user1 %><br />
<%= f.text_field :user1 %>
</div>
<div class="field">
<%= f.label :user2 %><br />
<%= f.text_field :user2 %>
</div>
<div class="field">
<%= f.label :winner %><br />
<%= f.text_field :winner %>
</div>
<div class="field">
<%= f.label :winreason %><br />
<%= f.number_field :winreason %>
</div>
<div class="field">
<%= f.label :replay %><br />
<%= f.text_field :replay %>
</div>
<div class="field">
<%= f.label :credits %><br />
<%= f.number_field :credits %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
<h1>Editing duel</h1>
<%= render 'form' %>
<%= link_to 'Show', @duel %> |
<%= link_to 'Back', duels_path %>
<style>
.pagination a {
color: #FFCC66;
text-decoration: none;
}
.pagination{
padding-top:10px;
padding-buttom:10px;
width:600px;
}
</style>
<div align="center" style="padding-top:150px; cursor:pointer;">
<div align="right" style="width:600px; font-size:30px; padding-bottom:20px; color:#ffcc66"><%= @user.name %> </div>
<div style="width:750px; font-size:14px; padding-bottom:10px; line-height:40px; color:#ffcc66" align="left" ><a href="#" style=" color:#ffcc66">YGO战网</a> >> <%= link_to @user.name, @user, :style=>"color:#ffcc66" %> >> <a href="" style=" color:#ffcc66">对战列表</a></div>
<div style="width:600px; display:none; " id="mian1" class="main1" >
<div style="line-height:25px; background-color:#1c1b1b; height:25px; color:#d6edff; font-weight:bold; ">
<div style='width:50px; float:left;'><em>场次</em></div>
<div style='width:200px; float:left;'><em>对手</em></div>
<div style='width:100px; float:left;' align='center'><em>胜负</em></div>
<div style='width:100px; float:left;' align='center'><em>得分</em></div>
<!--<div style='width:100px; float:left;' align='center'><em>战斗终分</em></div>-->
</div>
<!--这里的效率很低,待优化-->
<% first_index = @user.duels.where("id<=?",@duels.to_enum.first.id).count %>
<%# final_credits = Duels.where("id<=?",@duels.to_enum.first.id).sum %>
<% @duels.each_with_index do |duel, index| %>
<div style='clear:both;'></div>
<div style='line-height:25px; padding-top:3px; font-weight:bold; ' align='center'>
<!--场次-->
<div style='width:50px; float:left; color:white ' >
<%= link_to (first_index - index), duel, :style=>"color:white" %>
</div>
<!--对手-->
<div style='width:200px; float:left; ' align='left'>
<% opponent = duel.user1 == @user ? duel.user2 : duel.user1 %>
<%= link_to opponent.name, opponent, :style => 'color:#ffe793; text-decoration:none' %>
</div>
<!--胜负-->
<div style='width:100px; float:left; color:<% if duel.winner == @user %>#58db3e<% else %>red<% end %>'>
<%= duel.winner == @user ? "WIN" : "LOSE" %>
</div>
<!--得分-->
<div style='width:100px; float:left; color:<% if duel.winner == @user %>#58db3e<% else %>red<% end %>'>
<%= duel.user1 == @user ? duel.user1_credits : duel.user2_credits %>
</div>
<!--战斗终分-->
<!--<div style='width:100px; float:left; color:<% if index.zero? %>red<% else %>#d6edff<% end %>; '>
<%#= final_credits %>
<%# final_credits -= duel.user1 == @user ? duel.user1_credits : duel.user2_credits %>
</div>-->
</div>
<% end %>
</div>
</div>
<div style="clear:both"/>
<div align="center">
<%= will_paginate @duels %>
</div>
<h1>New duel</h1>
<%= render 'form' %>
<%= link_to 'Back', duels_path %>
<style type="text/css">
<!--
.STYLE3 {color: #00FF00; font-size:12px;}
.STYLE4 {color: #990000; font-size:12px;}
.STYLE6 {color: #CCCCCC}
-->
.card
{
float:left; padding-left:10px; padding-bottom:9px;
}
.card img
{
width:40px; height:50px; border:0px;
}
.user{ width:330px; font-size:20px; color:#ffcc66; float:left; cursor:pointer; line-height:40px;padding-left: 12px;font-weight: bold;}
.user_act{ width:330px; font-size:20px; color:#ffcc66; float:left; cursor:pointer; background-color:#111111; line-height:40px;padding-left: 12px;font-weight: bold;}
#cards1{background-color:#111111; overflow:hidden; padding:12px;}
#cards2{background-color:#111111; overflow:hidden; padding:12px; display:none}
</style>
<script>
function show(i){
if (i==1)
{
$('#cards2').hide(500);
$('#cards1').show(500);
$('#user2').attr("class","user");
$('#user1').attr("class","user_act");
}
else
{
$('#cards1').hide(500);
$('#cards2').show(500);
$('#user1').attr("class","user");
$('#user2').attr("class","user_act");
}
}
</script>
<div style="padding-top:150px; " align="center">
<div style="width:600px; font-size:30px; padding-bottom:10px; color:#ffcc66;font-weight: bold;" align="right">DUEL INFO </div>
<div style="width:750px; font-size:14px; padding-bottom:10px; line-height:40px; color:#ffcc66" align="left" ><a href="#" style=" color:#ffcc66">YGO战网</a> >> <a href="#" style=" color:#ffcc66">对战列表</a> >> <%=l @duel.created_at %> <span class="STYLE2"><a href="#" style=" color:#33CCFF">录像下载</a></span></div>
<div style="color: white; width:750px;" align="left">
<div class="user_act" id="user1" onClick="show(1)">
<%= @duel.user1.name %>
<% if @duel.winner == @duel.user1 %>
<span class="STYLE3">WINNER</span>
<% else %>
<span class="STYLE4">LOSER</span>
<% end %>
<span class="STYLE2"><% if @duel.user1_public or @current_user == @duel.user1 %><%= link_to image_tag('deck_download.png', :border=>false, :style => 'float:right;padding:12px 12px 0 0'), "/duels/#{@duel.id}/user1_deck.ydk" %><% end %> </span>
<% if @current_user == @duel.user1 %>
<%= form_for(@duel, :html => {:style => "display:inline"}) do |f| %>
<span style="font-size:12px;color:white;float:right;padding-right:24px">公开卡组<%= f.check_box :user1_public, :onclick=>"submit()" %></span>
<% end %>
<% end %>
</div>
<div class="user" id="user2" onClick="show(2)" >
<%= @duel.user2.name %>
<% if @duel.winner == @duel.user2 %>
<span class="STYLE3">WINNER</span>
<% else %>
<span class="STYLE4">LOSER</span>
<% end %>
<% if @duel.user2_public or @current_user == @duel.user2 %><%= link_to image_tag('deck_download.png', :border=>false, :style => 'float:right;padding:12px 12px 0 0'), "/duels/#{@duel.id}/user2_deck.ydk" %><% end %>
<% if @current_user == @duel.user2 %>
<%= form_for(@duel, :html => {:style => "display:inline"}) do |f| %>
<%= f.check_box :user2_public, :onclick=>"submit()" %> <span style="font-size:12px;color:white">公开卡组</span>
<% end %>
<% end %>
</div>
<div style="clear:both"/>
<div id="cards1">
<% if @duel.user1_public or @current_user == @duel.user1 %>
<p><b>主卡组:</b> </p>
<% @duel.user1_main.each do |card| %>
<div class="card">
<%= link_to image_tag(card.image, :title => card.name), card %>
</div>
<% end %>
<div style="clear:both"/>
<p><b>额外:</b> </p>
<% @duel.user1_extra.each do |card| %>
<div class="card">
<%= link_to image_tag(card.image, :title => card.name), card %>
</div>
<% end %>
<% else %>
卡组未公开
<% end %>
</div>
</div>
<div style="clear:both"/>
<div style="color: white; width:700px; " align="left">
<div id="cards2">
<% if @duel.user2_public or @current_user == @duel.user2 %>
<p><b>主卡组:</b> </p>
<% @duel.user2_main.each do |card| %>
<div class="card">
<%= link_to image_tag(card.image, :title => card.name, :width => 54, :height => 81), card %>
</div>
<% end %>
<div style="clear:both"/>
<p><b>额外:</b> </p>
<% @duel.user2_extra.each do |card| %>
<div class="card">
<%= link_to image_tag(card.image, :title => card.name, :width => 54, :height => 81), card %>
</div>
<% end %>
<% else %>
卡组未公开
<% end %>
</div>
</div>
<div align="center"></div>
</div>
\ No newline at end of file
<div id="user"> <div id="user">
<% if logged? %> <% if logged? %>
<cite><a href="space.php?uid=359" class="noborder"><%= @corrent_user %> </a></cite> <cite><a href="space.php?uid=359" class="noborder"><%= @current_user %> </a></cite>
<span class="pipe">|</span> <span class="pipe">|</span>
<%= link_to t('user.my'), @corrent_user %> <%= link_to t('user.my'), @current_user %>
<%= link_to t('user.space'), @corrent_user %> <%= link_to t('user.space'), @current_user %>
<%#= link_to t('user.notice'), @corrent_user %> <%#= link_to t('user.notice'), @current_user %>
<span id="myprompt_check"></span> <span id="myprompt_check"></span>
<%= link_to t('user.pm'), pms_path %> <%= link_to t('user.pm'), pms_path %>
......
<div id="welcome"> <div id="welcome">
<% if logged? %> <% if logged? %>
<%=t 'forum.welcom' %> <%= @corrent_user %> , <%= link_to t('forum.mypost'), @corrent_user %> <%= link_to t('forum.newpost'), @corrent_user %> <%=t 'forum.welcom' %> <%= @current_user %> , <%= link_to t('forum.mypost'), @current_user %> <%= link_to t('forum.newpost'), @current_user %>
<% else %> <% else %>
你可以<%= link_to t('user.register'), new_user_path %>一个帐号,并以此<%= link_to t('user.login'), login_user_path %> ,以浏览更多精彩内容,并随时发布观点,与大家交流。 你可以<%= link_to t('user.register'), new_user_path %>一个帐号,并以此<%= link_to t('user.login'), login_user_path %> ,以浏览更多精彩内容,并随时发布观点,与大家交流。
<% end %> <% end %>
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
<div id="footlink"> <div id="footlink">
<div style="width: 500px; height: 58px; float: left;"> <div style="width: 500px; height: 58px; float: left;">
<ul class="fmenu"> <ul class="fmenu">
<li style="width: 100px;"><%= link_to '66RPG 实验室', 'http://lab.66rpg.com' %></li> <li style="width: 100px;"><%= link_to 'Mycard Project', :root %></li>
</ul> </ul>
<div style="height: 16px; clear: both;">Powered by <%= link_to 'Reliz Project', 'http://lab.66rpg.com' %></div> <div style="height: 16px; clear: both;">Powered by Reliz</div>
</div> </div>
<div class="bhoge">Powered by:</div> <div class="bhoge">Powered by:</div>
<div class="bw3c">Validated by:</div> <div class="bw3c">Validated by:</div>
......
<!--<meta name="keywords" content="东方幻想乡,动漫,东方,东方project,同人,音乐,游戏,漫画,汉化,THDOTS,THBOSS,东方轮舞" /> <%#= stylesheet_link_tag 'moderator' %>
<meta name="description" content=" 东方幻想乡 这减速到死怎么打……求破 - Discuz! Board" /> \ No newline at end of file
<meta name="generator" content="Discuz! 7.2" />
<meta name="author" content="Discuz! Team and Comsenz UI Team" />
<meta name="copyright" content="2001-2009 Comsenz Inc." />
<meta name="MSSmartTagsPreventParsing" content="True" />
<meta http-equiv="MSThemeCompatible" content="Yes" />
<meta http-equiv="x-ua-compatible" content="ie=7" />
<link rel="archives" title="东方幻想乡" href="http://www.touhou.cc/bbs/archiver/" />-->
<%= stylesheet_link_tag 'common' %>
<%= javascript_include_tag 'common' %>
<%= stylesheet_link_tag 'moderator' %>
<%= stylesheet_link_tag 'viewthread' %>
<!--
<link rel="stylesheet" type="text/css" href="forumdata/cache/style_57_common.css?qfY" />
<script type="text/javascript">var STYLEID = '57', IMGDIR = 'images/default', VERHASH = 'qfY', charset = 'gbk', discuz_uid = 359, cookiedomain = '', cookiepath = '/', attackevasive = '0', disallowfloat = 'login|register', creditnotice = '1|点数|,2|威望|,3|经验|,4|推广|,5|贡献|,6|人气|,7|人品|', gid = parseInt('1'), fid = parseInt('2'), tid = parseInt('29727')</script>
<script src="forumdata/cache/common.js?qfY" type="text/javascript"></script>-->
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html>
<html> <html>
<head> <head>
<title> <%= @site.name %><% if !@actions.empty? %> - <%= @actions.last.respond_to?(:name) ? @actions.last.name : @actions.last %> <% end %> </title> <title> <%= @site.name %><% if @actions && !@actions.empty? %> - <%= @actions.last.respond_to?(:name) ? @actions.last.name : @actions.last %> <% end %> </title>
<%#= stylesheet_link_tag 'application' %>
<%= stylesheet_link_tag 'common' %>
<%= stylesheet_link_tag params[:controller] %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag 'common' %>
<%= javascript_include_tag params[:controller] %>
<%= csrf_meta_tags %>
<%= render 'layouts/header' %> <%= render 'layouts/header' %>
</head> </head>
<body> <body>
<%= render 'layouts/top' %> <%= render 'layouts/top' %>
<div id="body"> <div id="body">
......
<!DOCTYPE html>
<html>
<head>
<title> <%= @site.name %><% if @actions && !@actions.empty? %> - <%= @actions.last.respond_to?(:name) ? @actions.last.name : @actions.last %> <% end %> </title>
<%#= stylesheet_link_tag 'application' %>
<%= stylesheet_link_tag 'losses' %>
<%= stylesheet_link_tag params[:controller] %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag 'losses' %>
<%= javascript_include_tag params[:controller] %>
<%= csrf_meta_tags %>
</head>
<body>
<HEADER>
<div class="main">
<div id="logo">
<%= image_tag "logo.png", alt: "萌卡 Alpha" %>
</div>
</div>
<div id="nav">
<div class="main">
<%= link_to "返回主页", :root %>
<%= link_to "在线大厅", :rooms %>
<%= link_to "用户排行", :users %>
<%= link_to "论坛", :boards %>
</div>
</div>
</HEADER>
<div id="body">
<%= yield %>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title> <%= @site.name %><% if @actions && !@actions.empty? %> - <%= @actions.last.respond_to?(:name) ? @actions.last.name : @actions.last %> <% end %> </title>
<%#= stylesheet_link_tag 'application' %>
<%= stylesheet_link_tag 'ygo' %>
<%= stylesheet_link_tag params[:controller] %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag 'ygo' %>
<%= javascript_include_tag params[:controller] %>
<%= csrf_meta_tags %>
</head>
<body>
<div id="body">
<%= yield %>
</div>
<div style="clear:both"/>
<div style="line-height:50px; padding-top:20px; padding-bottom:10px; font-size:12px; color:#0099FF" align="center" >YGO DULE BATTLENET</div>
</body>
</html>
<h1>Mycard#update</h1>
<p>Find me in app/views/mycard/update.html.erb</p>
<div id="post_<%= post.id %>"><table id="post_<%= post.id %>" summary="post_<%= post.id %>" cellspacing="0" cellpadding="0">
<tbody><tr>
<td class="postauthor" rowspan="2">
<div class="postinfo" style="margin-left: 20px; font-weight: 800">
<%= post.user %>
</div>
<div>
<div class="avatar" onmouseover="showauthor(this, 'userinfo751931')"><%= post.user.avatar %></div>
<p><%= post.user.role %></p>
<p><em><%= post.user.nickname %></em></p>
</div>
<p><%= image_tag 'common/star_level2.gif', :alt => 'Rank:2' %></p>
<dl class="profile s_clear">
<dt><%=t 'user.post' %></dt><dd><%= post.user.posts.count %></dd>
<dt><%=t 'user.topic' %></dt><dd><%= post.user.topics.count %></dd>
<dt><%=t 'user.digest' %></dt><dd><%= post.user.topics.where(:digest => true).count %></dd>
<dt><%=t 'user.credits' %></dt><dd><%= post.user.credits %></dd>
</dl>
<!--<p><a href="magic.php?action=mybox&amp;operation=use&amp;type=1&amp;pid=751931&amp;magicid=7" onclick="showWindow('magics', this.href);doane(event);"><img src="images/magics/rtk_s.gif" title="对博丽开水使用狗仔卡"></a></p>-->
<hr class="shadowline">
<p>
管理此人<br>
<a href="topicadmin.php?action=getip&amp;fid=2&amp;tid=29727&amp;pid=751931" onclick="ajaxmenu(this, 0, 1, 2);doane(event)" title="查看 IP" class="lightlink">IP</a>&nbsp;
<a href="admincp.php?action=members&amp;username=%B2%A9%C0%F6%BF%AA%CB%AE&amp;submit=yes&amp;frames=yes" target="_blank" class="lightlink">编辑</a>&nbsp;
<a href="admincp.php?action=members&amp;operation=ban&amp;username=%B2%A9%C0%F6%BF%AA%CB%AE&amp;frames=yes" target="_blank" class="lightlink">禁止</a>&nbsp;
<a href="modcp.php?action=threads&amp;op=posts&amp;do=search&amp;searchsubmit=1&amp;users=%B2%A9%C0%F6%BF%AA%CB%AE" target="_blank" class="lightlink">帖子</a>
</p>
</td>
<td class="postcontent">
<div class="postinfo">
<strong><a title="复制本帖链接" id="postnum751931" href="javascript:;" onclick="setCopy('http://www.touhou.cc/bbs/redirect.php?goto=findpost&amp;ptid=29727&amp;pid=751931&amp;fromuid=359', '帖子地址已经复制到剪贴板')"><em><%= post.displayorder %></em><sup>#</sup></a>
</strong>
<div class="posterinfo">
<div class="pagecontrol">
</div>
<div class="authorinfo">
<%= link_to image_tag('common/online_member.gif', :class => :authicon, :id => 'authicon751931'), post.user %>
<em id="authorposton751931"><%=l post.created_at, :format => :short %> </em>
| <a href="viewthread.php?tid=29727&amp;page=1&amp;authorid=14806" rel="nofollow">只看该作者</a>
</div>
</div>
</div>
<div class="defaultpost">
<div id="ad_thread2_1"></div><div id="ad_thread3_1"></div><div id="ad_thread4_1"></div>
<div class="postmessage ">
<!--<div id="threadtitle">
<h1>蕾蒂+毒人 怎么破</h1>
</div>-->
<div class="t_msgfontfix">
<table cellspacing="0" cellpadding="0"><tbody><tr><td class="t_msgfont" id="postmessage_751931"><%= bbcodeize post.content %> </td></tr></tbody></table>
</div>
<div id="post_rate_div_751931"></div>
</div>
</div>
</td></tr>
<tr><td class="postcontent postbottom">
<% unless post.user.signature.blank? %>
<div class="signatures" style="max-height:300px;maxHeightIE:300px;">
<%= post.user.signature %>
</div>
<% end %>
<div id="ad_thread1_1"></div></td>
</tr>
<tr>
<td class="postauthor"></td>
<td class="postcontent">
<div class="postactions">
<span class="right">
<label for="manage751931">
<input type="checkbox" id="manage751931" onclick="pidchecked(this);modclick(this, 751931)" value="751931">
管理
</label>
</span>
<div class="postact s_clear">
<em>
<%= link_to t('topic.reply'), new_post_path(:topic_id => @topic.id), :class => :fastreply %>
<%= link_to t('topic.quote'), new_post_path(:topic_id => @topic.id), :class => :fastreply %>
<%= link_to t('post.edit'), edit_post_path(post), :class => :editpost %>
</em>
<p>
<a href="misc.php?action=rate&amp;tid=29727&amp;pid=751931" onclick="showWindow('rate', this.href);return false;">评分</a>
<a href="javascript:;" onclick="scrollTo(0,0);">TOP</a>
</p>
</div>
</div>
</td>
</tr>
<tr class="threadad">
<td class="postauthor"></td>
<td class="adcontent">
</td>
</tr>
</tbody></table></div>
\ No newline at end of file
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js "></script>
<script type="text/javascript">
if(window.navigator&&window.navigator.registerProtocolHandler){
window.navigator.registerProtocolHandler('web+mycard',"http://localhost:3000/calendar/render?cid\x3d%s","test");
}
</script>
<script>
var baseUrl = '/rooms.json';
function load_rooms(){
$.getJSON(baseUrl, function(data) {
var rooms = '';
var users = '当前在线</br>';
var roomcount = 0;
$.each(data, function(key, room) {
rooms += '<div class="room"><div style="float:left;position:absolute;margin-left:8px;font-size:16px;'
if(room.status == 'wait'){
rooms += 'color:#33CCFF;">等待中';
}else{
rooms += ';">决斗中';
}
rooms += '</div><a class="roomname">' + room.name + '</a>';
if(room.users[0]){
rooms += '<a class="playername">' + room.users[0].name + '</a>';
}
if(room.users[1]){
rooms += '<a class="playername">' + room.users[1].name + '</a>';
}
for(i in room.users){
user = room.users[i];
users += '<a class="online">' + user.name + '</a>';
}
rooms += '</div>';
roomcount++;
})
$('#roombox').html(rooms);
$('#online').html(users);
$('#roomcount').html(roomcount);
});
};
load_rooms();
setInterval((load_rooms), 5000);
</script>
<style>
#roombox {position: relative;}
</style>
<div id="mainbody">
<div class="main" style="height:900px;">
<div id="announcement">公告:系统测试中 出现bug请淡定</div>
<div id="roombox">
<div id="rooms">正在读取房间列表...</div>
</div>
<div id="bar">
<div id="info">
当前房间数量</br><a style="font-size:25px" id="roomcount">0</a>/150
</div>
</br>
<div id="online">
当前在线</br>
</div>
</div>
</div>
</div>
<FOOTER>
<div class="main">
By Losses Territory Studio & Mycard Team.</br>Apache 2.0 License.
</div>
</FOOTER>
\ No newline at end of file
<% name ||= 'post[content]' %> <% name ||= 'post[content]' %>
<% content ||= nil %> <% content ||= nil %>
<!-- 文本框name的值,看不明白的话不用更改,指定文本框name的时候直接调用name即可 --> <!-- 文本框name的值,看不明白的话不用更改,指定文本框name的时候直接调用name即可 -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<%= javascript_include_tag 'markitup/jquery.markitup.js' %>
<!-- markItUp! toolbar settings -->
<%= javascript_include_tag 'markitup/sets/bbcode/set.js' %>
<!-- markItUp! skin -->
<%= stylesheet_link_tag 'markitup/skins/markitup/style.css' %>
<!-- markItUp! toolbar skin -->
<%= stylesheet_link_tag "markitup/sets/bbcode/style.css" %>
<div class="editor_lite"> <div class="editor_lite">
<%= text_area_tag name, content, :id => :fastpostmessage, :rows => 5, :cols => 80, :tabindex => 4, :class => :txtarea %> <%= text_area_tag name, content, :id => :fastpostmessage, :rows => 5, :cols => 80, :tabindex => 4, :class => :txtarea %>
<!--id和class直接对应于HTML码,从DZ的主题上遗留下来的,应该修改--> <!--id和class直接对应于HTML码,从DZ的主题上遗留下来的,应该修改-->
</div> </div>
\ No newline at end of file <script type="text/javascript">
$(document).ready(function() {
$('#fastpostmessage').markItUp(mySettings);
});
</script>
\ No newline at end of file
<%= stylesheet_link_tag 'viewthread' %>
<ul class="popupmenu_popup headermenu_popup inlinelist" id="modopt_menu" style="width: 180px; display: none"><li class="wide"><a href="javascript:;" onclick="modthreads(3, 'delete')">删除主题</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(3, 'down')">提升下沉</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'stick')">主题置顶</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'highlight')">高亮显示</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'digest')">设置精华</a></li><li class="wide"><a href="javascript:;" onclick="modaction('stamp')">主题鉴定</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(4)">关闭打开</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(2, 'move')">移动主题</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(2, 'type')">主题分类</a></li><li class="wide"><a href="javascript:;" onclick="modaction('copy')">复制主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('merge')">合并主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('split')">分割主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('repair')">修复主题</a></li><li class="wide"><a href="plugin.php?id=dps_postawards:postawards&amp;tid=29727" onclick="showWindow('paward', this.href);return false;">楼层奖惩</a></li></ul> <ul class="popupmenu_popup headermenu_popup inlinelist" id="modopt_menu" style="width: 180px; display: none"><li class="wide"><a href="javascript:;" onclick="modthreads(3, 'delete')">删除主题</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(3, 'down')">提升下沉</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'stick')">主题置顶</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'highlight')">高亮显示</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'digest')">设置精华</a></li><li class="wide"><a href="javascript:;" onclick="modaction('stamp')">主题鉴定</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(4)">关闭打开</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(2, 'move')">移动主题</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(2, 'type')">主题分类</a></li><li class="wide"><a href="javascript:;" onclick="modaction('copy')">复制主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('merge')">合并主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('split')">分割主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('repair')">修复主题</a></li><li class="wide"><a href="plugin.php?id=dps_postawards:postawards&amp;tid=29727" onclick="showWindow('paward', this.href);return false;">楼层奖惩</a></li></ul>
<div id="modlayer" style="display:none;position:position;width:165px;"> <div id="modlayer" style="display:none;position:position;width:165px;">
<span>选中</span><strong id="modcount"></strong><span>篇: </span> <span>选中</span><strong id="modcount"></strong><span>篇: </span>
...@@ -26,131 +27,7 @@ ...@@ -26,131 +27,7 @@
<li><a href="post.php?action=newthread&amp;fid=2" onclick="showWindow('newthread', this.href);doane(event)">发新话题</a></li><li class="poll"><a href="post.php?action=newthread&amp;fid=2&amp;special=1">发布投票</a></li><li class="reward"><a href="post.php?action=newthread&amp;fid=2&amp;special=3">发布悬赏</a></li><li class="debate"><a href="post.php?action=newthread&amp;fid=2&amp;special=5">发布辩论</a></li><li class="activity"><a href="post.php?action=newthread&amp;fid=2&amp;special=4">发布活动</a></li><li class="trade"><a href="post.php?action=newthread&amp;fid=2&amp;special=2">发布商品</a></li></ul> <li><a href="post.php?action=newthread&amp;fid=2" onclick="showWindow('newthread', this.href);doane(event)">发新话题</a></li><li class="poll"><a href="post.php?action=newthread&amp;fid=2&amp;special=1">发布投票</a></li><li class="reward"><a href="post.php?action=newthread&amp;fid=2&amp;special=3">发布悬赏</a></li><li class="debate"><a href="post.php?action=newthread&amp;fid=2&amp;special=5">发布辩论</a></li><li class="activity"><a href="post.php?action=newthread&amp;fid=2&amp;special=4">发布活动</a></li><li class="trade"><a href="post.php?action=newthread&amp;fid=2&amp;special=2">发布商品</a></li></ul>
<div id="postlist" class="mainbox viewthread"> <div id="postlist" class="mainbox viewthread">
<% @topic.posts.each do |post| %> <%= render @topic.posts %>
<div id="post_751931"><table id="pid751931" summary="pid751931" cellspacing="0" cellpadding="0">
<tbody><tr>
<td class="postauthor" rowspan="2">
<div class="postinfo" style="margin-left: 20px; font-weight: 800">
<%= post.user %>
</div>
<!--<div class="popupmenu_popup userinfopanel" id="userinfo751931" style="display: none; position: absolute;margin-top: -11px;">
<div class="popavatar">
<div id="userinfo751931_ma"></div>
<ul class="profile_side">
<li class="pm"><a href="pm.php?action=new&amp;uid=14806" onclick="hideMenu('userinfo751931');showWindow('sendpm', this.href);return false;" title="发短消息">发短消息</a></li>
<li class="buddy"><a href="my.php?item=buddylist&amp;newbuddyid=14806&amp;buddysubmit=yes" target="_blank" id="ajax_buddy_1" title="加为好友" onclick="ajaxmenu(this, 3000);doane(event);">加为好友</a></li>
</ul>
</div>
<div class="popuserinfo">
<p>
<a href="space.php?uid=14806" target="_blank">博丽开水</a>
<em>(开水姐姐)</em><em>当前离线
</em>
</p>
<p class="customstatus">沙包</p>
<dl class="s_clear"><dt>UID</dt><dd>14806&nbsp;</dd><dt>帖子</dt><dd>65&nbsp;</dd><dt>主题</dt><dd>9&nbsp;</dd><dt>精华</dt><dd>0&nbsp;</dd><dt>积分</dt><dd>116&nbsp;</dd><dt>点数</dt><dd>16 &nbsp;</dd><dt>威望</dt><dd>0 &nbsp;</dd><dt>贡献</dt><dd>9 &nbsp;</dd><dt>人气</dt><dd>9 &nbsp;</dd><dt>人品</dt><dd>0 &nbsp;</dd><dt>阅读权限</dt><dd>20&nbsp;</dd><dt>在线时间</dt><dd>15 小时&nbsp;</dd><dt>注册时间</dt><dd>2011-1-20&nbsp;</dd><dt>最后登录</dt><dd>2011-3-26&nbsp;</dd></dl>
<div class="imicons">
<a href="http://www.touhou.cc/blog/space.php?uid=14806" target="_blank" title="个人空间"><img src="images/default/home.gif" alt="个人空间"></a>
<a href="space.php?uid=14806" target="_blank" title="查看详细资料"><img src="images/default/userinfo.gif" alt="查看详细资料"></a>
</div>
<div id="avatarfeed"><span id="threadsortswait"></span></div>
</div>
</div>-->
<div>
<div class="avatar" onmouseover="showauthor(this, 'userinfo751931')"><%= post.user.avatar %></div>
<p><%= post.user.role %></p>
<p><em><%= post.user.nickname %></em></p>
</div>
<p><%= image_tag 'common/star_level2.gif', :alt => 'Rank:2' %></p>
<dl class="profile s_clear">
<dt><%=t 'user.post' %></dt><dd><%= post.user.posts.count %></dd>
<dt><%=t 'user.topic' %></dt><dd><%= post.user.topics.count %></dd>
<dt><%=t 'user.digest' %></dt><dd><%= post.user.topics.where(:digest => true).count %></dd>
<dt><%=t 'user.credit' %></dt><dd><%= post.user.credit %></dd>
</dl>
<!--<p><a href="magic.php?action=mybox&amp;operation=use&amp;type=1&amp;pid=751931&amp;magicid=7" onclick="showWindow('magics', this.href);doane(event);"><img src="images/magics/rtk_s.gif" title="对博丽开水使用狗仔卡"></a></p>-->
<hr class="shadowline">
<p>
管理此人<br>
<a href="topicadmin.php?action=getip&amp;fid=2&amp;tid=29727&amp;pid=751931" onclick="ajaxmenu(this, 0, 1, 2);doane(event)" title="查看 IP" class="lightlink">IP</a>&nbsp;
<a href="admincp.php?action=members&amp;username=%B2%A9%C0%F6%BF%AA%CB%AE&amp;submit=yes&amp;frames=yes" target="_blank" class="lightlink">编辑</a>&nbsp;
<a href="admincp.php?action=members&amp;operation=ban&amp;username=%B2%A9%C0%F6%BF%AA%CB%AE&amp;frames=yes" target="_blank" class="lightlink">禁止</a>&nbsp;
<a href="modcp.php?action=threads&amp;op=posts&amp;do=search&amp;searchsubmit=1&amp;users=%B2%A9%C0%F6%BF%AA%CB%AE" target="_blank" class="lightlink">帖子</a>
</p>
</td>
<td class="postcontent">
<div class="postinfo">
<strong><a title="复制本帖链接" id="postnum751931" href="javascript:;" onclick="setCopy('http://www.touhou.cc/bbs/redirect.php?goto=findpost&amp;ptid=29727&amp;pid=751931&amp;fromuid=359', '帖子地址已经复制到剪贴板')"><em><%= post.displayorder %></em><sup>#</sup></a>
</strong>
<div class="posterinfo">
<div class="pagecontrol">
</div>
<div class="authorinfo">
<%= link_to image_tag('common/online_member.gif', :class => :authicon, :id => 'authicon751931'), post.user %>
<em id="authorposton751931"><%=l post.created_at, :format => :short %> </em>
| <a href="viewthread.php?tid=29727&amp;page=1&amp;authorid=14806" rel="nofollow">只看该作者</a>
</div>
</div>
</div>
<div class="defaultpost">
<div id="ad_thread2_1"></div><div id="ad_thread3_1"></div><div id="ad_thread4_1"></div>
<div class="postmessage ">
<!--<div id="threadtitle">
<h1>蕾蒂+毒人 怎么破</h1>
</div>-->
<div class="t_msgfontfix">
<table cellspacing="0" cellpadding="0"><tbody><tr><td class="t_msgfont" id="postmessage_751931"><%= post.content %> </td></tr></tbody></table>
</div>
<div id="post_rate_div_751931"></div>
</div>
</div>
</td></tr>
<tr><td class="postcontent postbottom">
<% unless post.user.signature.empty? %>
<div class="signatures" style="max-height:300px;maxHeightIE:300px;">
<%= post.user.signature %>
</div>
<% end %>
<div id="ad_thread1_1"></div></td>
</tr>
<tr>
<td class="postauthor"></td>
<td class="postcontent">
<div class="postactions">
<span class="right">
<label for="manage751931">
<input type="checkbox" id="manage751931" onclick="pidchecked(this);modclick(this, 751931)" value="751931">
管理
</label>
</span>
<div class="postact s_clear">
<em>
<%= link_to t('topic.reply'), new_post_path(:topic_id => @topic.id), :class => :fastreply %>
<%= link_to t('topic.quote'), new_post_path(:topic_id => @topic.id), :class => :fastreply %>
<%= link_to t('post.edit'), edit_post_path(post), :class => :editpost %>
</em>
<p>
<a href="misc.php?action=rate&amp;tid=29727&amp;pid=751931" onclick="showWindow('rate', this.href);return false;">评分</a>
<a href="magic.php?action=getmagic&amp;fid=2&amp;pid=751931" id="usermagicopt751931" class="dropmenu" onmouseover="SMAM=setTimeout(function() {ajaxmenu($('usermagicopt751931'), 1000, 1, 2);doane(event);}, 500)" onmouseout="clearTimeout(SMAM)" onclick="if($(this.id + '_menu') &amp;&amp; $(this.id + '_menu').style.display == '') {hideMenu(this.id + '_menu')} else {ajaxmenu(this, 1000, 1, 2);}doane(event);">使用道具</a>
<a href="javascript:;" onclick="scrollTo(0,0);">TOP</a>
</p>
</div>
</div>
</td>
</tr>
<tr class="threadad">
<td class="postauthor"></td>
<td class="adcontent">
</td>
</tr>
</tbody></table></div>
<% end %>
</div> </div>
<div id="postlistreply" class="mainbox viewthread"><div id="post_new" class="viewthread_table" style="display: none"></div></div> <div id="postlistreply" class="mainbox viewthread"><div id="post_new" class="viewthread_table" style="display: none"></div></div>
...@@ -188,7 +65,7 @@ ...@@ -188,7 +65,7 @@
<table cellspacing="0" cellpadding="0"> <table cellspacing="0" cellpadding="0">
<tbody><tr> <tbody><tr>
<td class="postauthor"> <td class="postauthor">
<div class="avatar"><%= @corrent_user.avatar %></td> <div class="avatar"><%= @current_user.avatar %></td>
<td class="postcontent"> <td class="postcontent">
<!--<input type="hidden" name="formhash" value="ba0236f6"> <!--<input type="hidden" name="formhash" value="ba0236f6">
<input type="hidden" name="subject" value=""> <input type="hidden" name="subject" value="">
......
<div style='clear:both;'></div>
<div style='line-height:25px; padding-top:3px; font-weight:bold; ' align='center'>
<!--名次-->
<div style='width:90px; float:left; color:#d6edff'>
<%= index.next %>
</div>
<!--名字-->
<div style='width:200px; float:left; color:#ffe793;' align='left'>
<%= link_to user.name, user, :style => 'color:#ffe793; text-decoration:none' %>
</div>
<!--积分-->
<div style='width:100px; float:left; color:#ff6468'>
<%= user.credits %>
</div>
<!--胜率-->
<div style='width:40px; float:left; color:#58db3e' align='left'>
<%= user.win.zero? && user.lost.zero? ? 0 : user.win * 100 / (user.win + user.lost) %>%
</div>
<!--胜场-->
<div style='width:30px; float:left; color:red' align='right'>
<%= user.win %>
</div>
<!--负场-->
<div style='width:30px; float:left; color:blue' align='right'>
<%= user.lost %>
</div>
<!--详情-->
<div style='width:100px; float:left; color:#dfc84b; font-weight:100; cursor:pointer' >
<%= link_to '详情', user, :style=>'color:#ffe793; text-decoration:none' %>
</div>
</div>
<h1>Listing users</h1> <div align="center" style="padding-top:130px;">
<div align="right" style="width:600px; font-size:50px; padding-bottom:20px; color:#ffffff">TOP10</div>
<table> <div style="width:600px; display:none; " id="mian1" class="main1" >
<tr> <div style="line-height:25px; background-color:#1c1b1b; height:25px; color:#d6edff; font-weight:bold; ">
<th>Name</th> <div style='width:90px; float:left;'><em>名次</em></div>
<th>Password</th> <div style='width:200px; float:left;'><em>决斗者</em></div>
<th>Email</th> <div style='width:100px; float:left;' align='center'><em>积分</em></div>
<th>Credit</th> <div style='width:100px; float:left;' align='center'><em>胜率/胜/负</em></div>
<th>Usergroup</th> <div style='width:100px; float:left;' align='center'><em>得分纪录</em></div>
<th>Admingroup</th> </div>
<th></th> <% top_users = User.order(:credits).reverse_order.limit(10) %>
<th></th> <% top_users.each_with_index do |user, index| %>
<th></th> <%= render :partial => "record", :locals => { :user => user, :index => index } %>
</tr> <% end %>
<% if logged? && !top_users.include?(@current_user) %>
<% @users.each do |user| %> <%= render :partial => "record", :locals => { :user => @current_user, :index => User.where("credits>?", @current_user.credits).count } %>
<tr> <% end %>
<td><%= user.name %></td> </div>
<td><%= user.password %></td> </div>
<td><%= user.email %></td>
<td><%= user.credit %></td>
<td><%= user.usergroup %></td>
<td><%= user.admingroup %></td>
<td><%= link_to 'Show', user %></td>
<td><%= link_to 'Edit', edit_user_path(user) %></td>
<td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New User', new_user_path %>
<%= form_for(@user) do |f| %> <style type="text/css">
.main_div{margin:50px auto 10px auto;padding:0;width:500px;height:340px;font-size:12px;font-family:微软雅黑;border-radius:5px;border:1px solid #eeeeee;
-webkit-box-shadow: #999 0px 2px 3px;-moz-box-shadow: #999 0px 2px 3px;box-shadow: #999 0px 2px 3px; color:#999999;background: #FFFFFF;
position:absolute;left:50%;top:50%;margin-left:-250px;margin-top:-170px;}
.inner_div{margin:20px 0 5px 40px; letter-spacing:1px; float:left;clear:left;}
body{background:#eeeeee;} .floatleft{float:left;}
.form_label{margin:4px 10px 0 0;padding:0;height:17px;width:65px;text-align:right;color:#666666;}
.from_input{border:1px solid #CCCCCC;width:220px;height:20px;padding:2px 5px;border-radius:5px;box-shadow:0 1px 3px rgba(0, 0, 0, 0.05) inset, 0 1px 0 #FFFFFF;
-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.05) inset, 0 1px 0 #FFFFFF; -webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.05) inset, 0 1px 0 #FFFFFF; }
.film_bit_download{margin:0 0 0 75px;border:1px solid #6DAFE3;cursor:pointer;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);font-weight:bold;
background: #8CC0E8;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#8CC0E8), to(#1494E1));background: -webkit-linear-gradient(#8CC0E8, #1494E1);
background: -moz-linear-gradient(#8CC0E8, #1494E1);background: -ms-linear-gradient(#8CC0E8, #1494E1);
background: -o-linear-gradient(#8CC0E8, #1494E1);background: linear-gradient(#8CC0E8, #1494E1);}
.film_bit_download:hover{background: #58A2DA;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#58A2DA), to(#147EBD));background: -webkit-linear-gradient(#58A2DA, #147EBD);
background: -moz-linear-gradient(#58A2DA, #147EBD);background: -ms-linear-gradient(#58A2DA, #147EBD);
background: -o-linear-gradient(#58A2DA, #147EBD);background: linear-gradient(#58A2DA, #147EBD);}
.film_bit_download:active{margin:1px 0 0 75px;-moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none;}
</style>
<script type="text/javascript">
function postOrder() {
var userNum = $("#username").val().length;
var passNum = $("#password").val().length;
var userVal = $("#username").val();
var userspecial = userVal.search(/[\$\=\ \,\<\>\[\]]/);
if ($("#username").val() =="" || $("#password").val() =="" || $("#rePassword").val() ==""){
alert("请填写完整");
return false;
}
else if(userspecial != -1){
alert("用户名不能包含特殊字符");
return false;
}
else if ( (userNum + passNum) > 18){
alert("用户名和密码长度总和不得超过18个字符");
return false;
}
else if( $("#password").val() != $("#rePassword").val()){
alert("两次密码输入不一致");
return false;
}
else{
return true;
}
}
</script>
<%= form_for(@user, :html => {:onsubmit => "return postOrder();"}) do |f| %>
<% if @user.errors.any? %> <% if @user.errors.any? %>
<div id="error_explanation"> <div id="error_explanation" style="color:black">
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2> <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
<ul> <ul>
<% @user.errors.full_messages.each do |msg| %> <% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li> <li><%= msg %></li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="field"> <!--<p>用户注册说明:用户名和密码长度总和不得超过18个字符 ,用户名不得包含“$”以及“=” 号,否则无法登陆,其他无限制</p>-->
<%= f.label t('user.name') %><br />
<%= f.text_field :name %> <div class="main_div">
</div> <div style="font-size:18px;margin:20px 0 10px 25px;padding:0 0 10px 0;border-bottom:1px solid #eeeeee;width:450px;">用户注册</div>
<div class="field"> <div class="inner_div">
<%= f.label t('user.password') %><br /> <div class="floatleft form_label"><%= f.label t('user.name') %></div>
<%= f.password_field :password %> <div class="floatleft">
</div> <%= f.text_field :name, :id => :username, :class => :from_input %>
<div class="field"> </div>
<%= f.label t('user.password_repeat') %><br /> </div>
<%= f.password_field :password %> <div class="inner_div">
</div> <div class="floatleft form_label"><%= f.label t('user.password') %></div>
<div class="field"> <div class="floatleft">
<%= f.label t('user.email') %><br /> <%= f.text_field :password, :id => :password, :class => :from_input %>
<%= f.text_field :email %> </div>
</div> </div>
<div class="actions"> <div class="inner_div">
<%= f.submit t('user.register') %> <div class="floatleft form_label"><%= f.label t('user.password_repeat') %></div>
<div class="floatleft">
<%= f.text_field :password, :id => :rePassword, :class => :from_input %>
</div>
</div>
<div class="inner_div">
<div class="floatleft form_label"><%= f.label t('user.email') %></div>
<div class="floatleft">
<%= f.text_field :email, :id => :email, :class => :from_input %>
</div>
</div>
<div class="inner_div">
<%= f.submit t('user.register'), :class=>"film_bit_download", :style=>"width:54px;height:25px;padding:4px 14px;border:1px solid #eeeeee;border-radius:5px;color:#ffffff;" %>
</div>
</div> </div>
<% end %> <% end %>
<% if @user == @corrent_user %> <div align="center" style="padding-top:150px; cursor:pointer;">
<div align="right" style="width:600px; font-size:30px; padding-bottom:20px; color:#ffcc66"><%= @user.name %> </div>
<div class="side">
<h2>个人中心</h2>
<div class="avatar"><%= @user.avatar %></div> <div style="color: white">
<ul class="tabs"> <p>
<li><%= link_to '个人资料', @user %></li> <%= @user.wins.count %>:负<%= @user.losts.count %> 总场次:<%= @user.duels.count %>
<li><%= link_to '短消息', pms_path %></li> </p>
<!--<li><a href="notice.php">提醒</a></li> <p>
<li><a href="my.php?item=buddylist&amp;">我的好友</a></li> <b>常用怪兽:</b>
<li><a href="http://www.touhou.cc/blog/space.php?uid=359" target="_blank">我的空间</a></li>--> <%= render @user.cards.main_monsters.top(10) %>
</p>
<hr class="shadowline"> <p>
<b>常用额外:</b>
<li><a href="memcp.php?action=profile&amp;typeid=5">论坛个性化设定</a></li> <%= render @user.cards.extra.top(5) %>
</ul> </p>
<p>
<b>常用魔法:</b>
<%= render @user.cards.magics.top(5) %>
</p>
<p>
<b>常用陷阱:</b>
<%= render @user.cards.traps.top(5) %>
</p>
</div> </div>
<div id="content">
<%= form_for(@user) do |f| %>
<% if @user.errors.any? %>
<div id="error_explanation"> <div style="width:600px; display:none; " id="mian1" class="main1" >
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2> <div style="line-height:25px; background-color:#1c1b1b; height:25px; color:#d6edff; font-weight:bold; ">
<div style='width:50px; float:left;'><em>场次</em></div>
<div style='width:200px; float:left;'><em>对手</em></div>
<div style='width:100px; float:left;' align='center'><em>胜负</em></div>
<div style='width:100px; float:left;' align='center'><em>得分</em></div>
<div style='width:100px; float:left;' align='center'><em>战斗终分</em></div>
</div>
<% final_credits = @user.credits %>
<% @user.top_duels(20).each_with_index do |duel, index| %>
<div style='clear:both;'></div>
<div style='line-height:25px; padding-top:3px; font-weight:bold; ' align='center'>
<ul> <!--场次-->
<% @user.errors.full_messages.each do |msg| %> <div style='width:50px; float:left; color:white ' >
<li><%= msg %></li> <%= link_to (@user.duels.count - index), duel, :style=>"color:white" %>
<% end %> </div>
</ul> <!--对手-->
<div style='width:200px; float:left; ' align='left'>
<% opponent = duel.user1 == @user ? duel.user2 : duel.user1 %>
<%= link_to opponent.name, opponent, :style => 'color:#ffe793; text-decoration:none' %>
</div>
<!--胜负-->
<div style='width:100px; float:left; color:<% if duel.winner == @user %>#58db3e<% else %>red<% end %>'>
<%= duel.winner == @user ? "WIN" : "LOSE" %>
</div>
<!--得分-->
<div style='width:100px; float:left; color:<% if duel.winner == @user %>#58db3e<% else %>red<% end %>'>
<%= duel.user1 == @user ? duel.user1_credits : duel.user2_credits %>
</div>
<!--战斗终分-->
<div style='width:100px; float:left; color:<% if index.zero? %>red<% else %>#d6edff<% end %>; '>
<%= final_credits %>
<% final_credits -= duel.user1 == @user ? duel.user1_credits : duel.user2_credits %>
</div> </div>
<% end %>
<div class="field">
<%= f.label t 'user.avatar' %>
修改头像请到 <%= link_to "http://gravatar.com" %>
</div>
<div class="field">
<%= f.label t 'user.nickname' %>
<%= f.text_field :nickname %>
</div>
<!-- <div class="field">
<%= f.label t 'user.old_password' %>
<%= f.text_field :password %>
</div>
<div class="field">
<%= f.label t 'user.new_password' %>
<%= f.text_field :password %>
</div>
<div class="field">
<%= f.label t 'user.password_repeat' %>
<%= f.text_field :password %>
</div>-->
<div class="field">
<%= f.label t 'user.email' %>
<%= f.text_field :email %>
</div>
<div class="field">
<%= f.label t 'user.credit' %>
<%= @user.credit %>
</div>
<div class="field">
<%= f.label t 'user.signature' %>
<%= f.text_area :signature %>
</div>
<div class="actions">
<%= f.submit %>
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
<% else %> <div style="clear:both"></div>
<div align="center"><%= link_to "更多...", {:controller => :duels, :action => :index, :user_id => @user.id}, :style=>"color:white" %></div>
<p id="notice"><%= notice %></p> \ No newline at end of file
<p>
<b><%=t 'user.name' %>:</b>
<%= @user.name %>
</p>
<p>
<b><%=t 'user.email' %>:</b>
<%= @user.email %>
</p>
<p>
<b><%=t 'user.credit' %>:</b>
<%= @user.credit %>
</p>
<% end %>
\ No newline at end of file
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)
run Reliz::Application run MycardServerHttp::Application
...@@ -2,11 +2,14 @@ require File.expand_path('../boot', __FILE__) ...@@ -2,11 +2,14 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all' require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems if defined?(Bundler)
# you've limited to :test, :development, or :production. # If you precompile assets before deploying to production, use this line
Bundler.require(:default, Rails.env) if defined?(Bundler) Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module Reliz module MycardServerHttp
class Application < Rails::Application class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here. # Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers # Application configuration should go into files in config/initializers
...@@ -24,21 +27,33 @@ module Reliz ...@@ -24,21 +27,33 @@ module Reliz
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)' config.time_zone = 'Asia/Shanghai'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de config.i18n.default_locale = :'zh-CN'
# JavaScript files you want as :defaults (application.js is always included).
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
# Configure the default encoding used in templates for Ruby 1.9. # Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8" config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file. # Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password] config.filter_parameters += [:password]
config.i18n.default_locale = 'zh-CN' # Use SQL instead of Active Record's schema dumper when creating the database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
# config.active_record.whitelist_attributes = true
# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
end end
end end
require 'rubygems' require 'rubygems'
# Set up gems listed in the Gemfile. # Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__) ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
Encoding.default_internal, Encoding.default_external = ['utf-8'] * 2
# Load the rails application # Load the rails application
require File.expand_path('../application', __FILE__) require File.expand_path('../application', __FILE__)
require File.expand_path('../../lib/mysql_utf8.rb', __FILE__)
# Initialize the rails application # Initialize the rails application
Reliz::Application.initialize! MycardServerHttp::Application.initialize!
Mime::Type.register 'application/octet-stream', :ydk
Mime::Type.register 'application/octet-stream', :yrp
Mime::Type.register 'application/octet-stream', :deck
\ No newline at end of file
Reliz::Application.configure do MycardServerHttp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on # In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development # every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes. # since you don't have to restart the web server when you make code changes.
config.cache_classes = false config.cache_classes = false
# Log error messages when you accidentally call methods on nil. # Log error messages when you accidentally call methods on nil.
...@@ -11,7 +11,6 @@ Reliz::Application.configure do ...@@ -11,7 +11,6 @@ Reliz::Application.configure do
# Show full error reports and disable caching # Show full error reports and disable caching
config.consider_all_requests_local = true config.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false config.action_controller.perform_caching = false
# Don't care if the mailer can't send # Don't care if the mailer can't send
...@@ -22,5 +21,17 @@ Reliz::Application.configure do ...@@ -22,5 +21,17 @@ Reliz::Application.configure do
# Only use best-standards-support built into browsers # Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin config.action_dispatch.best_standards_support = :builtin
end
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
end
Reliz::Application.configure do MycardServerHttp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests # Code is not reloaded between requests
config.cache_classes = true config.cache_classes = true
# Full error reports are disabled and caching is turned on # Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false config.consider_all_requests_local = true
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
# Specifies the header that your server uses for sending files # Disable Rails's static asset server (Apache or nginx will already do this)
config.action_dispatch.x_sendfile_header = "X-Sendfile" config.serve_static_assets = true
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
# Defaults to Rails.root.join("public/assets")
# config.assets.manifest = YOUR_PATH
# For nginx: # Specifies the header that your server uses for sending files
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# If you have no front-end server that supports something like X-Sendfile, # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# just comment this out and Rails will serve the files # config.force_ssl = true
# See everything in the log (default is :info) # See everything in the log (default is :info)
# config.log_level = :debug # config.log_level = :debug
# Prepend all log lines with the following tags
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups # Use a different logger for distributed setups
# config.logger = SyslogLogger.new # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production # Use a different cache store in production
# config.cache_store = :mem_cache_store # config.cache_store = :mem_cache_store
# Disable Rails's static asset server # Enable serving of images, stylesheets, and JavaScripts from an asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = false
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com" # config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
# Disable delivery errors, bad email addresses will be ignored # Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false # config.action_mailer.raise_delivery_errors = false
...@@ -46,4 +60,8 @@ Reliz::Application.configure do ...@@ -46,4 +60,8 @@ Reliz::Application.configure do
# Send deprecation notices to registered listeners # Send deprecation notices to registered listeners
config.active_support.deprecation = :notify config.active_support.deprecation = :notify
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5
end end
Reliz::Application.configure do MycardServerHttp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's # The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that # test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped # your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there! # and recreated between test runs. Don't rely on the data there!
config.cache_classes = true config.cache_classes = true
# Log error messages when you accidentally call methods on nil. # Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true config.whiny_nils = true
# Show full error reports and disable caching # Show full error reports and disable caching
...@@ -25,10 +29,8 @@ Reliz::Application.configure do ...@@ -25,10 +29,8 @@ Reliz::Application.configure do
# ActionMailer::Base.deliveries array. # ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test config.action_mailer.delivery_method = :test
# Use SQL instead of Active Record's schema dumper when creating the test database. # Raise exception on mass assignment protection for Active Record models
# This is necessary if your schema can't be completely dumped by the schema dumper, config.active_record.mass_assignment_sanitizer = :strict
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Print deprecation notices to the stderr # Print deprecation notices to the stderr
config.active_support.deprecation = :stderr config.active_support.deprecation = :stderr
......
...@@ -8,3 +8,8 @@ ...@@ -8,3 +8,8 @@
# inflect.irregular 'person', 'people' # inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep ) # inflect.uncountable %w( fish sheep )
# end # end
#
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.acronym 'RESTful'
# end
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid! # If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random, # Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks. # no regular words or you'll be exposed to dictionary attacks.
Reliz::Application.config.secret_token = 'cc1f062f92fe8a36c495361553a3f5fa7bd19c4b680f8003f9ae83b1b8dcdaba15c55cfe8dba9f6e90f2a2ebf5bcf92fb1852c71b58eaa107c756242f4efb5ff' MycardServerHttp::Application.config.secret_token = 'a32b24adbf3c1eb8ce92cd7ad099a14ff05bbf94ac397ddfe6ed0afd74cbaf58597ae575e1ef8e595a03f9a3f97b777ab500690efdfd8e58518da7775957da9c'
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
Reliz::Application.config.session_store :cookie_store, :key => '_Reliz_session' MycardServerHttp::Application.config.session_store :cookie_store, key: '_mycard-server-http_session'
# Use the database for sessions instead of the cookie-based default, # Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information # which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration") # (create the session table with "rails generate session_migration")
# Reliz::Application.config.session_store :active_record_store # MycardServerHttp::Application.config.session_store :active_record_store
# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json]
end
# Disable root element in JSON by default.
ActiveSupport.on_load(:active_record) do
self.include_root_in_json = false
end
10
dir
91
http://glupx.googlecode.com/svn/trunk/Reliz/config/locales
http://glupx.googlecode.com/svn
2011-05-16T13:23:40.474092Z
86
zh99998
svn:special svn:externals svn:needs-lock
189f022a-1064-8ae2-3e6f-c4a67275c50b
en.yml
file
2012-03-13T01:07:05.927000Z
16efc327461a7bdac033b4897171b5c6
2011-03-25T13:37:23.315011Z
35
zh99998
212
zh-CN.yml
file
2012-03-13T01:07:05.922000Z
8fdbc480232321a4330f300eaa9325da
2011-05-16T13:23:40.474092Z
86
zh99998
8050
# Sample localization file for English. Add more files in this directory for other locales.
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
hello: "Hello world"
\ No newline at end of file
# Chinese (China) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
zh-CN:
user:
login: "登陆"
register: "注册"
logout: "退出"
my: "我的中心"
space: "空间"
notice: "提醒"
pm: "短消息"
name: "用户名"
password: "密码"
password_repeat: "重复密码"
email: "邮箱"
credit: "积分"
id: "ID"
post: "帖子"
topic: "主题"
digest: "精华"
guest: "游客"
avatar: "头像"
nickname: "昵称"
signature: "个人签名"
forum:
next: "下一页"
prev: "上一页"
link: "友情链接"
board:
control: "管理面板"
name: "版块名称"
introduction: "版块简介"
notice: "版块公告"
logo: "板块图标"
banner: "板块顶图"
readperm: "阅读权限"
topicperm: "主题权限"
postperm: "回帖权限"
submit: "提交"
topic: "主题"
post: "帖子"
none: "从未"
subboard: "子版快"
search:
search: "搜索"
advanced: "高级搜索"
stat:
onlineuser: "在线人数"
total: "总计"
max: "最高"
at: "于"
topic:
new: "发帖"
reply: "回复"
quote: "引用"
title: "标题"
submit: "提交"
order: "排序"
displayorder: "置顶"
digest: "精华"
user_name: "作者"
view_num: "查看"
reply_num: "回复"
post_last: "最后回复"
created_at: "发表时间"
updated_at: "回复时间"
control:
delete: "删除"
displayorder: "置顶"
digest: "精华"
lock: "锁定"
highlight: "高亮"
post:
edit: "编辑"
content: "正文"
submit: "提交"
private: "仅楼主可见"
anonymous: "匿名发帖"
date:
formats:
default: "%Y-%m-%d"
short: "%b%d日"
long: "%Y年%b%d日"
day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
order:
- :year
- :month
- :day
time:
formats:
default: "%Y年%b%d日 %A %H:%M:%S %Z"
short: "%b%d日 %H:%M"
long: "%Y年%b%d日 %H:%M"
am: "上午"
pm: "下午"
datetime:
today: "今日"
yesterday: "昨日"
distance_in_words:
half_a_minute: "半分钟"
less_than_x_seconds:
one: "不到一秒"
other: "不到 %{count} 秒"
x_seconds:
one: "一秒"
other: "%{count} 秒"
less_than_x_minutes:
one: "不到一分钟"
other: "不到 %{count} 分钟"
x_minutes:
one: "一分钟"
other: "%{count} 分钟"
about_x_hours:
one: "大约一小时"
other: "大约 %{count} 小时"
x_days:
one: "一天"
other: "%{count} 天"
about_x_months:
one: "大约一个月"
other: "大约 %{count} 个月"
x_months:
one: "一个月"
other: "%{count} 个月"
about_x_years:
one: "大约一年"
other: "大约 %{count} 年"
over_x_years:
one: "一年多"
other: "%{count} 年多"
almost_x_years:
one: "接近一年"
other: "接近 %{count} 年"
prompts:
year: "年"
month: "月"
day: "日"
hour: "时"
minute: "分"
second: "秒"
number:
format:
separator: "."
delimiter: ","
precision: 3
significant: false
strip_insignificant_zeros: false
currency:
format:
format: "%u %n"
unit: "CN¥"
separator: "."
delimiter: ","
precision: 2
significant: false
strip_insignificant_zeros: false
percentage:
format:
delimiter: ""
precision:
format:
delimiter: ""
human:
format:
delimiter: ""
precision: 1
significant: false
strip_insignificant_zeros: false
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
decimal_units:
format: "%n %u"
units:
# 10^-21 zepto, 10^-24 yocto
atto: "渺" # 10^-18
femto: "飞" # 10^-15 毫微微
pico: "漠" # 10^-12 微微
nano: "奈" # 10^-9 毫微
micro: "微" # 10^-6
mili: "毫" # 10^-3 milli
centi: "厘" # 10^-2
deci: "分" # 10^-1
unit: ""
ten:
one: "十"
other: "十" # 10^1
hundred: "百" # 10^2
thousand: "千" # 10^3 kilo
million: "百万" # 10^6 mega
billion: "十亿" # 10^9 giga
trillion: "兆" # 10^12 tera
quadrillion: "千兆" # 10^15 peta
# 10^18 exa, 10^21 zetta, 10^24 yotta
support:
array:
words_connector: ", "
two_words_connector: " 和 "
last_word_connector: ", 和 "
select:
prompt: "请选择"
activerecord:
models:
user: 用户
attributes:
pm:
to_user: "收件人"
content: "正文"
errors:
template: # ~ 2.3.5 backward compatible
header:
one: "有 1 个错误发生导致「%{model}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{model}」无法被保存。"
body: "如下字段出现错误:"
full_messages:
format: "%{attribute} %{message}"
messages:
inclusion: "不包含于列表中"
exclusion: "是保留关键字"
invalid: "是无效的"
confirmation: "与确认值不匹配"
accepted: "必须是可被接受的"
empty: "不能留空"
blank: "不能为空字符"
too_long: "过长(最长为 %{count} 个字符)"
too_short: "过短(最短为 %{count} 个字符)"
wrong_length: "长度非法(必须为 %{count} 个字符)"
not_a_number: "不是数字"
not_an_integer: "必须是整数"
greater_than: "必须大于 %{count}"
greater_than_or_equal_to: "必须大于或等于 %{count}"
equal_to: "必须等于 %{count}"
less_than: "必须小于 %{count}"
less_than_or_equal_to: "必须小于或等于 %{count}"
odd: "必须为单数"
even: "必须为双数"
taken: "已经被使用"
record_invalid: "校验失败: %{errors}"
activemodel:
errors:
template:
header:
one: "有 1 个错误发生导致「%{model}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{model}」无法被保存。"
body: "如下字段出现错误:"
errors:
format: "%{attribute} %{message}"
messages:
inclusion: "不包含于列表中"
exclusion: "是保留关键字"
invalid: "是无效的"
confirmation: "与确认值不匹配"
accepted: "必须是可被接受的"
empty: "不能留空"
blank: "不能为空字符"
too_long: "过长(最长为 %{count} 个字符)"
too_short: "过短(最短为 %{count} 个字符)"
wrong_length: "长度非法(必须为 %{count} 个字符)"
not_a_number: "不是数字"
not_an_integer: "必须是整数"
greater_than: "必须大于 %{count}"
greater_than_or_equal_to: "必须大于或等于 %{count}"
equal_to: "必须等于 %{count}"
less_than: "必须小于 %{count}"
less_than_or_equal_to: "必须小于或等于 %{count}"
odd: "必须为单数"
even: "必须为双数"
helpers:
select:
prompt: "请选择"
submit:
create: "新增"
update: "修改"
submit: "储存"
\ No newline at end of file
# Chinese (China) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
zh-CN:
user:
login: "登陆"
register: "注册"
logout: "退出"
my: "我的中心"
space: "空间"
notice: "提醒"
pm: "短消息"
name: "用户名"
password: "密码"
password_repeat: "重复密码"
email: "邮箱"
credit: "积分"
id: "ID"
post: "帖子"
topic: "主题"
digest: "精华"
guest: "游客"
avatar: "头像"
nickname: "昵称"
signature: "个人签名"
forum:
next: "下一页"
prev: "上一页"
link: "友情链接"
board:
control: "管理面板"
name: "版块名称"
introduction: "版块简介"
notice: "版块公告"
logo: "板块图标"
banner: "板块顶图"
readperm: "阅读权限"
topicperm: "主题权限"
postperm: "回帖权限"
submit: "提交"
topic: "主题"
post: "帖子"
none: "从未"
subboard: "子版快"
search:
search: "搜索"
advanced: "高级搜索"
stat:
onlineuser: "在线人数"
total: "总计"
max: "最高"
at: "于"
topic:
new: "发帖"
reply: "回复"
quote: "引用"
title: "标题"
submit: "提交"
order: "排序"
displayorder: "置顶"
digest: "精华"
user_name: "作者"
view_num: "查看"
reply_num: "回复"
post_last: "最后回复"
created_at: "发表时间"
updated_at: "回复时间"
control:
delete: "删除"
displayorder: "置顶"
digest: "精华"
lock: "锁定"
highlight: "高亮"
post:
edit: "编辑"
content: "正文"
submit: "提交"
private: "仅楼主可见"
anonymous: "匿名发帖"
date:
formats:
default: "%Y-%m-%d"
short: "%b%d日"
long: "%Y年%b%d日"
day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
order:
- :year
- :month
- :day
time:
formats:
default: "%Y年%b%d日 %A %H:%M:%S %Z"
short: "%b%d日 %H:%M"
long: "%Y年%b%d日 %H:%M"
am: "上午"
pm: "下午"
datetime:
today: "今日"
yesterday: "昨日"
distance_in_words:
half_a_minute: "半分钟"
less_than_x_seconds:
one: "不到一秒"
other: "不到 %{count} 秒"
x_seconds:
one: "一秒"
other: "%{count} 秒"
less_than_x_minutes:
one: "不到一分钟"
other: "不到 %{count} 分钟"
x_minutes:
one: "一分钟"
other: "%{count} 分钟"
about_x_hours:
one: "大约一小时"
other: "大约 %{count} 小时"
x_days:
one: "一天"
other: "%{count} 天"
about_x_months:
one: "大约一个月"
other: "大约 %{count} 个月"
x_months:
one: "一个月"
other: "%{count} 个月"
about_x_years:
one: "大约一年"
other: "大约 %{count} 年"
over_x_years:
one: "一年多"
other: "%{count} 年多"
almost_x_years:
one: "接近一年"
other: "接近 %{count} 年"
prompts:
year: "年"
month: "月"
day: "日"
hour: "时"
minute: "分"
second: "秒"
number:
format:
separator: "."
delimiter: ","
precision: 3
significant: false
strip_insignificant_zeros: false
currency:
format:
format: "%u %n"
unit: "CN¥"
separator: "."
delimiter: ","
precision: 2
significant: false
strip_insignificant_zeros: false
percentage:
format:
delimiter: ""
precision:
format:
delimiter: ""
human:
format:
delimiter: ""
precision: 1
significant: false
strip_insignificant_zeros: false
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
decimal_units:
format: "%n %u"
units:
# 10^-21 zepto, 10^-24 yocto
atto: "渺" # 10^-18
femto: "飞" # 10^-15 毫微微
pico: "漠" # 10^-12 微微
nano: "奈" # 10^-9 毫微
micro: "微" # 10^-6
mili: "毫" # 10^-3 milli
centi: "厘" # 10^-2
deci: "分" # 10^-1
unit: ""
ten:
one: "十"
other: "十" # 10^1
hundred: "百" # 10^2
thousand: "千" # 10^3 kilo
million: "百万" # 10^6 mega
billion: "十亿" # 10^9 giga
trillion: "兆" # 10^12 tera
quadrillion: "千兆" # 10^15 peta
# 10^18 exa, 10^21 zetta, 10^24 yotta
support:
array:
words_connector: ", "
two_words_connector: " 和 "
last_word_connector: ", 和 "
select:
prompt: "请选择"
activerecord:
models:
user: 用户
attributes:
pm:
to_user: "收件人"
content: "正文"
errors:
template: # ~ 2.3.5 backward compatible
header:
one: "有 1 个错误发生导致「%{model}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{model}」无法被保存。"
body: "如下字段出现错误:"
full_messages:
format: "%{attribute} %{message}"
messages:
inclusion: "不包含于列表中"
exclusion: "是保留关键字"
invalid: "是无效的"
confirmation: "与确认值不匹配"
accepted: "必须是可被接受的"
empty: "不能留空"
blank: "不能为空字符"
too_long: "过长(最长为 %{count} 个字符)"
too_short: "过短(最短为 %{count} 个字符)"
wrong_length: "长度非法(必须为 %{count} 个字符)"
not_a_number: "不是数字"
not_an_integer: "必须是整数"
greater_than: "必须大于 %{count}"
greater_than_or_equal_to: "必须大于或等于 %{count}"
equal_to: "必须等于 %{count}"
less_than: "必须小于 %{count}"
less_than_or_equal_to: "必须小于或等于 %{count}"
odd: "必须为单数"
even: "必须为双数"
taken: "已经被使用"
record_invalid: "校验失败: %{errors}"
activemodel:
errors:
template:
header:
one: "有 1 个错误发生导致「%{model}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{model}」无法被保存。"
body: "如下字段出现错误:"
errors:
format: "%{attribute} %{message}"
messages:
inclusion: "不包含于列表中"
exclusion: "是保留关键字"
invalid: "是无效的"
confirmation: "与确认值不匹配"
accepted: "必须是可被接受的"
empty: "不能留空"
blank: "不能为空字符"
too_long: "过长(最长为 %{count} 个字符)"
too_short: "过短(最短为 %{count} 个字符)"
wrong_length: "长度非法(必须为 %{count} 个字符)"
not_a_number: "不是数字"
not_an_integer: "必须是整数"
greater_than: "必须大于 %{count}"
greater_than_or_equal_to: "必须大于或等于 %{count}"
equal_to: "必须等于 %{count}"
less_than: "必须小于 %{count}"
less_than_or_equal_to: "必须小于或等于 %{count}"
odd: "必须为单数"
even: "必须为双数"
helpers:
select:
prompt: "请选择"
submit:
create: "新增"
update: "修改"
submit: "储存"
\ No newline at end of file
...@@ -14,7 +14,7 @@ zh-CN: ...@@ -14,7 +14,7 @@ zh-CN:
password: "密码" password: "密码"
password_repeat: "重复密码" password_repeat: "重复密码"
email: "邮箱" email: "邮箱"
credit: "积分" credits: "积分"
id: "ID" id: "ID"
post: "帖子" post: "帖子"
topic: "主题" topic: "主题"
......
Reliz::Application.routes.draw do MycardServerHttp::Application.routes.draw do
get "rooms/index"
root :to => 'boards#index'
resources :boards get "mycard/update"
resources :topics
get 'topics/control' => "topics#control", :as => :control_topics root :to => "boards#index"
resources :posts
resources :users do resources :duels do
get 'pms' => "pms#index" get 'user1_deck.:format' => "duels#user1_deck"
get 'topics' => "users#topic" get 'user2_deck.:format' => "duels#user2_deck"
end end
get 'theme/:theme' => 'users#theme', :as => :theme resources :cards
get 'login' => 'users#login' resources :users do
post 'login' => 'users#login_do' resources :duels
get 'logout' => 'users#logout' end
get 'register' => 'users#new' resources :boards
resources :pms resources :topics
resources :links resources :rooms
resources :moderations get 'topics/control' => "topics#control", :as => :control_topics
resources :posts
# The priority is based upon order of creation: resources :users do
# first created -> highest priority. get 'pms' => "pms#index"
get 'topics' => "users#topic"
# Sample of regular route: end
# match 'products/:id' => 'catalog#view' get 'theme/:theme' => 'users#theme', :as => :theme
# Keep in mind you can assign values other than :controller and :action get 'login' => 'users#login'
post 'login' => 'users#login_do'
# Sample of named route: get 'logout' => 'users#logout'
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase get 'register' => 'users#new'
# This route can be invoked with purchase_url(:id => product.id) resources :pms
resources :links
# Sample resource route (maps HTTP verbs to controller actions automatically): resources :moderations
# resources :products # The priority is based upon order of creation:
# first created -> highest priority.
# Sample resource route with options:
# resources :products do # Sample of regular route:
# member do # match 'products/:id' => 'catalog#view'
# get 'short' # Keep in mind you can assign values other than :controller and :action
# post 'toggle'
# end # Sample of named route:
# # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# collection do # This route can be invoked with purchase_url(:id => product.id)
# get 'sold'
# end # Sample resource route (maps HTTP verbs to controller actions automatically):
# end # resources :products
# Sample resource route with sub-resources: # Sample resource route with options:
# resources :products do # resources :products do
# resources :comments, :sales # member do
# resource :seller # get 'short'
# end # post 'toggle'
# end
# Sample resource route with more complex sub-resources #
# resources :products do # collection do
# resources :comments # get 'sold'
# resources :sales do # end
# get 'recent', :on => :collection # end
# end
# end # Sample resource route with sub-resources:
# resources :products do
# Sample resource route within a namespace: # resources :comments, :sales
# namespace :admin do # resource :seller
# # Directs /admin/products/* to Admin::ProductsController # end
# # (app/controllers/admin/products_controller.rb)
# resources :products # Sample resource route with more complex sub-resources
# end # resources :products do
# resources :comments
# You can have the root of your site routed with "root" # resources :sales do
# just remember to delete public/index.html. # get 'recent', :on => :collection
# root :to => "welcome#index" # end
# end
# See how all your routes lay out with "rake routes"
# Sample resource route within a namespace:
# This is a legacy wild controller route that's not recommended for RESTful applications. # namespace :admin do
# Note: This route will make all actions in every controller accessible via GET requests. # # Directs /admin/products/* to Admin::ProductsController
# match ':controller(/:action(/:id(.:format)))' # # (app/controllers/admin/products_controller.rb)
end # resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => 'welcome#index'
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id))(.:format)'
end
...@@ -6,8 +6,8 @@ class CreateBoards < ActiveRecord::Migration ...@@ -6,8 +6,8 @@ class CreateBoards < ActiveRecord::Migration
t.string :name, :default => '', :null => false t.string :name, :default => '', :null => false
t.references :superboard, :null => false t.references :superboard, :null => false
t.integer :displayorder, :default => '0', :null => false t.integer :displayorder, :default => '0', :null => false
t.text :introduction, :default => '', :null => false t.text :introduction, :null => false
t.text :notice, :default => '', :null => false t.text :notice, :null => false
t.string :logo, :default => '', :null => false t.string :logo, :default => '', :null => false
t.string :banner, :default => '', :null => false t.string :banner, :default => '', :null => false
t.integer :readperm, :default => 0, :null => false t.integer :readperm, :default => 0, :null => false
......
...@@ -4,7 +4,7 @@ class CreateNavigations < ActiveRecord::Migration ...@@ -4,7 +4,7 @@ class CreateNavigations < ActiveRecord::Migration
t.string :name t.string :name
t.string :url t.string :url
t.integer :displayorder t.integer :displayorder
t.references :usergroup t.references :role
t.references :super t.references :super
#t.timestamps #t.timestamps
end end
......
class CreateUsers < ActiveRecord::Migration class CreateUsers < ActiveRecord::Migration
def self.up def change
create_table :users do |t| create_table :users do |t|
t.string :name, :null => false t.string :name, :null => false
t.string :password
t.string :email
t.string :nickname, :default => '', :null => false t.string :nickname, :default => '', :null => false
t.string :password, :null => false t.text :signature
t.string :email, :default => '', :null => false t.integer :credits, :default => 0, :null => false
t.integer :role_id, :default => 5, :null => false
t.boolean :locked, :default => false, :null => false
t.string :regip, :default => '', :null => false
t.string :lastloginip, :default => '', :null => false
t.integer :viewnum, :default => 0, :null => false
t.integer :onlinetime, :default => 0, :null => false
t.integer :credit, :default => 0, :null => false
t.integer :credit1, :default => 0, :null => false t.integer :credit1, :default => 0, :null => false
t.integer :credit2, :default => 0, :null => false t.integer :credit2, :default => 0, :null => false
t.integer :credit3, :default => 0, :null => false t.integer :credit3, :default => 0, :null => false
...@@ -20,13 +16,20 @@ class CreateUsers < ActiveRecord::Migration ...@@ -20,13 +16,20 @@ class CreateUsers < ActiveRecord::Migration
t.integer :credit6, :default => 0, :null => false t.integer :credit6, :default => 0, :null => false
t.integer :credit7, :default => 0, :null => false t.integer :credit7, :default => 0, :null => false
t.integer :credit8, :default => 0, :null => false t.integer :credit8, :default => 0, :null => false
t.integer :win, :default => 0, :null => false
t.integer :lost, :default => 0, :null => false
t.integer :role_id, :default => 5, :null => false
t.boolean :locked, :default => false, :null => false
t.string :regip, :default => '', :null => false
t.string :lastloginip, :default => '', :null => false
t.integer :viewnum, :default => 0, :null => false
t.integer :onlinetime, :default => 0, :null => false
t.string :locale t.string :locale
t.string :theme t.string :theme
t.timestamps t.timestamps
end end
end add_index :users, :name
def self.down
drop_table :users
end end
end end
class CreateCards < ActiveRecord::Migration
def change
create_table :cards do |t|
t.integer :number
t.string :name
t.string :card_type
t.string :monster_type
t.integer :monster_atk
t.integer :monster_def
t.string :monster_attribute
t.string :type
t.integer :monster_level
t.text :lore
t.integer :status
t.string :stats
t.string :archetypes
t.string :mediums
t.integer :tokens
end
add_index :cards, :number
add_index :cards, :name
add_index :cards, :card_type
end
end
class CreateDuels < ActiveRecord::Migration
def change
create_table :duels do |t|
t.references :user1
t.references :user2
t.references :winner
t.integer :winreason
t.string :replay
t.integer :user1_credits
t.integer :user2_credits
t.timestamps
end
add_index :duels, :user1_id
add_index :duels, :user2_id
end
end
class CreateDuelsUsersCards < ActiveRecord::Migration
def change
create_table :duels_users_cards do |t|
t.references :duel
t.references :user
t.references :card
t.boolean :main
end
add_index :duels_users_cards, :duel_id
add_index :duels_users_cards, :user_id
add_index :duels_users_cards, :card_id
end
end
#encoding: UTF-8
class DemoData < ActiveRecord::Migration class DemoData < ActiveRecord::Migration
def self.up def self.up
Board.create :id => 1, Board.create :id => 1,
...@@ -25,45 +26,45 @@ class DemoData < ActiveRecord::Migration ...@@ -25,45 +26,45 @@ class DemoData < ActiveRecord::Migration
:name => "论坛", :name => "论坛",
:displayorder => 0, :displayorder => 0,
:url => "/boards", :url => "/boards",
:Role_id => 0, :role_id => 0,
:super_id => 0 :super_id => 0
Navigation.create :id => 2, Navigation.create :id => 2,
:name => "测试导航1", :name => "测试导航1",
:displayorder => 1, :displayorder => 1,
:url => "/boards", :url => "/boards",
:Role_id => 0, :role_id => 0,
:super_id => 1 :super_id => 1
Navigation.create :id => 3, Navigation.create :id => 3,
:name => "测试导航2", :name => "测试导航2",
:displayorder => 1, :displayorder => 1,
:url => "/boards", :url => "/boards",
:Role_id => 0, :role_id => 0,
:super_id => 1 :super_id => 1
User.create :id => 1, # User.create :id => 1,
:name => "admin", # :name => "admin",
:nickname => "华丽丽滴全能高管", # :nickname => "华丽丽滴全能高管",
:password => "admin", # :password => "admin",
:email => "zh99998@163.com", # :email => "zh99998@163.com",
:role_id => 1, # :role_id => 1,
:locked => false, # :locked => false,
:regip => '127.0.0.1', # :regip => '127.0.0.1',
:lastloginip => '127.0.0.1', # :lastloginip => '127.0.0.1',
:viewnum => 0, # :viewnum => 0,
:onlinetime => 0, # :onlinetime => 0,
:credit => 0, # :credits => 0,
:credit1 => 0, # :credit1 => 0,
:credit2 => 0, # :credit2 => 0,
:credit3 => 0, # :credit3 => 0,
:credit4 => 0, # :credit4 => 0,
:credit5 => 0, # :credit5 => 0,
:credit6 => 0, # :credit6 => 0,
:credit7 => 0, # :credit7 => 0,
:credit8 => 0, # :credit8 => 0,
:locale => nil, # :locale => nil,
:theme => nil # :theme => nil
Role.create :id => 1, Role.create :id => 1,
:name => "创始人", :name => "创始人",
......
...@@ -15,7 +15,7 @@ class CreateTopics < ActiveRecord::Migration ...@@ -15,7 +15,7 @@ class CreateTopics < ActiveRecord::Migration
t.boolean :reverse, :default => false, :null => false t.boolean :reverse, :default => false, :null => false
t.boolean :private, :default => false, :null => false t.boolean :private, :default => false, :null => false
#t.timestamps t.timestamps
end end
end end
......
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to # of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition. # incrementally modify your database, and then regenerate this schema definition.
...@@ -10,39 +11,85 @@ ...@@ -10,39 +11,85 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20111052032430) do ActiveRecord::Schema.define(:version => 20120309231620) do
create_table "boards", :force => true do |t| create_table "boards", :force => true do |t|
t.string "name", :default => "", :null => false t.string "name", :default => "", :null => false
t.integer "displayorder", :default => 0, :null => false t.integer "superboard_id", :null => false
t.text "introduction", :null => false t.integer "displayorder", :default => 0, :null => false
t.text "notice", :null => false t.text "introduction", :null => false
t.string "logo", :default => "", :null => false t.text "notice", :null => false
t.string "banner", :default => "", :null => false t.string "logo", :default => "", :null => false
t.integer "readperm", :default => 0, :null => false t.string "banner", :default => "", :null => false
t.integer "topicperm", :default => 0, :null => false t.integer "readperm", :default => 0, :null => false
t.integer "postperm", :default => 0, :null => false t.integer "topicperm", :default => 0, :null => false
t.integer "superboard_id", :null => false t.integer "postperm", :default => 0, :null => false
t.datetime "created_at"
t.datetime "updated_at"
end end
create_table "cards", :force => true do |t|
t.integer "number"
t.string "name"
t.string "card_type"
t.string "monster_type"
t.integer "monster_atk"
t.integer "monster_def"
t.string "monster_attribute"
t.string "type"
t.integer "monster_level"
t.text "lore"
t.integer "status"
t.string "stats"
t.string "archetypes"
t.string "mediums"
t.integer "tokens"
end
add_index "cards", ["card_type"], :name => "index_cards_on_card_type"
add_index "cards", ["name"], :name => "index_cards_on_name"
add_index "cards", ["number"], :name => "index_cards_on_number"
create_table "comments", :force => true do |t| create_table "comments", :force => true do |t|
t.integer "post_id" t.integer "post_id"
t.integer "user_id" t.integer "user_id"
t.text "content" t.text "content"
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
end
create_table "duels", :force => true do |t|
t.integer "user1_id"
t.integer "user2_id"
t.integer "winner_id"
t.integer "winreason"
t.string "replay"
t.integer "user1_credits"
t.integer "user2_credits"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end end
add_index "duels", ["user1_id"], :name => "index_duels_on_user1_id"
add_index "duels", ["user2_id"], :name => "index_duels_on_user2_id"
create_table "duels_users_cards", :force => true do |t|
t.integer "duel_id"
t.integer "user_id"
t.integer "card_id"
t.boolean "main"
end
add_index "duels_users_cards", ["card_id"], :name => "index_duels_users_cards_on_card_id"
add_index "duels_users_cards", ["duel_id"], :name => "index_duels_users_cards_on_duel_id"
add_index "duels_users_cards", ["user_id"], :name => "index_duels_users_cards_on_user_id"
create_table "links", :force => true do |t| create_table "links", :force => true do |t|
t.string "name" t.string "name"
t.string "url" t.string "url"
t.string "logo" t.string "logo"
t.string "introduction" t.string "introduction"
t.integer "displayorder" t.integer "displayorder"
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
end end
create_table "moderations", :force => true do |t| create_table "moderations", :force => true do |t|
...@@ -51,15 +98,15 @@ ActiveRecord::Schema.define(:version => 20111052032430) do ...@@ -51,15 +98,15 @@ ActiveRecord::Schema.define(:version => 20111052032430) do
t.string "association_type" t.string "association_type"
t.string "action" t.string "action"
t.string "note" t.string "note"
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
end end
create_table "navigations", :force => true do |t| create_table "navigations", :force => true do |t|
t.string "name" t.string "name"
t.string "url" t.string "url"
t.integer "displayorder" t.integer "displayorder"
t.integer "usergroup_id" t.integer "role_id"
t.integer "super_id" t.integer "super_id"
end end
...@@ -69,8 +116,8 @@ ActiveRecord::Schema.define(:version => 20111052032430) do ...@@ -69,8 +116,8 @@ ActiveRecord::Schema.define(:version => 20111052032430) do
t.integer "assocaion_id" t.integer "assocaion_id"
t.string "assocaion_type" t.string "assocaion_type"
t.integer "from_user_id" t.integer "from_user_id"
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
end end
create_table "pms", :force => true do |t| create_table "pms", :force => true do |t|
...@@ -78,8 +125,8 @@ ActiveRecord::Schema.define(:version => 20111052032430) do ...@@ -78,8 +125,8 @@ ActiveRecord::Schema.define(:version => 20111052032430) do
t.integer "to_user_id", :null => false t.integer "to_user_id", :null => false
t.boolean "read", :default => false, :null => false t.boolean "read", :default => false, :null => false
t.text "content", :null => false t.text "content", :null => false
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
end end
create_table "posts", :force => true do |t| create_table "posts", :force => true do |t|
...@@ -92,8 +139,8 @@ ActiveRecord::Schema.define(:version => 20111052032430) do ...@@ -92,8 +139,8 @@ ActiveRecord::Schema.define(:version => 20111052032430) do
t.boolean "anonymous" t.boolean "anonymous"
t.boolean "ubb" t.boolean "ubb"
t.boolean "html" t.boolean "html"
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
end end
create_table "roles", :force => true do |t| create_table "roles", :force => true do |t|
...@@ -125,22 +172,17 @@ ActiveRecord::Schema.define(:version => 20111052032430) do ...@@ -125,22 +172,17 @@ ActiveRecord::Schema.define(:version => 20111052032430) do
t.boolean "deleted", :default => false, :null => false t.boolean "deleted", :default => false, :null => false
t.boolean "reverse", :default => false, :null => false t.boolean "reverse", :default => false, :null => false
t.boolean "private", :default => false, :null => false t.boolean "private", :default => false, :null => false
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
end end
create_table "users", :force => true do |t| create_table "users", :force => true do |t|
t.string "name", :null => false t.string "name", :null => false
t.string "password", :null => false t.string "password"
t.string "email", :default => "", :null => false t.string "email"
t.integer "role_id", :default => 0, :null => false
t.string "nickname", :default => "", :null => false t.string "nickname", :default => "", :null => false
t.text "signature", :null => false t.text "signature"
t.boolean "locked", :default => false, :null => false t.integer "credits", :default => 0, :null => false
t.string "regip", :default => "", :null => false
t.string "lastloginip", :default => "", :null => false
t.integer "viewnum", :default => 0, :null => false
t.integer "onlinetime", :default => 0, :null => false
t.integer "credit1", :default => 0, :null => false t.integer "credit1", :default => 0, :null => false
t.integer "credit2", :default => 0, :null => false t.integer "credit2", :default => 0, :null => false
t.integer "credit3", :default => 0, :null => false t.integer "credit3", :default => 0, :null => false
...@@ -149,10 +191,20 @@ ActiveRecord::Schema.define(:version => 20111052032430) do ...@@ -149,10 +191,20 @@ ActiveRecord::Schema.define(:version => 20111052032430) do
t.integer "credit6", :default => 0, :null => false t.integer "credit6", :default => 0, :null => false
t.integer "credit7", :default => 0, :null => false t.integer "credit7", :default => 0, :null => false
t.integer "credit8", :default => 0, :null => false t.integer "credit8", :default => 0, :null => false
t.integer "win", :default => 0, :null => false
t.integer "lost", :default => 0, :null => false
t.integer "role_id", :default => 5, :null => false
t.boolean "locked", :default => false, :null => false
t.string "regip", :default => "", :null => false
t.string "lastloginip", :default => "", :null => false
t.integer "viewnum", :default => 0, :null => false
t.integer "onlinetime", :default => 0, :null => false
t.string "locale" t.string "locale"
t.string "theme" t.string "theme"
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
end end
add_index "users", ["name"], :name => "index_users_on_name"
end end
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
# #
# Examples: # Examples:
# #
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(:name => 'Daley', :city => cities.first) # Mayor.create(name: 'Emanuel', city: cities.first)
require 'mysql'
class Mysql::Result
def encode(value, encoding = "utf-8")
String === value ? value.force_encoding(encoding) : value
end
def each_utf8(&block)
each_orig do |row|
yield row.map {|col| encode(col) }
end
end
alias each_orig each
alias each each_utf8
def each_hash_utf8(&block)
each_hash_orig do |row|
row.each {|k, v| row[k] = encode(v) }
yield(row)
end
end
alias each_hash_orig each_hash
alias each_hash each_hash_utf8
end
\ No newline at end of file
platform.active=Ruby
rails.port=3000
source.encoding=UTF-8
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.ruby.railsprojects</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/rails-project/1">
<name>Reliz</name>
</data>
</configuration>
</project>
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<!-- This file lives in public/500.html --> <!-- This file lives in public/500.html -->
<div class="dialog"> <div class="dialog">
<h1>We're sorry, but something went wrong.</h1> <h1>We're sorry, but something went wrong.</h1>
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
</div> </div>
</body> </body>
</html> </html>
<meta charset=utf-8 />
以下是本站开放的API,用来供外站和桌面程序获取信息<br />
<br />
现在本站在开发中,极度不稳定,请先不要投入正式使用。<br />
<br />
卡片信息:<br />
<a href="http://card.touhou.cc/cards/520.json">http://card.touhou.cc/cards/520.json</a><br />
卡图:<br />
<a href="http://card.touhou.cc/cards/520.png">http://card.touhou.cc/cards/520.png</a><br />
注:png只是表示请求卡图,返回的图不一定真的是png格式,也可以是jpg<br />
<br />
需要更多API、bug反馈或建议请联系 E-mail/GoogleTalk/QQ : zh99998@gmail.com
\ No newline at end of file
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Mon Nov 21 21:11:03 2011 -0500
*/
(function(a,b){function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function J(){return!1}function K(){return!0}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function bj(a,b){if(b.nodeType!==1||!f.hasData(a))return;var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}function bk(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bo(a){var b=c.createElement("div");return bh.appendChild(b),b.innerHTML=a.outerHTML,b.firstChild}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));return(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g)),l}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j)return j!==f[0]&&f.unshift(j),d[j]}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cs(){return setTimeout(ct,0),cr=f.now()}function ct(){cr=b}function cu(a,b){var c={};return f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a}),c}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(e.isReady)return;try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};return e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(a==="body"&&!d&&c.body)return this.context=c,this[0]=c.body,this.selector=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?g=[null,a,null]:g=i.exec(a);if(g&&(g[1]||!d)){if(g[1])return d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes),e.merge(this,a);h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}return this.context=c,this.selector=a,this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}return e.isFunction(a)?f.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),e.makeArray(a,this))},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();return e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return e.each(this,a,b)},ready:function(a){return e.bindReady(),A.add(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){return a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f),e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(A)return;A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":a.toString().replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];return a.length=d,a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};return g.guid=a.guid=a.guid||g.guid||e.guid++,g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){return f&&f instanceof e&&!(f instanceof a)&&(f=a(f)),e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())}),e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){return c=[],this},disable:function(){return c=d=e=b,this},disabled:function(){return!c},lock:function(){return d=b,(!e||e===!0)&&o.disable(),this},locked:function(){return!d},fireWith:function(b,c){return d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c)),this},fire:function(){return o.fireWith(this,arguments),this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){return i.done(a).fail(b).progress(c),this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments),this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;return i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i),i},when:function(a){function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}var b=i.call(arguments,0),c=0,d=b.length,e=new Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;return k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];if(!r)return;j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i)}),b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?f.cache[a[f.expando]]:a[f.expando],!!a&&!m(a)},data:function(a,c,d,e){if(!f.acceptData(a))return;var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);return g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d),o&&!h[c]?g.events:(k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h,i)},removeData:function(a,b,c){if(!f.acceptData(a))return;var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}return typeof a=="object"?this.each(function(){f.data(this,a)}):(d=a.split("."),d[1]=d[1]?"."+d[1]:"",c===b?(h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h)),h===b&&d[1]?this.data(d[0]):h):this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)}))},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){return typeof a!="string"&&(c=a,a="fx"),c===b?f.queue(this[0],a):this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){return a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);return m(),d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){return a=f.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return f.isFunction(a)?this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g)return c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type],c&&"get"in c&&(d=c.get(g,"value"))!==b?d:(d=g.value,typeof d=="string"?d.replace(q,""):d==null?"":d);return}return e=f.isFunction(a),this.each(function(d){var g=f(this),h;if(this.nodeType!==1)return;e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}return j&&!h.length&&i.length?f(i[g]).val():h},set:function(a,b){var c=f.makeArray(b);return f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return;if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}return h&&"set"in h&&i&&(g=h.set(a,d,c))!==b?g:(a.setAttribute(c,""+d),d)}return h&&"get"in h&&i&&(g=h.get(a,c))!==null?g:(g=a.getAttribute(c),g===null?b:g)},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return w&&f.nodeName(a,"button")?w.get(a,b):b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;return h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]),d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);return e||(e=c.createAttribute(d),a.setAttributeNode(e)),e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);return b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)")),b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m
,n,o,p,q,r,s;if(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))return;d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f=="undefined"||!!a&&f.event.triggered===a.type?b:f.event.dispatch.apply(i.elem,arguments)},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!g||!(o=g.events))return;b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();return c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n)),c.result}return},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;return a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];return a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey),h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return f.event.remove(this,"._change"),z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;return g===1&&(h=e,e=function(a){return f().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++)),this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;return f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler),this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=J),this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return f(this.context).on(a,this.selector,b,c),this},die:function(a,b){return f(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;return f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){return i=!1,0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length!==1||w[0]!=="~"&&w[0]!=="+"||!d.parentNode?d:d.parentNode,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);return l&&(m(l,h,e,f),m.uniqueSort(e)),e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}return d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]),{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q){if(g!=null)break;m.error(a)}q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);return a[0]=e++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");return!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" "),a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not"){if(!((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))){var g=m.filter(b[3],c,d,!0^f);return d||e.push.apply(e,g),!1}b[3]=m(b[3],null,null,c)}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){return a.unshift(!0),a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}return j=a.nodeIndex-e,c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){return a===b?(h=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b)return h=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)return;m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)return;a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}return c=c.length>1?f.unique(c):c,this.pushStack(c,"closest",a)},index:function(a){return a?typeof a=="string"?f.inArray(this[0],f(a)):f.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);return L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse()),this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.isFunction(a)?this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a)):f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return f.isFunction(a)?this.each(function(b){f(this).wrapInner(a.call(this,b))}):this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);return a.push.apply(a,this.toArray()),this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);return a.push.apply(a,f.clean(arguments)),a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(
b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){return this[0]&&this[0].parentNode?f.isFunction(a)?this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=f(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})):this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];return b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1),{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1)return e[b](this[0]),this;for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}return d=e=null,h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){return arguments.length===2&&c===b?this:f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b)return k&&"get"in k&&(g=k.get(a,!1,e))!==b?g:j[c];h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c)return a.offsetWidth!==0?bC(a,b,d):(f.swap(a,bw,function(){e=bC(a,b,d)}),e)},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;return f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight}),c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;return b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;return f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d)),f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;return f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}}),this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){return f.isFunction(d)&&(g=g||e,e=d,d=b),f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b),a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s===2)return;s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return s||(d.mimeType=a),this},abort:function(a){return a=a||"abort",p&&p.abort(a),w(0,a),this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(!d.beforeSend||d.beforeSend.call(e,v,d)!==!1&&s!==2){for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(!(s<2))throw z;w(-1,z)}}return v}return v.abort(),!1},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";return b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){return g||f.error(h+" was not called"),g[0]},b.dataTypes[0]="json","script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return f.globalEval(a),a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";return f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c),this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);return f.isEmptyObject(a)?this.each(e.complete,[!1]):(a=f.extend({},a),e.queue===!1?this.each(g):this.queue(e.queue,g))},stop:function(a,c,d){return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)},d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a}return this.elem[this.prop]},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}return i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;return f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft)),{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;return c===b?(e=this[0],e?(g=cy(e),g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]):null):this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window),function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);return j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}return!1},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))}),a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e)===!1&&c.enableElement(e),!1);if(e.data("method"))return c.handleMethod(e),!1
}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(document).delegate(c.formInputClickSelector,"click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})}(jQuery),function(){}.call(this),function(){}.call(this),function(){}.call(this);
\ No newline at end of file
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Mon Nov 21 21:11:03 2011 -0500
*/
(function(a,b){function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function J(){return!1}function K(){return!0}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function bj(a,b){if(b.nodeType!==1||!f.hasData(a))return;var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}function bk(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bo(a){var b=c.createElement("div");return bh.appendChild(b),b.innerHTML=a.outerHTML,b.firstChild}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));return(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g)),l}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j)return j!==f[0]&&f.unshift(j),d[j]}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cs(){return setTimeout(ct,0),cr=f.now()}function ct(){cr=b}function cu(a,b){var c={};return f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a}),c}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(e.isReady)return;try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};return e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(a==="body"&&!d&&c.body)return this.context=c,this[0]=c.body,this.selector=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?g=[null,a,null]:g=i.exec(a);if(g&&(g[1]||!d)){if(g[1])return d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes),e.merge(this,a);h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}return this.context=c,this.selector=a,this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}return e.isFunction(a)?f.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),e.makeArray(a,this))},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();return e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return e.each(this,a,b)},ready:function(a){return e.bindReady(),A.add(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){return a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f),e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(A)return;A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":a.toString().replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];return a.length=d,a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};return g.guid=a.guid=a.guid||g.guid||e.guid++,g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){return f&&f instanceof e&&!(f instanceof a)&&(f=a(f)),e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())}),e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){return c=[],this},disable:function(){return c=d=e=b,this},disabled:function(){return!c},lock:function(){return d=b,(!e||e===!0)&&o.disable(),this},locked:function(){return!d},fireWith:function(b,c){return d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c)),this},fire:function(){return o.fireWith(this,arguments),this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){return i.done(a).fail(b).progress(c),this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments),this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;return i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i),i},when:function(a){function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}var b=i.call(arguments,0),c=0,d=b.length,e=new Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;return k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];if(!r)return;j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i)}),b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?f.cache[a[f.expando]]:a[f.expando],!!a&&!m(a)},data:function(a,c,d,e){if(!f.acceptData(a))return;var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);return g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d),o&&!h[c]?g.events:(k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h,i)},removeData:function(a,b,c){if(!f.acceptData(a))return;var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}return typeof a=="object"?this.each(function(){f.data(this,a)}):(d=a.split("."),d[1]=d[1]?"."+d[1]:"",c===b?(h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h)),h===b&&d[1]?this.data(d[0]):h):this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)}))},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){return typeof a!="string"&&(c=a,a="fx"),c===b?f.queue(this[0],a):this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){return a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);return m(),d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){return a=f.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return f.isFunction(a)?this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g)return c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type],c&&"get"in c&&(d=c.get(g,"value"))!==b?d:(d=g.value,typeof d=="string"?d.replace(q,""):d==null?"":d);return}return e=f.isFunction(a),this.each(function(d){var g=f(this),h;if(this.nodeType!==1)return;e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}return j&&!h.length&&i.length?f(i[g]).val():h},set:function(a,b){var c=f.makeArray(b);return f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return;if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}return h&&"set"in h&&i&&(g=h.set(a,d,c))!==b?g:(a.setAttribute(c,""+d),d)}return h&&"get"in h&&i&&(g=h.get(a,c))!==null?g:(g=a.getAttribute(c),g===null?b:g)},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return w&&f.nodeName(a,"button")?w.get(a,b):b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;return h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]),d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);return e||(e=c.createAttribute(d),a.setAttributeNode(e)),e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);return b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)")),b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m
,n,o,p,q,r,s;if(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))return;d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f=="undefined"||!!a&&f.event.triggered===a.type?b:f.event.dispatch.apply(i.elem,arguments)},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!g||!(o=g.events))return;b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();return c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n)),c.result}return},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;return a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];return a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey),h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return f.event.remove(this,"._change"),z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;return g===1&&(h=e,e=function(a){return f().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++)),this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;return f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler),this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=J),this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return f(this.context).on(a,this.selector,b,c),this},die:function(a,b){return f(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;return f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){return i=!1,0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length!==1||w[0]!=="~"&&w[0]!=="+"||!d.parentNode?d:d.parentNode,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);return l&&(m(l,h,e,f),m.uniqueSort(e)),e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}return d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]),{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q){if(g!=null)break;m.error(a)}q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);return a[0]=e++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");return!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" "),a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not"){if(!((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))){var g=m.filter(b[3],c,d,!0^f);return d||e.push.apply(e,g),!1}b[3]=m(b[3],null,null,c)}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){return a.unshift(!0),a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}return j=a.nodeIndex-e,c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){return a===b?(h=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b)return h=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)return;m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)return;a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}return c=c.length>1?f.unique(c):c,this.pushStack(c,"closest",a)},index:function(a){return a?typeof a=="string"?f.inArray(this[0],f(a)):f.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);return L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse()),this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.isFunction(a)?this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a)):f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return f.isFunction(a)?this.each(function(b){f(this).wrapInner(a.call(this,b))}):this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);return a.push.apply(a,this.toArray()),this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);return a.push.apply(a,f.clean(arguments)),a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(
b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){return this[0]&&this[0].parentNode?f.isFunction(a)?this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=f(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})):this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];return b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1),{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1)return e[b](this[0]),this;for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}return d=e=null,h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){return arguments.length===2&&c===b?this:f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b)return k&&"get"in k&&(g=k.get(a,!1,e))!==b?g:j[c];h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c)return a.offsetWidth!==0?bC(a,b,d):(f.swap(a,bw,function(){e=bC(a,b,d)}),e)},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;return f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight}),c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;return b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;return f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d)),f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;return f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}}),this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){return f.isFunction(d)&&(g=g||e,e=d,d=b),f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b),a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s===2)return;s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return s||(d.mimeType=a),this},abort:function(a){return a=a||"abort",p&&p.abort(a),w(0,a),this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(!d.beforeSend||d.beforeSend.call(e,v,d)!==!1&&s!==2){for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(!(s<2))throw z;w(-1,z)}}return v}return v.abort(),!1},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";return b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){return g||f.error(h+" was not called"),g[0]},b.dataTypes[0]="json","script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return f.globalEval(a),a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";return f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c),this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);return f.isEmptyObject(a)?this.each(e.complete,[!1]):(a=f.extend({},a),e.queue===!1?this.each(g):this.queue(e.queue,g))},stop:function(a,c,d){return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)},d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a}return this.elem[this.prop]},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}return i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;return f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft)),{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;return c===b?(e=this[0],e?(g=cy(e),g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]):null):this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window),function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);return j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}return!1},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))}),a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e)===!1&&c.enableElement(e),!1);if(e.data("method"))return c.handleMethod(e),!1
}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(document).delegate(c.formInputClickSelector,"click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})}(jQuery),function(){}.call(this),function(){}.call(this),function(){}.call(this);
\ No newline at end of file
---
!binary "cmFpbHMucG5n": rails-782b548cc1ba7f898cdad2d9eb8420d2.png
!binary "YXBwbGljYXRpb24uanM=": application-d9c9265f37866dabd92089f4c4f7dd97.js
!binary "YXBwbGljYXRpb24uY3Nz": application-95bd4fe1de99c1cd91ec8e6f348a44bd.css
No preview for this file type
<meta charset="utf-8" />
mycard ygocore 服务器测试主页 <br />
<br />
<a href="register">用户注册</a> <br />
<br /><br /><br />
以下为开发中功能,玩家不要乱点=w=<br />
<a href="http://140.113.242.66:7922/">在线大厅</a> <br />
<a href="users">用户排行</a> <br />
<a href="users/5">用户个人信息统计</a> <br />
<a href="cards">卡片排行</a> <br />
<a href="cards/2067">卡片信息</a> <br />
<a href="boards">论坛</a> <br />
<a href="api">API</a> <br />
var BROWSER = {};var USERAGENT = navigator.userAgent.toLowerCase();BROWSER.ie = window.ActiveXObject && USERAGENT.indexOf('msie') != -1 && USERAGENT.substr(USERAGENT.indexOf('msie') + 5, 3);BROWSER.firefox = document.getBoxObjectFor && USERAGENT.indexOf('firefox') != -1 && USERAGENT.substr(USERAGENT.indexOf('firefox') + 8, 3);BROWSER.chrome = window.MessageEvent && !document.getBoxObjectFor && USERAGENT.indexOf('chrome') != -1 && USERAGENT.substr(USERAGENT.indexOf('chrome') + 7, 10);BROWSER.opera = window.opera && opera.version();BROWSER.safari = window.openDatabase && USERAGENT.indexOf('safari') != -1 && USERAGENT.substr(USERAGENT.indexOf('safari') + 7, 8);BROWSER.other = !BROWSER.ie && !BROWSER.firefox && !BROWSER.chrome && !BROWSER.opera && !BROWSER.safari;BROWSER.firefox = BROWSER.chrome ? 1 : BROWSER.firefox;var DISCUZCODE = [];DISCUZCODE['num'] = '-1';DISCUZCODE['html'] = [];var CSSLOADED = [];var JSMENU = [];JSMENU['active'] = [];JSMENU['timer'] = [];JSMENU['drag'] = [];JSMENU['layer'] = 0;JSMENU['zIndex'] = {'win':200,'menu':300,'prompt':400,'dialog':500};JSMENU['float'] = '';var AJAX = [];AJAX['debug'] = 0;AJAX['url'] = [];AJAX['stack'] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];var clipboardswfdata = '';var CURRENTSTYPE = null;var discuz_uid = isUndefined(discuz_uid) ? 0 : discuz_uid;var creditnotice = isUndefined(creditnotice) ? '' : creditnotice;var cookiedomain = isUndefined(cookiedomain) ? '' : cookiedomain;var cookiepath = isUndefined(cookiepath) ? '' : cookiepath;if(BROWSER.firefox && window.HTMLElement) {HTMLElement.prototype.__defineSetter__('outerHTML', function(sHTML) {var r = this.ownerDocument.createRange();r.setStartBefore(this);var df = r.createContextualFragment(sHTML);this.parentNode.replaceChild(df,this);return sHTML;});HTMLElement.prototype.__defineGetter__('outerHTML', function() {var attr;var attrs = this.attributes;var str = '<' + this.tagName.toLowerCase();for(var i = 0;i < attrs.length;i++){attr = attrs[i];if(attr.specified)str += ' ' + attr.name + '="' + attr.value + '"';}if(!this.canHaveChildren) {return str + '>';}return str + '>' + this.innerHTML + '</' + this.tagName.toLowerCase() + '>';});HTMLElement.prototype.__defineGetter__('canHaveChildren', function() {switch(this.tagName.toLowerCase()) {case 'area':case 'base':case 'basefont':case 'col':case 'frame':case 'hr':case 'img':case 'br':case 'input':case 'isindex':case 'link':case 'meta':case 'param':return false;}return true;});HTMLElement.prototype.click = function(){var evt = this.ownerDocument.createEvent('MouseEvents');evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);this.dispatchEvent(evt);};}function $(id) {return document.getElementById(id);}function display(id) {$(id).style.display = $(id).style.display == '' ? 'none' : '';}function isUndefined(variable) {return typeof variable == 'undefined' ? true : false;}function in_array(needle, haystack) {if(typeof needle == 'string' || typeof needle == 'number') {for(var i in haystack) {if(haystack[i] == needle) {return true;}}}return false;}function trim(str) {return (str + '').replace(/(\s+)$/g, '').replace(/^\s+/g, '');}function strlen(str) {return (BROWSER.ie && str.indexOf('\n') != -1) ? str.replace(/\r?\n/g, '_').length : str.length;}function mb_strlen(str) {var len = 0;for(var i = 0; i < str.length; i++) {len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? (charset == 'utf-8' ? 3 : 2) : 1;}return len;}function mb_cutstr(str, maxlen, dot) {var len = 0;var ret = '';var dot = !dot ? '...' : '';maxlen = maxlen - dot.length;for(var i = 0; i < str.length; i++) {len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? (charset == 'utf-8' ? 3 : 2) : 1;if(len > maxlen) {ret += dot;break;}ret += str.substr(i, 1);}return ret;}function checkall(form, prefix, checkall) {var checkall = checkall ? checkall : 'chkall';count = 0;for(var i = 0; i < form.elements.length; i++) {var e = form.elements[i];if(e.name && e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {e.checked = form.elements[checkall].checked;if(e.checked) {count++;}}}return count;}function doane(event) {e = event ? event : window.event;if(!e) return;if(BROWSER.ie) {e.returnValue = false;e.cancelBubble = true;} else if(e) {e.stopPropagation();e.preventDefault();}}function _attachEvent(obj, evt, func, eventobj) {eventobj = !eventobj ? obj : eventobj;if(obj.addEventListener) {obj.addEventListener(evt, func, false);} else if(eventobj.attachEvent) {obj.attachEvent('on' + evt, func);}}function _detachEvent(obj, evt, func, eventobj) {eventobj = !eventobj ? obj : eventobj;if(obj.removeEventListener) {obj.removeEventListener(evt, func, false);} else if(eventobj.detachEvent) {obj.detachEvent('on' + evt, func);}}function setcookie(cookieName, cookieValue, seconds, path, domain, secure) {var expires = new Date();expires.setTime(expires.getTime() + seconds * 1000);domain = !domain ? cookiedomain : domain;path = !path ? cookiepath : path;document.cookie = escape(cookieName) + '=' + escape(cookieValue)+ (expires ? '; expires=' + expires.toGMTString() : '')+ (path ? '; path=' + path : '/')+ (domain ? '; domain=' + domain : '')+ (secure ? '; secure' : '');}function getcookie(name) {var cookie_start = document.cookie.indexOf(name);var cookie_end = document.cookie.indexOf(";", cookie_start);return cookie_start == -1 ? '' : unescape(document.cookie.substring(cookie_start + name.length + 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length)));}function thumbImg(obj, method) {if(!obj) {return;}obj.onload = null;file = obj.src;zw = obj.offsetWidth;zh = obj.offsetHeight;if(zw < 2) {if(!obj.id) {obj.id = 'img_' + Math.random();}setTimeout("thumbImg($('" + obj.id + "'), " + method + ")", 100);return;}zr = zw / zh;method = !method ? 0 : 1;if(method) {fixw = obj.getAttribute('_width');fixh = obj.getAttribute('_height');if(zw > fixw) {zw = fixw;zh = zw / zr;}if(zh > fixh) {zh = fixh;zw = zh * zr;}} else {var widthary = imagemaxwidth.split('%');if(widthary.length > 1) {fixw = $('wrap').clientWidth - 200;if(widthary[0]) {fixw = fixw * widthary[0] / 100;} else if(widthary[1]) {fixw = fixw < widthary[1] ? fixw : widthary[1];}} else {fixw = widthary[0];}if(zw > fixw) {zw = fixw;zh = zw / zr;obj.style.cursor = 'pointer';if(!obj.onclick) {obj.onclick = function() {zoom(obj, obj.src);};}}}obj.width = zw;obj.height = zh;}function imgzoom() {}function attachimg() {}function setCopy(text, msg){if(BROWSER.ie) {clipboardData.setData('Text', text);if(msg) {showDialog(msg, 'notice');}} else {var msg = '<div style="text-decoration:underline;">点此复制到剪贴板</div>' +AC_FL_RunContent('id', 'clipboardswf', 'name', 'clipboardswf', 'devicefont', 'false', 'width', '120', 'height', '40', 'src', 'images/common/clipboard.swf', 'menu', 'false', 'allowScriptAccess', 'sameDomain', 'swLiveConnect', 'true', 'wmode', 'transparent', 'style' , 'margin-top:-20px');showDialog(msg, 'info');text = text.replace(/[\xA0]/g, ' ');clipboardswfdata = text;}}function getClipboardData() {window.document.clipboardswf.SetVariable('str', clipboardswfdata);}function saveData(ignoreempty) {var ignoreempty = isUndefined(ignoreempty) ? 0 : ignoreempty;var obj = $('postform') && (($('fwin_newthread') && $('fwin_newthread').style.display == '') || ($('fwin_reply') && $('fwin_reply').style.display == '')) ? $('postform') : ($('fastpostform') ? $('fastpostform') : $('postform'));if(!obj) return;var data = subject = message = '';for(var i = 0; i < obj.elements.length; i++) {var el = obj.elements[i];if(el.name != '' && (el.tagName == 'TEXTAREA' || el.tagName == 'INPUT' && (el.type == 'text' || el.type == 'checkbox' || el.type == 'radio')) && el.name.substr(0, 6) != 'attach') {var elvalue = el.value;if(el.name == 'subject') {subject = trim(elvalue);} else if(el.name == 'message') {if(typeof wysiwyg != 'undefined' && wysiwyg == 1) {elvalue = html2bbcode(editdoc.body.innerHTML);}message = trim(elvalue);}if((el.type == 'checkbox' || el.type == 'radio') && !el.checked) {continue;}if(trim(elvalue)) {data += el.name + String.fromCharCode(9) + el.tagName + String.fromCharCode(9) + el.type + String.fromCharCode(9) + elvalue + String.fromCharCode(9, 9);}}}if(!subject && !message && !ignoreempty) {return;}if(BROWSER.ie){with(document.documentElement) {setAttribute("value", data);save('Discuz');}} else if(window.sessionStorage){sessionStorage.setItem('Discuz', data);}}function switchAdvanceMode(url) {var obj = $('postform') && (($('fwin_newthread') && $('fwin_newthread').style.display == '') || ($('fwin_reply') && $('fwin_reply').style.display == '')) ? $('postform') : $('fastpostform');if(obj && obj.message.value != '') {saveData();url += '&cedit=yes';}location.href = url;return false;}function updatestring(str1, str2, clear) {str2 = '_' + str2 + '_';return clear ? str1.replace(str2, '') : (str1.indexOf(str2) == -1 ? str1 + str2 : str1);}function toggle_collapse(objname, noimg, complex, lang) {var obj = $(objname);if(obj) {obj.style.display = obj.style.display == '' ? 'none' : '';var collapsed = getcookie('discuz_collapse');collapsed = updatestring(collapsed, objname, !obj.style.display);setcookie('discuz_collapse', collapsed, (collapsed ? 2592000 : -2592000));}if(!noimg) {var img = $(objname + '_img');if(img.tagName != 'IMG') {if(img.className.indexOf('_yes') == -1) {img.className = img.className.replace(/_no/, '_yes');if(lang) {img.innerHTML = lang[0];}} else {img.className = img.className.replace(/_yes/, '_no');if(lang) {img.innerHTML = lang[1];}}} else {img.src = img.src.indexOf('_yes.gif') == -1 ? img.src.replace(/_no\.gif/, '_yes\.gif') : img.src.replace(/_yes\.gif/, '_no\.gif');}img.blur();}if(complex) {var objc = $(objname + '_c');if(objc) {objc.className = objc.className == 'c_header' ? 'c_header closenode' : 'c_header';}}}function sidebar_collapse(lang) {if(lang[0]) {toggle_collapse('sidebar', null, null, lang);$('wrap').className = $('wrap').className == 'wrap with_side s_clear' ? 'wrap s_clear' : 'wrap with_side s_clear';} else {var collapsed = getcookie('discuz_collapse');collapsed = updatestring(collapsed, 'sidebar', 1);setcookie('discuz_collapse', collapsed, (collapsed ? 2592000 : -2592000));location.reload();}}function loadcss(cssname) {if(!CSSLOADED[cssname]) {css = document.createElement('link');css.type = 'text/css';css.rel = 'stylesheet';css.href = 'forumdata/cache/style_' + STYLEID + '_' + cssname + '.css?' + VERHASH;var headNode = document.getElementsByTagName("head")[0];headNode.appendChild(css);CSSLOADED[cssname] = 1;}}function showMenu(v) {var ctrlid = isUndefined(v['ctrlid']) ? v : v['ctrlid'];var showid = isUndefined(v['showid']) ? ctrlid : v['showid'];var menuid = isUndefined(v['menuid']) ? showid + '_menu' : v['menuid'];var ctrlObj = $(ctrlid);var menuObj = $(menuid);if(!menuObj) return;var mtype = isUndefined(v['mtype']) ? 'menu' : v['mtype'];var evt = isUndefined(v['evt']) ? 'mouseover' : v['evt'];var pos = isUndefined(v['pos']) ? '43' : v['pos'];var layer = isUndefined(v['layer']) ? 1 : v['layer'];var duration = isUndefined(v['duration']) ? 2 : v['duration'];var timeout = isUndefined(v['timeout']) ? 250 : v['timeout'];var maxh = isUndefined(v['maxh']) ? 500 : v['maxh'];var cache = isUndefined(v['cache']) ? 1 : v['cache'];var drag = isUndefined(v['drag']) ? '' : v['drag'];var dragobj = drag && $(drag) ? $(drag) : menuObj;var fade = isUndefined(v['fade']) ? 0 : v['fade'];var cover = isUndefined(v['cover']) ? 0 : v['cover'];var zindex = isUndefined(v['zindex']) ? JSMENU['zIndex']['menu'] : v['zindex'];if(typeof JSMENU['active'][layer] == 'undefined') {JSMENU['active'][layer] = [];}if(evt == 'click' && in_array(menuid, JSMENU['active'][layer]) && mtype != 'win') {hideMenu(menuid, mtype);return;}if(mtype == 'menu') {hideMenu(layer, mtype);}if(ctrlObj) {if(!ctrlObj.initialized) {ctrlObj.initialized = true;ctrlObj.unselectable = true;ctrlObj.outfunc = typeof ctrlObj.onmouseout == 'function' ? ctrlObj.onmouseout : null;ctrlObj.onmouseout = function() {if(this.outfunc) this.outfunc();if(duration < 3 && !JSMENU['timer'][menuid]) JSMENU['timer'][menuid] = setTimeout('hideMenu(\'' + menuid + '\', \'' + mtype + '\')', timeout);};ctrlObj.overfunc = typeof ctrlObj.onmouseover == 'function' ? ctrlObj.onmouseover : null;ctrlObj.onmouseover = function(e) {doane(e);if(this.overfunc) this.overfunc();if(evt == 'click') {clearTimeout(JSMENU['timer'][menuid]);JSMENU['timer'][menuid] = null;} else {for(var i in JSMENU['timer']) {if(JSMENU['timer'][i]) {clearTimeout(JSMENU['timer'][i]);JSMENU['timer'][i] = null;}}}};}}var dragMenu = function(menuObj, e, op) {e = e ? e : window.event;if(op == 1) {if(in_array(BROWSER.ie ? e.srcElement.tagName : e.target.tagName, ['TEXTAREA', 'INPUT', 'BUTTON', 'SELECT'])) {return;}JSMENU['drag'] = [e.clientX, e.clientY];JSMENU['drag'][2] = parseInt(menuObj.style.left);JSMENU['drag'][3] = parseInt(menuObj.style.top);document.onmousemove = function(e) {try{dragMenu(menuObj, e, 2);}catch(err){}};document.onmouseup = function(e) {try{dragMenu(menuObj, e, 3);}catch(err){}};doane(e);} else if(op == 2 && JSMENU['drag'][0]) {var menudragnow = [e.clientX, e.clientY];menuObj.style.left = (JSMENU['drag'][2] + menudragnow[0] - JSMENU['drag'][0]) + 'px';menuObj.style.top = (JSMENU['drag'][3] + menudragnow[1] - JSMENU['drag'][1]) + 'px';doane(e);} else if(op == 3) {JSMENU['drag'] = [];document.onmousemove = null;document.onmouseup = null;}};if(!menuObj.initialized) {menuObj.initialized = true;menuObj.ctrlkey = ctrlid;menuObj.mtype = mtype;menuObj.layer = layer;menuObj.cover = cover;if(ctrlObj && ctrlObj.getAttribute('fwin')) {menuObj.scrolly = true;}menuObj.style.position = 'absolute';menuObj.style.zIndex = zindex + layer;menuObj.onclick = function(e) {if(!e || BROWSER.ie) {window.event.cancelBubble = true;return window.event;} else {e.stopPropagation();return e;}};if(duration < 3) {if(duration > 1) {menuObj.onmouseover = function() {clearTimeout(JSMENU['timer'][menuid]);JSMENU['timer'][menuid] = null;};}if(duration != 1) {menuObj.onmouseout = function() {JSMENU['timer'][menuid] = setTimeout('hideMenu(\'' + menuid + '\', \'' + mtype + '\')', timeout);};}}if(drag) {dragobj.style.cursor = 'move';dragobj.onmousedown = function(event) {try{dragMenu(menuObj, event, 1);}catch(e){}};}if(cover) {var coverObj = document.createElement('div');coverObj.id = menuid + '_cover';coverObj.style.position = 'absolute';coverObj.style.zIndex = menuObj.style.zIndex - 1;coverObj.style.left = coverObj.style.top = '0px';coverObj.style.width = '100%';coverObj.style.height = document.body.scrollHeight + 'px';coverObj.style.backgroundColor = '#000';coverObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=50)';coverObj.style.opacity = 0.5;$('append_parent').appendChild(coverObj);}}menuObj.style.display = '';if(cover) $(menuid + '_cover').style.display = '';if(fade) {var O = 0;var fadeIn = function(O) {if(O == 100) {clearTimeout(fadeInTimer);return;}menuObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + O + ')';menuObj.style.opacity = O / 100;O += 10;var fadeInTimer = setTimeout(function () {fadeIn(O);}, 50);};fadeIn(O);menuObj.fade = true;} else {menuObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=100)';menuObj.style.opacity = 1;menuObj.fade = false;}setMenuPosition(showid, menuid, pos);if(maxh && menuObj.scrollHeight > maxh) {menuObj.style.height = maxh + 'px';if(BROWSER.opera) {menuObj.style.overflow = 'auto';} else {menuObj.style.overflowY = 'auto';}}if(!duration) {setTimeout('hideMenu(\'' + menuid + '\', \'' + mtype + '\')', timeout);}if(!in_array(menuid, JSMENU['active'][layer])) JSMENU['active'][layer].push(menuid);menuObj.cache = cache;if(layer > JSMENU['layer']) {JSMENU['layer'] = layer;}}function setMenuPosition(showid, menuid, pos) {var showObj = $(showid);var menuObj = menuid ? $(menuid) : $(showid + '_menu');if(isUndefined(pos)) pos = '43';var basePoint = parseInt(pos.substr(0, 1));var direction = parseInt(pos.substr(1, 1));var sxy = sx = sy = sw = sh = ml = mt = mw = mcw = mh = mch = bpl = bpt = 0;if(!menuObj || (basePoint > 0 && !showObj)) return;if(showObj) {sxy = fetchOffset(showObj);sx = sxy['left'];sy = sxy['top'];sw = showObj.offsetWidth;sh = showObj.offsetHeight;}mw = menuObj.offsetWidth;mcw = menuObj.clientWidth;mh = menuObj.offsetHeight;mch = menuObj.clientHeight;switch(basePoint) {case 1:bpl = sx;bpt = sy;break;case 2:bpl = sx + sw;bpt = sy;break;case 3:bpl = sx + sw;bpt = sy + sh;break;case 4:bpl = sx;bpt = sy + sh;break;}switch(direction) {case 0:menuObj.style.left = (document.body.clientWidth - menuObj.clientWidth) / 2 + 'px';mt = (document.documentElement.clientHeight - menuObj.clientHeight) / 2;break;case 1:ml = bpl - mw;mt = bpt - mh;break;case 2:ml = bpl;mt = bpt - mh;break;case 3:ml = bpl;mt = bpt;break;case 4:ml = bpl - mw;mt = bpt;break;}if(in_array(direction, [1, 4]) && ml < 0) {ml = bpl;if(in_array(basePoint, [1, 4])) ml += sw;} else if(ml + mw > document.documentElement.scrollLeft + document.body.clientWidth && sx >= mw) {ml = bpl - mw;if(in_array(basePoint, [2, 3])) ml -= sw;}if(in_array(direction, [1, 2]) && mt < 0) {mt = bpt;if(in_array(basePoint, [1, 2])) mt += sh;} else if(mt + mh > document.documentElement.scrollTop + document.documentElement.clientHeight && sy >= mh) {mt = bpt - mh;if(in_array(basePoint, [3, 4])) mt -= sh;}if(pos == '210') {ml += 69 - sw / 2;mt -= 5;if(showObj.tagName == 'TEXTAREA') {ml -= sw / 2;mt += sh / 2;}}if(direction == 0 || menuObj.scrolly) {if(BROWSER.ie && BROWSER.ie < 7) {if(direction == 0) mt += Math.max(document.documentElement.scrollTop, document.body.scrollTop);} else {if(menuObj.scrolly) mt -= Math.max(document.documentElement.scrollTop, document.body.scrollTop);menuObj.style.position = 'fixed';}}if(ml) menuObj.style.left = ml + 'px';if(mt) menuObj.style.top = mt + 'px';if(direction == 0 && BROWSER.ie && !document.documentElement.clientHeight) {menuObj.style.position = 'absolute';menuObj.style.top = (document.body.clientHeight - menuObj.clientHeight) / 2 + 'px';}if(menuObj.style.clip && !BROWSER.opera) {menuObj.style.clip = 'rect(auto, auto, auto, auto)';}}function fetchOffset(obj) {var left_offset = 0, top_offset = 0;if(obj.getBoundingClientRect){var rect = obj.getBoundingClientRect();var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);if(document.documentElement.dir == 'rtl') {scrollLeft = scrollLeft + document.documentElement.clientWidth - document.documentElement.scrollWidth;}left_offset = rect.left + scrollLeft - document.documentElement.clientLeft;top_offset = rect.top + scrollTop - document.documentElement.clientTop;}if(left_offset <= 0 || top_offset <= 0) {left_offset = obj.offsetLeft;top_offset = obj.offsetTop;while((obj = obj.offsetParent) != null) {left_offset += obj.offsetLeft;top_offset += obj.offsetTop;}}return { 'left' : left_offset, 'top' : top_offset };}function hideMenu(attr, mtype) {attr = isUndefined(attr) ? '' : attr;mtype = isUndefined(mtype) ? 'menu' : mtype;if(attr == '') {for(var i = 1; i <= JSMENU['layer']; i++) {hideMenu(i, mtype);}return;} else if(typeof attr == 'number') {for(var j in JSMENU['active'][attr]) {hideMenu(JSMENU['active'][attr][j], mtype);}return;} else if(typeof attr == 'string') {var menuObj = $(attr);if(!menuObj || (mtype && menuObj.mtype != mtype)) return;clearTimeout(JSMENU['timer'][attr]);var hide = function() {if(menuObj.cache) {menuObj.style.display = 'none';if(menuObj.cover) $(attr + '_cover').style.display = 'none';} else {menuObj.parentNode.removeChild(menuObj);if(menuObj.cover) $(attr + '_cover').parentNode.removeChild($(attr + '_cover'));}var tmp = [];for(var k in JSMENU['active'][menuObj.layer]) {if(attr != JSMENU['active'][menuObj.layer][k]) tmp.push(JSMENU['active'][menuObj.layer][k]);}JSMENU['active'][menuObj.layer] = tmp;};if(menuObj.fade) {var O = 100;var fadeOut = function(O) {if(O == 0) {clearTimeout(fadeOutTimer);hide();return;}menuObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + O + ')';menuObj.style.opacity = O / 100;O -= 10;var fadeOutTimer = setTimeout(function () {fadeOut(O);}, 50);};fadeOut(O);} else {hide();}}}function showPrompt(ctrlid, evt, msg, timeout, negligible) {var menuid = ctrlid ? ctrlid + '_pmenu' : 'ntcwin';var duration = timeout ? 0 : 3;if(!$(menuid)) {var div = document.createElement('div');div.id = menuid;div.className = ctrlid ? 'promptmenu up' : 'ntcwin';div.style.display = 'none';$('append_parent').appendChild(div);if(ctrlid) {msg = '<div id="' + ctrlid + '_prompt" class="promptcontent"><ul><li>' + msg + '</li></ul></div>';} else {msg = negligible ? msg : '<span style="font-style: normal;">' + msg + '</span>';msg = '<table cellspacing="0" cellpadding="0" class="popupcredit"><tr><td class="pc_l">&nbsp;</td><td class="pc_c"><div class="pc_inner">' + msg +(negligible ? '<a class="pc_btn" href="javascript:;" onclick="display(\'ntcwin\');setcookie(\'discuz_creditnoticedisable\', 1, 31536000);" title="不要再提示我"><img src="' + IMGDIR + '/popupcredit_btn.gif" alt="不要再提示我" /></a>' : '') +'</td><td class="pc_r">&nbsp;</td></tr></table>';}div.innerHTML = msg;}if(ctrlid) {if($(ctrlid).evt !== false) {var prompting = function() {showMenu({'mtype':'prompt','ctrlid':ctrlid,'evt':evt,'menuid':menuid,'pos':'210'});};if(evt == 'click') {$(ctrlid).onclick = prompting;} else {$(ctrlid).onmouseover = prompting;}}showMenu({'mtype':'prompt','ctrlid':ctrlid,'evt':evt,'menuid':menuid,'pos':'210','duration':duration,'timeout':timeout,'fade':1,'zindex':JSMENU['zIndex']['prompt']});$(ctrlid).unselectable = false;} else {showMenu({'mtype':'prompt','pos':'00','menuid':menuid,'duration':duration,'timeout':timeout,'fade':1,'zindex':JSMENU['zIndex']['prompt']});}}function showCreditPrompt() {var notice = getcookie('discuz_creditnotice').split('D');if(notice.length < 2 || notice[9] != discuz_uid || getcookie('discuz_creditnoticedisable')) {return;}var creditnames = creditnotice.split(',');var creditinfo = [];var s = '';var e;for(var i in creditnames) {e = creditnames[i].split('|');creditinfo[e[0]] = [e[1], e[2]];}for(i = 1; i <= 8; i++) {if(notice[i] != 0 && creditinfo[i]) {s += '<span>' + creditinfo[i][0] + (notice[i] > 0 ? '<em>+' : '<em class="desc">') + notice[i] + '</em>' + creditinfo[i][1] + '</span>';}}s && showPrompt(null, null, s, 2000, 1);setcookie('discuz_creditnotice', '', -2592000);}function showDialog(msg, mode, t, func, cover) {cover = isUndefined(cover) ? (mode == 'info' ? 0 : 1) : cover;mode = in_array(mode, ['confirm', 'notice', 'info']) ? mode : 'alert';var menuid = 'fwin_dialog';var menuObj = $(menuid);if(menuObj) hideMenu('fwin_dialog', 'dialog');menuObj = document.createElement('div');menuObj.style.display = 'none';menuObj.className = 'fwinmask';menuObj.id = menuid;$('append_parent').appendChild(menuObj);var s = '<table cellpadding="0" cellspacing="0" class="fwin"><tr><td class="t_l"></td><td class="t_c"></td><td class="t_r"></td></tr><tr><td class="m_l"></td><td class="m_c"><div class="fcontent' + (mode == 'info' ? '' : ' alert_win') + '"><h3 class="float_ctrl"><em>';s += t ? t : '提示信息';s += '</em><span><a href="javascript:;" class="float_close" onclick="hideMenu(\'' + menuid + '\', \'dialog\')" title="关闭">关闭</a></span></h3>';if(mode == 'info') {s += msg ? msg : '';} else {s += '<hr class="shadowline" />';s += '<div class="postbox"><div class="' + (mode == 'alert' ? 'alert_error' : 'alert_info') + '"><p>' + msg + '</p></div>';s += '<div class="alert_btn"><input type="button" id="fwin_dialog_submit" value="&nbsp;确定&nbsp;" />';s += mode == 'confirm' ? '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" onclick="hideMenu(\'' + menuid + '\', \'dialog\')" value="&nbsp;取消&nbsp;" />' : '';s += '</div></div>';}s += '</div></td><td class="m_r"></td></tr><tr><td class="b_l"></td><td class="b_c"></td><td class="b_r"></td></tr></table>';menuObj.innerHTML = s;if($('fwin_dialog_submit')) $('fwin_dialog_submit').onclick = function() {if(typeof func == 'function') func();else eval(func);hideMenu(menuid, 'dialog')};showMenu({'mtype':'dialog','menuid':menuid,'duration':3,'pos':'00','zindex':JSMENU['zIndex']['dialog'],'cache':0,'cover':cover});}function showWindow(k, url, mode, cache) {mode = isUndefined(mode) ? 'get' : mode;cache = isUndefined(cache) ? 1 : cache;var menuid = 'fwin_' + k;var menuObj = $(menuid);if(disallowfloat && disallowfloat.indexOf(k) != -1) {if(BROWSER.ie) url += (url.indexOf('?') != -1 ? '&' : '?') + 'referer=' + escape(location.href);location.href = url;return;}var fetchContent = function() {if(mode == 'get') {menuObj.url = url;url += (url.search(/\?/) > 0 ? '&' : '?') + 'infloat=yes&handlekey=' + k;ajaxget(url, 'fwin_content_' + k, null, '', '', function() {initMenu();show();});} else if(mode == 'post') {menuObj.act = $(url).action;ajaxpost(url, 'fwin_content_' + k, '', '', '', function() {initMenu();show();});}showDialog('', 'info', '<img src="' + IMGDIR + '/loading.gif"> 加载中...');};var initMenu = function() {var objs = menuObj.getElementsByTagName('*');for(var i = 0; i < objs.length; i++) {if(objs[i].id) {objs[i].setAttribute('fwin', k);}if(objs[i].className == 'float_ctrl') {if(!objs[i].id) objs[i].id = 'fctrl_' + k;drag = objs[i].id;}}};var show = function() {hideMenu('fwin_dialog', 'dialog');showMenu({'mtype':'win','menuid':menuid,'duration':3,'pos':'00','zindex':JSMENU['zIndex']['win'],'drag':typeof drag == 'undefined' ? '' : drag,'cache':cache});};if(!menuObj) {menuObj = document.createElement('div');menuObj.id = menuid;menuObj.className = 'fwinmask';menuObj.style.display = 'none';$('append_parent').appendChild(menuObj);menuObj.innerHTML = '<table cellpadding="0" cellspacing="0" class="fwin"><tr><td class="t_l"></td><td class="t_c"></td><td class="t_r"></td></tr><tr><td class="m_l"></td><td class="m_c" id="fwin_content_' + k + '">'+ '</td><td class="m_r"></td></tr><tr><td class="b_l"></td><td class="b_c"></td><td class="b_r"></td></tr></table>';fetchContent();} else if((mode == 'get' && url != menuObj.url) || (mode == 'post' && $(url).action != menuObj.act)) {fetchContent();} else {show();}doane();}function hideWindow(k) {hideMenu('fwin_' + k, 'win');hideMenu();hideMenu('', 'prompt');}function Ajax(recvType, waitId) {for(var stackId = 0; stackId < AJAX['stack'].length && AJAX['stack'][stackId] != 0; stackId++);AJAX['stack'][stackId] = 1;var aj = new Object();aj.loading = '加载中...';aj.recvType = recvType ? recvType : 'XML';aj.waitId = waitId ? $(waitId) : null;aj.resultHandle = null;aj.sendString = '';aj.targetUrl = '';aj.stackId = 0;aj.stackId = stackId;aj.setLoading = function(loading) {if(typeof loading !== 'undefined' && loading !== null) aj.loading = loading;};aj.setRecvType = function(recvtype) {aj.recvType = recvtype;};aj.setWaitId = function(waitid) {aj.waitId = typeof waitid == 'object' ? waitid : $(waitid);};aj.createXMLHttpRequest = function() {var request = false;if(window.XMLHttpRequest) {request = new XMLHttpRequest();if(request.overrideMimeType) {request.overrideMimeType('text/xml');}} else if(window.ActiveXObject) {var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0', 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP'];for(var i=0; i<versions.length; i++) {try {request = new ActiveXObject(versions[i]);if(request) {return request;}} catch(e) {}}}return request;};aj.XMLHttpRequest = aj.createXMLHttpRequest();aj.showLoading = function() {if(aj.waitId && (aj.XMLHttpRequest.readyState != 4 || aj.XMLHttpRequest.status != 200)) {aj.waitId.style.display = '';aj.waitId.innerHTML = '<span><img src="' + IMGDIR + '/loading.gif"> ' + aj.loading + '</span>';}};aj.processHandle = function() {if(aj.XMLHttpRequest.readyState == 4 && aj.XMLHttpRequest.status == 200) {for(k in AJAX['url']) {if(AJAX['url'][k] == aj.targetUrl) {AJAX['url'][k] = null;}}if(aj.waitId) {aj.waitId.style.display = 'none';}if(aj.recvType == 'HTML') {aj.resultHandle(aj.XMLHttpRequest.responseText, aj);} else if(aj.recvType == 'XML') {if(aj.XMLHttpRequest.responseXML.lastChild) {aj.resultHandle(aj.XMLHttpRequest.responseXML.lastChild.firstChild.nodeValue, aj);} else {if(AJAX['debug']) {var error = mb_cutstr(aj.XMLHttpRequest.responseText.replace(/\r?\n/g, '\\n').replace(/"/g, '\\\"'), 200);aj.resultHandle('<root>ajaxerror<script type="text/javascript" reload="1">showDialog(\'Ajax Error: \\n' + error + '\');</script></root>', aj);}}}AJAX['stack'][aj.stackId] = 0;}};aj.get = function(targetUrl, resultHandle) {setTimeout(function(){aj.showLoading()}, 250);if(in_array(targetUrl, AJAX['url'])) {return false;} else {AJAX['url'].push(targetUrl);}aj.targetUrl = targetUrl;aj.XMLHttpRequest.onreadystatechange = aj.processHandle;aj.resultHandle = resultHandle;var attackevasive = isUndefined(attackevasive) ? 0 : attackevasive;var delay = attackevasive & 1 ? (aj.stackId + 1) * 1001 : 100;if(window.XMLHttpRequest) {setTimeout(function(){aj.XMLHttpRequest.open('GET', aj.targetUrl);aj.XMLHttpRequest.send(null);}, delay);} else {setTimeout(function(){aj.XMLHttpRequest.open("GET", targetUrl, true);aj.XMLHttpRequest.send();}, delay);}};aj.post = function(targetUrl, sendString, resultHandle) {setTimeout(function(){aj.showLoading()}, 250);if(in_array(targetUrl, AJAX['url'])) {return false;} else {AJAX['url'].push(targetUrl);}aj.targetUrl = targetUrl;aj.sendString = sendString;aj.XMLHttpRequest.onreadystatechange = aj.processHandle;aj.resultHandle = resultHandle;aj.XMLHttpRequest.open('POST', targetUrl);aj.XMLHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');aj.XMLHttpRequest.send(aj.sendString);};return aj;}function newfunction(func){var args = [];for(var i=1; i<arguments.length; i++) args.push(arguments[i]);return function(event){doane(event);window[func].apply(window, args);return false;}}function evalscript(s) {if(s.indexOf('<script') == -1) return s;var p = /<script[^\>]*?>([^\x00]*?)<\/script>/ig;var arr = [];while(arr = p.exec(s)) {var p1 = /<script[^\>]*?src=\"([^\>]*?)\"[^\>]*?(reload=\"1\")?(?:charset=\"([\w\-]+?)\")?><\/script>/i;var arr1 = [];arr1 = p1.exec(arr[0]);if(arr1) {appendscript(arr1[1], '', arr1[2], arr1[3]);} else {p1 = /<script(.*?)>([^\x00]+?)<\/script>/i;arr1 = p1.exec(arr[0]);appendscript('', arr1[2], arr1[1].indexOf('reload=') != -1);}}return s;}function appendscript(src, text, reload, charset) {var id = hash(src + text);var evalscripts = [];if(!reload && in_array(id, evalscripts)) return;if(reload && $(id)) {$(id).parentNode.removeChild($(id));}evalscripts.push(id);var scriptNode = document.createElement("script");scriptNode.type = "text/javascript";scriptNode.id = id;scriptNode.charset = charset ? charset : (BROWSER.firefox ? document.characterSet : document.charset);try {if(src) {scriptNode.src = src;} else if(text){scriptNode.text = text;}$('append_parent').appendChild(scriptNode);} catch(e) {}}function stripscript(s) {return s.replace(/<script.*?>.*?<\/script>/ig, '');}function ajaxupdateevents(obj, tagName) {tagName = tagName ? tagName : 'A';var objs = obj.getElementsByTagName(tagName);for(k in objs) {var o = objs[k];ajaxupdateevent(o);}}function ajaxupdateevent(o) {if(typeof o == 'object' && o.getAttribute) {if(o.getAttribute('ajaxtarget')) {if(!o.id) o.id = Math.random();var ajaxevent = o.getAttribute('ajaxevent') ? o.getAttribute('ajaxevent') : 'click';var ajaxurl = o.getAttribute('ajaxurl') ? o.getAttribute('ajaxurl') : o.href;_attachEvent(o, ajaxevent, newfunction('ajaxget', ajaxurl, o.getAttribute('ajaxtarget'), o.getAttribute('ajaxwaitid'), o.getAttribute('ajaxloading'), o.getAttribute('ajaxdisplay')));if(o.getAttribute('ajaxfunc')) {o.getAttribute('ajaxfunc').match(/(\w+)\((.+?)\)/);_attachEvent(o, ajaxevent, newfunction(RegExp.$1, RegExp.$2));}}}}function ajaxget(url, showid, waitid, loading, display, recall) {waitid = typeof waitid == 'undefined' || waitid === null ? showid : waitid;var x = new Ajax();x.setLoading(loading);x.setWaitId(waitid);x.display = typeof display == 'undefined' || display == null ? '' : display;x.showId = $(showid);if(x.showId) x.showId.orgdisplay = typeof x.showId.orgdisplay === 'undefined' ? x.showId.style.display : x.showId.orgdisplay;if(url.substr(strlen(url) - 1) == '#') {url = url.substr(0, strlen(url) - 1);x.autogoto = 1;}var url = url + '&inajax=1&ajaxtarget=' + showid;x.get(url, function(s, x) {var evaled = false;if(s.indexOf('ajaxerror') != -1) {evalscript(s);evaled = true;}if(!evaled && (typeof ajaxerror == 'undefined' || !ajaxerror)) {if(x.showId) {x.showId.style.display = x.showId.orgdisplay;x.showId.style.display = x.display;x.showId.orgdisplay = x.showId.style.display;ajaxinnerhtml(x.showId, s);ajaxupdateevents(x.showId);if(x.autogoto) scroll(0, x.showId.offsetTop);}}ajaxerror = null;if(typeof recall == 'function') {recall();} else {eval(recall);}if(!evaled) evalscript(s);});}function ajaxpost(formid, showid, waitid, showidclass, submitbtn, recall) {var waitid = typeof waitid == 'undefined' || waitid === null ? showid : (waitid !== '' ? waitid : '');var showidclass = !showidclass ? '' : showidclass;var ajaxframeid = 'ajaxframe';var ajaxframe = $(ajaxframeid);var formtarget = $(formid).target;var handleResult = function() {var s = '';var evaled = false;showloading('none');try {if(BROWSER.ie) {s = $(ajaxframeid).contentWindow.document.XMLDocument.text;} else {s = $(ajaxframeid).contentWindow.document.documentElement.firstChild.nodeValue;}} catch(e) {if(AJAX['debug']) {var error = mb_cutstr($(ajaxframeid).contentWindow.document.body.innerText.replace(/\r?\n/g, '\\n').replace(/"/g, '\\\"'), 200);s = '<root>ajaxerror<script type="text/javascript" reload="1">showDialog(\'Ajax Error: \\n' + error + '\');</script></root>';}}if(s != '' && s.indexOf('ajaxerror') != -1) {evalscript(s);evaled = true;}if(showidclass) {$(showid).className = showidclass;if(submitbtn) {submitbtn.disabled = false;}}if(!evaled && (typeof ajaxerror == 'undefined' || !ajaxerror)) {ajaxinnerhtml($(showid), s);}ajaxerror = null;if($(formid)) $(formid).target = formtarget;if(typeof recall == 'function') {recall();} else {eval(recall);}if(!evaled) evalscript(s);ajaxframe.loading = 0;$('append_parent').removeChild(ajaxframe);};if(!ajaxframe) {if (BROWSER.ie) {ajaxframe = document.createElement('<iframe name="' + ajaxframeid + '" id="' + ajaxframeid + '"></iframe>');} else {ajaxframe = document.createElement('iframe');ajaxframe.name = ajaxframeid;ajaxframe.id = ajaxframeid;}ajaxframe.style.display = 'none';ajaxframe.loading = 1;$('append_parent').appendChild(ajaxframe);} else if(ajaxframe.loading) {return false;}_attachEvent(ajaxframe, 'load', handleResult);showloading();$(formid).target = ajaxframeid;$(formid).action += '&inajax=1';$(formid).submit();return false;}function ajaxmenu(ctrlObj, timeout, cache, duration, pos, recall) {var ctrlid = ctrlObj.id;if(!ctrlid) {ctrlid = ctrlObj.id = 'ajaxid_' + Math.random();}var menuid = ctrlid + '_menu';var menu = $(menuid);if(isUndefined(timeout)) timeout = 3000;if(isUndefined(cache)) cache = 1;if(isUndefined(pos)) pos = '43';if(isUndefined(duration)) duration = timeout > 0 ? 0 : 3;var func = function() {showMenu({'ctrlid':ctrlid,'duration':duration,'timeout':timeout,'pos':pos,'cache':cache,'layer':2});if(typeof recall == 'function') {recall();} else {eval(recall);}};if(menu) {if(menu.style.display == '') {hideMenu(menuid);} else {func();}} else {menu = document.createElement('div');menu.id = menuid;menu.style.display = 'none';menu.className = 'popupmenu_popup';menu.innerHTML = '<div class="popupmenu_option" id="' + menuid + '_content"></div>';$('append_parent').appendChild(menu);ajaxget(!isUndefined(ctrlObj.href) ? ctrlObj.href : ctrlObj.attributes['href'].value, menuid + '_content', 'ajaxwaitid', '', '', func);}}function hash(string, length) {var length = length ? length : 32;var start = 0;var i = 0;var result = '';filllen = length - string.length % length;for(i = 0; i < filllen; i++){string += "0";}while(start < string.length) {result = stringxor(result, string.substr(start, length));start += length;}return result;}function stringxor(s1, s2) {var s = '';var hash = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';var max = Math.max(s1.length, s2.length);for(var i=0; i<max; i++) {var k = s1.charCodeAt(i) ^ s2.charCodeAt(i);s += hash.charAt(k % 52);}return s;}function showloading(display, waiting) {var display = display ? display : 'block';var waiting = waiting ? waiting : '页面加载中...';$('ajaxwaitid').innerHTML = waiting;$('ajaxwaitid').style.display = display;}function ajaxinnerhtml(showid, s) {if(showid.tagName != 'TBODY') {showid.innerHTML = s;} else {while(showid.firstChild) {showid.firstChild.parentNode.removeChild(showid.firstChild);}var div1 = document.createElement('DIV');div1.id = showid.id+'_div';div1.innerHTML = '<table><tbody id="'+showid.id+'_tbody">'+s+'</tbody></table>';$('append_parent').appendChild(div1);var trs = div1.getElementsByTagName('TR');var l = trs.length;for(var i=0; i<l; i++) {showid.appendChild(trs[0]);}var inputs = div1.getElementsByTagName('INPUT');var l = inputs.length;for(var i=0; i<l; i++) {showid.appendChild(inputs[0]);}div1.parentNode.removeChild(div1);}}function AC_GetArgs(args, classid, mimeType) {var ret = new Object();ret.embedAttrs = new Object();ret.params = new Object();ret.objAttrs = new Object();for (var i = 0; i < args.length; i = i + 2){var currArg = args[i].toLowerCase();switch (currArg){case "classid":break;case "pluginspage":ret.embedAttrs[args[i]] = 'http://www.macromedia.com/go/getflashplayer';break;case "src":ret.embedAttrs[args[i]] = args[i+1];ret.params["movie"] = args[i+1];break;case "codebase":ret.objAttrs[args[i]] = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0';break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblclick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":case "id":ret.objAttrs[args[i]] = args[i+1];break;case "width":case "height":case "align":case "vspace": case "hspace":case "class":case "title":case "accesskey":case "name":case "tabindex":ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];break;default:ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];}}ret.objAttrs["classid"] = classid;if(mimeType) {ret.embedAttrs["type"] = mimeType;}return ret;}function AC_DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {var versionStr = -1;if(navigator.plugins != null && navigator.plugins.length > 0 && (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])) {var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;var descArray = flashDescription.split(" ");var tempArrayMajor = descArray[2].split(".");var versionMajor = tempArrayMajor[0];var versionMinor = tempArrayMajor[1];var versionRevision = descArray[3];if(versionRevision == "") {versionRevision = descArray[4];}if(versionRevision[0] == "d") {versionRevision = versionRevision.substring(1);} else if(versionRevision[0] == "r") {versionRevision = versionRevision.substring(1);if(versionRevision.indexOf("d") > 0) {versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));}}versionStr = versionMajor + "." + versionMinor + "." + versionRevision;} else if(BROWSER.ie && !BROWSER.opera) {try {var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");versionStr = axo.GetVariable("$version");} catch (e) {}}if(versionStr == -1 ) {return false;} else if(versionStr != 0) {if(BROWSER.ie && !BROWSER.opera) {tempArray = versionStr.split(" ");tempString = tempArray[1];versionArray = tempString.split(",");} else {versionArray = versionStr.split(".");}var versionMajor = versionArray[0];var versionMinor = versionArray[1];var versionRevision = versionArray[2];return versionMajor > parseFloat(reqMajorVer) || (versionMajor == parseFloat(reqMajorVer)) && (versionMinor > parseFloat(reqMinorVer) || versionMinor == parseFloat(reqMinorVer) && versionRevision >= parseFloat(reqRevision));}}function AC_FL_RunContent() {var str = '';if(AC_DetectFlashVer(9,0,124)) {var ret = AC_GetArgs(arguments, "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash");if(BROWSER.ie && !BROWSER.opera) {str += '<object ';for (var i in ret.objAttrs) {str += i + '="' + ret.objAttrs[i] + '" ';}str += '>';for (var i in ret.params) {str += '<param name="' + i + '" value="' + ret.params[i] + '" /> ';}str += '</object>';} else {str += '<embed ';for (var i in ret.embedAttrs) {str += i + '="' + ret.embedAttrs[i] + '" ';}str += '></embed>';}} else {str = '此内容需要 Adobe Flash Player 9.0.124 或更高版本<br /><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="下载 Flash Player" /></a>';}return str;}function simulateSelect(selectId) {var selectObj = $(selectId);var defaultopt = defaultv = '';var menuObj = document.createElement('div');var ul = document.createElement('ul');var handleKeyDown = function(e) {e = BROWSER.ie ? event : e;if(e.keyCode == 40 || e.keyCode == 38) doane(e);};for(var i = 0; i < selectObj.options.length; i++) {var li = document.createElement('li');li.innerHTML = selectObj.options[i].innerHTML;li.k_id = i;li.k_value = selectObj.options[i].value;if(selectObj.options[i].selected) {defaultopt = selectObj.options[i].innerHTML;defaultv = selectObj.options[i].value;li.className = 'current';selectObj.setAttribute('selecti', i);}li.onclick = function() {if($(selectId + '_ctrl').innerHTML != this.innerHTML) {var lis = menuObj.getElementsByTagName('li');lis[$(selectId).getAttribute('selecti')].className = '';this.className = 'current';$(selectId + '_ctrl').innerHTML = this.innerHTML;$(selectId).setAttribute('selecti', this.k_id);$(selectId).options.length = 0;$(selectId).options[0] = new Option('', this.k_value);eval(selectObj.getAttribute('change'));}hideMenu(menuObj.id);return false;};ul.appendChild(li);}selectObj.options.length = 0;selectObj.options[0]= new Option('', defaultv);selectObj.style.display = 'none';selectObj.outerHTML += '<a href="javascript:;" hidefocus="true" id="' + selectId + '_ctrl" tabindex="1">' + defaultopt + '</a>';menuObj.id = selectId + '_ctrl_menu';menuObj.className = 'select_menu';menuObj.style.display = 'none';menuObj.appendChild(ul);$('append_parent').appendChild(menuObj);$(selectId + '_ctrl').onclick = function(e) {$(selectId + '_ctrl_menu').style.width = (BROWSER.ie ? Math.max($(selectId + '_ctrl').clientWidth, parseInt($(selectId + '_ctrl').currentStyle.width)) : $(selectId + '_ctrl').clientWidth) + 'px';showMenu({'ctrlid':(selectId == 'loginfield' ? 'account' : selectId + '_ctrl'),'menuid':selectId + '_ctrl_menu','evt':'click','pos':'13'});doane(e);};$(selectId + '_ctrl').onfocus = menuObj.onfocus = function() {_attachEvent(document.body, 'keydown', handleKeyDown);};$(selectId + '_ctrl').onblur = menuObj.onblur = function() {_detachEvent(document.body, 'keydown', handleKeyDown);};$(selectId + '_ctrl').onkeyup = function(e) {e = e ? e : window.event;value = e.keyCode;if(value == 40 || value == 38) {if(menuObj.style.display == 'none') {$(selectId + '_ctrl').click();} else {lis = menuObj.getElementsByTagName('li');selecti = selectObj.getAttribute('selecti');lis[selecti].className = '';if(value == 40) {selecti = parseInt(selecti) + 1;} else if(value == 38) {selecti = parseInt(selecti) - 1;}if(selecti < 0) {selecti = lis.length - 1} else if(selecti > lis.length - 1) {selecti = 0;}lis[selecti].className = 'current';selectObj.setAttribute('selecti', selecti);lis[selecti].parentNode.scrollTop = lis[selecti].offsetTop;}} else if(value == 13) {var lis = menuObj.getElementsByTagName('li');lis[selectObj.getAttribute('selecti')].click();} else if(value == 27) {hideMenu(menuObj.id);}};}function detectCapsLock(e, obj) {var valueCapsLock = e.keyCode ? e.keyCode : e.which;var valueShift = e.shiftKey ? e.shiftKey : (valueCapsLock == 16 ? true : false);this.clearDetect = function () {obj.className = 'txt';};obj.className = (valueCapsLock >= 65 && valueCapsLock <= 90 && !valueShift || valueCapsLock >= 97 && valueCapsLock <= 122 && valueShift) ? 'capslock txt' : 'txt';if(BROWSER.ie) {event.srcElement.onblur = this.clearDetect;} else {e.target.onblur = this.clearDetect;}}function switchTab(prefix, current, total) {for(i = 1; i <= total;i++) {$(prefix + '_' + i).className = '';$(prefix + '_c_' + i).style.display = 'none';}$(prefix + '_' + current).className = 'current';$(prefix + '_c_' + current).style.display = '';}function keyPageScroll(e, prev, next, url, page) {e = e ? e : window.event;var tagname = BROWSER.ie ? e.srcElement.tagName : e.target.tagName;if(tagname == 'INPUT' || tagname == 'TEXTAREA') return;actualCode = e.keyCode ? e.keyCode : e.charCode;if(next && actualCode == 39) {window.location = url + '&page=' + (page + 1);}if(prev && actualCode == 37) {window.location = url + '&page=' + (page - 1);}}function showselect(obj, inpid, t, rettype) {if(!obj.id) {var t = !t ? 0 : t;var rettype = !rettype ? 0 : rettype;obj.id = 'calendarexp_' + Math.random();div = document.createElement('div');div.id = obj.id + '_menu';div.style.display = 'none';div.className = 'showselect_menu';$('append_parent').appendChild(div);s = '';if(!t) {s += showselect_row(inpid, '一天', 1, 0, rettype);s += showselect_row(inpid, '一周', 7, 0, rettype);s += showselect_row(inpid, '一个月', 30, 0, rettype);s += showselect_row(inpid, '三个月', 90, 0, rettype);s += showselect_row(inpid, '自定义', -2);} else {if($(t)) {var lis = $(t).getElementsByTagName('LI');for(i = 0;i < lis.length;i++) {s += '<a href="javascript:;" onclick="$(\'' + inpid + '\').value = this.innerHTML">' + lis[i].innerHTML + '</a><br />';}s += showselect_row(inpid, '自定义', -1);} else {s += '<a href="javascript:;" onclick="$(\'' + inpid + '\').value = \'0\'">永久</a><br />';s += showselect_row(inpid, '7 天', 7, 1, rettype);s += showselect_row(inpid, '14 天', 14, 1, rettype);s += showselect_row(inpid, '一个月', 30, 1, rettype);s += showselect_row(inpid, '三个月', 90, 1, rettype);s += showselect_row(inpid, '半年', 182, 1, rettype);s += showselect_row(inpid, '一年', 365, 1, rettype);s += showselect_row(inpid, '自定义', -1);}}$(div.id).innerHTML = s;}showMenu({'ctrlid':obj.id,'evt':'click'});if(BROWSER.ie && BROWSER.ie < 7) {doane(event);}}function showselect_row(inpid, s, v, notime, rettype) {if(v >= 0) {if(!rettype) {var notime = !notime ? 0 : 1;t = today.getTime();t += 86400000 * v;d = new Date();d.setTime(t);return '<a href="javascript:;" onclick="$(\'' + inpid + '\').value = \'' + d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + (!notime ? ' ' + d.getHours() + ':' + d.getMinutes() : '') + '\'">' + s + '</a><br />';} else {return '<a href="javascript:;" onclick="$(\'' + inpid + '\').value = \'' + v + '\'">' + s + '</a><br />';}} else if(v == -1) {return '<a href="javascript:;" onclick="$(\'' + inpid + '\').focus()">' + s + '</a><br />';} else if(v == -2) {return '<a href="javascript:;" onclick="$(\'' + inpid + '\').onclick()">' + s + '</a><br />';}}function showColorBox(ctrlid, layer, k) {if(!$(ctrlid + '_menu')) {var menu = document.createElement('div');menu.id = ctrlid + '_menu';menu.className = 'popupmenu_popup colorbox';menu.unselectable = true;menu.style.display = 'none';var coloroptions = ['Black', 'Sienna', 'DarkOliveGreen', 'DarkGreen', 'DarkSlateBlue', 'Navy', 'Indigo', 'DarkSlateGray', 'DarkRed', 'DarkOrange', 'Olive', 'Green', 'Teal', 'Blue', 'SlateGray', 'DimGray', 'Red', 'SandyBrown', 'YellowGreen','SeaGreen', 'MediumTurquoise','RoyalBlue', 'Purple', 'Gray', 'Magenta', 'Orange', 'Yellow', 'Lime', 'Cyan', 'DeepSkyBlue', 'DarkOrchid', 'Silver', 'Pink', 'Wheat', 'LemonChiffon', 'PaleGreen', 'PaleTurquoise', 'LightBlue', 'Plum', 'White'];var str = '';for(var i = 0; i < 40; i++) {str += '<input type="button" style="background-color: ' + coloroptions[i] + '" onclick="'+ (typeof wysiwyg == 'undefined' ? 'seditor_insertunit(\'' + k + '\', \'[color=' + coloroptions[i] + ']\', \'[/color]\')' : (ctrlid == editorid + '_cmd_table_param_4' ? '$(\'' + ctrlid + '\').value=\'' + coloroptions[i] + '\';hideMenu(2)' : 'discuzcode(\'forecolor\', \'' + coloroptions[i] + '\')'))+ '" title="' + coloroptions[i] + '" />' + (i < 39 && (i + 1) % 8 == 0 ? '<br />' : '');}menu.innerHTML = str;$('append_parent').appendChild(menu);}showMenu({'ctrlid':ctrlid,'evt':'click','layer':layer});}function announcement() {var ann = new Object();ann.anndelay = 3000;ann.annst = 0;ann.annstop = 0;ann.annrowcount = 0;ann.anncount = 0;ann.annlis = $('annbody').getElementsByTagName("LI");ann.annrows = new Array();ann.announcementScroll = function () {if(this.annstop) { this.annst = setTimeout(function () { ann.announcementScroll(); }, this.anndelay);return; }if(!this.annst) {var lasttop = -1;for(i = 0;i < this.annlis.length;i++) {if(lasttop != this.annlis[i].offsetTop) {if(lasttop == -1) lasttop = 0;this.annrows[this.annrowcount] = this.annlis[i].offsetTop - lasttop;this.annrowcount++;}lasttop = this.annlis[i].offsetTop;}if(this.annrows.length == 1) {$('ann').onmouseover = $('ann').onmouseout = null;} else {this.annrows[this.annrowcount] = this.annrows[1];$('annbodylis').innerHTML += $('annbodylis').innerHTML;this.annst = setTimeout(function () { ann.announcementScroll(); }, this.anndelay);$('ann').onmouseover = function () { ann.annstop = 1; };$('ann').onmouseout = function () { ann.annstop = 0; };}this.annrowcount = 1;return;}if(this.annrowcount >= this.annrows.length) {$('annbody').scrollTop = 0;this.annrowcount = 1;this.annst = setTimeout(function () { ann.announcementScroll(); }, this.anndelay);} else {this.anncount = 0;this.announcementScrollnext(this.annrows[this.annrowcount]);}};ann.announcementScrollnext = function (time) {$('annbody').scrollTop++;this.anncount++;if(this.anncount != time) {this.annst = setTimeout(function () { ann.announcementScrollnext(time); }, 10);} else {this.annrowcount++;this.annst = setTimeout(function () { ann.announcementScroll(); }, this.anndelay);}};ann.announcementScroll();}function removeindexheats() {return confirm('您确认要把此主题从热点主题中移除么?');}function smilies_show(id, smcols, seditorkey) {if(seditorkey && !$(seditorkey + 'smilies_menu')) {var div = document.createElement("div");div.id = seditorkey + 'smilies_menu';div.style.display = 'none';div.className = 'smilieslist';$('append_parent').appendChild(div);var div = document.createElement("div");div.id = id;div.style.overflow = 'hidden';$(seditorkey + 'smilies_menu').appendChild(div);}if(typeof smilies_type == 'undefined') {var scriptNode = document.createElement("script");scriptNode.type = "text/javascript";scriptNode.charset = charset ? charset : (BROWSER.firefox ? document.characterSet : document.charset);scriptNode.src = 'forumdata/cache/smilies_var.js?' + VERHASH;$('append_parent').appendChild(scriptNode);if(BROWSER.ie) {scriptNode.onreadystatechange = function() {smilies_onload(id, smcols, seditorkey);};} else {scriptNode.onload = function() {smilies_onload(id, smcols, seditorkey);};}} else {smilies_onload(id, smcols, seditorkey);}}function smilies_onload(id, smcols, seditorkey) {seditorkey = !seditorkey ? '' : seditorkey;smile = getcookie('smile').split('D');if(typeof smilies_type == 'object') {if(smile[0] && smilies_array[smile[0]]) {CURRENTSTYPE = smile[0];} else {for(i in smilies_array) {CURRENTSTYPE = i; break;}}smiliestype = '<div class="smiliesgroup"><ul>';for(i in smilies_type) {if(smilies_type[i][0]) {smiliestype += '<li><a href="javascript:;" hidefocus="true" ' + (CURRENTSTYPE == i ? 'class="current"' : '') + ' id="'+seditorkey+'stype_'+i+'" onclick="smilies_switch(\'' + id + '\', \'' + smcols + '\', '+i+', 1, \'' + seditorkey + '\');if(CURRENTSTYPE) {$(\''+seditorkey+'stype_\'+CURRENTSTYPE).className=\'\';}this.className=\'current\';CURRENTSTYPE='+i+';doane(event);">'+smilies_type[i][0]+'</a></li>';}}smiliestype += '</ul></div>';$(id).innerHTML = smiliestype + '<div id="' + id + '_data"></div><div class="smilieslist_page" id="' + id + '_page"></div>';smilies_switch(id, smcols, CURRENTSTYPE, smile[1], seditorkey);}}function smilies_switch(id, smcols, type, page, seditorkey) {page = page ? page : 1;if(!smilies_array[type] || !smilies_array[type][page]) return;setcookie('smile', type + 'D' + page, 31536000);smiliesdata = '<table id="' + id + '_table" cellpadding="0" cellspacing="0"><tr>';j = k = 0;img = [];for(i in smilies_array[type][page]) {if(j >= smcols) {smiliesdata += '<tr>';j = 0;}s = smilies_array[type][page][i];smilieimg = 'images/smilies/' + smilies_type[type][1] + '/' + s[2];img[k] = new Image();img[k].src = smilieimg;smiliesdata += s && s[0] ? '<td onmouseover="smilies_preview(\'' + seditorkey + '\', \'' + id + '\', this, ' + s[5] + ')" onclick="' + (typeof wysiwyg != 'undefined' ? 'insertSmiley(' + s[0] + ')': 'seditor_insertunit(\'' + seditorkey + '\', \'' + s[1].replace(/'/, '\\\'') + '\')') +'" id="' + seditorkey + 'smilie_' + s[0] + '_td"><img id="smilie_' + s[0] + '" width="' + s[3] +'" height="' + s[4] +'" src="' + smilieimg + '" alt="' + s[1] + '" />' : '<td>';j++;k++;}smiliesdata += '</table>';smiliespage = '';if(smilies_array[type].length > 2) {prevpage = ((prevpage = parseInt(page) - 1) < 1) ? smilies_array[type].length - 1 : prevpage;nextpage = ((nextpage = parseInt(page) + 1) == smilies_array[type].length) ? 1 : nextpage;smiliespage = '<div class="pags_act"><a href="javascript:;" onclick="smilies_switch(\'' + id + '\', \'' + smcols + '\', ' + type + ', ' + prevpage + ', \'' + seditorkey + '\');doane(event);">上页</a>' +'<a href="javascript:;" onclick="smilies_switch(\'' + id + '\', \'' + smcols + '\', ' + type + ', ' + nextpage + ', \'' + seditorkey + '\');doane(event);">下页</a></div>' +page + '/' + (smilies_array[type].length - 1);}$(id + '_data').innerHTML = smiliesdata;$(id + '_page').innerHTML = smiliespage;}function smilies_preview(seditorkey, id, obj, w) {var menu = $('smilies_preview');if(!menu) {menu = document.createElement('div');menu.id = 'smilies_preview';menu.className = 'smilies_preview';menu.style.display = 'none';$('append_parent').appendChild(menu);}menu.innerHTML = '<img width="' + w + '" src="' + obj.childNodes[0].src + '" />';mpos = fetchOffset($(id + '_data'));spos = fetchOffset(obj);pos = spos['left'] >= mpos['left'] + $(id + '_data').offsetWidth / 2 ? '13' : '24';showMenu({'ctrlid':obj.id,'showid':id + '_data','menuid':menu.id,'pos':pos,'layer':3});}function seditor_ctlent(event, script) {if(event.ctrlKey && event.keyCode == 13 || event.altKey && event.keyCode == 83) {eval(script);}}function seditor_insertunit(key, text, textend, moveend) {$(key + 'message').focus();textend = isUndefined(textend) ? '' : textend;moveend = isUndefined(textend) ? 0 : moveend;startlen = strlen(text);endlen = strlen(textend);if(!isUndefined($(key + 'message').selectionStart)) {var opn = $(key + 'message').selectionStart + 0;if(textend != '') {text = text + $(key + 'message').value.substring($(key + 'message').selectionStart, $(key + 'message').selectionEnd) + textend;}$(key + 'message').value = $(key + 'message').value.substr(0, $(key + 'message').selectionStart) + text + $(key + 'message').value.substr($(key + 'message').selectionEnd);if(!moveend) {$(key + 'message').selectionStart = opn + strlen(text) - endlen;$(key + 'message').selectionEnd = opn + strlen(text) - endlen;}} else if(document.selection && document.selection.createRange) {var sel = document.selection.createRange();if(textend != '') {text = text + sel.text + textend;}sel.text = text.replace(/\r?\n/g, '\r\n');if(!moveend) {sel.moveStart('character', -endlen);sel.moveEnd('character', -endlen);}sel.select();} else {$(key + 'message').value += text;}hideMenu(2);if(BROWSER.ie) {doane();}}function parseurl(str, mode, parsecode) {if(isUndefined(parsecode)) parsecode = true;if(parsecode) str= str.replace(/\s*\[code\]([\s\S]+?)\[\/code\]\s*/ig, function($1, $2) {return codetag($2);});str = str.replace(/([^>=\]"'\/]|^)((((https?|ftp):\/\/)|www\.)([\w\-]+\.)*[\w\-\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!]*)+\.(jpg|gif|png|bmp))/ig, mode == 'html' ? '$1<img src="$2" border="0">' : '$1[img]$2[/img]');str = str.replace(/([^>=\]"'\/@]|^)((((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k|thunder|synacast):\/\/))([\w\-]+\.)*[:\.@\-\w\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!#]*)*)/ig, mode == 'html' ? '$1<a href="$2" target="_blank">$2</a>' : '$1[url]$2[/url]');str = str.replace(/([^\w>=\]"'\/@]|^)((www\.)([\w\-]+\.)*[:\.@\-\w\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!#]*)*)/ig, mode == 'html' ? '$1<a href="$2" target="_blank">$2</a>' : '$1[url]$2[/url]');str = str.replace(/([^\w->=\]:"'\.\/]|^)(([\-\.\w]+@[\.\-\w]+(\.\w+)+))/ig, mode == 'html' ? '$1<a href="mailto:$2">$2</a>' : '$1[email]$2[/email]');if(parsecode) {for(var i = 0; i <= DISCUZCODE['num']; i++) {str = str.replace("[\tDISCUZ_CODE_" + i + "\t]", DISCUZCODE['html'][i]);}}return str;}function codetag(text) {DISCUZCODE['num']++;if(typeof wysiwyg != 'undefined' && wysiwyg) text = text.replace(/<br[^\>]*>/ig, '\n').replace(/<(\/|)[A-Za-z].*?>/ig, '');DISCUZCODE['html'][DISCUZCODE['num']] = '[code]' + text + '[/code]';return '[\tDISCUZ_CODE_' + DISCUZCODE['num'] + '\t]';}function pmchecknew() {ajaxget('pm.php?checknewpm=' + Math.random(), 'myprompt_check', 'ajaxwaitid');}function showimmestatus(imme) {var lang = {'Online':'MSN 在线','Busy':'MSN 忙碌','Away':'MSN 离开','Offline':'MSN 脱机'};$('imme_status_' + imme.id.substr(0, imme.id.indexOf('@'))).innerHTML = lang[imme.statusText];}if(typeof IN_ADMINCP == 'undefined') {if(discuz_uid && !getcookie('checkpm')) {_attachEvent(window, 'load', pmchecknew, document);}if(creditnotice != '' && getcookie('discuz_creditnotice') && !getcookie('discuz_creditnoticedisable')) {_attachEvent(window, 'load', showCreditPrompt, document);}}if(BROWSER.ie) {document.documentElement.addBehavior("#default#userdata");}
\ No newline at end of file
*{word-wrap:break-word;}html,body{border:0 !important;}body{background:#EBEBEB url("/images/common/bodybg.gif") repeat-x 0 90px;text-align:center;}body,td,input,textarea,select,button{color:#444;font:12px/1.6em Verdana,Helvetica,Arial,sans-serif;}input,select,button{vertical-align:middle;}textarea{resize:none;}body,ul,li,dl,dd,p,h1,h2,h3,h4,h5,h6,form,fieldset{margin:0;padding:0;}h1,h2,h3,h4,h5,h6{font-size:1em;}ul li{list-style:none;}a{text-decoration:none;color:#000;}a:hover{text-decoration:underline;}.lightlink,.lightlink a{color:#09C;}a img{border:none;}em,cite,strong,th{text-align:left;font-style:normal;}.emfont{color:#F60;}table{empty-cells:show;border-collapse:collapse;}th{font-weight:400;}.txt,.txtarea{padding:2px;*padding:0 2px;height:16px;*height:20px;border:1px solid;border-color:#999 #CCC #CCC #999;background:#FFF;}.txtarea{height:auto;}.checkbox,.radio{margin:0;width:15px;}.pipe{margin:0 5px;}.lighttxt,.lighttxt a,.pipe{color:#999;}.smalltext{font-size:0.83em;font-family:Verdana,Helvetica,Arial,sans-serif;}.noborder,.noborder td{border:none !important;}.nobg{background:none !important;}.right{float:right;}.left{float:left;}.onerror,.onright{clear:both;padding:2px 2px 2px 22px;background:url(/images/check_error.gif) no-repeat 2px 2px;}.onright{background:url(/images/check_right.gif) no-repeat 2px 2px;}.notice{clear:both;margin:5px 0;padding:3px 5px 3px 20px;background:url(/images/common/notice.gif) no-repeat 2px 6px;}.nodata{margin:99px auto;text-align:center;color:#999;font-size:16px;font-weight:700;}#ajaxwaitid{display:none;position:absolute;z-index:100;top:0;right:0;width:100px;height:1.6em;background:#D00;line-height:1.6em;color:#FFF;overflow:hidden;}#checksecanswer img,#checksecanswer3 img,#checkseccodeverify img,#checkseccodeverify3 img,.warning img{vertical-align:middle;}.s_clear:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.s_clear{zoom:1;}hr{clear:both;margin:1em 0;border:0 solid #E6E7E1;background:transparent;}.solidline{border-top:1px solid #FFF;border-bottom-width:1px;}.dashline{height:0px;border-bottom-width:1px;border-style:dashed;}.shadowline{*margin:2px 0;border-width:1px 0;border-top-color:#C8DCEC;border-bottom-color:#FFF;}.side .shadowline{margin:5px 0;*margin:2px 0;}.cornerlayger{padding:6px 8px;border:1px solid #09C;background:#EBF2F8;line-height:1.6em;}.minicorner{margin-top:-1px;height:6px;background:url(/images/common/attachinfobg.gif) no-repeat 50% 0;}.wrap{text-align:left;margin:0 auto;}#wrap{padding-bottom:10px;min-height:450px;border:0 solid #00B2E8;background-color:#FFF;clear:both;}* html #wrap{height:450px;}.wrap,#nav{width:1024px;}#header{margin-bottom:8px;min-width:1024px;width:100%;border-bottom:1px solid #00B2E8;background:#00A2D2 url("/images/common/header.gif") repeat-x 0 100%;}#header .wrap{position:relative;padding:24px 0 22px;}#header h2{float:left;}#umenu{position:absolute;right:0;top:0;line-height:20px;}#umenu a{margin:0 6px;}#umenu cite{font-weight:700;}#umenu cite span a{margin:0;font-weight:400;}#myprompt.new{padding-left:22px;background:url(/images/common/notice_newpm.gif) no-repeat 0 50%;}#myprompt_menu a.new{color:#F60;}#myprompt_menu li{float:left;width:50%;}.promptmenu{margin-left:-27px;padding-top:10px;width:250px;background:transparent url(/images/common/pm_ntc.gif) no-repeat 0 0;text-align:left;opacity:0.98;}.promptcontent{padding-bottom:10px;background:transparent url(/images/common/pm_ntc.gif) no-repeat -250px 100%;}.promptmenu ul{padding:0 10px;border:solid #91C8E2;border-width:0 2px;background:#FEFEFE;}.promptmenu li{border-bottom:1px solid #F4F4F4;line-height:29px;display:block;width:100%;color:#999;overflow:hidden;text-overflow:ellipsis;-webkit-text-overflow:ellipsis;-moz-text-overflow:ellipsis;-o-text-overflow:ellipsis;}.promptmenu a:hover{text-decoration:none;color:#09C;}.up{padding-top:0;padding-bottom:10px;width:150px;background-position:-500px 100%;}.up .promptcontent{padding-top:5px;padding-bottom:0;background-position:-650px 0;}.up li{border-bottom:none;line-height:160%;}#uchome_ntc{padding:1px 10px 3px 15px;*padding:2px 10px 2px 15px;background:url(/images/common/notify_bg_m.gif) no-repeat 0 50%;color:#FFF !important;}#uchome_ntc a{margin:0;}#umenu,#umenu a,#umenu .pipe{color:#97F2FF;}#footer{padding:1em 0;}#rightinfo{float:left;}#footlink{float:right;text-align:right;}#footer,#footer a{color:#8691A2;}.content{padding:20px 25px;}.content h1{margin-bottom:10px;font-size:16px;font-weight:400;}#menu{position:absolute;right:0;bottom:0;_bottom:-2px;height:26px;}#menu li{display:inline;float:left;margin-left:5px;;}#menu a{float:left;padding:0 14px;height:25px;border:solid #B0E4EF;border-width:1px 1px 0;background:transparent none;line-height:25px;color:#FFF;text-decoration:none;overflow:hidden;}#menu a.dropmenu{padding-right:20px;background-image:url(/images/common/arrow_down.gif);background-repeat:no-repeat;background-position:95% 50%;}#menu a:hover{border-color:#00B2E8;background-color:;color:#333;}#menu li.current a{height:26px;border-color:#00B2E8;background-color:;color:#333;}#nav{margin:-8px auto 0;background:url(/images/common/icon_nav.gif) no-repeat 0 50%;text-align:left;text-indent:25px;line-height:3em;}#nav,#nav a{color:#333;}.mainbox table{width:100%;}.blocktitle{margin-bottom:0.5em;font-size:16px;font-weight:700;}.channelinfo{clear:both;margin:5px 0;color:#666;}.channelinfo img{vertical-align:middle;}.channelinfo .onerror{* background-position:2px 0;}.pages_btns{padding:5px 0 1em;line-height:30px;}.pages,.pageback{float:right;padding:2px 0;}.pages a,.pages strong,.pageback a{float:left;padding:0 6px;margin-right:2px;height:26px;border:1px solid;line-height:26px;overflow:hidden;}.pages a,.pageback a{border-color:#E6E7E1;background-color:#FFF;color:#09C;}.pages a:hover,.pageback a:hover{text-decoration:none;}.pages strong{border-color:#09C;background-color:#09C;color:#FFF;font-weight:700;}.pages a.prev,.pages a.next{background-repeat:no-repeat;}.pages a.prev{background-image:url(/images/common/arrow_left.gif);background-position:30% 50%;padding:0;width:22px;overflow:hidden;text-indent:-9999px;}.pages a.next{padding-right:16px;background-image:url(/images/common/arrow_right.gif);background-position:90% 50%;}.pageback a{padding-left:16px;background:#FFF url(/images/common/arrow_left.gif) no-repeat 0 50%;}.pages a:hover,.pageback a,.pages a.next{border-color:#09C;}.formtable{width:100%;}.formtable th{padding:5px 2px;width:100px;}.formtable th a{font-weight:400;color:#09C;text-decoration:underline;}.formtable td{padding:5px 2px;}.formtable .sep_space th{height:40px;}.formtable .txt{width:270px;}.formtable .txtarea{float:left;margin:-1px 8px 0 0;width:270px;height:60px;border-top-color:#CCC;}.float_typeid{float:left;margin-right:6px;}.float_typeid select{float:left;height:20px;}.float_typeid a{display:block;overflow:hidden;padding:0 17px 0 4px;width:73px;height:20px;text-decoration:none !important;color:#444 !important;border:1px solid;border-color:#999 #CCC #CCC #999;background:#FFF url(/images/common/newarow.gif) no-repeat 100% 0;}* html .float_typeid a{height:18px;padding-top:2px;}.float_typeid a:hover,.float_typeid a:focus{border:1px solid #09C;background-position:100% -20px;}.float_typeid select{width:94px;}.short_select a{width:39px;}.short_select select{width:60px;}.select_menu{border:1px solid #09C;background:#FFF url(/images/common/newarow.gif) no-repeat 100% -20px;text-align:left;}.select_menu ul{margin:0 4px;}.select_menu li{color:#444;cursor:pointer;}.select_menu li:hover{color:#09C;}.select_menu li.current{color:#F60;}.commonlist li{margin:4px 0;}.inlinelist li{float:left;width:33%;}.inlinelist li.wide{width:49.5%;}.datalist{zoom:1;}.datalist table{margin-bottom:30px;width:100%;border:1px solid #E6E7E1;}.datalist th,.datalist td{padding:4px 5px;border:1px solid #E6E7E1;font-weight:400;}.datalist th img{vertical-align:top;}.datalist table .stat_subject{border-right:none;}.datalist table .stat_num{padding-right:15px;text-align:right;border-left:none;}.datalist .datatable{margin-bottom:10px;}.datalist .datatable,.datalist .datatable th,.datalist .datatable td{border-width:1px 0;}.datalist .fixtable{table-layout:fixed;}.colplural,.colplural th,.colplural td,th.highlight,td.highlight{background-color:#F5F5F5;}.avt_list li{float:left;margin-right:9px;width:64px;height:54px;text-align:center;}.side .avt_list li{margin:0;width:33.3%}.postmessage .avt_list li{height:70px;}.avt_uname li{height:80px;}.avt_list img{display:block;margin:0 auto;}.avt_list p{width:96%;white-space:nowrap;overflow:hidden;}.avt_list .cornerlayger p{white-space:normal;text-align:left;}.avt_list .minicorner{background:url(/images/common/attachinfobg.gif) no-repeat -30px 0;}.avt_title{margin:8px;}.list{border-top:3px solid #E6E7E1;}.content .list h3{padding-left:6px;color:#666;line-height:35px;}.list td,.list th{height:50px;padding:6px 0;border-top:1px dashed #E6E7E1;color:#666;}.list th{background:url(/images/common/forum.gif) 5px 10px no-repeat;padding-left:45px !important;}.narrowlist th{vertical-align:top;}.list th.new{background-image:url(/images/common/forum_new.gif);}.list th h2 em{font-weight:400;}.list th h2 em strong{color:#F60}.feed{margin-bottom:10px;}.feed h3{margin:10px 0 10px 30px;font-size:14px;color:#999;}.feed a{color:#09C;}.feed li{border-bottom:1px dashed #E6E7E1;}.feed div{padding:10px 30px;background:url(/images/common/alert.gif) no-repeat 0 12px;position:relative;}.feed div div{padding:0;background:none;}.feed .f_icon{background:none;}.feed .apptype{position:absolute;float:left;display:inline;margin:3px 0 0 -30px;}.feed .f_thread{background-image:url(/images/common/folder_new.gif);}.feed .f_reply{background-image:url(/images/topic/fastreply.gif);}.feed .f_quote{background-image:url(/images/topic/repquote.gif);}.feed .f_buddy{background-image:url(/images/common/user_link.gif);}.feed .f_pin{background-image:url(/images/common/pin_1.gif);background-position:0 9px;}.feed .f_digest{background-image:url(/images/common/digest_1.gif);}.feed .f_rate{background-image:url(/images/common/agree.gif);}.feed .f_manage{background-image:url(/images/common/icon_manage.gif);}.feed .f_magic{background-image:url(/images/common/magic.gif);}.feed .f_trade{background-image:url(/images/common/tradesmall.gif);}.feed .f_activity{background-image:url(/images/common/activitysmall.gif);}.feed .f_reward{background-image:url(/images/common/rewardsmall.gif);}.feed .f_task{background-image:url(/images/common/icon_task.gif);background-position:0 14px;}.feed .f_credit{background-image:url(/images/common/viewpay.gif);}.feed dfn{position:absolute;right:0;top:14px;*top:12px;font-style:normal;}.feed dfn .deloption{float:right;margin:0;}.feed em,.feed em a,.feed .summary{color:#999;}.feed .summary{margin:12px 2em 6px;}.feed dt{float:left;color:#444;}.feed dd{margin-bottom:6px;}.feed .il{margin-left:2em;white-space:nowrap;}a.to{padding-right:1em;background:url(/images/common/arrow_right.gif) no-repeat 100% 50%;}.feed i{margin:0 5px;color:#999;}.f_thumb{margin:5px 0;}.f_thumb img{margin-right:4px;padding:2px;max-width:100px;max-height:70px;border:1px solid #E6E7E1}* html .f_thumb img{width:100px;height:70px;}.feed fieldset{margin:10px 0;padding:0 0 0 20px;border:none;background:url(/images/common/icon_quote_m_s.gif) no-repeat 0 0;}.feed ins{margin:0;padding:0 20px 0 0;display:inline;background:url(/images/common/icon_quote_m_e.gif) no-repeat 100% 100%;line-height:1.6em;color:#999;text-decoration:none;}.folder{width:25px;text-align:center;}td.icon{width:20px;text-align:center;}.icon .solved{filter:alpha(opacity=30);opacity:0.3;}.subject label{float:right;}.threadlist th a:hover,.subject a:hover{color:#09C;}.datatable .subject{padding:8px 5px;}.threadpages{white-space:nowrap;}.threadpages a{padding:2px 4px;color:#444;}.threadpages a:hover{background-color:#EBF2F8;}.forum,.author,.lastpost{width:110px;}.lastpost,.lastpost cite,.lastpost em{text-align:right;}.author cite,.lastpost cite{display:block;margin-bottom:-5px;width:105px;height:1.6em;overflow:hidden;}thead .lastpost cite{margin-bottom:0;}.author em,.lastpost em,.lastpost em a{font-size:9px;font-family:Arial,sans-serif;color:#999;}.lastpost cite,.lastpost em{display:block;margin-right:5px;}.nums{width:80px;color:#999;text-align:center;}thead .nums{color:#444;}.nums strong{padding-right:2px;color:#09C;font-weight:400;}.nums em{padding-left:2px;color:#444;}.forumnums{width:90px;padding-right:10px !important;color:#999;text-align:center;}.forumnums em{color:#09C;}.forumlast{width:225px;text-align:left;}.num{width:120px;text-align:center;color:red;}.threadlist td{padding:0 !important;}.threadlist .colplural th,.threadlist .colplural td{padding:7px 0 !important;background:#EBF2F8;}.threadlist .colplural th{padding:7px 5px !important;}.threadlist .colplural a{color:#09C;font-family:Tahoma,sans-serif;}.threadlist .colplural a:hover{text-decoration:underline;}.threadlist .colplural .order_active{padding-right:8px;background:url(/images/common/order.gif) no-repeat 100% 50%;}.itemfilter{line-height:18px;}.itemfilter *{float:left;height:18px;overflow:hidden;}.itemfilter li{margin-right:5px;}.itemfilter .current a{margin-right:2px;background:url(/images/common/btn_block.gif) no-repeat 0 -161px;}.itemfilter .current a:hover{text-decoration:none;}.itemfilter span{cursor:pointer;}.itemfilter .current span{padding:0 5px;background:url(/images/common/btn_block.gif) no-repeat 100% -179px;color:#FFF;}.threadlist th em{margin-right:4px;}.threadlist th em,.threadlist th em a{color:#09C;}.threadlist th .attach{vertical-align:middle;}* html .threadlist th .attach{vertical-align:baseline;}.threadlist th a{text-decoration:none;}.dropmenu{padding-right:15px;background:url(/images/common/arrow_down.gif) 100% 50% no-repeat;cursor:pointer;}.popupmenu_popup{overflow:hidden;padding:10px;text-align:left;border:1px solid #CBD8E4;background:#FEFEFE;}.popupmenu_popup li{margin:3px 0;line-height:20px;}.headermenu_popup{width:100px;}.headermenu_popup li{width:100px;border-bottom:1px solid #E6E7E1;}.headermenu_popup a:hover{text-decoration:none;color:#09C;}.headermenu_popup .active{font-weight:700;}.titlemenu_popup{padding:0;}.titlemenu_popup li{margin:0;}.titlemenu_popup a{display:block;padding:3px 8px;}* html .titlemenu_popup a{display:inline-block;}.titlemenu_popup .current a{background:#F1F5FA;}.filter_popup{width:5em;}.filter_popup li{width:60px;}.showselect_menu{margin-bottom:0.8em;padding:5px;text-align:left;border:1px solid #CBD8E4;background:#FEFEFE;}.headactions .popupmenu_popup a,.headactions .popupmenu_popup strong{color:#666;background:none;white-space:nowrap;}.headactions .popupmenu_popup{overflow:visible;}.hasdropdownbtn{}.hasdropdownbtn input{float:left;width:129px;}.hasdropdownbtn .spmediuminput{width:115px;}.dropdownbtn{float:left;overflow:hidden;text-indent:-9999px;width:20px;height:20px;border-width:1px 1px 1px 0;border-style:solid;border-color:#999 #CCC #CCC #999;background:#FFF url(/images/common/newarow.gif) no-repeat 0 0;}.dropdownbtn:hover{background-position:0 -20px;}#style_switch{position:absolute;right:0px;bottom:-25px;}#style_switch li{float:left;padding-left:5px;}#style_switch a{float:left;width:8px;height:8px;border:1px solid #DDD;background:#FFF;line-height:100px;overflow:hidden;}#style_switch a:hover,#style_switch .current a{border-color:#FFF;}#style_switch .current a{margin-top:-1px;border-width:2px;}#ad_headerbanner{float:right;margin:5px 0 10px;}.ad_text{margin:0 auto 5px;padding:10px 0;width:1024px;background:#FFF;}.ad_text table{width:100%;}.ad_text td{padding:3px 20px;text-align:left;}.ad_textlink1,.ad_textlink2{margin:10px 0;padding-left:20px;background:url(/images/common/icon_ad.gif) no-repeat 0 50%;}.ad_pip{clear:right;float:right;padding:10px;background:#FFF;color:#999;line-height:130%;}.ad_pip li{margin-bottom:1em;}.ad_pip a{color:#09C;}.ad_topicrelated{clear:both;float:right;display:inline;margin:0 10px 10px;padding:10px 10px 10px 30px;border:1px solid #78A73D;background:#CAEEC0;}.ad_column{text-align:center;}.ad_footerbanner{text-align:center;clear:both;margin:5px;}.ad_float_left,.ad_float_right{float:right;position:fixed;top:350px;z-index:300;}* html .ad_float_left,* html .ad_float_right{position:absolute;top:expression(offsetParent.scrollTop+350);}.ad_float_left{left:5px;}.ad_float_right{right:5px;}.ad_couplebanner{top:5px}* html .ad_couplebanner{top:expression(offsetParent.scrollTop+5);}.headactions{float:right;line-height:1em;padding:12px 0 0;}.headactions img{vertical-align:middle;cursor:pointer;padding:0 5px;}.headactions a{margin-left:4px;}.mainbox .headactions{color:#999;}.mainbox .headactions strong{font-weight:700;}.msgfix{overflow:hidden;}.side{width:170px;}.postauthor .avatar img{background:url(/images/common/midavt_shadow.gif) repeat-x scroll 0 100% #FFFFFF;padding:5px 5px 8px;max-height:160px;max-width:130px;}.sideinner .txt{margin:6px 0;}.side li.current a{font-weight:700;color:#444;text-decoration:none;}.with_side{background:#FFF url("/images/common/sidebg.gif") repeat-y 100% 0;}.with_side .main{float:left;overflow:hidden;margin-left:-180px;width:100%;}.with_side .content{margin-left:180px;width:auto;}.with_side .side{float:right;padding-bottom:20px;width:180px;}.with_side .side h2{margin:20px 25px 10px;color:#999;font-size:14px;}.with_side .side a{color:#09C;text-decoration:underline;}.sideinner{padding:0 25px;}.sideinner .tabs{margin:5px 0;}.sideinner .tabs li{line-height:2em;}.numbg{float:right;text-align:center;width:35px;height:2em;background:url(/images/common/numbg.gif) no-repeat 0 50%;color:#FFF;font-weight:700;}.special{background:none;}.special .main{float:right;}.special .side{float:left;}.sidebox{overflow:hidden;margin:5px 10px 10px;}.sidebox h4{margin-bottom:4px;color:#09C;}.fwinmask{}.fwin{overflow-x:hidden;margin:0 auto;text-align:left;}.t_l,.t_c,.t_r,.m_l,.m_r,.b_l,.b_c,.b_r{overflow:hidden;opacity:0.9;filter:alpha(opacity=90);background:#CBD8E4;}.t_l,.t_r,.b_l,.b_r{width:8px;height:8px;}.t_c,.b_c{height:8px;}.m_l,.m_r{width:8px;}.m_c{background:#F1F5FA;}.fcontent{margin:15px;}.float_ctrl{margin-bottom:15px;height:20px;line-height:20px;}.float_ctrl em{float:left;font-size:14px;font-weight:700;color:#09C;}.float_ctrl em a{text-decoration:none;}.float_ctrl .needverify{margin-left:8px;padding-left:13px;width:45px;height:21px;line-height:21px;background:url(/images/common/re_unsolved.gif) no-repeat 0 0;font-size:12px;color:#666;font-weight:400;}.float_ctrl .onerror,.float_ctrl .onright{white-space:nowrap;height:auto;line-height:140%;color:#444;font-size:12px;font-weight:400;}.float_ctrl span{float:right;color:#999;}.float_ctrl span a,.float_ctrl strong{float:left;text-decoration:none;margin-left:8px;font-weight:400;color:#444;}.float_ctrl span a:hover{color:#999;}.float_close{float:left;width:20px;height:20px;overflow:hidden;text-indent:-9999px;background:url(/images/common/newclose.gif) no-repeat 0 0;}.float_close:hover{background-position:0 -20px;}.floatwrap{overflow:auto;overflow-x:hidden;margin-bottom:10px;height:280px;}.fcontent li{list-style:none;}.fcontent a{color:#09C;text-decoration:underline;}.fcontent .list{margin:0 auto;width:570px;border-top:3px solid #E6E7E1;border-bottom:3px solid #E6E7E1;}.fcontent .list th,.fcontent .list td{padding:3px !important;height:auto;border-bottom:1px dashed #E6E7E1;}.fcontent .list .btns th,.fcontent .list .btns td{border-bottom:none;}.fcontent .list th{width:150px;background:none;}.postbox{clear:both;}.moreconf{margin-top:10px;}.moreconf button,.moreconf a{margin-right:3px;}.loginform{float:left;margin-bottom:10px;*margin-bottom:-10px;padding:20px 0;width:280px;border-right:1px solid #D3E8F2;}.regsec{margin-bottom:10px;}.channelinfo .onerror,.channelinfo .onright{background-position:2px 0;}.loginform label{clear:both;overflow:hidden;display:block;margin:0 0 10px;line-height:22px;}.loginform .txt{width:170px;}.loginform select{width:175px;}.fsubmit{clear:both;margin-top:8px;}.fsubmit .submit{margin-right:8px;}.loginform label em,.fsubmit em{float:left;width:60px;}.fsubmit .regpre{*margin-top:4px;}.nolabelform .txt{width:230px;}.clause{overflow:auto;margin-bottom:10px;width:470px;height:240px;}.selectinput{float:none;margin:0 0 10px;width:234px;height:20px;background-color:#FFF;border:1px solid;border-color:#999 #CCC #CCC #999;}.selectinput a{float:left;padding-right:0;width:61px;border:none;}.selectinput a:hover,.selectinput a:focus{border:none;}.selectinput .txt{float:left;width:160px;border:none;}.selecttype{float:none;margin:10px 0;clear:both;}.selecttype a,.selecttype a:hover,.selecttype a:focus{padding-right:0;width:230px;background-color:transparent;border-color:#F1F5FA;color:#999 !important;}.loginpsw label{float:left;padding-left:4px;width:61px;line-height:150%;}.capslock{background:url(/images/common/capslock.gif) no-repeat 98% 50%;}.logininfo{float:left;overflow:visible;margin:87px 25px 10px 40px;}.logininfo h4{margin-bottom:10px;font-weight:400;font-size:14px;}.multinfo{margin-top:53px;}.switchnav{float:left;white-space:nowrap;overflow:hidden;width:480px;}.postboardlist{overflow:hidden;margin:9px 0;width:597px;border-width:1px 0 1px 1px;border-style:solid;border-color:#CBD8E4;background:#FFF;}.postboardlist li{float:left;overflow-x:hidden;overflow-y:auto;padding:5px;width:188px;height:300px;border-right:1px solid #CBD8E4;}.postboardlist p{height:25px;line-height:25px;}.postboardlist a{display:block;white-space:nowrap;overflow:hidden;padding:0 4px;text-decoration:none;color:#444;}.postboardlist a:hover{text-decoration:none;background-color:#F5F5F5;}.postboardlist .highlightlink{color:#09C;}.hassubboard{background:url(/images/common/arrow_right.gif) right center no-repeat;}.pbl_selected a,.pbl_selected a:hover{background-color:#09C;color:#FFF !important;font-weight:700;}.nofloat{height:auto !important;height:410px;min-height:410px;background-color:#EBF2F8;}.nofloat .fcontent{margin:15px auto;width:600px;}.nofloat .loginform{height:auto;}.nofloat .clause{width:auto;height:auto;}.fcontent .float_postinfo{width:568px;}.c_header{overflow:hidden;margin-bottom:10px;}* html .c_header{zoom:1;}.c_header h2,.c_header h3{float:left;padding-right:15px;background:#FFF;font-size:14px;cursor:pointer;}.c_header h3{background:#FFF url(/images/common/arrow_down_big.gif) no-repeat 100% 5px;color:#09C;}.searchfaq h3{background:none;cursor:auto;}.c_header .noarrow{background:none;cursor:auto;}.c_header h3 a{color:#09C;}.c_header h3 span{font-size:12px;font-weight:400;color:#666;}.c_header h2 em,.c_header h3 em{margin-left:8px;font-size:12px;color:#999;font-weight:400;}.c_header_action{float:right;}.c_header .c_header_ctrlbtn{display:none;}.c_header .c_header_ext{display:block;}.closenode{background:url(/images/common/dashline.gif) repeat-x 0 10px;}.closenode h3{background-image:url(/images/common/arrow_right_big.gif);}.closenode .c_header_ctrlbtn{display:block;background-color:#FFF;color:#666;cursor:pointer;}.closenode .c_header_ext{display:none;}.itemtitle{clear:both;overflow:hidden;margin-bottom:10px;line-height:23px;}.itemtitle h1{float:left;margin:0 20px 0 0;}.itemtitle ul{float:left;}.itemtitle li{float:left;margin-right:5px;}.itemtitle li.pipe{margin-left:0;}.itemtitle ul a{display:block;overflow:hidden;height:23px;cursor:pointer;}* html .itemtitle ul a{float:left;}.itemtitle ul a span{display:block;padding:0 7px;*padding:1px 7px 0;*line-height:22px;}.itemtitle ul a:hover{background:#F5F5F5 url(/images/common/btn_block.gif) no-repeat 0 -46px;text-decoration:none;}.itemtitle ul a:hover span{background:url(/images/common/btn_block.gif) no-repeat 100% -69px;}.itemtitle ul a.dropmenu{padding-right:0;background-position:0 -161px;}.itemtitle ul a.dropmenu span{padding-right:12px;background:url(/images/common/btn_block.gif) no-repeat 100% -138px;}.itemtitle ul a.dropmenu:hover{background-position:0 -46px;}.itemtitle ul a.dropmenu:hover span{background-position:100% -115px;}.itemtitle ul .current a,.itemtitle ul .current a:hover,.itemtitle ul .current a.dropmenu:hover{background:#09C url(/images/common/btn_block.gif) no-repeat 0 0;}.itemtitle ul .current a span,.itemtitle ul .current a:hover span{background:url(/images/common/btn_block.gif) no-repeat 100% -23px;color:#FFF;}.itemtitle ul .current a.dropmenu span,.itemtitle ul .current a.dropmenu:hover span{background-position:100% -92px;}.float_postinfo{}.float_postinfo em{float:left;margin-right:5px;padding-left:3px;height:20px;border:1px solid;border-color:#999 #CCC #CCC #999;background-color:#FFF;cursor:pointer;}.float_postinfo em img{margin-top:2px;}.float_postinfo input{float:left;}.float_postinfo #subject{width:358px;}.float_postinfo .float_typeid{display:inline;margin-right:0;margin-left:6px;}.viewpoint{margin:9px 0;}.colorbox input{margin:2px;padding:0px;float:left;cursor:pointer;width:12px;height:12px;border:0;}.smilieslist{padding:10px;border:1px solid #CBD8E4;background:#FEFEFE;}.smilieslist td{padding:8px;border:none;cursor:pointer;}.smilieslist_page{*float:left;text-align:right;}.smilieslist_page a{margin-right:5px;color:#09C;text-decoration:underline;}.pags_act{float:left;}.smilies_preview{margin-top:5px;padding:8px;background:#FFF;border:1px solid #CBD8E4;}.smiliesgroup{height:33px;*height:34px;overflow:hidden;width:expression(this.parentNode.offsetWidth);}.smiliesgroup ul,.imguptype{margin:6px 0;padding:0 0 26px 8px;border-bottom:1px solid #D3E8F2;}.smiliesgroup li,.imguptype li{display:inline;}* html .smiliesgroup li,* html .imguptype li{line-height:18px;}.smiliesgroup li a,.imguptype li a{float:left;margin:2px 6px 0 0;padding:2px 10px;height:19px;border:1px solid #D3E8F2;color:#09C;text-decoration:none;}.smiliesgroup li a:focus,.imguptype li a:focus{outline:none;}.smiliesgroup li a.current,.imguptype li a.current{border-bottom-color:#FEFEFE;font-weight:700;color:#444;}.alert_win{margin:0;width:350px;}.alert_win .float_ctrl{margin-bottom:0;padding:8px;}.alert_win .shadowline{margin:0;*margin:-8px 0;}.alert_win .postbox{*margin-top:-15px;padding:15px;}.alert_right,.alert_error,.alert_info{padding:6px 0 6px 58px;line-height:160%;background:url(/images/common/right_big.gif) no-repeat 8px 50%;font-size:14px;}.alert_error{background-image:url(/images/common/error_big.gif);}.alert_info{background-image:url(/images/common/info_big.gif);}.alert_btnleft{margin-top:8px;}.alert_btn{margin-top:20px;text-align:center;}.alert_act{margin-top:20px;padding-left:58px;}.popupcredit{}.pc_l,.pc_c,.pc_inner,.pc_r{width:29px;height:56px;line-height:56px;background:url(/images/common/popupcredit_bg.gif) no-repeat 0 0;}.pc_c{width:200px;background-position:0 -56px;background-repeat:repeat-x;}.pc_inner{white-space:nowrap;text-align:center;width:auto;background-position:50% -112px;}.pc_inner span{margin-right:15px;color:#FFEA97;font-size:14px;font-weight:700;}* html .pc_inner span{display:inline-block;}.pc_inner span a{color:#FFEA97;text-decoration:underline;}.pc_inner span em{color:#FFF;font-size:18px;font-weight:400;}.pc_inner span em.desc{color:#930;}.pc_btn img{opacity:0.5;}.pc_btn:hover img{opacity:1;}.pc_r{background-position:-30px 0;}.optionbar{float:left;overflow:hidden;margin:3px 4px 0 -6px;background:#09C url(/images/common/header.gif) repeat-x;height:14px;}.deloption{float:left;margin:4px;width:12px;height:12px;background:url(/images/common/close.gif) no-repeat 0 0;overflow:hidden;text-indent:-9999px;}.deloption:hover{background-position:0 -12px;}.color_menu{overflow:hidden;width:63px;}.color_menu a{overflow:hidden;float:left;width:20px;height:20px;}.chosemagic{margin-bottom:9px;width:220px;}.topicadminhigh{height:200px;}.topicadminhigh .tah_body{margin:5px 0 15px;}.topicadminhigh .tah_body select{width:217px;}.topicadminlow{height:50px;}.topicadminlow table{width:100%;}.topicadminlow td{padding:0 5px;}.topicadminlow .txt{width:100px;}.topicadminlow .wide .txt{width:50px;}.topicadminlog{}.topicadminlog h4{font-weight:400;}.topicadminlog .dropdownbtn{border-left-width:1px;}.topicadminlog .txtarea{margin:5px 0;width:212px;height:40px;}body{font-size:12px;color:#555;font-family:Arial,Tahoma,Verdana,Serif;padding:0;height:100%;margin:0;background:#ebebeb;}table,tr,td{font-family:Tahoma,Verdana,Georgia,Simsun,Serif;font-size:12px;background-color:inherit;color:#666;}em,cite,strong,th{font-style:normal;font-weight:normal;}img{border-width:0px;outline:none;}img.inline{vertical-align:middle;outline:none;}h1,h2,h3,h4,h5,h6{font-size:1em;}img.inline{vertical-align:middle;outline:none;}#topbar{width:100%;height:34px;background:url(/images/common/tbg.gif) repeat-x;position:relative;}.topanel{width:1024px;height:34px;margin:auto;}#memberp{width:630px;float:left;height:32px;line-height:33px;}#memberp a{color:#D0D0D0;padding:0 4px;}#searchform{background-color:inherit;width:190px;height:25px;margin-top:3px;float:right;}#searchform #srchtxt{margin-right:3px;padding:4px 7px 1px 5px;background:#FFF url(/images/common/form-field-bg.gif) no-repeat;width:120px;color:#999;height:17px;border:0;}#searchform #searchsubmit{background:url(/images/common/t_go.gif) no-repeat;width:29px;text-indent:-999%;line-height:1px;height:23px;cursor:pointer;margin-top:2px;border:0;}.searchsub{background:url(/images/common/t_go.gif);width:29px;height:23px;margin:0px;border:0px;padding:0px;font-size:0.1em;}#headerbg{width:100%;height:174px;background:url(/images/common/bg.gif) repeat-x;}.header{width:1024px;height:116px;margin:auto;}#dmenu{width:1024px;height:58px;margin:auto;}.bg-dmenuleft{width:76px;height:58px;background:url(/images/common/bg_cat.gif) no-repeat;float:left;}.bg-dmenu{width:822px;height:58px;background:#DCE1E8 url(/images/common/bg_dmenu.gif) no-repeat;float:left;}#nav{width:1024px;height:53px;margin:0 auto;background:url(/images/common/bg_areabar.gif) no-repeat center bottom;clear:both;color:#999;}#body{width:1024px;min-height:450px;margin:auto;background:#ebebeb url(/images/common/cbg.gif) repeat-y;clear:both;}.wrap{width:95% !important;}#footer{width:1024px;height:200px;font-size:11px;color:#717275;background:#ebebeb url(/images/common/bg_bottom.gif) no-repeat;clear:both;margin:auto;}.footerc{width:900px;height:150px;margin:auto;text-align:left;}#ftop{width:80px;height:25px;text-align:center;}#ftop a{text-decoration:none;color:#406a78;background-color:inherit;font-size:11px;}#footlink{width:900px;margin:20px auto;height:60px;clear:both;text-align:left;}.fmenu{width:430px;height:16px;margin:10px;list-style:none;clear:both;}.fmenu li{width:65px;height:16px;float:left;}.fmenu li a{text-decoration:none;color:#a6a6a6;background-color:inherit;}.fmenu li a:hover{text-decoration:none;color:#bdbdbd;background-color:inherit;}.bhoge{float:right;width:110px;height:60px;background:url(/images/common/b_hoge.gif) no-repeat 30% 80%;text-align:left;line-height:23px;}.bw3c{float:right;width:110px;height:60px;background:url(/images/common/b_w3c.gif) no-repeat 30% 80%;text-align:left;line-height:23px;}.bexa{float:right;width:120px;height:60px;background:url(/images/common/b_exa.gif) no-repeat 40% 80%;text-align:left;line-height:23px;}#menu{padding:0;width:700px;height:36px;position:absolute;left:100px;bottom:0;}#menu a{float:left;width:88px;height:36px;border:0;background:transparent url(/images/common/menu_bg.gif) no-repeat;line-height:45px;color:#FFF;text-align:center;overflow:hidden;padding:0;}#menu a.dropmenu{float:left;width:88px;height:36px;border:0;background:transparent url(/images/common/menu_bg.gif) no-repeat;line-height:45px;color:#FFF;text-align:center;overflow:hidden;padding:0;}#menu li.current a{background:url(/images/common/menu_h_bg.gif) no-repeat;color:#333;height:36px;font-weight:bold;font-size:14px;}.postattachlist{width:600px !important;}.clearbar{overflow:hidden;height:10px;clear:both;}.muban_price{padding:10px 15px;border:1px solid #FADC80;background:#FFFBDB;color:#965432;line-height:24px !important;}strong.price{color:#FF6600;font-size:18px;}.minifont{color:#A2A7AB;font-family:arial,tahoma,verdana;font-size:11px;}.nums{color:#999999;font-size:10px;text-align:right;width:150px;}.main h4{font-size:14px;height:38px;line-height:38px;padding-left:5px;color:#000;}.main h1{margin-bottom:10px;font-size:16px;font-weight:400;}.main .list h3{padding-left:6px;color:#666;line-height:35px;}.itemtitle .l{float:left;}.itemtitle .r{float:right;}.itemtitle .r li{float:left;width:50px;list-style:none;text-align:left;padding-left:17px;}.itemtitle .r li.tposts{background:url(/images/common/boy.gif) no-repeat left center;}.itemtitle .r li.pdata{background:url(/images/common/girl.gif) no-repeat left center;}.itemtitle .r li.tmembers{background:url(/images/common/baom.gif) no-repeat left center;}.dotbar{width:574px;height:10px;text-align:center;margin:0 auto;clear:both;background:url(/images/common/dot1.gif) repeat-x bottom;}.wbar{width:560px;color:#806C80;height:33px;margin:0 auto;line-height:32px;text-align:center;clear:both;background:url(/images/common/dot1.gif) repeat-x bottom;}.wbar .l{float:left;padding-left:12px;}.wbar .r{float:right;width:220px;}.wbar li{float:left;width:50px;padding-left:17px;list-style:none;text-align:left;}.wbar .newthread{background:url(/images/common/newthread.gif) no-repeat left center;width:240px;}.news_box{clear:both;position:relative;width:560px;margin:0 auto;}.news_box ul{padding:0;margin:0;list-style:none;}.news_box li{height:30px;line-height:30px;border-bottom:1px dashed #E5E5E5;clear:both;overflow:hidden;}.news_box li.bai{background:#FFF;}.news_box li .icon{width:30px;height:30px;background:url(/images/common/slisticon.gif) no-repeat center center;float:left;}.img_box{clear:both;position:relative;width:560px;margin:0 auto;border-top:1px solid #EBEBEB;background:#F4F4F4;height:110px;}.img_box ul{padding:8px 0 0 4px;margin:0;overflow:hidden;}.img_box li{width:168px;height:95px;background:url(/images/common/mob_img_bg.gif) repeat-x bottom;float:left;margin:0 7px;}.img_box img{width:166px;height:88px;border:1px solid #EBEBEB;background:#333;display:block;}.img_box a{position:relative;display:block;}.img_box span{width:43px;height:43px;position:absolute;right:0;top:0;display:block;background:url(/images/common/hot/free.gif) no-repeat right top;}.img_box span.free{background:url(/images/common/hot/free.gif) no-repeat right top;}.img_box span.unfree{background:url(/images/common/hot/unfree.gif) no-repeat right top;}.img_box span.yugao{background:url(/images/common/hot/yugao.gif) no-repeat right top;}.taolun_box{clear:both;position:relative;width:560px;margin:0 auto;}.list th{padding-left:55px !important;background-image:url(/images/common/forum.gif);background-position:13px 10px;}.list th.new{background-image:url(/images/common/forum_new.gif);}.side h4{height:32px;background:url(/images/common/side_title_bg.png) repeat-x;line-height:32px;border:1px solid #D6E3E9;padding-left:10px;}.sbox{padding:8px;overflow:hidden;}.login_box,.event_box,.caifu_box{padding:8px;background:#FFF;border:1px solid #F2F2F2;overflow:hidden;clear:both;}.login_ava{width:80px;height:58px;background:url(/images/common/avatar_bg.gif) no-repeat;float:left;}.login_ava img{padding:5px;}.login_text{width:140px;float:left;}.login_join{width:60px;float:right;}.announcement{height:30px;background:url(/images/common/side_title_bg.png) repeat-x 0 -34px;line-height:30px;border:1px solid #E7E6C8;padding-left:20px;}.announcement .laba{padding-left:22px;background:url(/images/common/announcement.png) no-repeat left center;}.announcement .laba a{color:#8B0000 !important;text-decoration:none !important;}.event_box{height:230px;overflow:hidden;}.event_box ul{padding:0;margin:0;}.event_box li{float:left;width:142px;height:118px;text-align:center;}.event_box li img{width:135px;height:110px;border:1px solid #F2F2F2;}.caifu_box .info{border:1px solid #E7E6C8;background:#FCFBE7;padding:2px 4px;clear:both;}.caifu_box .paihang{clear:both;}.caifu_box ul{padding:0;margin:0;}.caifu_box li{clear:both;height:64px;border-bottom:1px dashed #E5E5E5}.caifu_box li p{clear:both;overflow:hidden;height:6px;padding:0;margin:0;}.caifu_box li div{height:52px;float:left;color:#999999;}.caifu_box li span{color:#666;}.caifu_box li .caifu_num{width:42px;background:url(/images/common/paihang_bg.gif) no-repeat center 22px;text-align:center;line-height:54px;font-size:10px;color:#FFF;}.caifu_box li .caifu_ava{width:60px;}.caifu_box li .caifu_ava img{border:2px solid #E1E9EF;}.caifu_box li .caifu_point{line-height:20px;overflow:hidden;width:180px;}.caifu_box li.no1 .caifu_num{background:url(/images/common/paihang_bg.gif) no-repeat center -82px;font-size:14px;font-weight:bold;}.caifu_box li.no1 span{color:#FF8176;font-size:14px;}.caifu_box li.no2 .caifu_num{background:url(/images/common/paihang_bg.gif) no-repeat center -27px;font-size:12px;font-weight:bold;}.caifu_box li.no2 span{color:#80B94B;}.threadv{background:url(/images/common/slisticon.gif) no-repeat 5px center;padding-left:30px;}.photoshow{width:574px;height:174px;background:url(/images/common/photo_bg.gif);margin:0 auto;}#slideshow{list-style:none;color:#fff;}#slideshow span{display:none}#psbar{overflow:hidden;height:7px;clear:both;}#slidephoto{width:560px;margin:0;margin:0 auto;display:none}#slidephoto *{margin:0;padding:0}#s_fullsize{position:relative;width:560px;height:160px;padding:0;background:#000}#s_information{position:absolute;bottom:0;width:560px;height:0;background:#000;color:#fff;overflow:hidden;z-index:200;opacity:.7;filter:alpha(opacity=70)}#s_information h3{padding:4px 8px 3px;font-size:12px;color:#CCC;}#s_information p{padding:0 8px 8px;font-size:12px;color:#7b7b7b;}#s_image{width:560px}#s_image img{position:absolute;z-index:25;width:auto}.imgnav{position:absolute;width:25%;height:160px;cursor:pointer;z-index:150}#imgprev{left:0;background:url(/images/common/photo/s_left.gif) left center no-repeat}#imgnext{right:0;background:url(/images/common/photo/s_right.gif) right center no-repeat}#imglink{position:absolute;height:160px;width:100%;z-index:100;opacity:.4;filter:alpha(opacity=40)}.linkhover{background:url(../../images/ahmengv2/link.gif) center center no-repeat}#slideleft{float:left;width:20px;height:81px;background:url(/images/common/photo/scroll-left.gif) center center no-repeat;background-color:#222}#slideleft:hover{background-color:#333}#slideright{float:right;width:20px;height:81px;background:#222 url(/images/common/photo/scroll-right.gif) center center no-repeat}#slideright:hover{background-color:#333}#slidearea{float:left;position:relative;width:540px;margin-left:3px;height:81px;overflow:hidden}#slider{position:absolute;left:0;height:81px}#slider img{cursor:pointer;border:1px solid #666;padding:2px}#ad_headerbanner{position:absolute;right:30px;top:60px;}.ad_text{margin:0 auto 5px;padding:10px 0;width:95%;background:#FFF;}
\ No newline at end of file
cd /d %~dp0
:begin
rails s
goto :begin
\ No newline at end of file
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
name: MyString
introduction: MyText
notice: MyText
logo: MyString
banner: MyString
readperm: 1
topicperm: 1
postperm: 1
two:
name: MyString
introduction: MyText
notice: MyText
logo: MyString
banner: MyString
readperm: 1
topicperm: 1
postperm: 1
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
number: 1
name: MyString
card_type: MyString
monster_type: MyString
monster_atk: 1
monster_def: 1
monster_attribute: MyString
type:
monster_level: 1
lore: MyText
status: 1
stats: MyString
archetypes: MyString
mediums: MyString
tokens: 1
two:
number: 1
name: MyString
card_type: MyString
monster_type: MyString
monster_atk: 1
monster_def: 1
monster_attribute: MyString
type:
monster_level: 1
lore: MyText
status: 1
stats: MyString
archetypes: MyString
mediums: MyString
tokens: 1
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
post:
user:
content: MyText
two:
post:
user:
content: MyText
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
duel:
user:
card:
main: false
two:
duel:
user:
card:
main: false
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
user1:
user2:
winner:
winreason: 1
replay: MyString
credits: 1
two:
user1:
user2:
winner:
winreason: 1
replay: MyString
credits: 1
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
name: MyString
url: MyString
logo: MyString
introduction: MyString
two:
name: MyString
url: MyString
logo: MyString
introduction: MyString
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
user:
target:
action:
note: MyString
two:
user:
target:
action:
note: MyString
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
user:
type: MyString
assocaion:
user:
two:
user:
type: MyString
assocaion:
user:
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
user:
user:
content: MyText
two:
user:
user:
content: MyText
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
topic:
user:
content: MyText
displayorder: 1
readperm: 1
private: false
anonymous: false
ubb: false
html: false
two:
topic:
user:
content: MyText
displayorder: 1
readperm: 1
private: false
anonymous: false
ubb: false
html: false
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
name: MyString
topic_delete: false
topic_digest: 1
topic_displayorder: 1
topic_highlight: false
topic_edit: false
topic_lock: false
two:
name: MyString
topic_delete: false
topic_digest: 1
topic_displayorder: 1
topic_highlight: false
topic_edit: false
topic_lock: false
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
value: MyText
two:
value: MyText
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
user:
type:
board:
name: MyString
displayorder: 1
views: 1
readperm: 1
notice: false
reverse: false
private: false
two:
user:
type:
board:
name: MyString
displayorder: 1
views: 1
readperm: 1
notice: false
reverse: false
private: false
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one: one:
name: MyString name: MyString
password: MyString password: MyString
email: MyString email: MyString
credit: 1 credits: 1
usergroup: win: 1
admingroup: lost: 1
two: two:
name: MyString name: MyString
password: MyString password: MyString
email: MyString email: MyString
credit: 1 credits: 1
usergroup: win: 1
admingroup: lost: 1
require 'test_helper'
class BoardsControllerTest < ActionController::TestCase
setup do
@board = boards(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:boards)
end
test "should get new" do
get :new
assert_response :success
end
test "should create board" do
assert_difference('Board.count') do
post :create, :board => @board.attributes
end
assert_redirected_to board_path(assigns(:board))
end
test "should show board" do
get :show, :id => @board.to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => @board.to_param
assert_response :success
end
test "should update board" do
put :update, :id => @board.to_param, :board => @board.attributes
assert_redirected_to board_path(assigns(:board))
end
test "should destroy board" do
assert_difference('Board.count', -1) do
delete :destroy, :id => @board.to_param
end
assert_redirected_to boards_path
end
end
require 'test_helper' require 'test_helper'
class PmsControllerTest < ActionController::TestCase class CardsControllerTest < ActionController::TestCase
setup do setup do
@pm = pms(:one) @card = cards(:one)
end end
test "should get index" do test "should get index" do
get :index get :index
assert_response :success assert_response :success
assert_not_nil assigns(:pms) assert_not_nil assigns(:cards)
end end
test "should get new" do test "should get new" do
...@@ -16,34 +16,34 @@ class PmsControllerTest < ActionController::TestCase ...@@ -16,34 +16,34 @@ class PmsControllerTest < ActionController::TestCase
assert_response :success assert_response :success
end end
test "should create pm" do test "should create card" do
assert_difference('Pm.count') do assert_difference('Card.count') do
post :create, :pm => @pm.attributes post :create, card: @card.attributes
end end
assert_redirected_to pm_path(assigns(:pm)) assert_redirected_to card_path(assigns(:card))
end end
test "should show pm" do test "should show card" do
get :show, :id => @pm.to_param get :show, id: @card
assert_response :success assert_response :success
end end
test "should get edit" do test "should get edit" do
get :edit, :id => @pm.to_param get :edit, id: @card
assert_response :success assert_response :success
end end
test "should update pm" do test "should update card" do
put :update, :id => @pm.to_param, :pm => @pm.attributes put :update, id: @card, card: @card.attributes
assert_redirected_to pm_path(assigns(:pm)) assert_redirected_to card_path(assigns(:card))
end end
test "should destroy pm" do test "should destroy card" do
assert_difference('Pm.count', -1) do assert_difference('Card.count', -1) do
delete :destroy, :id => @pm.to_param delete :destroy, id: @card
end end
assert_redirected_to pms_path assert_redirected_to cards_path
end end
end end
require 'test_helper'
class CommentsControllerTest < ActionController::TestCase
setup do
@comment = comments(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:comments)
end
test "should get new" do
get :new
assert_response :success
end
test "should create comment" do
assert_difference('Comment.count') do
post :create, :comment => @comment.attributes
end
assert_redirected_to comment_path(assigns(:comment))
end
test "should show comment" do
get :show, :id => @comment.to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => @comment.to_param
assert_response :success
end
test "should update comment" do
put :update, :id => @comment.to_param, :comment => @comment.attributes
assert_redirected_to comment_path(assigns(:comment))
end
test "should destroy comment" do
assert_difference('Comment.count', -1) do
delete :destroy, :id => @comment.to_param
end
assert_redirected_to comments_path
end
end
require 'test_helper' require 'test_helper'
class PostsControllerTest < ActionController::TestCase class DuelsControllerTest < ActionController::TestCase
setup do setup do
@post = posts(:one) @duel = duels(:one)
end end
test "should get index" do test "should get index" do
get :index get :index
assert_response :success assert_response :success
assert_not_nil assigns(:posts) assert_not_nil assigns(:duels)
end end
test "should get new" do test "should get new" do
...@@ -16,34 +16,34 @@ class PostsControllerTest < ActionController::TestCase ...@@ -16,34 +16,34 @@ class PostsControllerTest < ActionController::TestCase
assert_response :success assert_response :success
end end
test "should create post" do test "should create duel" do
assert_difference('Post.count') do assert_difference('Duel.count') do
post :create, :post => @post.attributes post :create, duel: @duel.attributes
end end
assert_redirected_to post_path(assigns(:post)) assert_redirected_to duel_path(assigns(:duel))
end end
test "should show post" do test "should show duel" do
get :show, :id => @post.to_param get :show, id: @duel
assert_response :success assert_response :success
end end
test "should get edit" do test "should get edit" do
get :edit, :id => @post.to_param get :edit, id: @duel
assert_response :success assert_response :success
end end
test "should update post" do test "should update duel" do
put :update, :id => @post.to_param, :post => @post.attributes put :update, id: @duel, duel: @duel.attributes
assert_redirected_to post_path(assigns(:post)) assert_redirected_to duel_path(assigns(:duel))
end end
test "should destroy post" do test "should destroy duel" do
assert_difference('Post.count', -1) do assert_difference('Duel.count', -1) do
delete :destroy, :id => @post.to_param delete :destroy, id: @duel
end end
assert_redirected_to posts_path assert_redirected_to duels_path
end end
end end
require 'test_helper'
class LinksControllerTest < ActionController::TestCase
setup do
@link = links(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:links)
end
test "should get new" do
get :new
assert_response :success
end
test "should create link" do
assert_difference('Link.count') do
post :create, :link => @link.attributes
end
assert_redirected_to link_path(assigns(:link))
end
test "should show link" do
get :show, :id => @link.to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => @link.to_param
assert_response :success
end
test "should update link" do
put :update, :id => @link.to_param, :link => @link.attributes
assert_redirected_to link_path(assigns(:link))
end
test "should destroy link" do
assert_difference('Link.count', -1) do
delete :destroy, :id => @link.to_param
end
assert_redirected_to links_path
end
end
require 'test_helper'
class ModcpControllerTest < ActionController::TestCase
test "should get delete" do
get :delete
assert_response :success
end
test "should get displayorder" do
get :displayorder
assert_response :success
end
test "should get highlight" do
get :highlight
assert_response :success
end
test "should get digest" do
get :digest
assert_response :success
end
test "should get lock" do
get :lock
assert_response :success
end
test "should get move" do
get :move
assert_response :success
end
test "should get merge" do
get :merge
assert_response :success
end
test "should get split" do
get :split
assert_response :success
end
end
require 'test_helper'
class ModerationsControllerTest < ActionController::TestCase
setup do
@moderation = moderations(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:moderations)
end
test "should get new" do
get :new
assert_response :success
end
test "should create moderation" do
assert_difference('Moderation.count') do
post :create, :moderation => @moderation.attributes
end
assert_redirected_to moderation_path(assigns(:moderation))
end
test "should show moderation" do
get :show, :id => @moderation.to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => @moderation.to_param
assert_response :success
end
test "should update moderation" do
put :update, :id => @moderation.to_param, :moderation => @moderation.attributes
assert_redirected_to moderation_path(assigns(:moderation))
end
test "should destroy moderation" do
assert_difference('Moderation.count', -1) do
delete :destroy, :id => @moderation.to_param
end
assert_redirected_to moderations_path
end
end
require 'test_helper'
class MycardControllerTest < ActionController::TestCase
test "should get update" do
get :update
assert_response :success
end
end
require 'test_helper'
class NoticesControllerTest < ActionController::TestCase
setup do
@notice = notices(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:notices)
end
test "should get new" do
get :new
assert_response :success
end
test "should create notice" do
assert_difference('Notice.count') do
post :create, :notice => @notice.attributes
end
assert_redirected_to notice_path(assigns(:notice))
end
test "should show notice" do
get :show, :id => @notice.to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => @notice.to_param
assert_response :success
end
test "should update notice" do
put :update, :id => @notice.to_param, :notice => @notice.attributes
assert_redirected_to notice_path(assigns(:notice))
end
test "should destroy notice" do
assert_difference('Notice.count', -1) do
delete :destroy, :id => @notice.to_param
end
assert_redirected_to notices_path
end
end
require 'test_helper'
class RoomsControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
end
end
require 'test_helper'
class SettingsControllerTest < ActionController::TestCase
setup do
@setting = settings(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:settings)
end
test "should get new" do
get :new
assert_response :success
end
test "should create setting" do
assert_difference('Setting.count') do
post :create, :setting => @setting.attributes
end
assert_redirected_to setting_path(assigns(:setting))
end
test "should show setting" do
get :show, :id => @setting.to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => @setting.to_param
assert_response :success
end
test "should update setting" do
put :update, :id => @setting.to_param, :setting => @setting.attributes
assert_redirected_to setting_path(assigns(:setting))
end
test "should destroy setting" do
assert_difference('Setting.count', -1) do
delete :destroy, :id => @setting.to_param
end
assert_redirected_to settings_path
end
end
require 'test_helper'
class TopicsControllerTest < ActionController::TestCase
setup do
@topic = topics(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:topics)
end
test "should get new" do
get :new
assert_response :success
end
test "should create topic" do
assert_difference('Topic.count') do
post :create, :topic => @topic.attributes
end
assert_redirected_to topic_path(assigns(:topic))
end
test "should show topic" do
get :show, :id => @topic.to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => @topic.to_param
assert_response :success
end
test "should update topic" do
put :update, :id => @topic.to_param, :topic => @topic.attributes
assert_redirected_to topic_path(assigns(:topic))
end
test "should destroy topic" do
assert_difference('Topic.count', -1) do
delete :destroy, :id => @topic.to_param
end
assert_redirected_to topics_path
end
end
...@@ -18,30 +18,30 @@ class UsersControllerTest < ActionController::TestCase ...@@ -18,30 +18,30 @@ class UsersControllerTest < ActionController::TestCase
test "should create user" do test "should create user" do
assert_difference('User.count') do assert_difference('User.count') do
post :create, :user => @user.attributes post :create, user: @user.attributes
end end
assert_redirected_to user_path(assigns(:user)) assert_redirected_to user_path(assigns(:user))
end end
test "should show user" do test "should show user" do
get :show, :id => @user.to_param get :show, id: @user
assert_response :success assert_response :success
end end
test "should get edit" do test "should get edit" do
get :edit, :id => @user.to_param get :edit, id: @user
assert_response :success assert_response :success
end end
test "should update user" do test "should update user" do
put :update, :id => @user.to_param, :user => @user.attributes put :update, id: @user, user: @user.attributes
assert_redirected_to user_path(assigns(:user)) assert_redirected_to user_path(assigns(:user))
end end
test "should destroy user" do test "should destroy user" do
assert_difference('User.count', -1) do assert_difference('User.count', -1) do
delete :destroy, :id => @user.to_param delete :destroy, id: @user
end end
assert_redirected_to users_path assert_redirected_to users_path
......
require 'test_helper' require 'test_helper'
require 'rails/performance_test_help' require 'rails/performance_test_help'
# Profiling results for each test method are written to tmp/performance.
class BrowsingTest < ActionDispatch::PerformanceTest class BrowsingTest < ActionDispatch::PerformanceTest
# Refer to the documentation for all available options
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
# :output => 'tmp/performance', :formats => [:flat] }
def test_homepage def test_homepage
get '/' get '/'
end end
......
require 'test_helper'
class BoardTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class CardTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
require 'test_helper'
class CommentTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class DuelTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
require 'test_helper'
class DuelUserCardTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
require 'test_helper' require 'test_helper'
class LinksHelperTest < ActionView::TestCase class CardsHelperTest < ActionView::TestCase
end end
require 'test_helper'
class CommentsHelperTest < ActionView::TestCase
end
require 'test_helper' require 'test_helper'
class PostsHelperTest < ActionView::TestCase class DuelsHelperTest < ActionView::TestCase
end end
require 'test_helper'
class ModerationsHelperTest < ActionView::TestCase
end
require 'test_helper' require 'test_helper'
class BoardsHelperTest < ActionView::TestCase class MycardHelperTest < ActionView::TestCase
end end
require 'test_helper'
class NoticesHelperTest < ActionView::TestCase
end
require 'test_helper'
class PmsHelperTest < ActionView::TestCase
end
require 'test_helper' require 'test_helper'
class ModcpHelperTest < ActionView::TestCase class RoomsHelperTest < ActionView::TestCase
end end
require 'test_helper'
class SettingsHelperTest < ActionView::TestCase
end
require 'test_helper'
class TopicsHelperTest < ActionView::TestCase
end
require 'test_helper'
class LinkTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class ModerationTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class NavigationTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class NoticeTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class PmTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class PostTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class RoleTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class SettingTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper'
class TopicTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
require 'test_helper' require 'test_helper'
class UserTest < ActiveSupport::TestCase class UserTest < ActiveSupport::TestCase
# Replace this with your real tests. # test "the truth" do
test "the truth" do # assert true
assert true # end
end
end end
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50150
Source Host : localhost:3306
Source Database : reliz
Target Server Type : MYSQL
Target Server Version : 50150
File Encoding : 65001
Date: 2011-04-24 14:37:18
*/
SET FOREIGN_KEY_CHECKS=0;
body {
background:#EEE url(body.png) repeat-x;
font: 13px "Trebuchet MS", Arial, Verdana;
padding:20px;
}
a {
text-decoration:none;
color:#3C769D;
}
h1 a,
p em a {
display:block;
overflow:hidden;
text-indent:-9999px;
}
h1 a {
width:700px;
height:200px;
background:transparent url(markitup.png) no-repeat center center;
}
p em a {
background:transparent url(jaysalvat.png) no-repeat 10% 50%;
width:120px; height:28px;
left:30px;
position:absolute;
top:0px;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment