├── _admin ├── data │ ├── tpl │ │ └── test.php │ ├── var.php │ └── config.php ├── includes │ ├── data.php │ ├── widget.php │ ├── Snoopy.class.php │ ├── 1.php │ └── function.php ├── init.php ├── template │ ├── footer.php │ ├── login.php │ ├── _widget │ │ ├── textarea.php │ │ ├── text.php │ │ └── select.php │ ├── index.php │ ├── editReplace.php │ ├── editPageReplace.php │ ├── menu.php │ ├── header.php │ ├── siteBase.php │ ├── editPage.php │ ├── siteAdvanced.php │ ├── pageAdvanced.php │ ├── siteReplace.php │ ├── pageReplace.php │ └── pageList.php ├── static │ ├── admin.js │ ├── core.css │ └── jquery-1.5.1.min.js ├── module │ ├── index.php │ ├── site.php │ └── page.php └── index.php ├── 伪静态规则 ├── Nginx.txt └── Apache.txt ├── README.md ├── index.php └── License /_admin/data/tpl/test.php: -------------------------------------------------------------------------------- 1 | '|a|', 3 | 'b' => '|b|', 4 | ); -------------------------------------------------------------------------------- /_admin/includes/data.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iHunterDev/7ghost/main/_admin/includes/data.php -------------------------------------------------------------------------------- /_admin/includes/widget.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iHunterDev/7ghost/main/_admin/includes/widget.php -------------------------------------------------------------------------------- /_admin/includes/Snoopy.class.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iHunterDev/7ghost/main/_admin/includes/Snoopy.class.php -------------------------------------------------------------------------------- /_admin/init.php: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /伪静态规则/Apache.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | RewriteEngine On 4 | 5 | RewriteBase / 6 | 7 | RewriteRule ^index\.php$ - [L] 8 | 9 | RewriteCond %{REQUEST_FILENAME} !-f 10 | 11 | RewriteCond %{REQUEST_FILENAME} !-d 12 | 13 | RewriteRule . /index.php [L] 14 | 15 | -------------------------------------------------------------------------------- /_admin/template/login.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 6 | 8 |
账号 5 |
密码 7 |
9 | 10 |

11 |

12 | 13 |
-------------------------------------------------------------------------------- /_admin/template/_widget/textarea.php: -------------------------------------------------------------------------------- 1 |
2 |
:
3 | 6 |
7 |
8 |
-------------------------------------------------------------------------------- /_admin/data/config.php: -------------------------------------------------------------------------------- 1 | 'admin', 3 | 'password' => 'admin888', 4 | 'host' => 'https://www.baidu.com/', 5 | 'replaceDomain' => '', 6 | 'relativeHTML' => '', 7 | 'relativeCSS' => '', 8 | 'static' => '1', 9 | 'diyStatic' => 'css|js', 10 | 'cookies' => '', 11 | 'agent' => '', 12 | 'referer' => '0', 13 | 'ip' => '0', 14 | 'diyAgent' => '', 15 | 'replaces' => 16 | array ( 17 | ), 18 | 'pages' => 19 | array ( 20 | ), 21 | ); -------------------------------------------------------------------------------- /_admin/template/_widget/text.php: -------------------------------------------------------------------------------- 1 |
2 |
:
3 | 9 |
10 |
11 |
-------------------------------------------------------------------------------- /_admin/template/_widget/select.php: -------------------------------------------------------------------------------- 1 |
2 |
:
3 |
4 | 14 |
15 |
16 |
-------------------------------------------------------------------------------- /_admin/static/admin.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $("#collapsible").height($("#nav").height()).toggle(function() { 3 | $("#nav").css('width','10px'); 4 | $("#nav .dashboard").css('width','0px'); 5 | 6 | return false; 7 | }, function() { 8 | $("#nav").css('width','140px'); 9 | $("#nav .dashboard").css('width','133px'); 10 | return false; 11 | }); 12 | 13 | $('.actions span').css('display','none'); 14 | $('.actions').parent().mouseenter(function(){ 15 | $(this).find('.actions span').css('display','inline'); 16 | }).mouseleave(function() { 17 | $(this).find('.actions span').css('display','none'); 18 | }); 19 | }); -------------------------------------------------------------------------------- /_admin/module/index.php: -------------------------------------------------------------------------------- 1 | get('password')==$_POST['password']){ 12 | $_SESSION['Jzb6spHwTmm2LUkMPAk2H1uCRhoA']=true; 13 | header("Location:/_admin/?m=site&a=index"); 14 | exit(); 15 | } 16 | echo "密码错误"; 17 | } 18 | include tpl('login'); 19 | } 20 | 21 | function actionLogout(){ 22 | unset($_SESSION['Jzb6spHwTmm2LUkMPAk2H1uCRhoA']); 23 | header("Location:/_admin"); 24 | exit(); 25 | } 26 | } -------------------------------------------------------------------------------- /_admin/index.php: -------------------------------------------------------------------------------- 1 | actionLogin(); 19 | exit(); 20 | } 21 | if(@include ('./module/'.$_GET['m'].'.php')){ 22 | $m = new $_GET['m'](); 23 | $a = empty($_GET['a'])?'actionIndex':'action'.$_GET['a']; 24 | $m->$a(); 25 | } -------------------------------------------------------------------------------- /_admin/template/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |

基本信息

6 |
需要代理的网址:
7 |
8 |
整站需要反向代理的网址,如:http://www.baidu.com/
9 |
10 | set('name','需要代理的网址') 12 | ->set('key','host') 13 | ->set('tipe','整站需要反向代理的网址,如:http://www.baidu.com/') 14 | ->e(); 15 | ?> 16 |
17 |
站点名称:
18 |
19 |
站点名称,将显示在浏览器窗口标题等位置
20 |
21 |
22 | -------------------------------------------------------------------------------- /_admin/template/editReplace.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |

添加内容替换

6 | 7 | set('name','名称') 9 | ->set('key','name') 10 | ->set('value',$item['name']) 11 | ->set('tipe','仅方便记忆') 12 | ->e(); 13 | 14 | w('text')->set('name','查找内容') 15 | ->set('key','seach') 16 | ->set('value',$item['seach']) 17 | ->set('tipe','查找需要替换的内容,为正则匹配') 18 | ->e(); 19 | 20 | w('textarea')->set('name','替换为') 21 | ->set('key','replace') 22 | ->set('value',$item['replace']) 23 | ->set('tipe','将查找到的内容替换为') 24 | ->e(); 25 | ?> 26 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /_admin/template/editPageReplace.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |

自定义页()-编辑内容替换

6 | '> 7 | set('name','名称') 9 | ->set('key','name') 10 | ->set('value',$item['name']) 11 | ->set('tipe','仅方便记忆') 12 | ->e(); 13 | 14 | w('text')->set('name','查找内容') 15 | ->set('key','seach') 16 | ->set('value',$item['seach']) 17 | ->set('tipe','查找需要替换的内容,为正则匹配') 18 | ->e(); 19 | 20 | w('textarea')->set('name','替换为') 21 | ->set('key','replace') 22 | ->set('value',$item['replace']) 23 | ->set('tipe','将查找到的内容替换为') 24 | ->e(); 25 | ?> 26 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /_admin/template/menu.php: -------------------------------------------------------------------------------- 1 | $name"; 7 | } 8 | ?> 9 |
10 | 42 |
-------------------------------------------------------------------------------- /_admin/template/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7ghost管理后台 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |

7ghost

15 |
16 | 30 |
31 |
32 |
33 |
    34 |
  • 35 | 基本 36 |
  • 37 |
38 |
39 |
-------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 7克隆 (7Gost) 2 | * 7ghost是一款基于PHP的网站反向代理程序。能够快速高效的反向代理所指定的网站。 3 | * 并拥有丰富的内容替换、请求头设置。让没有主机的朋友也可以反向代理和加速你的网站。 4 | --- 5 | 6 | ## 功能 7 | * 指定网站完全代理 8 | * 自定义页面代理 9 | * 域名替换 10 | * 内容替换 11 | * 静态缓存 12 | * cookies自定义 13 | * 浏览器标识自定义 14 | * referer自定义 15 | 16 | ## 运行环境 17 | * 推荐在Linux服务器上运行 18 | * 推荐使用Nginx或Apache运行 19 | * 最小运行内存不因低于64 MB 20 | * 最低PHP版本不应低于PHP5.4 21 | 22 | ## 说明 23 | * 后台地址为:
\_admin\
24 | * 默认登录密码:
admin888
25 | * 可编辑:
\_admin\data\config.php
修改。 26 | 27 | ## 更新预告 28 | * 3.0.0.1版本 29 | * 抛弃**config.php**里面的密码存储方式 30 | * 支持**Mysql**,将后台数据存储进入数据库 31 | 32 | ## 更新 33 | * 2.0.0.1版本: 34 | * 重写底层PHP代码,更新了一些PHP函数 35 | * 小改了验证方式,提高安全性 36 | 37 | * 1.2.4版本: 38 | * 添加secache作为动态缓存储存模式 39 | * 添加代理模式和api代理模式,防止单一ip被屏蔽 40 | * 添加直接匹配和正则匹配模式 41 | * 优化.htaccess处理静态缓存的方式,减少php调用 42 | 43 | * 1.2.3版本: 44 | * 添加伪原创功能 45 | * 添加程序所在二级目录可设置,解决部分空间不能自动获取的问题 46 | * 修正全文搜索的bug 47 | 48 | * 1.2.2版本: 49 | * 修正伪静态实现方式,对搜索引擎更加友好 50 | * 修正自定义页面优先级别 51 | * 添加自定义页面是否允许访问选项 52 | 53 | * 1.2.1版本: 54 | * 添加页面编码设置 55 | * 修正自定义页面配置替换bug 56 | * 动态缓存添加gzip支持 57 | 58 | * 1.2版本: 59 | * 增加IIS7支持 60 | * 修改静态缓存模式,将静态文件集中保存 61 | * 添加动态缓存 62 | * 添加全站伪静态功能 63 | * 添加内容替换DOM功能 64 | * 添加清空静态、动态缓存功能 65 | * 修正内容替换正则表达bug 66 | 67 | -------------------------------------------------------------------------------- /_admin/template/siteBase.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |

基本信息

6 | set('name','需要代理的网址') 8 | ->set('key','host') 9 | ->set('value',d('config')->get('host')) 10 | ->set('tipe','整站需要反向代理的网址,如:http://www.baidu.com/') 11 | ->e(); 12 | 13 | w('select')->set('name','替换域名') 14 | ->set('key','replaceDomain') 15 | ->set('value',d('config')->get('replaceDomain')) 16 | ->set('options',array('替换'=>'0','不替换'=>'1')) 17 | ->set('tipe','替换域名,实现全站镜像') 18 | ->e(); 19 | 20 | w('select')->set('name','替换HTML相对地址') 21 | ->set('key','relativeHTML') 22 | ->set('value',d('config')->get('relativeHTML')) 23 | ->set('options',array('替换'=>'0','不替换'=>'1')) 24 | ->set('tipe','替换相对地址,可以让在二级目录的7ghost正常运行,影响样式文件、脚本、站内链接') 25 | ->e(); 26 | w('select')->set('name','替换CSS相对地址') 27 | ->set('key','relativeCSS') 28 | ->set('value',d('config')->get('relativeCSS')) 29 | ->set('options',array('替换'=>'0','不替换'=>'1')) 30 | ->set('tipe','替换相对地址,可以让在二级目录的7ghost正常运行,影响样式文件中的图片') 31 | ->e(); 32 | ?> 33 |
34 |

静态页面缓存

35 | set('name','是否开启缓存') 37 | ->set('key','static') 38 | ->set('value',d('config')->get('static')) 39 | ->set('options',array('缓存'=>'0','不缓存'=>'1')) 40 | ->set('tipe','开启静态缓存,会自动将文件存在本地,请开启根目录可写权限') 41 | ->e(); 42 | w('text')->set('name','自定义缓存类型') 43 | ->set('key','diyStatic') 44 | ->set('value',d('config')->get('diyStatic')) 45 | ->set('tipe','“是否开启缓存”选项必须选择“缓存”才能生效!!!,如:css|js|html') 46 | ->e(); 47 | ?> 48 | 49 |
50 |
51 | -------------------------------------------------------------------------------- /_admin/includes/1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 | 9 |
10 |
11 |
12 |
13 |
14 |
15 | 密码登录 16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 35 | 36 | 37 |
38 |
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | 47 | -------------------------------------------------------------------------------- /_admin/module/site.php: -------------------------------------------------------------------------------- 1 | setBase(); 6 | } 7 | include tpl('siteBase'); 8 | } 9 | 10 | function actionAdvanced(){ 11 | if($_SERVER['REQUEST_METHOD'] == "POST"){ 12 | $msg = $this->setAdvanced(); 13 | } 14 | include tpl('siteAdvanced'); 15 | } 16 | 17 | function actionReplace(){ 18 | if($_SERVER['REQUEST_METHOD'] == "POST"){ 19 | $msg = $this->setReplace(); 20 | } 21 | include tpl('siteReplace'); 22 | } 23 | 24 | function setBase(){ 25 | d('config')->set('host',$_POST['host']); 26 | d('config')->set('replaceDomain',$_POST['replaceDomain']); 27 | d('config')->set('relativeHTML',$_POST['relativeHTML']); 28 | d('config')->set('relativeCSS',$_POST['relativeCSS']); 29 | d('config')->set('static',$_POST['static']); 30 | d('config')->set('diyStatic',$_POST['diyStatic']); 31 | } 32 | 33 | function setAdvanced(){ 34 | d('config')->set('cookies',$_POST['cookies']); 35 | 36 | d('config')->set('agent',$_POST['agent']); 37 | d('config')->set('diyAgent',$_POST['diyAgent']); 38 | 39 | d('config')->set('referer',$_POST['referer']); 40 | d('config')->set('diyReferer',$_POST['diyReferer']); 41 | 42 | d('config')->set('ip',$_POST['ip']); 43 | d('config')->set('diyIp',$_POST['diyIp']); 44 | } 45 | 46 | function setReplace(){ 47 | $item['name'] = $_POST['name']; 48 | $item['seach'] = $_POST['seach']; 49 | $item['replace'] = $_POST['replace']; 50 | 51 | $replaces = d('config')->get('replaces'); 52 | 53 | if(is_numeric($_POST['key'])){ 54 | $replaces[$_POST['key']] = $item; 55 | }else{ 56 | $replaces[] = $item; 57 | } 58 | d('config')->set('replaces',$replaces); 59 | } 60 | 61 | function actionEditReplace(){ 62 | if($_SERVER['REQUEST_METHOD'] == "POST"){ 63 | $msg = $this->setReplace(); 64 | } 65 | 66 | if(is_numeric($_GET['key'])){ 67 | $replaces = d('config')->get('replaces'); 68 | $key = $_GET['key']; 69 | $item = $replaces[$key]; 70 | } 71 | 72 | 73 | include tpl('editReplace'); 74 | } 75 | 76 | function actionDelReplace(){ 77 | if(is_numeric($_GET['key'])){ 78 | $replaces = d('config')->get('replaces'); 79 | unset($replaces[$_GET['key']]); 80 | d('config')->set('replaces',$replaces); 81 | } 82 | header("Location:./?m=site&a=Replace"); 83 | } 84 | } -------------------------------------------------------------------------------- /_admin/template/editPage.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |

自定义页面() - 基本 7 | - 高级 8 | - 内容替换 9 |

10 | set('name','名称') 12 | ->set('key','name') 13 | ->set('value',$item['name']) 14 | ->set('tipe','仅方便记忆') 15 | ->e(); 16 | 17 | w('text')->set('name','页面地址') 18 | ->set('key','uri') 19 | ->set('value',$item['uri']) 20 | ->set('tipe','需要自定义的uri,为正则匹配
如:about.html 如:html/.*') 21 | ->e(); 22 | 23 | w('text')->set('name','需要代理的网址') 24 | ->set('key','host') 25 | ->set('value',$item['host']) 26 | ->set('tipe','当前页面需要反向代理的网址,如:http://hi.baidu.com/。不填则使用全局设置') 27 | ->e(); 28 | 29 | w('select')->set('name','返回类型') 30 | ->set('key','returnType') 31 | ->set('value',$item['returnType']) 32 | ->set('options',array('网页(html)'=>'0','文本(text)'=>'1','表单(form)'=>'2','链接(link)'=>'3')) 33 | ->set('tipe','页面返回的类型,默认为网页形式') 34 | ->e(); 35 | 36 | w('select')->set('name','替换域名') 37 | ->set('key','replaceDomain') 38 | ->set('value',$item['replaceDomain']) 39 | ->set('options',array('替换'=>'0','不替换'=>'1')) 40 | ->set('tipe','替换域名,实现全站镜像') 41 | ->e(); 42 | 43 | w('select')->set('name','替换HTML相对地址') 44 | ->set('key','relativeHTML') 45 | ->set('value',$item['relativeHTML']) 46 | ->set('options',array('替换'=>'0','不替换'=>'1')) 47 | ->set('tipe','替换相对地址,可以让在二级目录的7ghost正常运行,影响样式文件、脚本、站内链接') 48 | ->e(); 49 | w('select')->set('name','替换CSS相对地址') 50 | ->set('key','relativeCSS') 51 | ->set('value',$item['relativeCSS']) 52 | ->set('options',array('替换'=>'0','不替换'=>'1')) 53 | ->set('tipe','替换相对地址,可以让在二级目录的7ghost正常运行,影响样式文件中的图片') 54 | ->e(); 55 | w('text')->set('name','模版文件名') 56 | ->set('key','template') 57 | ->set('value',$item['template']) 58 | ->set('tipe','留空为不使用模版。使用模版后,不执行内容替换。模版文件保存在“tpl”文件夹下') 59 | ->e(); 60 | ?> 61 | 62 | 63 | 64 |
65 | -------------------------------------------------------------------------------- /_admin/template/siteAdvanced.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |

自定义COOKIES

6 | set('name','COOKIES设置') 8 | ->set('key','cookies') 9 | ->set('value',d('config')->get('cookies')) 10 | ->set('options',array('传统cookies'=>'0','全局cookies'=>'1','自定义cookies'=>'2',)) 11 | ->set('tipe','传统cookies能保证每个访客一个cookies,全局cookies则是所有访客一个cookies,自定义cookies则cookies将不会变化') 12 | ->e(); 13 | w('text')->set('name','自定义COOKIES') 14 | ->set('key','diyCookies') 15 | ->set('value',d('config')->get('diyCookies')) 16 | ->set('tipe','“COOKIES设置”选项必须选择“自定义cookies”才能生效') 17 | ->e(); 18 | ?> 19 | 20 |
21 |

自定义浏览器标识(agent)

22 | set('name','伪造agent') 24 | ->set('key','agent') 25 | ->set('value',d('config')->get('agent')) 26 | ->set('options',array('使用客户端agent'=>'0','不伪造'=>'1','自定义agent'=>'2',)) 27 | ->set('tipe','这个可以让受访服务器识别是IE、firefox或者手机访问,建议设置为“使用客户端agent”') 28 | ->e(); 29 | w('text')->set('name','自定义agent') 30 | ->set('key','diyAgent') 31 | ->set('value',d('config')->get('diyAgent')) 32 | ->set('tipe','“伪造agent”选项必须选择“自定义agent”才会生效,如:
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)') 33 | ->e(); 34 | ?> 35 | 36 |
37 |

自定义来路(referer)

38 | set('name','伪造referer') 40 | ->set('key','referer') 41 | ->set('value',d('config')->get('referer')) 42 | ->set('options',array('自动伪造'=>'0','自定义referer'=>'1')) 43 | ->set('tipe','自动伪造可以还原原始的referer,使全站镜像可以完美突破防盗链') 44 | ->e(); 45 | w('text')->set('name','自定义referer') 46 | ->set('key','diyReferer') 47 | ->set('value',d('config')->get('diyReferer')) 48 | ->set('tipe','“伪造referer”选项必须选择“自定义referer”才会生效,如:http://www.baidu.com') 49 | ->e(); 50 | ?> 51 | 52 |
53 |

自定义IP

54 | set('name','伪造ip') 56 | ->set('key','ip') 57 | ->set('value',d('config')->get('ip')) 58 | ->set('options',array('使用服务器ip'=>'0','使用客户端ip'=>'1','自定义ip'=>'2',)) 59 | ->set('tipe','注意!!受代理网站仍然可以得到服务器的ip,此为不完全伪造ip!!!') 60 | ->e(); 61 | w('text')->set('name','自定义ip') 62 | ->set('key','diyIp') 63 | ->set('value',d('config')->get('diyIp')) 64 | ->set('tipe','伪造ip选项必须选择自定义IP才能生效,此为不完全伪造!!!,如:127.0.0.1') 65 | ->e(); 66 | ?> 67 | 68 |
69 |
70 | -------------------------------------------------------------------------------- /_admin/template/pageAdvanced.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

自定义页面() - 基本 5 | - 高级 6 | - 内容替换 7 |

8 |
9 |

自定义COOKIES

10 | set('name','COOKIES设置') 12 | ->set('key','cookies') 13 | ->set('value',$page['cookies']) 14 | ->set('options',array('传统cookies'=>'0','全局cookies'=>'1','自定义cookies'=>'2',)) 15 | ->set('tipe','传统cookies能保证每个访客一个cookies,全局cookies则是所有访客一个cookies,自定义cookies则cookies将不会变化') 16 | ->e(); 17 | w('text')->set('name','自定义COOKIES') 18 | ->set('key','diyCookies') 19 | ->set('value',$page['diyCookies']) 20 | ->set('tipe','“COOKIES设置”选项必须选择“自定义cookies”才能生效') 21 | ->e(); 22 | ?> 23 | 24 |
25 |

自定义浏览器标识(agent)

26 | set('name','伪造agent') 28 | ->set('key','agent') 29 | ->set('value',$page['agent']) 30 | ->set('options',array('使用客户端agent'=>'0','不伪造'=>'1','自定义agent'=>'2',)) 31 | ->set('tipe','这个可以让受访服务器识别是IE、firefox或者手机访问,建议设置为“使用客户端agent”') 32 | ->e(); 33 | w('text')->set('name','自定义agent') 34 | ->set('key','diyAgent') 35 | ->set('value',$page['diyAgent']) 36 | ->set('tipe','“伪造agent”选项必须选择“自定义agent”才会生效,如:
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)') 37 | ->e(); 38 | ?> 39 | 40 |
41 |

自定义来路(referer)

42 | set('name','伪造referer') 44 | ->set('key','referer') 45 | ->set('value',$page['referer']) 46 | ->set('options',array('自动伪造'=>'0','自定义referer'=>'1')) 47 | ->set('tipe','自动伪造可以还原原始的referer,使全站镜像可以完美突破防盗链') 48 | ->e(); 49 | w('text')->set('name','自定义agent') 50 | ->set('key','diyReferer') 51 | ->set('value',$page['diyReferer']) 52 | ->set('tipe','“伪造referer”选项必须选择“自定义referer”才会生效,如:http://www.baidu.com') 53 | ->e(); 54 | ?> 55 | 56 |
57 |

自定义IP

58 | set('name','伪造ip') 60 | ->set('key','ip') 61 | ->set('value',$page['ip']) 62 | ->set('options',array('使用服务器ip'=>'0','使用客户端ip'=>'1','自定义ip'=>'2',)) 63 | ->set('tipe','注意!!受代理网站仍然可以得到服务器的ip,此为不完全伪造ip!!!') 64 | ->e(); 65 | w('text')->set('name','自定义ip') 66 | ->set('key','diyIp') 67 | ->set('value',$page['diyIp']) 68 | ->set('tipe','伪造ip选项必须选择自定义IP才能生效,此为不完全伪造!!!,如:127.0.0.1') 69 | ->e(); 70 | ?> 71 | 72 |
73 |
74 | -------------------------------------------------------------------------------- /_admin/template/siteReplace.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 |

添加内容替换

7 | set('name','名称') 9 | ->set('key','name') 10 | ->set('tipe','仅方便记忆') 11 | ->e(); 12 | 13 | w('text')->set('name','查找内容') 14 | ->set('key','seach') 15 | ->set('tipe','查找需要替换的内容,为正则匹配') 16 | ->e(); 17 | 18 | w('textarea')->set('name','替换为') 19 | ->set('key','replace') 20 | ->set('tipe','将查找到的内容替换为') 21 | ->e(); 22 | ?> 23 | 24 |
25 |
26 |
27 |

内容替换列表

28 | 29 | 30 | 31 | 34 | 37 | 40 | 41 | 42 | 43 | get('replaces'); 45 | $i = 'class="ae-even"'; 46 | if(is_array($replaces)) 47 | foreach($replaces as $key => $item){ 48 | if($i == 'class="ae-even"'){ 49 | $i = ''; 50 | }else{ 51 | $i = 'class="ae-even"'; 52 | } 53 | ?> 54 | > 55 | 64 | 67 | 70 | 71 | 74 | 75 | 76 | 79 | 82 | 85 | 86 | 87 | 88 |
32 | 名称 33 | 35 | 查找 36 | 38 | 替换为 39 |
56 |
57 | 58 |
59 |
60 | 编辑 | 61 | 删除 62 |
63 |
65 | 66 | 68 | 69 |
77 | 名称 78 | 80 | 查找 81 | 83 | 替换为 84 |
89 |
90 |
91 | -------------------------------------------------------------------------------- /_admin/template/pageReplace.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

自定义页面() - 基本 5 | - 高级 6 | - 内容替换 7 |

8 |
9 |
10 |

添加内容替换

11 | set('name','名称') 13 | ->set('key','name') 14 | ->set('tipe','仅方便记忆') 15 | ->e(); 16 | 17 | w('text')->set('name','查找内容') 18 | ->set('key','seach') 19 | ->set('tipe','查找需要替换的内容,为正则匹配') 20 | ->e(); 21 | 22 | w('textarea')->set('name','替换为') 23 | ->set('key','replace') 24 | ->set('tipe','将查找到的内容替换为') 25 | ->e(); 26 | ?> 27 | 28 |
29 |
30 |
31 |

内容替换列表

32 | 33 | 34 | 35 | 38 | 41 | 44 | 45 | 46 | 47 | get('pages'); 49 | $key = $_GET['key']; 50 | $replaces = $pages[$key]['replaces']; 51 | $i = 'class="ae-even"'; 52 | if(is_array($replaces)) 53 | foreach($replaces as $rekey => $item){ 54 | if($i == 'class="ae-even"'){ 55 | $i = ''; 56 | }else{ 57 | $i = 'class="ae-even"'; 58 | } 59 | ?> 60 | > 61 | 70 | 73 | 76 | 77 | 80 | 81 | 82 | 85 | 88 | 91 | 92 | 93 | 94 |
36 | 名称 37 | 39 | 查找 40 | 42 | 替换为 43 |
62 |
63 | 64 |
65 |
66 | 编辑 | 67 | 删除 68 |
69 |
71 | 72 | 74 | 75 |
83 | 名称 84 | 86 | 查找 87 | 89 | 替换为 90 |
95 |
96 |
97 | -------------------------------------------------------------------------------- /_admin/module/page.php: -------------------------------------------------------------------------------- 1 | setPage(); 6 | } 7 | include tpl('pageList'); 8 | } 9 | 10 | function actionEdit(){ 11 | if($_SERVER['REQUEST_METHOD'] == "POST"){ 12 | $msg = $this->setPage(); 13 | header("Location:./?m=page&a=Index"); 14 | } 15 | 16 | if(is_numeric($_GET['key'])){ 17 | $pages = d('config')->get('pages'); 18 | $key = $_GET['key']; 19 | $item = $pages[$key]; 20 | } 21 | include tpl('editPage'); 22 | } 23 | 24 | function actionDel(){ 25 | if(is_numeric($_GET['key'])){ 26 | $pages = d('config')->get('pages'); 27 | $key = $_GET['key']; 28 | unset($pages[$key]); 29 | d('config')->set('pages',$pages); 30 | header("Location:./?m=page&a=Index"); 31 | } 32 | } 33 | 34 | function actionAdvanced(){ 35 | if(!is_numeric($_GET['key'])){ 36 | exit('error'); 37 | } 38 | if($_SERVER['REQUEST_METHOD'] == "POST"){ 39 | $msg = $this->setAdvanced(); 40 | } 41 | $key = $_GET['key']; 42 | $pages = d('config')->get('pages'); 43 | $page = $pages[$key]; 44 | include tpl('pageAdvanced'); 45 | } 46 | 47 | function actionReplace(){ 48 | if($_SERVER['REQUEST_METHOD'] == "POST"){ 49 | $msg = $this->setReplace(); 50 | } 51 | if(!is_numeric($_GET['key'])){ 52 | exit('error'); 53 | } 54 | $key = $_GET['key']; 55 | $pages = d('config')->get('pages'); 56 | $page = $pages[$key]; 57 | include tpl('pageReplace'); 58 | } 59 | 60 | function actionEditReplace(){ 61 | if(!is_numeric($_GET['key'])){ 62 | exit('error'); 63 | } 64 | 65 | $pages = d('config')->get('pages'); 66 | $key = $_GET['key']; 67 | $page = $pages[$key]; 68 | $item = $page['replaces'][$_GET['rekey']]; 69 | 70 | if($_SERVER['REQUEST_METHOD'] == "POST"){ 71 | $msg = $this->setReplace(); 72 | header("Location:./?m=page&a=replace&key=$key"); 73 | } 74 | include tpl('editPageReplace'); 75 | } 76 | 77 | function actionDelReplace(){ 78 | if(!is_numeric($_GET['key'])){ 79 | exit('error'); 80 | } 81 | if(!is_numeric($_GET['rekey'])){ 82 | exit('error'); 83 | } 84 | 85 | $pages = d('config')->get('pages'); 86 | $key = $_GET['key']; 87 | $page = $pages[$key]; 88 | unset($page['replaces'][$_GET['rekey']]); 89 | $pages[$key]=$page; 90 | d('config')->set('pages',$pages); 91 | 92 | header("Location:./?m=page&a=replace&key=$key"); 93 | } 94 | 95 | function setAdvanced(){ 96 | if(!is_numeric($_GET['key'])){ 97 | exit('error'); 98 | } 99 | $key = $_GET['key']; 100 | $pages = d('config')->get('pages'); 101 | $page = $pages[$key]; 102 | 103 | $page['cookies']=$_POST['cookies']; 104 | 105 | $page['agent']=$_POST['agent']; 106 | $page['diyAgent']=$_POST['diyAgent']; 107 | 108 | $page['referer']=$_POST['referer']; 109 | $page['diyReferer']=$_POST['diyReferer']; 110 | 111 | $page['ip']=$_POST['ip']; 112 | $page['diyIp']=$_POST['diyIp']; 113 | 114 | $pages[$key] =$page; 115 | $pages = d('config')->set('pages',$pages); 116 | } 117 | 118 | function setPage(){ 119 | $item['name'] = $_POST['name']; 120 | $item['uri'] = $_POST['uri']; 121 | $item['host'] = $_POST['host']; 122 | $item['replaceDomain'] = $_POST['replaceDomain']; 123 | $item['returnType'] = $_POST['returnType']; 124 | $item['relativeHTML'] = $_POST['relativeHTML']; 125 | $item['relativeCSS'] = $_POST['relativeCSS']; 126 | $item['template'] = $_POST['template']; 127 | 128 | $pages = d('config')->get('pages'); 129 | 130 | if(is_numeric($_POST['key'])){ 131 | $pages[$_POST['key']] = $item; 132 | }else{ 133 | $pages[] = $item; 134 | } 135 | d('config')->set('pages',$pages); 136 | } 137 | 138 | function setReplace(){ 139 | if(!is_numeric($_GET['key'])){ 140 | exit('error'); 141 | } 142 | 143 | $item['name'] = $_POST['name']; 144 | $item['seach'] = $_POST['seach']; 145 | $item['replace'] = $_POST['replace']; 146 | 147 | $pages = d('config')->get('pages'); 148 | $replaces = $pages[$_GET['key']]['replaces']; 149 | 150 | if(is_numeric($_POST['rekey'])){ 151 | $replaces[$_POST['rekey']] = $item; 152 | }else{ 153 | $replaces[] = $item; 154 | } 155 | $pages[$_GET['key']]['replaces'] = $replaces; 156 | d('config')->set('pages',$pages); 157 | } 158 | } -------------------------------------------------------------------------------- /_admin/template/pageList.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 |

添加自定义页面

7 | set('name','名称') 9 | ->set('key','name') 10 | ->set('tipe','仅方便记忆') 11 | ->e(); 12 | 13 | w('text')->set('name','页面地址') 14 | ->set('key','uri') 15 | ->set('tipe','需要自定义的uri,为正则匹配
如:about.html 如:html/.*') 16 | ->e(); 17 | 18 | w('text')->set('name','需要代理的网址') 19 | ->set('key','host') 20 | ->set('tipe','当前页面需要反向代理的网址,如:http://hi.baidu.com/。不填则使用全局设置') 21 | ->e(); 22 | 23 | w('select')->set('name','返回类型') 24 | ->set('key','returnType') 25 | ->set('value',$item['returnType']) 26 | ->set('options',array('网页(html)'=>'0','文本(text)'=>'1','表单(form)'=>'2','链接(link)'=>'3')) 27 | ->set('tipe','页面返回的类型,默认为网页形式') 28 | ->e(); 29 | 30 | w('select')->set('name','替换域名') 31 | ->set('key','replaceDomain') 32 | ->set('value',d('config')->get('replaceDomain')) 33 | ->set('options',array('替换'=>'0','不替换'=>'1')) 34 | ->set('tipe','替换域名,实现全站镜像') 35 | ->e(); 36 | 37 | w('select')->set('name','替换HTML相对地址') 38 | ->set('key','relativeHTML') 39 | ->set('value',d('config')->get('relativeHTML')) 40 | ->set('options',array('替换'=>'0','不替换'=>'1')) 41 | ->set('tipe','替换相对地址,可以让在二级目录的7ghost正常运行,影响样式文件、脚本、站内链接') 42 | ->e(); 43 | w('select')->set('name','替换CSS相对地址') 44 | ->set('key','relativeCSS') 45 | ->set('value',d('config')->get('relativeCSS')) 46 | ->set('options',array('替换'=>'0','不替换'=>'1')) 47 | ->set('tipe','替换相对地址,可以让在二级目录的7ghost正常运行,影响样式文件中的图片') 48 | ->e(); 49 | 50 | w('text')->set('name','模版文件名') 51 | ->set('key','template') 52 | ->set('value',$item['template']) 53 | ->set('tipe','留空为不使用模版。使用模版后,不执行内容替换。模版文件保存在“tpl”文件夹下') 54 | ->e(); 55 | ?> 56 | 57 |
58 |
59 | 添加后可以在右侧列表选择,进行高级设置 60 |
61 |
62 |
63 |
64 |
65 |

自定义页面列表

66 | 67 | 68 | 69 | 72 | 75 | 76 | 77 | 78 | get('pages'); 80 | $i = 'class="ae-even"'; 81 | if(is_array($pages)) 82 | foreach($pages as $key => $item){ 83 | if($i == 'class="ae-even"'){ 84 | $i = ''; 85 | }else{ 86 | $i = 'class="ae-even"'; 87 | } 88 | ?> 89 | > 90 | 101 | 104 | 105 | 108 | 109 | 110 | 113 | 116 | 117 | 118 | 119 |
70 | 名称 71 | 73 | 页面地址 74 |
91 |
92 | 93 |
94 |
95 | 基本 | 96 | 高级 | 97 | 内容替换 | 98 | 删除 99 |
100 |
102 | 103 |
111 | 名称 112 | 114 | 页面地址 115 |
120 |
121 |
122 | -------------------------------------------------------------------------------- /_admin/includes/function.php: -------------------------------------------------------------------------------- 1 | get('a'); 29 | * {} 30 | */ 31 | function v($str){ 32 | //get 33 | preg_match_all('/{g:(.+?)}/',$str,$elements); 34 | if(!empty($elements[1])) 35 | foreach($elements[1] as $v){ 36 | $str = str_replace('{g:'.$v.'}',$_GET[$v],$str); 37 | } 38 | //post 39 | preg_match_all('/{p:(.+?)}/',$str,$elements); 40 | if(!empty($elements[1])) 41 | foreach($elements[1] as $v){ 42 | $str = str_replace('{p:'.$v.'}',$_POST[$v],$str); 43 | } 44 | //var 45 | preg_match_all('/{v:(.+?)}/',$str,$elements); 46 | if(!empty($elements[1])) 47 | foreach($elements[1] as $v){ 48 | $str = str_replace('{v:'.$v.'}',d('var')->get('a'),$str); 49 | } 50 | return $str; 51 | } 52 | 53 | function siteUri(){ 54 | $sitefolder=explode('.php', $_SERVER['PHP_SELF']); 55 | return trim(dirname($sitefolder[0]),DIRECTORY_SEPARATOR).'/'; 56 | } 57 | 58 | function send_header($headers,$cookies=1){ 59 | $return; 60 | if(is_array($headers)) 61 | foreach($headers as $value){ 62 | $arr=explode(": ",$value); 63 | if($arr[0]!="Set-Cookie"){ 64 | if($arr[0]!="Transfer-Encoding") 65 | header($value); 66 | }else{ 67 | if($cookies){ 68 | $arr=explode(";",$arr[1]); 69 | $arr_value = explode("=",$arr[0]); 70 | setcookie($arr_value[0],$arr_value[1]); 71 | } 72 | } 73 | if($arr[0]=="Content-Type"){ 74 | $arr=explode("; charset=",$arr[1]); 75 | $arr[0] = trim($arr[0]); 76 | $return = $arr; 77 | } 78 | } 79 | return $return; 80 | } 81 | function get_header($headers,$name=NULL){ 82 | $return=array(); 83 | if(is_array($headers)) 84 | foreach($headers as $value){ 85 | $arr=split(": ",$value); 86 | if(strtolower($arr[0])==strtolower($name)){ 87 | return $arr[1]; 88 | } 89 | $return[$arr[0]]=$arr[1]; 90 | } 91 | if(empty($name)) 92 | return $return; 93 | } 94 | function get_cookies($headers){ 95 | $cookies = ""; 96 | if(is_array($headers)) 97 | foreach($headers as $value){ 98 | $arr=split(": ",$value); 99 | if($arr[0]=="Set-Cookie"){ 100 | $arr=split(";",$arr[1]); 101 | $arr_value = split("=",$arr[0]); 102 | $cookies[$arr_value[0]]=$arr_value[1]; 103 | } 104 | } 105 | return $cookies; 106 | } 107 | 108 | function save_cache($name,$data){ 109 | file_put_contents('./cache/'.$name.'.php',"/", $html, $matches); 121 | foreach($matches[0] as $k=> $input){ 122 | preg_match('/name="(.+?)"/',$input, $matches); 123 | $name = $matches[1]; 124 | preg_match('/value="(.+?)"/',$input, $matches); 125 | $value = is_null($matches[1])?'':$matches[1]; 126 | $arr[$name]=$value; 127 | } 128 | return $arr; 129 | } 130 | function get_ip(){ 131 | if (@$_SERVER['HTTP_CLIENT_IP'] && $_SERVER['HTTP_CLIENT_IP']!='unknown') { 132 | $ip = $_SERVER['HTTP_CLIENT_IP']; 133 | } elseif (@$_SERVER['HTTP_X_FORWARDED_FOR'] && $_SERVER['HTTP_X_FORWARDED_FOR']!='unknown') { 134 | $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 135 | } else { 136 | $ip = $_SERVER['REMOTE_ADDR']; 137 | } 138 | return $ip; 139 | } 140 | /** 141 | * mdir加强版,支持多重文件夹建立 142 | */ 143 | function mdir2($path){ 144 | $path2 = $path; 145 | while(!is_dir($path2)){ 146 | $path2 = dirname($path2); 147 | } 148 | foreach (explode('/',str_replace($path2, '', $path)) as $value){ 149 | $path2 .= $value.'/'; 150 | if(!is_dir($path2)) 151 | @mkdir($path2, 0777); 152 | } 153 | } 154 | 155 | /** 156 | * 保存文件 157 | */ 158 | function save_file($filename,$data){ 159 | $pathinfo = pathinfo($filename); 160 | if(in_array($pathinfo['basename'],array('.htaccess'))||$pathinfo['extension']=='php'){ 161 | return false; 162 | } 163 | mdir2(dirname($filename)); 164 | file_put_contents($filename, $data); 165 | } 166 | ?> -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | get(); 6 | 7 | // 报告所有 PHP 错误 8 | // error_reporting(E_ALL); 9 | // 在浏览器中显示错误 10 | // ini_set('display_errors', 1); 11 | 12 | //当前根url 13 | $rootUrl = 'http://'.$_SERVER['HTTP_HOST'].siteUri(); 14 | $snoopy = new Snoopy(); 15 | $uri = substr($_SERVER['REQUEST_URI'],strlen(siteUri())); 16 | //匹配自定义页面,合并参数 17 | foreach($config['pages'] as $page){ 18 | if(@ereg($page['uri'],$uri)){ 19 | if(!empty($page['replaces'])){ 20 | $config['replaces'] = array_merge($config['replaces'],$page['replaces']); 21 | } 22 | if(!empty($page['host'])){ 23 | $uri = substr($uri,strlen(dirname($page['uri']))+1); 24 | }else{ 25 | unset($page['host']); 26 | } 27 | unset($config['pages']); 28 | $config = array_merge($config,$page); 29 | break; 30 | } 31 | } 32 | //获取要请求的url 33 | $url = $config['host'].$uri; 34 | //当前请求的文件后缀 35 | $thisExt = pathinfo($_SERVER['PATH_INFO'],PATHINFO_EXTENSION); 36 | //静态文件 37 | if(in_array($thisExt,explode("|",$config['diyStatic']))){ 38 | $filename = dirname(ADIR).'/'.substr($_SERVER['REDIRECT_URL'],strlen(siteUri())); 39 | //如果存在,直接输出 40 | if(is_file($filename)){ 41 | echo file_get_contents($filename); 42 | exit(); 43 | } 44 | } 45 | //-------------设置请求头信息------------ 46 | //设置cookie 47 | switch($config['cookies']){ 48 | case 1://全局cookies 49 | $snoopy->cookies = get_cache('cookies'); 50 | break; 51 | case 2://自定义COOKIES 52 | $snoopy->cookies = $config['diyCookies']; 53 | break; 54 | default://传统cookies 55 | $snoopy->cookies = $_COOKIE; 56 | break; 57 | } 58 | 59 | //设置agent 60 | switch($config['agent']){ 61 | case 1://不伪造 62 | break; 63 | case 2://自定义agent 64 | $snoopy->agent = $config['diyAgent']; 65 | break; 66 | default://使用客户端agent 67 | $snoopy->agent = $_SERVER['HTTP_USER_AGENT']; 68 | break; 69 | } 70 | 71 | 72 | //设置referer 73 | switch($config['referer']){ 74 | case 1://自定义referer 75 | $snoopy->referer = $config['diyReferer'];; 76 | break; 77 | default://自动伪造 78 | $HTTP_REFERER=""; 79 | $snoopy->referer = str_replace('rootUrl',$config['host'],$_SERVER[$HTTP_REFERER]); 80 | if($snoopy->referer==$_SERVER[$HTTP_REFERER]) 81 | $snoopy->referer = ''; 82 | break; 83 | } 84 | 85 | //设置ip 86 | switch($config['ip']){ 87 | case 1://使用客户端ip 88 | $snoopy->rawheaders["X_FORWARDED_FOR"] = get_ip(); //伪装ip 89 | break; 90 | case 2://自定义ip 91 | $snoopy->referer = $config['diyReferer'];; 92 | break; 93 | default://使用服务器ip 94 | break; 95 | } 96 | 97 | //-------其他头信息 begin-- 98 | 99 | //-------其他头信息 end---- 100 | 101 | //是否补全链接 102 | $snoopy->expandlinks = true; 103 | 104 | //--------------抓取网页----------------- 105 | //判断是POST还是GET 106 | 107 | if($_SERVER['REQUEST_METHOD']=="POST"){ 108 | $snoopy->submit($url,$_POST); 109 | }else{ 110 | $snoopy->fetch($url); 111 | } 112 | //---------------处理返回信息------------ 113 | //设置cookie 114 | switch($config['cookies']){ 115 | case 1://全局cookies 116 | $snoopy->cookies = set_cache('cookies'); 117 | break; 118 | default: 119 | break; 120 | } 121 | $contentType = send_header($snoopy->headers); 122 | $charset = empty($contentType[1])?'utf-8':$contentType[1]; 123 | $charset = trim($charset,"\n\r"); 124 | 125 | //替换域名 relativeHTML relativeCSS 126 | if(empty($config['replaceDomain'])){ 127 | if(in_array($thisExt,array('','php','html'))){ 128 | //替换域名 129 | $snoopy->results = str_replace($config['host'],$rootUrl,$snoopy->results); 130 | } 131 | } 132 | 133 | //替换相对地址relativeHTML 134 | if(empty($config['replaceDomain'])){ 135 | if(in_array($thisExt,array('','php','html'))){ 136 | $snoopy->results = str_replace('="/','="'.siteUri(),$snoopy->results); 137 | $snoopy->results = str_replace('=\'/','=\''.siteUri(),$snoopy->results); 138 | $snoopy->results = preg_replace('//','',$snoopy->results); 139 | } 140 | } 141 | 142 | //替换CSS相对地址 143 | if(empty($config['relativeCSS'])){ 144 | if(in_array($thisExt,array('css'))){ 145 | $snoopy->results = str_replace('url("/','url("'.siteUri(),$snoopy->results); 146 | } 147 | } 148 | 149 | //内容替换 150 | if(is_array($config['replaces'])&&!empty($config['replaces'])) 151 | 152 | foreach($config['replaces'] as $replace){ 153 | $seach = addcslashes(v($replace['seach']),'/'); 154 | $replace = v($replace['replace']); 155 | $snoopy->results = preg_replace('/'.$seach.'/',$replace,$snoopy->results); 156 | } 157 | 158 | //模版 159 | if(!empty($config['template'])){ 160 | @include(ADIR.'data/tpl/'.$config['template']); 161 | exit(); 162 | } 163 | //静态文件 164 | if(in_array($thisExt,explode("|",$config['diyStatic']))){ 165 | $filename = dirname(ADIR).'/'.substr($_SERVER['REDIRECT_URL'],strlen(siteUri())); 166 | save_file($filename,$snoopy->results); 167 | } 168 | 169 | //输出 170 | echo $snoopy->results; 171 | //echo htmlspecialchars($snoopy->results); -------------------------------------------------------------------------------- /_admin/static/core.css: -------------------------------------------------------------------------------- 1 | html, body, div, h1, h2, h3, h4, h5, h6, p, img, dl, dt, dd, ol, ul, li, table, caption, tbody, tfoot, thead, tr, th, td, form, fieldset, embed, object, applet { 2 | margin: 0; 3 | padding: 0; 4 | border: 0; 5 | } 6 | 7 | body { 8 | font-size: 62.5%; 9 | font-family: Arial, sans-serif; 10 | color: #000; 11 | background: #fff 12 | } 13 | 14 | a { 15 | color: #00c 16 | } 17 | 18 | a:hover,a:active { 19 | color: #f86807; 20 | text-decoration:underline; 21 | } 22 | 23 | a:visited { 24 | /*color: #551a8b*/ 25 | } 26 | 27 | table { 28 | border-collapse: collapse; 29 | border-width: 0; 30 | empty-cells: show 31 | } 32 | 33 | ul { 34 | padding: 0 0 1em 1em 35 | } 36 | 37 | ol { 38 | padding: 0 0 1em 1.3em 39 | } 40 | 41 | li { 42 | line-height: 1.5em; 43 | padding: 0 0 .5em 0 44 | } 45 | 46 | p { 47 | padding: 0 0 1em 0 48 | } 49 | 50 | h1, h2, h3, h4, h5 { 51 | padding: 0 0 1em 0 52 | } 53 | 54 | h1, h2 { 55 | font-size: 1.3em 56 | } 57 | 58 | h3 { 59 | font-size: 1.1em 60 | } 61 | 62 | h4, h5, table { 63 | font-size: 1em 64 | } 65 | 66 | sup, sub { 67 | font-size: .7em 68 | } 69 | 70 | input, select, textarea, option { 71 | font-family: inherit; 72 | font-size: inherit 73 | } 74 | .doc { 75 | font-size: 130%; 76 | width: 100%; 77 | text-align: left; 78 | margin: 0 10px; 79 | width: auto; 80 | } 81 | /*---------------------*/ 82 | .top { position:relative;width:100%;} 83 | .side { position:relative;height:100%;overflow:auto; float:left; margin-right:0 !important; margin-right:-3px; overflow:auto;} 84 | .main { left;position:relative; overflow:auto; height:100%;} 85 | .bottom { position:relative; clear:both;} 86 | #copyright { 87 | clear: both; 88 | text-align: center; 89 | margin-top: 3.5em; 90 | margin-bottom: 1em; 91 | background-repeat: no-repeat; 92 | background-position: left center; 93 | } 94 | /*---------------------*/ 95 | .m-50-{ 96 | float:left; 97 | width:49.999999%; 98 | } 99 | /*---------------------*/ 100 | .top li{ 101 | display: inline; 102 | } 103 | #userinfo{ 104 | height:2.5em; 105 | } 106 | #hd h1{ 107 | color:#496a93; 108 | font-size:2em; 109 | padding:0; 110 | width:200px; 111 | float:left; 112 | display:block; 113 | } 114 | #userinfo{ 115 | text-align: right; 116 | white-space: nowrap; 117 | } 118 | 119 | #userinfo ul { 120 | padding-bottom: 0; 121 | padding-top: 5px; 122 | } 123 | 124 | #bar { 125 | background-color: #E5ECF9; 126 | border-top: 1px solid #3366CC; 127 | font-size: 1em; 128 | margin: 0 0 1.25em; 129 | padding: 0.1em 0; 130 | white-space: nowrap; 131 | width: 100%; 132 | word-wrap: normal; 133 | } 134 | 135 | #bar ul{ 136 | line-height: 1em; 137 | list-style: none outside none; 138 | margin: 0; 139 | padding: 0.47em 0; 140 | text-align: left; 141 | } 142 | 143 | #bar ul li { 144 | line-height: 1em; 145 | display: inline; 146 | float: none; 147 | margin: 0; 148 | padding: 0 0.8em; 149 | } 150 | /*-----------------------*/ 151 | #nav { 152 | clear: left; 153 | height: auto; 154 | margin-bottom: 1em; 155 | margin: 0 0.5em 0 0; 156 | float: left; 157 | width: 140px; 158 | } 159 | #nav ul{ 160 | list-style-type: none; 161 | margin: 0; 162 | padding: 1em 0; 163 | } 164 | #nav ul.dashboard{ 165 | width:133px; 166 | float:left; 167 | overflow:hidden; 168 | position:relative; 169 | padding:0; 170 | z-index:2; 171 | } 172 | #nav span{ 173 | font-weight: bold; 174 | } 175 | #nav ul li { 176 | list-style: none outside none; 177 | margin: 0; 178 | padding-left: 0.5em; 179 | width:100%; 180 | } 181 | #nav li a{ 182 | padding-left: 0.5em; 183 | width:115px; 184 | text-decoration:none; 185 | } 186 | #nav li a:hover{ 187 | text-decoration:underline; 188 | } 189 | 190 | #nav li a.section{ 191 | display:block; 192 | background-color: #E5ECF9; 193 | margin-right: -1px; 194 | padding:0.2em 0.5em 0.1em 0.5em; 195 | z-index: 2; 196 | position:relative; 197 | color:#000; 198 | } 199 | #nav ul ul { 200 | margin: 0; 201 | padding: 0; 202 | overflow:hidden; 203 | } 204 | 205 | #collapsible { 206 | background: none repeat scroll 0 0 #E5ECF9; 207 | border-left:solid 1px #FFFFFF; 208 | border-right:solid 1px #FFFFFF; 209 | cursor: pointer; 210 | overflow: hidden; 211 | width: 3px; 212 | float:left; 213 | position:relative; 214 | right:3px; 215 | } 216 | a#collapsible:hover{ 217 | width: 5px; 218 | border-left:solid 1px #d3d9e5; 219 | border-right:solid 1px #d3d9e5; 220 | right:4px; 221 | } 222 | /*-----------------------*/ 223 | dl{ 224 | border-bottom:1px dotted #E5ECF9; 225 | display:block; 226 | overflow:hidden; 227 | padding:0.2em 0 0.5em; 228 | } 229 | dl dt{ 230 | font-weight: 700; 231 | padding: 0.2em 0.4em 0.3em; 232 | } 233 | dl dd{ 234 | width:300px; 235 | padding: 0.2em 1.5em 0.2em 0em; 236 | position:relative; 237 | height:100%; 238 | float:left; 239 | margin-right:0 !important; 240 | margin-right:-3px; 241 | overflow:visible; 242 | } 243 | dl dd input,dl dd select{ 244 | font-size:1.2em; 245 | width:100%; 246 | } 247 | dl dd textarea{ 248 | width:100%; 249 | position:relative; 250 | z-index:2; 251 | } 252 | dl dd.tipe{ 253 | color: #666667; 254 | width:auto; 255 | position:relative; 256 | overflow:auto; 257 | height:100%; 258 | float:none; 259 | line-height:1.8em; 260 | } 261 | 262 | h2.section-header { 263 | background: none repeat scroll 0 0 #E5ECF9; 264 | margin-bottom: 0.2em; 265 | padding: 0.2em 0.4em; 266 | } 267 | 268 | .mside dl dd.tipe{ 269 | float:left; 270 | overflow:visible; 271 | } 272 | /*------------------------------*/ 273 | #ae-quota-details table.ae-quota-requests { 274 | margin-bottom:0.5em; 275 | } 276 | 277 | #ae-quota-details table { 278 | margin-bottom:1.75em; 279 | } 280 | 281 | .ae-table { 282 | border-bottom-color:#C5D7EF; 283 | border-bottom-style:solid; 284 | border-bottom-width:1px; 285 | border-collapse:collapse; 286 | border-left-color:#C5D7EF; 287 | border-left-style:solid; 288 | border-left-width:1px; 289 | border-right-color:#C5D7EF; 290 | border-right-style:solid; 291 | border-right-width:1px; 292 | border-top-color:#C5D7EF; 293 | border-top-style:solid; 294 | border-top-width:1px; 295 | width:100%; 296 | } 297 | .ae-table thead th,.ae-table tfoot td{ 298 | background-color:#C5D7EF; 299 | font-weight:bold; 300 | text-align:left; 301 | vertical-align:bottom; 302 | } 303 | 304 | .ae-table th, .ae-table td { 305 | background-color:#FFFFFF; 306 | margin-bottom:0; 307 | margin-left:0; 308 | margin-right:0; 309 | margin-top:0; 310 | padding-bottom:0.35em; 311 | padding-left:0.35em; 312 | padding-right:1em; 313 | padding-top:0.35em; 314 | } 315 | 316 | .ae-table td { 317 | border-bottom-color:#C5D7EF; 318 | border-bottom-style:solid; 319 | border-bottom-width:1px; 320 | border-top-color:#C5D7EF; 321 | border-top-style:solid; 322 | border-top-width:1px; 323 | } 324 | 325 | .ae-even td, .ae-even th, .ae-even-top td, .ae-even-tween td, .ae-even-bottom td, ol.ae-even { 326 | background-color:#E9E9E9; 327 | border-bottom-color:#C5D7EF; 328 | border-bottom-style:solid; 329 | border-bottom-width:1px; 330 | border-top-color:#C5D7EF; 331 | border-top-style:solid; 332 | border-top-width:1px; 333 | } 334 | 335 | .ae-table-caption, .ae-table caption { 336 | border: 1px solid #C5D7EF; 337 | background: #E5ECF9; 338 | text-align: left; 339 | padding: 0.35em 0.35em; 340 | text-align: left; 341 | } 342 | 343 | .ae-table caption span{ 344 | padding:0 5px; 345 | } 346 | .ae-table caption span.count{ 347 | color:#999; 348 | } 349 | .ae-table .row-title{ 350 | padding-bottom:0.2em; 351 | } 352 | .ae-table .row-title a{ 353 | text-decoration:none; 354 | } 355 | 356 | .ae-table .row{ 357 | padding:0.1em 0; 358 | } 359 | .actions{ 360 | height:1em; 361 | } -------------------------------------------------------------------------------- /License: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /_admin/static/jquery-1.5.1.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v1.5.1 3 | * http://jquery.com/ 4 | * 5 | * Copyright 2011, John Resig 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://jquery.org/license 8 | * 9 | * Includes Sizzle.js 10 | * http://sizzlejs.com/ 11 | * Copyright 2011, The Dojo Foundation 12 | * Released under the MIT, BSD, and GPL Licenses. 13 | * 14 | * Date: Wed Feb 23 13:55:29 2011 -0500 15 | */ 16 | (function(a,b){function cg(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cd(a){if(!bZ[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bZ[a]=c}return bZ[a]}function cc(a,b){var c={};d.each(cb.concat.apply([],cb.slice(0,b)),function(){c[this]=a});return c}function bY(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bX(){try{return new a.XMLHttpRequest}catch(b){}}function bW(){d(a).unload(function(){for(var a in bU)bU[a](0,1)})}function bQ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(r,"`").replace(s,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,q=[],r=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function w(){return!0}function v(){return!1}function g(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,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=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return E.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 e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,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"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1){var f=E.call(arguments,0),g=b,h=function(a){return function(b){f[a]=arguments.length>1?E.call(arguments,0):b,--g||c.resolveWith(e,f)}};while(b--)a=f[b],a&&d.isFunction(a.promise)?a.promise().then(h(b),c.reject):--g;g||c.resolveWith(e,f)}else c!==a&&c.resolve(a);return e},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)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="
a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e),b=e=f=null}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!g(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,h=b.nodeType,i=h?d.cache:b,j=h?b[d.expando]:d.expando;if(!i[j])return;if(c){var k=e?i[j][f]:i[j];if(k){delete k[c];if(!g(k))return}}if(e){delete i[j][f];if(!g(i[j]))return}var l=i[j][f];d.support.deleteExpando||i!=a?delete i[j]:i[j]=null,l?(i[j]={},h||(i[j].toJSON=d.noop),i[j][f]=l):h&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var k=i?f:0,l=i?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=k.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&l.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:m.test(a.nodeName)||n.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var p=/\.(.*)$/,q=/^(?:textarea|input|select)$/i,r=/\./g,s=/ /g,t=/[^\w\s.|`]/g,u=function(a){return a.replace(t,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=v;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),u).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(p,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(q.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return q.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return q.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){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,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.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]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.getAttribute("type")},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},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 bc[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=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||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=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":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=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.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:[]}},l.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&&(l.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.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(d||!l.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return k(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},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 P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div
","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(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=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){$(a,e),f=_(a),g=_(e);for(h=0;f[h];++h)$(f[h],g[h])}if(b){Z(a,e);if(c){f=_(a),g=_(e);for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bb=/alpha\([^)]*\)/i,bc=/opacity=([^)]*)/,bd=/-([a-z])/ig,be=/([A-Z])/g,bf=/^-?\d+(?:px)?$/i,bg=/^-?\d/,bh={position:"absolute",visibility:"hidden",display:"block"},bi=["Left","Right"],bj=["Top","Bottom"],bk,bl,bm,bn=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bk(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bk)return bk(a,c,g)},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]},camelCase:function(a){return a.replace(bd,bn)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bo(a,b,e):d.swap(a,bh,function(){f=bo(a,b,e)});if(f<=0){f=bk(a,b,b),f==="0px"&&bm&&(f=bm(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bf.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bb.test(f)?f.replace(bb,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bl=function(a,c,e){var f,g,h;e=e.replace(be,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bm=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bf.test(d)&&bg.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bk=bl||bm,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bp=/%20/g,bq=/\[\]$/,br=/\r?\n/g,bs=/#.*$/,bt=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bu=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bv=/(?:^file|^widget|\-extension):$/,bw=/^(?:GET|HEAD)$/,bx=/^\/\//,by=/\?/,bz=/)<[^<]*)*<\/script>/gi,bA=/^(?:select|textarea)/i,bB=/\s+/,bC=/([?&])_=[^&]*/,bD=/(^|\-)([a-z])/g,bE=function(a,b,c){return b+c.toUpperCase()},bF=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,bG=d.fn.load,bH={},bI={},bJ,bK;try{bJ=c.location.href}catch(bL){bJ=c.createElement("a"),bJ.href="",bJ=bJ.href}bK=bF.exec(bJ.toLowerCase()),d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bG)return bG.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.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?d("
").append(c.replace(bz,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bA.test(this.nodeName)||bu.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(br,"\r\n")}}):{name:b.name,value:c.replace(br,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bJ,isLocal:bv.test(bK[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","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bM(bH),ajaxTransport:bM(bI),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bP(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bQ(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bD,bE)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bt.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bs,"").replace(bx,bK[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bB),e.crossDomain||(q=bF.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bK[1]||q[2]!=bK[2]||(q[3]||(q[1]==="http:"?80:443))!=(bK[3]||(bK[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bN(bH,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!bw.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(by.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bC,"$1_="+w);e.url=x+(x===e.url?(by.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bN(bI,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bO(g,a[g],c,f);return e.join("&").replace(bp,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bR=d.now(),bS=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bR++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bS.test(b.url)||f&&bS.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bS,l),b.url===j&&(f&&(k=k.replace(bS,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.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(!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 bT=d.now(),bU,bV;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bX()||bY()}:bX,bV=d.ajaxSettings.xhr(),d.support.ajax=!!bV,d.support.cors=bV&&"withCredentials"in bV,bV=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),(!a.crossDomain||a.hasContent)&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bU[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bU||(bU={},bW()),h=bT++,g.onreadystatechange=bU[h]=c):c()},abort:function(){c&&c(0,1)}}}});var bZ={},b$=/^(?:toggle|show|hide)$/,b_=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ca,cb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(cc("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:cc("show",1),slideUp:cc("hide",1),slideToggle:cc("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},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={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!ca&&(ca=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.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):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=cf.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!cf.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=cg(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=cg(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window); --------------------------------------------------------------------------------