mercury 0.9.1 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/LICENSE +1 -1
  2. data/README.rdoc +12 -5
  3. data/bin/mercury +17 -2
  4. data/lib/mercury.rb +9 -69
  5. data/lib/mercury/helpers.rb +61 -0
  6. data/lib/mercury/images.rb +33 -0
  7. data/lib/public/javascripts/jquery-ui-1.8.custom.min.js +374 -0
  8. data/lib/public/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
  9. data/lib/public/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  10. data/lib/public/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
  11. data/lib/public/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
  12. data/lib/public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  13. data/lib/public/stylesheets/smoothness/{jquery-ui-1.8rc3.custom.css → jquery-ui-1.8.custom.css} +9 -8
  14. data/lib/views/index.haml +6 -1
  15. data/lib/views/layout.haml +2 -2
  16. metadata +21 -33
  17. data/.document +0 -5
  18. data/.gitignore +0 -21
  19. data/Mercury.gemspec +0 -108
  20. data/Rakefile +0 -48
  21. data/VERSION +0 -1
  22. data/docs/config.ru +0 -7
  23. data/docs/mercury.log +0 -3015
  24. data/docs/views/about.haml +0 -6
  25. data/docs/views/about.md +0 -25
  26. data/docs/views/default.sass +0 -30
  27. data/docs/views/example.haml +0 -14
  28. data/docs/views/example.md +0 -82
  29. data/docs/views/footer.haml +0 -2
  30. data/docs/views/header.haml +0 -3
  31. data/docs/views/home.md +0 -21
  32. data/docs/views/index.haml +0 -14
  33. data/docs/views/navigation.haml +0 -9
  34. data/docs/views/resources.haml +0 -12
  35. data/docs/views/resources.md +0 -8
  36. data/docs/views/wolfgang.coffee +0 -4
  37. data/lib/public/javascripts/jquery-ui-1.8rc3.custom.min.js +0 -374
  38. data/spec/spec.opts +0 -1
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 Tom & Russell
1
+ Copyright (c) 2010 Jack Russell Software Company, LLC
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -1,6 +1,8 @@
1
1
  = Mercury
2
2
 
3
- Mercury is a prototype builder:
3
+ === What is it?
4
+
5
+ It is a command line application that allows you to create and run web sites built using haml, sass, jquery, and coffee-script. It also has support for markdown, textile, and 960 built right in. Give it a try, it only takes 5 minutes to get up and running.
4
6
 
5
7
  === Technology
6
8
 
@@ -8,12 +10,17 @@ Mercury is a prototype builder:
8
10
  * sass
9
11
  * jquery
10
12
  * jquery-ui
13
+ * coffee-script
14
+ * markdown
15
+ * textile
11
16
  * 960.gs
12
17
  * /gif|png|jpg|jpeg/ Image Support
13
18
 
14
19
  == Why
15
20
 
16
- We love using haml, sass and jquery in complex applications, but wanted a simple way to utilize these tools for web sites, simple or nosql applications, and wireframes. Mercury gives us the power to create quick projects without having to setup a rails or sinatra app or write any code to get started.
21
+ At Jack Russell Software, we love haml, jquery, etc and needed to create web mockups or wireframes quickly to get user interface feedback during our storyboarding process. Mercury was the answer, it allows us to work with the same tools we are familar with and focus on getting the user interface right.
22
+
23
+ See for you self! Try Mercury, you will be hooked!
17
24
 
18
25
  Simply type:
19
26
 
@@ -27,7 +34,8 @@ To run a mercury app:
27
34
 
28
35
  mercury
29
36
 
30
- Keeping it this simple allows users that are not super familiar with ruby technologies to use haml and sass.
37
+ Keeping it this simple allows users to start building right away!
38
+
31
39
 
32
40
  == Install
33
41
 
@@ -44,7 +52,7 @@ Keeping it this simple allows users that are not super familiar with ruby techno
44
52
 
45
53
  cd {project}
46
54
 
47
- cd views
55
+ cd wwwroot
48
56
 
49
57
  touch test.haml
50
58
 
@@ -78,7 +86,6 @@ Keeping it this simple allows users that are not super familiar with ruby techno
78
86
 
79
87
  And you should see you index page with a link to your test.haml form
80
88
 
81
- You can create more haml documents, and you can create subfolders and organize your pages however you want, and you never have to write a line of code, other than haml.
82
89
 
83
90
  ===Using Sass
84
91
 
data/bin/mercury CHANGED
@@ -8,9 +8,24 @@ version = ">= 0"
8
8
  if ARGV.first
9
9
  # Build Directory and add setup files
10
10
  FileUtils.mkdir_p ARGV.first
11
- FileUtils.mkdir_p File.join(ARGV.first, 'views')
12
- config_ru = ["require 'mercury'","log = File.new('mercury.log', 'a+')", "$stdout.reopen(log)", "$stderr.reopen(log)", "run Mercury"].join("\n")
11
+ FileUtils.mkdir_p File.join(ARGV.first, 'wwwroot')
12
+ FileUtils.mkdir_p File.join(ARGV.first, 'tmp')
13
+ config_ru = ["require 'mercury'","log = File.new('tmp/mercury.log', 'a+')", "$stdout.reopen(log)", "$stderr.reopen(log)", "run Mercury"].join("\n")
13
14
  File.open(File.join(ARGV.first, 'config.ru'),'w').write(config_ru)
15
+ gemfile = ['source :gemcutter', "gem 'thin'", "gem 'mercury'"].join("\n")
16
+ File.open(File.join(ARGV.first, 'Gemfile'),'w').write(gemfile)
17
+ puts "***********************************"
18
+ puts "* Thank you for choosing Mercury! *"
19
+ puts "***********************************"
20
+ puts "* $ cd #{ARGV.first}/wwwroot "
21
+ puts "* $ mercury "
22
+ puts "***********************************"
23
+ puts "* have fun.... "
24
+ puts "***********************************"
25
+ puts "* Go to http://mercury.jackhq.com "
26
+ puts "* for more info "
27
+ puts "***********************************"
28
+
14
29
  else
15
30
  puts "Running Mercury on port:9292"
16
31
  puts "Press Ctrl-C to exit"
data/lib/mercury.rb CHANGED
@@ -1,97 +1,37 @@
1
1
  require 'sinatra'
2
2
  require 'haml'
3
- require 'sass'
4
3
  require 'fileutils'
5
4
  require 'faker'
6
-
7
- begin
8
- require 'rdiscount'
9
- # ^^ that sets a Markdown constant
10
- rescue LoadError
11
- require 'bluecloth'
12
- Markdown = BlueCloth
13
- end
5
+ require File.dirname(__FILE__) + '/mercury/helpers'
6
+ require File.dirname(__FILE__) + '/mercury/images'
14
7
 
15
8
  # Core Sinatra application to run mercury apps
16
9
  class Mercury < Sinatra::Application
17
- SASS = 'sass'
18
- JS = 'js'
19
- MARKDOWN = 'md'
20
- COFFEE = 'coffee'
21
-
10
+ helpers Sinatra::Helpers
11
+ helpers Sinatra::Images
12
+
22
13
  set :root, FileUtils.pwd.gsub("\n",'')
23
14
  set :public, File.dirname(__FILE__) + '/public'
24
-
25
-
26
- get '/*.gif' do
27
- stream_image([params["splat"][0],'gif'].join('.'),"image/gif")
28
- end
29
-
30
- get '/*.png' do
31
- stream_image([params["splat"][0],'png'].join('.'),"image/png")
32
- end
33
-
34
- get '/*.jpg' do
35
- stream_image([params["splat"][0],'jpg'].join('.'),"image/jpg")
36
- end
37
-
38
- get '/*.jpeg' do
39
- stream_image([params["splat"][0],'jpeg'].join('.'),"image/jpeg")
40
- end
15
+ set :views, FileUtils.pwd.gsub("\n",'') + '/wwwroot'
41
16
 
42
17
  get '/*' do
43
18
  view_file_request = params["splat"][0]
44
19
  haml view_file_request.empty? ? view_file = get_view('index.haml') : view_file_request.to_sym, :layout => get_view('layout.haml')
45
20
  end
46
21
 
47
- def sass(sassfile)
48
- ["<style type='text/css'>",
49
- Sass::Engine.new(open_file(find_file(sassfile, SASS))).render,
50
- "</style>\n"].join("\n")
51
- end
52
-
53
- def javascript(jsfile)
54
- ["<script type='text/javascript'>",
55
- open_file(find_file(jsfile, JS)),
56
- "</script>\n"].join("\n")
57
- end
58
-
59
- def markdown(mdfile)
60
- Markdown.new(open_file(find_file(mdfile, MARKDOWN))).to_html
61
- end
62
-
63
- def coffee(coffeefile)
64
- ["<script type='text/coffeescript'>",
65
- open_file(find_file(coffeefile, COFFEE)),
66
- "</script>\n"].join("\n")
67
- end
68
22
 
69
23
  private
70
- def find_file(filename, ext)
71
- Dir.glob(File.join(options.views, "**/*.#{ext}")).select { |extfile| extfile =~ /#{filename}.#{ext}$/ }.first
72
- end
73
-
74
- def open_file(full_path_and_filename)
75
- open(full_path_and_filename,'r').read
76
- end
77
24
 
78
25
  def get_view(filename)
79
26
  if File.exists?(File.join(options.views, filename))
80
- open_file File.join(options.views,filename)
27
+ view_file = File.join(options.views,filename)
81
28
  else
82
29
  view_directory = File.join(File.dirname(__FILE__),'views')
83
- open_file File.join(view_directory,filename)
30
+ view_file = File.join(view_directory,filename)
84
31
  end
32
+ open(view_file,'r') { |file| file.read }
85
33
  end
86
34
 
87
- def get_image(filename)
88
- open(File.join(options.views, filename), 'rb').read
89
- end
90
-
91
- def stream_image(filename, content_type)
92
- content_type "image/png"
93
- get_image(filename)
94
- end
95
35
 
96
36
 
97
37
 
@@ -0,0 +1,61 @@
1
+ require 'sinatra/base'
2
+ require 'sass'
3
+ require 'redcloth'
4
+
5
+ begin
6
+ require 'rdiscount'
7
+ # ^^ that sets a Markdown constant
8
+ rescue LoadError
9
+ require 'bluecloth'
10
+ Markdown = BlueCloth
11
+ end
12
+
13
+ module Sinatra
14
+ module MercuryHelpers
15
+
16
+ SASS = 'sass'
17
+ JS = 'js'
18
+ MARKDOWN = 'md'
19
+ TEXTILE = 'textile'
20
+ COFFEE = 'coffee'
21
+
22
+ def sass(sassfile)
23
+ ["<style type='text/css'>",
24
+ Sass::Engine.new(open_file(find_file(sassfile, SASS))).render,
25
+ "</style>\n"].join("\n")
26
+ end
27
+
28
+ def javascript(jsfile)
29
+ ["<script type='text/javascript'>",
30
+ open_file(find_file(jsfile, JS)),
31
+ "</script>\n"].join("\n")
32
+ end
33
+
34
+ def markdown(mdfile)
35
+ Markdown.new(open_file(find_file(mdfile, MARKDOWN))).to_html
36
+ end
37
+
38
+ def textile(txfile)
39
+ RedCloth.new(open_file(find_file(txfile, TEXTILE))).to_html
40
+ end
41
+
42
+ def coffee(coffeefile)
43
+ ["<script type='text/coffeescript'>",
44
+ open_file(find_file(coffeefile, COFFEE)),
45
+ "</script>\n"].join("\n")
46
+ end
47
+
48
+ private
49
+
50
+ def find_file(filename, ext)
51
+ Dir.glob(File.join(options.views, "**/*.#{ext}")).select { |extfile| extfile.downcase =~ /\/#{filename.to_s.downcase}.#{ext}$/ }.first
52
+ end
53
+
54
+ def open_file(full_path_and_filename)
55
+ open(full_path_and_filename,'r') { |file| file.read }
56
+ end
57
+
58
+ end
59
+
60
+ helpers MercuryHelpers
61
+ end
@@ -0,0 +1,33 @@
1
+ module Sinatra
2
+ module Images
3
+ def self.registered(app)
4
+ app.get '/*.gif' do
5
+ stream_image([params["splat"][0],'gif'].join('.'),"image/gif")
6
+ end
7
+
8
+ app.get '/*.png' do
9
+ stream_image([params["splat"][0],'png'].join('.'),"image/png")
10
+ end
11
+
12
+ app.get '/*.jpg' do
13
+ stream_image([params["splat"][0],'jpg'].join('.'),"image/jpg")
14
+ end
15
+
16
+ app.get '/*.jpeg' do
17
+ stream_image([params["splat"][0],'jpeg'].join('.'),"image/jpeg")
18
+ end
19
+ end
20
+
21
+ private
22
+ def get_image(filename)
23
+ open(File.join(options.views, filename), 'rb') { |file| file.read }
24
+ end
25
+
26
+ def stream_image(filename, ct)
27
+ content_type(ct)
28
+ get_image(filename)
29
+ end
30
+
31
+ end
32
+ register Images
33
+ end
@@ -0,0 +1,374 @@
1
+ /*!
2
+ * jQuery UI 1.8
3
+ *
4
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI
9
+ */
10
+ * jQuery UI 1.8
11
+ *
12
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
13
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
14
+ * and GPL (GPL-LICENSE.txt) licenses.
15
+ *
16
+ * http://docs.jquery.com/UI
17
+ */
18
+ jQuery.ui||(function(a){a.ui={version:"1.8",plugin:{add:function(c,d,f){var e=a.ui[c].prototype;for(var b in f){e.plugins[b]=e.plugins[b]||[];e.plugins[b].push([d,f[b]])}},call:function(b,d,c){var f=b.plugins[d];if(!f||!b.element[0].parentNode){return}for(var e=0;e<f.length;e++){if(b.options[f[e][0]]){f[e][1].apply(b.element,c)}}}},contains:function(d,c){return document.compareDocumentPosition?d.compareDocumentPosition(c)&16:d!==c&&d.contains(c)},hasScroll:function(e,c){if(a(e).css("overflow")=="hidden"){return false}var b=(c&&c=="left")?"scrollLeft":"scrollTop",d=false;if(e[b]>0){return true}e[b]=1;d=(e[b]>0);e[b]=0;return d},isOverAxis:function(c,b,d){return(c>b)&&(c<(b+d))},isOver:function(g,c,f,e,b,d){return a.ui.isOverAxis(g,f,b)&&a.ui.isOverAxis(c,e,d)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b==="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus();(c&&c.call(d))},b)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var b;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){b=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{b=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!b.length?a(document):b},zIndex:function(e){if(e!==undefined){return this.css("zIndex",e)}if(this.length){var c=a(this[0]),b,d;while(c.length&&c[0]!==document){b=c.css("position");if(b=="absolute"||b=="relative"||b=="fixed"){d=parseInt(c.css("zIndex"));if(!isNaN(d)&&d!=0){return d}}c=c.parent()}}return 0}});a.extend(a.expr[":"],{data:function(d,c,b){return !!a.data(d,b[3])},focusable:function(c){var d=c.nodeName.toLowerCase(),b=a.attr(c,"tabindex");return(/input|select|textarea|button|object/.test(d)?!c.disabled:"a"==d||"area"==d?c.href||!isNaN(b):!isNaN(b))&&!a(c)["area"==d?"parents":"closest"](":hidden").length},tabbable:function(c){var b=a.attr(c,"tabindex");return(isNaN(b)||b>=0)&&a(c).is(":focusable")}})})(jQuery);;/*!
19
+ * jQuery UI Widget 1.8
20
+ *
21
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
22
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
23
+ * and GPL (GPL-LICENSE.txt) licenses.
24
+ *
25
+ * http://docs.jquery.com/UI/Widget
26
+ */
27
+ * jQuery UI Widget 1.8
28
+ *
29
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
30
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
31
+ * and GPL (GPL-LICENSE.txt) licenses.
32
+ *
33
+ * http://docs.jquery.com/UI/Widget
34
+ */
35
+ (function(b){var a=b.fn.remove;b.fn.remove=function(c,d){return this.each(function(){if(!d){if(!c||b.filter(c,[this]).length){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")})}}return a.call(b(this),c,d)})};b.widget=function(d,f,c){var e=d.split(".")[0],h;d=d.split(".")[1];h=e+"-"+d;if(!c){c=f;f=b.Widget}b.expr[":"][h]=function(i){return !!b.data(i,d)};b[e]=b[e]||{};b[e][d]=function(i,j){if(arguments.length){this._createWidget(i,j)}};var g=new f();g.options=b.extend({},g.options);b[e][d].prototype=b.extend(true,g,{namespace:e,widgetName:d,widgetEventPrefix:b[e][d].prototype.widgetEventPrefix||d,widgetBaseClass:h},c);b.widget.bridge(d,b[e][d])};b.widget.bridge=function(d,c){b.fn[d]=function(g){var e=typeof g==="string",f=Array.prototype.slice.call(arguments,1),h=this;g=!e&&f.length?b.extend.apply(null,[true,g].concat(f)):g;if(e&&g.substring(0,1)==="_"){return h}if(e){this.each(function(){var i=b.data(this,d),j=i&&b.isFunction(i[g])?i[g].apply(i,f):i;if(j!==i&&j!==undefined){h=j;return false}})}else{this.each(function(){var i=b.data(this,d);if(i){if(g){i.option(g)}i._init()}else{b.data(this,d,new c(g,this))}})}return h}};b.Widget=function(c,d){if(arguments.length){this._createWidget(c,d)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(d,e){this.element=b(e).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(e)[this.widgetName],d);var c=this;this.element.bind("remove."+this.widgetName,function(){c.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled")},widget:function(){return this.element},option:function(e,f){var d=e,c=this;if(arguments.length===0){return b.extend({},c.options)}if(typeof e==="string"){if(f===undefined){return this.options[e]}d={};d[e]=f}b.each(d,function(g,h){c._setOption(g,h)});return c},_setOption:function(c,d){this.options[c]=d;if(c==="disabled"){this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",d)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(d,e,f){var h=this.options[d];e=b.Event(e);e.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();f=f||{};if(e.originalEvent){for(var c=b.event.props.length,g;c;){g=b.event.props[--c];e[g]=e.originalEvent[g]}}this.element.trigger(e,f);return !(b.isFunction(h)&&h.call(this.element[0],e,f)===false||e.isDefaultPrevented())}}})(jQuery);;/*!
36
+ * jQuery UI Mouse 1.8
37
+ *
38
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
39
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
40
+ * and GPL (GPL-LICENSE.txt) licenses.
41
+ *
42
+ * http://docs.jquery.com/UI/Mouse
43
+ *
44
+ * Depends:
45
+ * jquery.ui.widget.js
46
+ */
47
+ * jQuery UI Mouse 1.8
48
+ *
49
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
50
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
51
+ * and GPL (GPL-LICENSE.txt) licenses.
52
+ *
53
+ * http://docs.jquery.com/UI/Mouse
54
+ *
55
+ * Depends:
56
+ * jquery.ui.widget.js
57
+ */
58
+ (function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=d.originalEvent||{};if(d.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(d));this._mouseDownEvent=d;var c=this,e=(d.which==1),b=(typeof this.options.cancel=="string"?a(d.target).parents().add(d.target).filter(this.options.cancel).length:false);if(!e||b||!this._mouseCapture(d)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(d)!==false);if(!this._mouseStarted){d.preventDefault();return true}}this._mouseMoveDelegate=function(f){return c._mouseMove(f)};this._mouseUpDelegate=function(f){return c._mouseUp(f)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(a.browser.safari||d.preventDefault());d.originalEvent.mouseHandled=true;return true},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,b)!==false);(this._mouseStarted?this._mouseDrag(b):this._mouseUp(b))}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(b.target==this._mouseDownEvent.target);this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return(Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance)},_mouseDelayMet:function(b){return this.mouseDelayMet},_mouseStart:function(b){},_mouseDrag:function(b){},_mouseStop:function(b){},_mouseCapture:function(b){return true}})})(jQuery);;/*
59
+ * jQuery UI Position 1.8
60
+ *
61
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
62
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
63
+ * and GPL (GPL-LICENSE.txt) licenses.
64
+ *
65
+ * http://docs.jquery.com/UI/Position
66
+ */
67
+ * jQuery UI Draggable 1.8
68
+ *
69
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
70
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
71
+ * and GPL (GPL-LICENSE.txt) licenses.
72
+ *
73
+ * http://docs.jquery.com/UI/Draggables
74
+ *
75
+ * Depends:
76
+ * jquery.ui.core.js
77
+ * jquery.ui.mouse.js
78
+ * jquery.ui.widget.js
79
+ */
80
+ * jQuery UI Droppable 1.8
81
+ *
82
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
83
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
84
+ * and GPL (GPL-LICENSE.txt) licenses.
85
+ *
86
+ * http://docs.jquery.com/UI/Droppables
87
+ *
88
+ * Depends:
89
+ * jquery.ui.core.js
90
+ * jquery.ui.widget.js
91
+ * jquery.ui.mouse.js
92
+ * jquery.ui.draggable.js
93
+ */
94
+ * jQuery UI Resizable 1.8
95
+ *
96
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
97
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
98
+ * and GPL (GPL-LICENSE.txt) licenses.
99
+ *
100
+ * http://docs.jquery.com/UI/Resizables
101
+ *
102
+ * Depends:
103
+ * jquery.ui.core.js
104
+ * jquery.ui.mouse.js
105
+ * jquery.ui.widget.js
106
+ */
107
+ * jQuery UI Selectable 1.8
108
+ *
109
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
110
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
111
+ * and GPL (GPL-LICENSE.txt) licenses.
112
+ *
113
+ * http://docs.jquery.com/UI/Selectables
114
+ *
115
+ * Depends:
116
+ * jquery.ui.core.js
117
+ * jquery.ui.mouse.js
118
+ * jquery.ui.widget.js
119
+ */
120
+ * jQuery UI Sortable 1.8
121
+ *
122
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
123
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
124
+ * and GPL (GPL-LICENSE.txt) licenses.
125
+ *
126
+ * http://docs.jquery.com/UI/Sortables
127
+ *
128
+ * Depends:
129
+ * jquery.ui.core.js
130
+ * jquery.ui.mouse.js
131
+ * jquery.ui.widget.js
132
+ */
133
+ * jQuery UI Accordion 1.8
134
+ *
135
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
136
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
137
+ * and GPL (GPL-LICENSE.txt) licenses.
138
+ *
139
+ * http://docs.jquery.com/UI/Accordion
140
+ *
141
+ * Depends:
142
+ * jquery.ui.core.js
143
+ * jquery.ui.widget.js
144
+ */
145
+ * jQuery UI Autocomplete 1.8
146
+ *
147
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
148
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
149
+ * and GPL (GPL-LICENSE.txt) licenses.
150
+ *
151
+ * http://docs.jquery.com/UI/Autocomplete
152
+ *
153
+ * Depends:
154
+ * jquery.ui.core.js
155
+ * jquery.ui.widget.js
156
+ * jquery.ui.position.js
157
+ */
158
+ * jQuery UI Button 1.8
159
+ *
160
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
161
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
162
+ * and GPL (GPL-LICENSE.txt) licenses.
163
+ *
164
+ * http://docs.jquery.com/UI/Button
165
+ *
166
+ * Depends:
167
+ * jquery.ui.core.js
168
+ * jquery.ui.widget.js
169
+ */
170
+ * jQuery UI Dialog 1.8
171
+ *
172
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
173
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
174
+ * and GPL (GPL-LICENSE.txt) licenses.
175
+ *
176
+ * http://docs.jquery.com/UI/Dialog
177
+ *
178
+ * Depends:
179
+ * jquery.ui.core.js
180
+ * jquery.ui.widget.js
181
+ * jquery.ui.button.js
182
+ * jquery.ui.draggable.js
183
+ * jquery.ui.mouse.js
184
+ * jquery.ui.position.js
185
+ * jquery.ui.resizable.js
186
+ */
187
+ * jQuery UI Slider 1.8
188
+ *
189
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
190
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
191
+ * and GPL (GPL-LICENSE.txt) licenses.
192
+ *
193
+ * http://docs.jquery.com/UI/Slider
194
+ *
195
+ * Depends:
196
+ * jquery.ui.core.js
197
+ * jquery.ui.mouse.js
198
+ * jquery.ui.widget.js
199
+ */
200
+ * jQuery UI Tabs 1.8
201
+ *
202
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
203
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
204
+ * and GPL (GPL-LICENSE.txt) licenses.
205
+ *
206
+ * http://docs.jquery.com/UI/Tabs
207
+ *
208
+ * Depends:
209
+ * jquery.ui.core.js
210
+ * jquery.ui.widget.js
211
+ */
212
+ * jQuery UI Datepicker 1.8
213
+ *
214
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
215
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
216
+ * and GPL (GPL-LICENSE.txt) licenses.
217
+ *
218
+ * http://docs.jquery.com/UI/Datepicker
219
+ *
220
+ * Depends:
221
+ * jquery.ui.core.js
222
+ */
223
+ * jQuery UI Progressbar 1.8
224
+ *
225
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
226
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
227
+ * and GPL (GPL-LICENSE.txt) licenses.
228
+ *
229
+ * http://docs.jquery.com/UI/Progressbar
230
+ *
231
+ * Depends:
232
+ * jquery.ui.core.js
233
+ * jquery.ui.widget.js
234
+ */
235
+ * jQuery UI Effects 1.8
236
+ *
237
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
238
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
239
+ * and GPL (GPL-LICENSE.txt) licenses.
240
+ *
241
+ * http://docs.jquery.com/UI/Effects/
242
+ */
243
+ * jQuery UI Effects Blind 1.8
244
+ *
245
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
246
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
247
+ * and GPL (GPL-LICENSE.txt) licenses.
248
+ *
249
+ * http://docs.jquery.com/UI/Effects/Blind
250
+ *
251
+ * Depends:
252
+ * jquery.effects.core.js
253
+ */
254
+ * jQuery UI Effects Bounce 1.8
255
+ *
256
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
257
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
258
+ * and GPL (GPL-LICENSE.txt) licenses.
259
+ *
260
+ * http://docs.jquery.com/UI/Effects/Bounce
261
+ *
262
+ * Depends:
263
+ * jquery.effects.core.js
264
+ */
265
+ * jQuery UI Effects Clip 1.8
266
+ *
267
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
268
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
269
+ * and GPL (GPL-LICENSE.txt) licenses.
270
+ *
271
+ * http://docs.jquery.com/UI/Effects/Clip
272
+ *
273
+ * Depends:
274
+ * jquery.effects.core.js
275
+ */
276
+ * jQuery UI Effects Drop 1.8
277
+ *
278
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
279
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
280
+ * and GPL (GPL-LICENSE.txt) licenses.
281
+ *
282
+ * http://docs.jquery.com/UI/Effects/Drop
283
+ *
284
+ * Depends:
285
+ * jquery.effects.core.js
286
+ */
287
+ * jQuery UI Effects Explode 1.8
288
+ *
289
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
290
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
291
+ * and GPL (GPL-LICENSE.txt) licenses.
292
+ *
293
+ * http://docs.jquery.com/UI/Effects/Explode
294
+ *
295
+ * Depends:
296
+ * jquery.effects.core.js
297
+ */
298
+ * jQuery UI Effects Fold 1.8
299
+ *
300
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
301
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
302
+ * and GPL (GPL-LICENSE.txt) licenses.
303
+ *
304
+ * http://docs.jquery.com/UI/Effects/Fold
305
+ *
306
+ * Depends:
307
+ * jquery.effects.core.js
308
+ */
309
+ * jQuery UI Effects Highlight 1.8
310
+ *
311
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
312
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
313
+ * and GPL (GPL-LICENSE.txt) licenses.
314
+ *
315
+ * http://docs.jquery.com/UI/Effects/Highlight
316
+ *
317
+ * Depends:
318
+ * jquery.effects.core.js
319
+ */
320
+ * jQuery UI Effects Pulsate 1.8
321
+ *
322
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
323
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
324
+ * and GPL (GPL-LICENSE.txt) licenses.
325
+ *
326
+ * http://docs.jquery.com/UI/Effects/Pulsate
327
+ *
328
+ * Depends:
329
+ * jquery.effects.core.js
330
+ */
331
+ * jQuery UI Effects Scale 1.8
332
+ *
333
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
334
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
335
+ * and GPL (GPL-LICENSE.txt) licenses.
336
+ *
337
+ * http://docs.jquery.com/UI/Effects/Scale
338
+ *
339
+ * Depends:
340
+ * jquery.effects.core.js
341
+ */
342
+ * jQuery UI Effects Shake 1.8
343
+ *
344
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
345
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
346
+ * and GPL (GPL-LICENSE.txt) licenses.
347
+ *
348
+ * http://docs.jquery.com/UI/Effects/Shake
349
+ *
350
+ * Depends:
351
+ * jquery.effects.core.js
352
+ */
353
+ * jQuery UI Effects Slide 1.8
354
+ *
355
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
356
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
357
+ * and GPL (GPL-LICENSE.txt) licenses.
358
+ *
359
+ * http://docs.jquery.com/UI/Effects/Slide
360
+ *
361
+ * Depends:
362
+ * jquery.effects.core.js
363
+ */
364
+ * jQuery UI Effects Transfer 1.8
365
+ *
366
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
367
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
368
+ * and GPL (GPL-LICENSE.txt) licenses.
369
+ *
370
+ * http://docs.jquery.com/UI/Effects/Transfer
371
+ *
372
+ * Depends:
373
+ * jquery.effects.core.js
374
+ */