Chrysostomos for scheduler
authorChrysostomos Kolovos <xrklvs@gmail.com>
Wed, 12 Mar 2014 10:52:32 +0000 (12:52 +0200)
committerChrysostomos Kolovos <xrklvs@gmail.com>
Wed, 12 Mar 2014 10:52:32 +0000 (12:52 +0200)
43 files changed:
plugins/scheduler/__init__.py [deleted file]
plugins/scheduler/static/css/scheduler.css [deleted file]
plugins/scheduler/static/js/raphael-1.5.2.js [deleted file]
plugins/scheduler/static/js/raphael.js [deleted symlink]
plugins/scheduler/static/js/scheduler.js [deleted file]
plugins/scheduler/template/scheduler.html [deleted file]
plugins/scheduler2/__init__.py [new file with mode: 0755]
plugins/scheduler2/asdf.txt [changed mode: 0644->0755]
plugins/scheduler2/static/css/scheduler2.css [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_flat_0_aaaaaa_40x100.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_55_fbf9ee_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_65_ffffff_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_dadada_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_e6e6e6_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_ffffff_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_highlight-soft_75_cccccc_1x100.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_inset-soft_95_fef1ec_1x100.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_222222_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_2e83ff_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_454545_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_888888_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_cd0a0a_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_f6cf3b_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/jquery-ui-1.10.3.slider.min.css [new file with mode: 0755]
plugins/scheduler2/static/img/closed-lock-15.png [new file with mode: 0755]
plugins/scheduler2/static/img/closed-lock.png [new file with mode: 0755]
plugins/scheduler2/static/img/loading.gif [new file with mode: 0755]
plugins/scheduler2/static/img/nitos_topo.png [new file with mode: 0755]
plugins/scheduler2/static/img/opened-lock-15.png [new file with mode: 0755]
plugins/scheduler2/static/img/opened-lock.png [new file with mode: 0755]
plugins/scheduler2/static/img/podcast-15-w.png [new file with mode: 0755]
plugins/scheduler2/static/img/podcast-15.png [new file with mode: 0755]
plugins/scheduler2/static/img/podcast.png [new file with mode: 0755]
plugins/scheduler2/static/img/pushpin-1.png [new file with mode: 0755]
plugins/scheduler2/static/img/tools-15.png [new file with mode: 0755]
plugins/scheduler2/static/img/tools.png [new file with mode: 0755]
plugins/scheduler2/static/js/scheduler-helpers.js [new file with mode: 0755]
plugins/scheduler2/static/js/scheduler2.js [new file with mode: 0755]
plugins/scheduler2/static/js/selectRangeWorker.js [new file with mode: 0755]
plugins/scheduler2/static/js/slider/jquery-ui-1.10.3.slider.min.js [new file with mode: 0755]
plugins/scheduler2/static/js/table-selector.js [new file with mode: 0755]
plugins/scheduler2/templates/scheduler.html [new file with mode: 0755]
portal/sliceview.py [changed mode: 0644->0755]

diff --git a/plugins/scheduler/__init__.py b/plugins/scheduler/__init__.py
deleted file mode 100644 (file)
index caaaa52..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-from unfold.plugin import Plugin
-
-class Scheduler(Plugin):
-
-    # set checkboxes if a final column with checkboxes is desired
-    # pass columns as the initial set of columns
-    #   if None then this is taken from the query's fields
-    # latitude,longitude, zoom : the starting point
-    def __init__ (self, query, query_all_resources, query_lease = None, **settings):
-        Plugin.__init__ (self, **settings)
-        self.query=query
-        self.query_all_resources = query_all_resources
-        self.query_all_resources_uuid = query_all_resources.query_uuid
-        self.query_lease = query_lease
-        self.query_lease_uuid = query_lease.query_uuid if query_lease else None
-
-    def template_file (self):
-        return "scheduler.html"
-
-    def template_env (self, request):
-        env={}
-        return env
-
-    def requirements (self):
-        reqs = {
-            'js_files' : [ "js/scheduler.js",
-                           #"//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js",
-                            "js/raphael.js",
-                            "js/manifold.js", "js/manifold-query.js", 
-                            "js/spin-presets.js", "js/spin.min.js", "js/jquery.spin.js", 
-                            "js/unfold-helper.js",
-                            "js/jquery-ui-timepicker-addon.js", "js/jquery-ui-sliderAccess.js",
-                           ],
-            'css_files' : [ "css/scheduler.css",
-                            "css/jquery-ui-timepicker-addon.css",
-                            ],
-            }
-        return reqs
-
-    # the list of things passed to the js plugin
-    def json_settings_list (self): 
-        return ['plugin_uuid','query_uuid', 'query_lease_uuid', 'query_all_resources_uuid']
diff --git a/plugins/scheduler/static/css/scheduler.css b/plugins/scheduler/static/css/scheduler.css
deleted file mode 100644 (file)
index fbaede0..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- $Id: toggle.css 12435 2009-03-11 15:07:00Z thierry $
- */
-
-/* this class is used to store data that needs to get passed to javascript code */
-/* these elements are not meant to be rendered */
-.hidden {
-    display: none;
-}
-.center {
-    text-align: center;
-}
-
-.scrollx {
-       overflow-x:scroll;
-        height: 340px;
-}
-.scrolly {
-overflow-y : scroll;
-}
-/* space around various messages */
-div.my-slice-renewal {
-    margin: 30px;
-}
-
-/* toggles for the nodes sections */
-div#toggle-container-my-slice-persons-current,
-div#toggle-container-my-slice-nodes-current {
-    background: #f0f0f0;
-}
-
-div#toggle-container-my-slice-persons-add,
-div#toggle-container-my-slice-nodes-add {
-    background: #f0e0e0;
-}
-
-/* the scheduler area */
-div#toggle-container-my-slice-nodes-reserve {
-    background: #def;
-}
-
-/* where the graphics go */
-div#leases_area {
-  /* padding: 10px 25px; */
-}
-
-/* don't display the scheduler data table - not quite sure this works */
-table#leases_data {
-    display: none;
-}
-
-/* the various controls for the scheduler */
-/* upper section, with selection mode */
-#leases_modes { padding: 10px; text-align: center; color: #333; }
-
-#leases_buttons { padding: 0px 10px 10px 10px; }
-#leases_refresh { position: relative; left: 30%;}
-#leases_submit { position: relative; left: 60%; }
-        
-
-/* column configuation style */
-
-div#toggle-container-my-slice-nodes-configuration {
-    background: #f8f8f8;
-}
-
-OPTION.out{background-color:white; color:black}
-OPTION.in{background-color:#CAE8EA; color:#4f6b72}
-
-div.out{background-color:white; color:black}
-div.in{background-color:#CAE8EA; color:#4f6b72}
-div.selected{background-color:gray; color:black}
-div.invisible{display:none}
-
-div.toggle-info {
-       padding: 10px 20px;
-       background-color: #cae8ea;
-       margin: 10px 10px;
-
-}
-
-div#scrolldiv {
-       border : solid 2px grey; 
-       padding:4px; 
-       width:300px; 
-       height:180px; 
-       overflow:auto;
-}
-
-th,td.top {
-       vertical-align: top;
-       text-align: left;
-       padding:10px;
-}
-
-td.smallright {
-       text-align: right;
-       width:20px;
-}
-
-table.center {
-       margin-left:auto; 
-       margin-right:auto;
-}
-
-table.columnlist {
-       width:280px;
-}
-
-td.header {
-       background-color: #CAE8EA;
-       text-align: center;
-       width:30px;
-}
-
-span.header {
-       font-weight: bold;
-       color: #3399CC;
-}
-
-a.source-url{
-        font-weight: bold;
-}
-
-span.gray{
-        color: #555555;
-}
-
-span.short {
-       height:10px;
-}
-
-span.column-title {
-        font-size: 12px;
-        font-weight: bold;
-}
-
-span.column-detail {
-        font-size: 11px; 
-        font-style: italic;
-}
diff --git a/plugins/scheduler/static/js/raphael-1.5.2.js b/plugins/scheduler/static/js/raphael-1.5.2.js
deleted file mode 100644 (file)
index e5e7126..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Raphael 1.5.2 - JavaScript Vector Library
- *
- * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
- * Licensed under the MIT (http://raphaeljs.com/license.html) license.
- */
-(function(){function a(){if(a.is(arguments[0],G)){var b=arguments[0],d=bV[m](a,b.splice(0,3+a.is(b[0],E))),e=d.set();for(var g=0,h=b[w];g<h;g++){var i=b[g]||{};c[f](i.type)&&e[L](d[i.type]().attr(i))}return e}return bV[m](a,arguments)}a.version="1.5.2";var b=/[, ]+/,c={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},d=/\{(\d+)\}/g,e="prototype",f="hasOwnProperty",g=document,h=window,i={was:Object[e][f].call(h,"Raphael"),is:h.Raphael},j=function(){this.customAttributes={}},k,l="appendChild",m="apply",n="concat",o="createTouch"in g,p="",q=" ",r=String,s="split",t="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[s](q),u={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},v="join",w="length",x=r[e].toLowerCase,y=Math,z=y.max,A=y.min,B=y.abs,C=y.pow,D=y.PI,E="number",F="string",G="array",H="toString",I="fill",J=Object[e][H],K={},L="push",M=/^url\(['"]?([^\)]+?)['"]?\)$/i,N=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,O={"NaN":1,Infinity:1,"-Infinity":1},P=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Q=y.round,R="setAttribute",S=parseFloat,T=parseInt,U=" progid:DXImageTransform.Microsoft",V=r[e].toUpperCase,W={blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:"10px \"Arial\"","font-family":"\"Arial\"","font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},X={along:"along",blur:E,"clip-rect":"csv",cx:E,cy:E,fill:"colour","fill-opacity":E,"font-size":E,height:E,opacity:E,path:"path",r:E,rotation:"csv",rx:E,ry:E,scale:"csv",stroke:"colour","stroke-opacity":E,"stroke-width":E,translation:"csv",width:E,x:E,y:E},Y="replace",Z=/^(from|to|\d+%?)$/,$=/\s*,\s*/,_={hs:1,rg:1},ba=/,?([achlmqrstvxz]),?/gi,bb=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,bc=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,bd=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,be=function(a,b){return a.key-b.key};a.type=h.SVGAngle||g.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var bf=g.createElement("div"),bg;bf.innerHTML="<v:shape adj=\"1\"/>";bg=bf.firstChild;bg.style.behavior="url(#default#VML)";if(!(bg&&typeof bg.adj=="object"))return a.type=null;bf=null}a.svg=!(a.vml=a.type=="VML");j[e]=a[e];k=j[e];a._id=0;a._oid=0;a.fn={};a.is=function(a,b){b=x.call(b);if(b=="finite")return!O[f](+a);return b=="null"&&a===null||b==typeof a||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||J.call(a).slice(8,-1).toLowerCase()==b};a.angle=function(b,c,d,e,f,g){{if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return((h<0)*180+y.atan(-i/-h)*180/D+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)}};a.rad=function(a){return a%360*D/180};a.deg=function(a){return a*180/D%360};a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,G)){var e=b.length;while(e--)if(B(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(f<d)return c-f;if(f>b-d)return c-f+b}return c};function bh(){var a=[],b=0;for(;b<32;b++)a[b]=(~(~(y.random()*16)))[H](16);a[12]=4;a[16]=(a[16]&3|8)[H](16);return"r-"+a[v]("")}a.setWindow=function(a){h=a;g=h.document};var bi=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write("<body>");e.close();d=e.body}catch(a){d=createPopup().document.body}var f=d.createTextRange();bi=bm(function(a){try{d.style.color=r(a)[Y](c,p);var b=f.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b[H](16)).slice(-6)}catch(a){return"none"}})}else{var h=g.createElement("i");h.title="Raphaël Colour Picker";h.style.display="none";g.body[l](h);bi=bm(function(a){h.style.color=a;return g.defaultView.getComputedStyle(h,p).getPropertyValue("color")})}return bi(b)},bj=function(){return"hsb("+[this.h,this.s,this.b]+")"},bk=function(){return"hsl("+[this.h,this.s,this.l]+")"},bl=function(){return this.hex};a.hsb2rgb=function(b,c,d,e){if(a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b){d=b.b;c=b.s;b=b.h;e=b.o}return a.hsl2rgb(b,c,d/2,e)};a.hsl2rgb=function(b,c,d,e){if(a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b){d=b.l;c=b.s;b=b.h}if(b>1||c>1||d>1){b/=360;c/=100;d/=100}var f={},g=["r","g","b"],h,i,j,k,l,m;if(c){d<0.5?h=d*(1+c):h=d+c-d*c;i=2*d-h;for(var n=0;n<3;n++){j=b+1/3*-(n-1);j<0&&j++;j>1&&j--;j*6<1?f[g[n]]=i+(h-i)*6*j:j*2<1?f[g[n]]=h:j*3<2?f[g[n]]=i+(h-i)*(2/3-j)*6:f[g[n]]=i}}else f={r:d,g:d,b:d};f.r*=255;f.g*=255;f.b*=255;f.hex="#"+(16777216|f.b|f.g<<8|f.r<<16).toString(16).slice(1);a.is(e,"finite")&&(f.opacity=e);f.toString=bl;return f};a.rgb2hsb=function(b,c,d){if(c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b){d=b.b;c=b.g;b=b.r}if(c==null&&a.is(b,F)){var e=a.getRGB(b);b=e.r;c=e.g;d=e.b}if(b>1||c>1||d>1){b/=255;c/=255;d/=255}var f=z(b,c,d),g=A(b,c,d),h,i,j=f;{if(g==f)return{h:0,s:0,b:f,toString:bj};var k=f-g;i=k/f;b==f?h=(c-d)/k:c==f?h=2+(d-b)/k:h=4+(b-c)/k;h/=6;h<0&&h++;h>1&&h--}return{h:h,s:i,b:j,toString:bj}};a.rgb2hsl=function(b,c,d){if(c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b){d=b.b;c=b.g;b=b.r}if(c==null&&a.is(b,F)){var e=a.getRGB(b);b=e.r;c=e.g;d=e.b}if(b>1||c>1||d>1){b/=255;c/=255;d/=255}var f=z(b,c,d),g=A(b,c,d),h,i,j=(f+g)/2,k;if(g==f)k={h:0,s:0,l:j};else{var l=f-g;i=j<0.5?l/(f+g):l/(2-f-g);b==f?h=(c-d)/l:c==f?h=2+(d-b)/l:h=4+(b-c)/l;h/=6;h<0&&h++;h>1&&h--;k={h:h,s:i,l:j}}k.toString=bk;return k};a._path2string=function(){return this.join(",")[Y](ba,"$1")};function bm(a,b,c){function d(){var g=Array[e].slice.call(arguments,0),h=g[v]("►"),i=d.cache=d.cache||{},j=d.count=d.count||[];if(i[f](h))return c?c(i[h]):i[h];j[w]>=1000&&delete i[j.shift()];j[L](h);i[h]=a[m](b,g);return c?c(i[h]):i[h]}return d}a.getRGB=bm(function(b){if(!b||!(!((b=r(b)).indexOf("-")+1)))return{r:-1,g:-1,b:-1,hex:"none",error:1};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none"};!(_[f](b.toLowerCase().substring(0,2))||b.charAt()=="#")&&(b=bi(b));var c,d,e,g,h,i,j,k=b.match(N);if(k){if(k[2]){g=T(k[2].substring(5),16);e=T(k[2].substring(3,5),16);d=T(k[2].substring(1,3),16)}if(k[3]){g=T((i=k[3].charAt(3))+i,16);e=T((i=k[3].charAt(2))+i,16);d=T((i=k[3].charAt(1))+i,16)}if(k[4]){j=k[4][s]($);d=S(j[0]);j[0].slice(-1)=="%"&&(d*=2.55);e=S(j[1]);j[1].slice(-1)=="%"&&(e*=2.55);g=S(j[2]);j[2].slice(-1)=="%"&&(g*=2.55);k[1].toLowerCase().slice(0,4)=="rgba"&&(h=S(j[3]));j[3]&&j[3].slice(-1)=="%"&&(h/=100)}if(k[5]){j=k[5][s]($);d=S(j[0]);j[0].slice(-1)=="%"&&(d*=2.55);e=S(j[1]);j[1].slice(-1)=="%"&&(e*=2.55);g=S(j[2]);j[2].slice(-1)=="%"&&(g*=2.55);(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360);k[1].toLowerCase().slice(0,4)=="hsba"&&(h=S(j[3]));j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,g,h)}if(k[6]){j=k[6][s]($);d=S(j[0]);j[0].slice(-1)=="%"&&(d*=2.55);e=S(j[1]);j[1].slice(-1)=="%"&&(e*=2.55);g=S(j[2]);j[2].slice(-1)=="%"&&(g*=2.55);(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360);k[1].toLowerCase().slice(0,4)=="hsla"&&(h=S(j[3]));j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,g,h)}k={r:d,g:e,b:g};k.hex="#"+(16777216|g|e<<8|d<<16).toString(16).slice(1);a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1}},a);a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||0.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=0.075;if(b.h>1){b.h=0;b.s-=0.2;b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})}return c.hex};a.getColor.reset=function(){delete this.start};a.parsePathString=bm(function(b){if(!b)return null;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},d=[];a.is(b,G)&&a.is(b[0],G)&&(d=bo(b));d[w]||r(b)[Y](bb,function(a,b,e){var f=[],g=x.call(b);e[Y](bc,function(a,b){b&&f[L](+b)});if(g=="m"&&f[w]>2){d[L]([b][n](f.splice(0,2)));g="l";b=b=="m"?"l":"L"}while(f[w]>=c[g]){d[L]([b][n](f.splice(0,c[g])));if(!c[g])break}});d[H]=a._path2string;return d});a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=C(j,3)*a+C(j,2)*3*i*c+j*3*i*i*e+C(i,3)*g,l=C(j,3)*b+C(j,2)*3*i*d+j*3*i*i*f+C(i,3)*h,m=a+2*i*(c-a)+i*i*(e-2*c+a),n=b+2*i*(d-b)+i*i*(f-2*d+b),o=c+2*i*(e-c)+i*i*(g-2*e+c),p=d+2*i*(f-d)+i*i*(h-2*f+d),q=(1-i)*a+i*c,r=(1-i)*b+i*d,s=(1-i)*e+i*g,t=(1-i)*f+i*h,u=90-y.atan((m-o)/(n-p))*180/D;(m>o||n<p)&&(u+=180);return{x:k,y:l,m:{x:m,y:n},n:{x:o,y:p},start:{x:q,y:r},end:{x:s,y:t},alpha:u}};var bn=bm(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=bw(a);var b=0,c=0,d=[],e=[],f;for(var g=0,h=a[w];g<h;g++){f=a[g];if(f[0]=="M"){b=f[1];c=f[2];d[L](b);e[L](c)}else{var i=bv(b,c,f[1],f[2],f[3],f[4],f[5],f[6]);d=d[n](i.min.x,i.max.x);e=e[n](i.min.y,i.max.y);b=f[5];c=f[6]}}var j=A[m](0,d),k=A[m](0,e);return{x:j,y:k,width:z[m](0,d)-j,height:z[m](0,e)-k}}),bo=function(b){var c=[];if(!a.is(b,G)||!a.is(b&&b[0],G))b=a.parsePathString(b);for(var d=0,e=b[w];d<e;d++){c[d]=[];for(var f=0,g=b[d][w];f<g;f++)c[d][f]=b[d][f]}c[H]=a._path2string;return c},bp=bm(function(b){if(!a.is(b,G)||!a.is(b&&b[0],G))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;if(b[0][0]=="M"){d=b[0][1];e=b[0][2];f=d;g=e;h++;c[L](["M",d,e])}for(var i=h,j=b[w];i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=x.call(l[0])){k[0]=x.call(l[0]);switch(k[0]){case"a":k[1]=l[1];k[2]=l[2];k[3]=l[3];k[4]=l[4];k[5]=l[5];k[6]=+(l[6]-d).toFixed(3);k[7]=+(l[7]-e).toFixed(3);break;case"v":k[1]=+(l[1]-e).toFixed(3);break;case"m":f=l[1];g=l[2];default:for(var m=1,n=l[w];m<n;m++)k[m]=+(l[m]-(m%2?d:e)).toFixed(3)}}else{k=c[i]=[];if(l[0]=="m"){f=l[1]+d;g=l[2]+e}for(var o=0,p=l[w];o<p;o++)c[i][o]=l[o]}var q=c[i][w];switch(c[i][0]){case"z":d=f;e=g;break;case"h":d+=+c[i][q-1];break;case"v":e+=+c[i][q-1];break;default:d+=+c[i][q-2];e+=+c[i][q-1]}}c[H]=a._path2string;return c},0,bo),bq=bm(function(b){if(!a.is(b,G)||!a.is(b&&b[0],G))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;if(b[0][0]=="M"){d=+b[0][1];e=+b[0][2];f=d;g=e;h++;c[0]=["M",d,e]}for(var i=h,j=b[w];i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=V.call(l[0])){k[0]=V.call(l[0]);switch(k[0]){case"A":k[1]=l[1];k[2]=l[2];k[3]=l[3];k[4]=l[4];k[5]=l[5];k[6]=+(l[6]+d);k[7]=+(l[7]+e);break;case"V":k[1]=+l[1]+e;break;case"H":k[1]=+l[1]+d;break;case"M":f=+l[1]+d;g=+l[2]+e;default:for(var m=1,n=l[w];m<n;m++)k[m]=+l[m]+(m%2?d:e)}}else for(var o=0,p=l[w];o<p;o++)c[i][o]=l[o];switch(k[0]){case"Z":d=f;e=g;break;case"H":d=k[1];break;case"V":e=k[1];break;case"M":f=c[i][c[i][w]-2];g=c[i][c[i][w]-1];default:d=c[i][c[i][w]-2];e=c[i][c[i][w]-1]}}c[H]=a._path2string;return c},null,bo),br=function(a,b,c,d){return[a,b,c,d,c,d]},bs=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},bt=function(a,b,c,d,e,f,g,h,i,j){var k=D*120/180,l=D/180*(+e||0),m=[],o,p=bm(function(a,b,c){var d=a*y.cos(c)-b*y.sin(c),e=a*y.sin(c)+b*y.cos(c);return{x:d,y:e}});if(j){G=j[0];H=j[1];E=j[2];F=j[3]}else{o=p(a,b,-l);a=o.x;b=o.y;o=p(h,i,-l);h=o.x;i=o.y;var q=y.cos(D/180*e),r=y.sin(D/180*e),t=(a-h)/2,u=(b-i)/2,x=t*t/(c*c)+u*u/(d*d);if(x>1){x=y.sqrt(x);c=x*c;d=x*d}var z=c*c,A=d*d,C=(f==g?-1:1)*y.sqrt(B((z*A-z*u*u-A*t*t)/(z*u*u+A*t*t))),E=C*c*u/d+(a+h)/2,F=C*-d*t/c+(b+i)/2,G=y.asin(((b-F)/d).toFixed(9)),H=y.asin(((i-F)/d).toFixed(9));G=a<E?D-G:G;H=h<E?D-H:H;G<0&&(G=D*2+G);H<0&&(H=D*2+H);g&&G>H&&(G=G-D*2);!g&&H>G&&(H=H-D*2)}var I=H-G;if(B(I)>k){var J=H,K=h,L=i;H=G+k*(g&&H>G?1:-1);h=E+c*y.cos(H);i=F+d*y.sin(H);m=bt(h,i,c,d,e,0,g,K,L,[H,J,E,F])}I=H-G;var M=y.cos(G),N=y.sin(G),O=y.cos(H),P=y.sin(H),Q=y.tan(I/4),R=4/3*c*Q,S=4/3*d*Q,T=[a,b],U=[a+R*N,b-S*M],V=[h+R*P,i-S*O],W=[h,i];U[0]=2*T[0]-U[0];U[1]=2*T[1]-U[1];{if(j)return[U,V,W][n](m);m=[U,V,W][n](m)[v]()[s](",");var X=[];for(var Y=0,Z=m[w];Y<Z;Y++)X[Y]=Y%2?p(m[Y-1],m[Y],l).y:p(m[Y],m[Y+1],l).x;return X}},bu=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:C(j,3)*a+C(j,2)*3*i*c+j*3*i*i*e+C(i,3)*g,y:C(j,3)*b+C(j,2)*3*i*d+j*3*i*i*f+C(i,3)*h}},bv=bm(function(a,b,c,d,e,f,g,h){var i=e-2*c+a-(g-2*e+c),j=2*(c-a)-2*(e-c),k=a-c,l=(-j+y.sqrt(j*j-4*i*k))/2/i,n=(-j-y.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;B(l)>"1e12"&&(l=0.5);B(n)>"1e12"&&(n=0.5);if(l>0&&l<1){q=bu(a,b,c,d,e,f,g,h,l);p[L](q.x);o[L](q.y)}if(n>0&&n<1){q=bu(a,b,c,d,e,f,g,h,n);p[L](q.x);o[L](q.y)}i=f-2*d+b-(h-2*f+d);j=2*(d-b)-2*(f-d);k=b-d;l=(-j+y.sqrt(j*j-4*i*k))/2/i;n=(-j-y.sqrt(j*j-4*i*k))/2/i;B(l)>"1e12"&&(l=0.5);B(n)>"1e12"&&(n=0.5);if(l>0&&l<1){q=bu(a,b,c,d,e,f,g,h,l);p[L](q.x);o[L](q.y)}if(n>0&&n<1){q=bu(a,b,c,d,e,f,g,h,n);p[L](q.x);o[L](q.y)}return{min:{x:A[m](0,p),y:A[m](0,o)},max:{x:z[m](0,p),y:z[m](0,o)}}}),bw=bm(function(a,b){var c=bq(a),d=b&&bq(b),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1];b.Y=a[2];break;case"A":a=["C"][n](bt[m](0,[b.x,b.y][n](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x));d=b.y+(b.y-(b.by||b.y));a=["C",c,d][n](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));a=["C"][n](bs(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1];b.qy=a[2];a=["C"][n](bs(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](br(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](br(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](br(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](br(b.x,b.y,b.X,b.Y));break}return a},h=function(a,b){if(a[b][w]>7){a[b].shift();var e=a[b];while(e[w])a.splice(b++,0,["C"][n](e.splice(0,6)));a.splice(b,1);k=z(c[w],d&&d[w]||0)}},i=function(a,b,e,f,g){if(a&&b&&a[g][0]=="M"&&b[g][0]!="M"){b.splice(g,0,["M",f.x,f.y]);e.bx=0;e.by=0;e.x=a[g][1];e.y=a[g][2];k=z(c[w],d&&d[w]||0)}};for(var j=0,k=z(c[w],d&&d[w]||0);j<k;j++){c[j]=g(c[j],e);h(c,j);d&&(d[j]=g(d[j],f));d&&h(d,j);i(c,d,e,f,j);i(d,c,f,e,j);var l=c[j],o=d&&d[j],p=l[w],q=d&&o[w];e.x=l[p-2];e.y=l[p-1];e.bx=S(l[p-4])||e.x;e.by=S(l[p-3])||e.y;f.bx=d&&(S(o[q-4])||f.x);f.by=d&&(S(o[q-3])||f.y);f.x=d&&o[q-2];f.y=d&&o[q-1]}return d?[c,d]:c},null,bo),bx=bm(function(b){var c=[];for(var d=0,e=b[w];d<e;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);f.color=a.getRGB(g[1]);if(f.color.error)return null;f.color=f.color.hex;g[2]&&(f.offset=g[2]+"%");c[L](f)}for(d=1,e=c[w]-1;d<e;d++){if(!c[d].offset){var h=S(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++){if(c[j].offset){i=c[j].offset;break}}if(!i){i=100;j=e}i=S(i);var k=(i-h)/(j-d+1);for(;d<j;d++){h+=k;c[d].offset=h+"%"}}}return c}),by=function(b,c,d,e){var f;if(a.is(b,F)||a.is(b,"object")){f=a.is(b,F)?g.getElementById(b):b;if(f.tagName)return c==null?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d}}else return{container:1,x:b,y:c,width:d,height:e}},bz=function(a,b){var c=this;for(var d in b){if(b[f](d)&&!(d in a))switch(typeof b[d]){case"function":(function(b){a[d]=a===c?b:function(){return b[m](c,arguments)}})(b[d]);break;case"object":a[d]=a[d]||{};bz.call(this,a[d],b[d]);break;default:a[d]=b[d];break}}},bA=function(a,b){a==b.top&&(b.top=a.prev);a==b.bottom&&(b.bottom=a.next);a.next&&(a.next.prev=a.prev);a.prev&&(a.prev.next=a.next)},bB=function(a,b){if(b.top===a)return;bA(a,b);a.next=null;a.prev=b.top;b.top.next=a;b.top=a},bC=function(a,b){if(b.bottom===a)return;bA(a,b);a.next=b.bottom;a.prev=null;b.bottom.prev=a;b.bottom=a},bD=function(a,b,c){bA(a,c);b==c.top&&(c.top=a);b.next&&(b.next.prev=a);a.next=b.next;a.prev=b;b.next=a},bE=function(a,b,c){bA(a,c);b==c.bottom&&(c.bottom=a);b.prev&&(b.prev.next=a);a.prev=b.prev;b.prev=a;a.next=b},bF=function(a){return function(){throw new Error("Raphaël: you are calling to method “"+a+"” of removed object")}};a.pathToRelative=bp;if(a.svg){k.svgns="http://www.w3.org/2000/svg";k.xlink="http://www.w3.org/1999/xlink";Q=function(a){return+a+(~(~a)===a)*0.5};var bG=function(a,b){if(b)for(var c in b)b[f](c)&&a[R](c,r(b[c]));else{a=g.createElementNS(k.svgns,a);a.style.webkitTapHighlightColor="rgba(0,0,0,0)";return a}};a[H]=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var bH=function(a,b){var c=bG("path");b.canvas&&b.canvas[l](c);var d=new bN(c,b);d.type="path";bK(d,{fill:"none",stroke:"#000",path:a});return d},bI=function(a,b,c){var d="linear",e=0.5,f=0.5,h=a.style;b=r(b)[Y](bd,function(a,b,c){d="radial";if(b&&c){e=S(b);f=S(c);var g=(f>0.5)*2-1;C(e-0.5,2)+C(f-0.5,2)>0.25&&(f=y.sqrt(0.25-C(e-0.5,2))*g+0.5)&&f!=0.5&&(f=f.toFixed(5)-0.00001*g)}return p});b=b[s](/\s*\-\s*/);if(d=="linear"){var i=b.shift();i=-S(i);if(isNaN(i))return null;var j=[0,0,y.cos(i*D/180),y.sin(i*D/180)],k=1/(z(B(j[2]),B(j[3]))||1);j[2]*=k;j[3]*=k;if(j[2]<0){j[0]=-j[2];j[2]=0}if(j[3]<0){j[1]=-j[3];j[3]=0}}var m=bx(b);if(!m)return null;var n=a.getAttribute(I);n=n.match(/^url\(#(.*)\)$/);n&&c.defs.removeChild(g.getElementById(n[1]));var o=bG(d+"Gradient");o.id=bh();bG(o,d=="radial"?{fx:e,fy:f}:{x1:j[0],y1:j[1],x2:j[2],y2:j[3]});c.defs[l](o);for(var q=0,t=m[w];q<t;q++){var u=bG("stop");bG(u,{offset:m[q].offset?m[q].offset:q?"100%":"0%","stop-color":m[q].color||"#fff"});o[l](u)}bG(a,{fill:"url(#"+o.id+")",opacity:1,"fill-opacity":1});h.fill=p;h.opacity=1;h.fillOpacity=1;return 1},bJ=function(b){var c=b.getBBox();bG(b.pattern,{patternTransform:a.format("translate({0},{1})",c.x,c.y)})},bK=function(c,d){var e={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},h=c.node,i=c.attrs,j=c.rotate(),k=function(a,b){b=e[x.call(b)];if(b){var c=a.attrs["stroke-width"]||"1",f=({round:c,square:c,butt:0})[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],i=b[w];while(i--)g[i]=b[i]*c+(i%2?1:-1)*f;bG(h,{"stroke-dasharray":g[v](",")})}};d[f]("rotation")&&(j=d.rotation);var m=r(j)[s](b);if(m.length-1){m[1]=+m[1];m[2]=+m[2]}else m=null;S(j)&&c.rotate(0,true);for(var n in d){if(d[f](n)){if(!W[f](n))continue;var o=d[n];i[n]=o;switch(n){case"blur":c.blur(o);break;case"rotation":c.rotate(o,true);break;case"href":case"title":case"target":var t=h.parentNode;if(x.call(t.tagName)!="a"){var u=bG("a");t.insertBefore(u,h);u[l](h);t=u}n=="target"&&o=="blank"?t.setAttributeNS(c.paper.xlink,"show","new"):t.setAttributeNS(c.paper.xlink,n,o);break;case"cursor":h.style.cursor=o;break;case"clip-rect":var y=r(o)[s](b);if(y[w]==4){c.clip&&c.clip.parentNode.parentNode.removeChild(c.clip.parentNode);var z=bG("clipPath"),A=bG("rect");z.id=bh();bG(A,{x:y[0],y:y[1],width:y[2],height:y[3]});z[l](A);c.paper.defs[l](z);bG(h,{"clip-path":"url(#"+z.id+")"});c.clip=A}if(!o){var B=g.getElementById(h.getAttribute("clip-path")[Y](/(^url\(#|\)$)/g,p));B&&B.parentNode.removeChild(B);bG(h,{"clip-path":p});delete c.clip}break;case"path":c.type=="path"&&bG(h,{d:o?i.path=bq(o):"M0,0"});break;case"width":h[R](n,o);if(i.fx){n="x";o=i.x}else break;case"x":i.fx&&(o=-i.x-(i.width||0));case"rx":if(n=="rx"&&c.type=="rect")break;case"cx":m&&(n=="x"||n=="cx")&&(m[1]+=o-i[n]);h[R](n,o);c.pattern&&bJ(c);break;case"height":h[R](n,o);if(i.fy){n="y";o=i.y}else break;case"y":i.fy&&(o=-i.y-(i.height||0));case"ry":if(n=="ry"&&c.type=="rect")break;case"cy":m&&(n=="y"||n=="cy")&&(m[2]+=o-i[n]);h[R](n,o);c.pattern&&bJ(c);break;case"r":c.type=="rect"?bG(h,{rx:o,ry:o}):h[R](n,o);break;case"src":c.type=="image"&&h.setAttributeNS(c.paper.xlink,"href",o);break;case"stroke-width":h.style.strokeWidth=o;h[R](n,o);i["stroke-dasharray"]&&k(c,i["stroke-dasharray"]);break;case"stroke-dasharray":k(c,o);break;case"translation":var C=r(o)[s](b);C[0]=+C[0]||0;C[1]=+C[1]||0;if(m){m[1]+=C[0];m[2]+=C[1]}cz.call(c,C[0],C[1]);break;case"scale":C=r(o)[s](b);c.scale(+C[0]||1,+C[1]||+C[0]||1,isNaN(S(C[2]))?null:+C[2],isNaN(S(C[3]))?null:+C[3]);break;case I:var D=r(o).match(M);if(D){z=bG("pattern");var E=bG("image");z.id=bh();bG(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});bG(E,{x:0,y:0});E.setAttributeNS(c.paper.xlink,"href",D[1]);z[l](E);var F=g.createElement("img");F.style.cssText="position:absolute;left:-9999em;top-9999em";F.onload=function(){bG(z,{width:this.offsetWidth,height:this.offsetHeight});bG(E,{width:this.offsetWidth,height:this.offsetHeight});g.body.removeChild(this);c.paper.safari()};g.body[l](F);F.src=D[1];c.paper.defs[l](z);h.style.fill="url(#"+z.id+")";bG(h,{fill:"url(#"+z.id+")"});c.pattern=z;c.pattern&&bJ(c);break}var G=a.getRGB(o);if(G.error)if((({circle:1,ellipse:1})[f](c.type)||r(o).charAt()!="r")&&bI(h,o,c.paper)){i.gradient=o;i.fill="none";break}else{delete d.gradient;delete i.gradient;!a.is(i.opacity,"undefined")&&a.is(d.opacity,"undefined")&&bG(h,{opacity:i.opacity});!a.is(i["fill-opacity"],"undefined")&&a.is(d["fill-opacity"],"undefined")&&bG(h,{"fill-opacity":i["fill-opacity"]})}G[f]("opacity")&&bG(h,{"fill-opacity":G.opacity>1?G.opacity/100:G.opacity});case"stroke":G=a.getRGB(o);h[R](n,G.hex);n=="stroke"&&G[f]("opacity")&&bG(h,{"stroke-opacity":G.opacity>1?G.opacity/100:G.opacity});break;case"gradient":(({circle:1,ellipse:1})[f](c.type)||r(o).charAt()!="r")&&bI(h,o,c.paper);break;case"opacity":i.gradient&&!i[f]("stroke-opacity")&&bG(h,{"stroke-opacity":o>1?o/100:o});case"fill-opacity":if(i.gradient){var H=g.getElementById(h.getAttribute(I)[Y](/^url\(#|\)$/g,p));if(H){var J=H.getElementsByTagName("stop");J[J[w]-1][R]("stop-opacity",o)}break}default:n=="font-size"&&(o=T(o,10)+"px");var K=n[Y](/(\-.)/g,function(a){return V.call(a.substring(1))});h.style[K]=o;h[R](n,o);break}}}bM(c,d);m?c.rotate(m.join(q)):S(j)&&c.rotate(j,true)},bL=1.2,bM=function(b,c){if(b.type!="text"||!(c[f]("text")||c[f]("font")||c[f]("font-size")||c[f]("x")||c[f]("y")))return;var d=b.attrs,e=b.node,h=e.firstChild?T(g.defaultView.getComputedStyle(e.firstChild,p).getPropertyValue("font-size"),10):10;if(c[f]("text")){d.text=c.text;while(e.firstChild)e.removeChild(e.firstChild);var i=r(c.text)[s]("\n");for(var j=0,k=i[w];j<k;j++)if(i[j]){var m=bG("tspan");j&&bG(m,{dy:h*bL,x:d.x});m[l](g.createTextNode(i[j]));e[l](m)}}else{i=e.getElementsByTagName("tspan");for(j=0,k=i[w];j<k;j++)j&&bG(i[j],{dy:h*bL,x:d.x})}bG(e,{y:d.y});var n=b.getBBox(),o=d.y-(n.y+n.height/2);o&&a.is(o,"finite")&&bG(e,{y:d.y+o})},bN=function(b,c){var d=0,e=0;this[0]=b;this.id=a._oid++;this.node=b;b.raphael=this;this.paper=c;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!c.bottom&&(c.bottom=this);this.prev=c.top;c.top&&(c.top.next=this);c.top=this;this.next=null},bO=bN[e];bN[e].rotate=function(c,d,e){if(this.removed)return this;if(c==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][v](q);return this._.rt.deg}var f=this.getBBox();c=r(c)[s](b);if(c[w]-1){d=S(c[1]);e=S(c[2])}c=S(c[0]);d!=null&&d!==false?this._.rt.deg=c:this._.rt.deg+=c;e==null&&(d=null);this._.rt.cx=d;this._.rt.cy=e;d=d==null?f.x+f.width/2:d;e=e==null?f.y+f.height/2:e;if(this._.rt.deg){this.transformations[0]=a.format("rotate({0} {1} {2})",this._.rt.deg,d,e);this.clip&&bG(this.clip,{transform:a.format("rotate({0} {1} {2})",-this._.rt.deg,d,e)})}else{this.transformations[0]=p;this.clip&&bG(this.clip,{transform:p})}bG(this.node,{transform:this.transformations[v](q)});return this};bN[e].hide=function(){!this.removed&&(this.node.style.display="none");return this};bN[e].show=function(){!this.removed&&(this.node.style.display="");return this};bN[e].remove=function(){if(this.removed)return;bA(this,this.paper);this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=true};bN[e].getBBox=function(){if(this.removed)return this;if(this.type=="path")return bn(this.attrs.path);if(this.node.style.display=="none"){this.show();var a=true}var b={};try{b=this.node.getBBox()}catch(a){}finally{b=b||{}}if(this.type=="text"){b={x:b.x,y:Infinity,width:0,height:0};for(var c=0,d=this.node.getNumberOfChars();c<d;c++){var e=this.node.getExtentOfChar(c);e.y<b.y&&(b.y=e.y);e.y+e.height-b.y>b.height&&(b.height=e.y+e.height-b.y);e.x+e.width-b.x>b.width&&(b.width=e.x+e.width-b.x)}}a&&this.hide();return b};bN[e].attr=function(b,c){if(this.removed)return this;if(b==null){var d={};for(var e in this.attrs)this.attrs[f](e)&&(d[e]=this.attrs[e]);this._.rt.deg&&(d.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(d.scale=this.scale());d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient;return d}if(c==null&&a.is(b,F)){if(b=="translation")return cz.call(this);if(b=="rotation")return this.rotate();if(b=="scale")return this.scale();if(b==I&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[b]}if(c==null&&a.is(b,G)){var g={};for(var h=0,i=b.length;h<i;h++)g[b[h]]=this.attr(b[h]);return g}if(c!=null){var j={};j[b]=c}else b!=null&&a.is(b,"object")&&(j=b);for(var k in this.paper.customAttributes)if(this.paper.customAttributes[f](k)&&j[f](k)&&a.is(this.paper.customAttributes[k],"function")){var l=this.paper.customAttributes[k].apply(this,[][n](j[k]));this.attrs[k]=j[k];for(var m in l)l[f](m)&&(j[m]=l[m])}bK(this,j);return this};bN[e].toFront=function(){if(this.removed)return this;this.node.parentNode[l](this.node);var a=this.paper;a.top!=this&&bB(this,a);return this};bN[e].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);bC(this,this.paper);var a=this.paper}return this};bN[e].insertAfter=function(a){if(this.removed)return this;var b=a.node||a[a.length-1].node;b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode[l](this.node);bD(this,a,this.paper);return this};bN[e].insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;b.parentNode.insertBefore(this.node,b);bE(this,a,this.paper);return this};bN[e].blur=function(a){var b=this;if(+a!==0){var c=bG("filter"),d=bG("feGaussianBlur");b.attrs.blur=a;c.id=bh();bG(d,{stdDeviation:+a||1.5});c.appendChild(d);b.paper.defs.appendChild(c);b._blur=c;bG(b.node,{filter:"url(#"+c.id+")"})}else{if(b._blur){b._blur.parentNode.removeChild(b._blur);delete b._blur;delete b.attrs.blur}b.node.removeAttribute("filter")}};var bP=function(a,b,c,d){var e=bG("circle");a.canvas&&a.canvas[l](e);var f=new bN(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"};f.type="circle";bG(e,f.attrs);return f},bQ=function(a,b,c,d,e,f){var g=bG("rect");a.canvas&&a.canvas[l](g);var h=new bN(g,a);h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"};h.type="rect";bG(g,h.attrs);return h},bR=function(a,b,c,d,e){var f=bG("ellipse");a.canvas&&a.canvas[l](f);var g=new bN(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"};g.type="ellipse";bG(f,g.attrs);return g},bS=function(a,b,c,d,e,f){var g=bG("image");bG(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"});g.setAttributeNS(a.xlink,"href",b);a.canvas&&a.canvas[l](g);var h=new bN(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b};h.type="image";return h},bT=function(a,b,c,d){var e=bG("text");bG(e,{x:b,y:c,"text-anchor":"middle"});a.canvas&&a.canvas[l](e);var f=new bN(e,a);f.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:W.font,stroke:"none",fill:"#000"};f.type="text";bK(f,f.attrs);return f},bU=function(a,b){this.width=a||this.width;this.height=b||this.height;this.canvas[R]("width",this.width);this.canvas[R]("height",this.height);return this},bV=function(){var b=by[m](0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,h=b.height;if(!c)throw new Error("SVG container not found.");var i=bG("svg");d=d||0;e=e||0;f=f||512;h=h||342;bG(i,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:f,height:h});if(c==1){i.style.cssText="position:absolute;left:"+d+"px;top:"+e+"px";g.body[l](i)}else c.firstChild?c.insertBefore(i,c.firstChild):c[l](i);c=new j;c.width=f;c.height=h;c.canvas=i;bz.call(c,c,a.fn);c.clear();return c};k.clear=function(){var a=this.canvas;while(a.firstChild)a.removeChild(a.firstChild);this.bottom=this.top=null;(this.desc=bG("desc"))[l](g.createTextNode("Created with Raphaël"));a[l](this.desc);a[l](this.defs=bG("defs"))};k.remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bF(a)}}if(a.vml){var bW={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bX=/([clmz]),?([^clmz]*)/gi,bY=/ progid:\S+Blur\([^\)]+\)/g,bZ=/-?[^,\s-]+/g,b$=1000+q+1000,b_=10,ca={path:1,rect:1},cb=function(a){var b=/[ahqstv]/ig,c=bq;r(a).match(b)&&(c=bw);b=/[clmz]/g;if(c==bq&&!r(a).match(b)){var d=r(a)[Y](bX,function(a,b,c){var d=[],e=x.call(b)=="m",f=bW[b];c[Y](bZ,function(a){if(e&&d[w]==2){f+=d+bW[b=="m"?"l":"L"];d=[]}d[L](Q(a*b_))});return f+d});return d}var e=c(a),f,g;d=[];for(var h=0,i=e[w];h<i;h++){f=e[h];g=x.call(e[h][0]);g=="z"&&(g="x");for(var j=1,k=f[w];j<k;j++)g+=Q(f[j]*b_)+(j!=k-1?",":p);d[L](g)}return d[v](q)};a[H]=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};bH=function(a,b){var c=cd("group");c.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px";c.coordsize=b.coordsize;c.coordorigin=b.coordorigin;var d=cd("shape"),e=d.style;e.width=b.width+"px";e.height=b.height+"px";d.coordsize=b$;d.coordorigin=b.coordorigin;c[l](d);var f=new bN(d,c,b),g={fill:"none",stroke:"#000"};a&&(g.path=a);f.type="path";f.path=[];f.Path=p;bK(f,g);b.canvas[l](c);return f};bK=function(c,d){c.attrs=c.attrs||{};var e=c.node,h=c.attrs,i=e.style,j,k=(d.x!=h.x||d.y!=h.y||d.width!=h.width||d.height!=h.height||d.r!=h.r)&&c.type=="rect",m=c;for(var n in d)d[f](n)&&(h[n]=d[n]);if(k){h.path=cc(h.x,h.y,h.width,h.height,h.r);c.X=h.x;c.Y=h.y;c.W=h.width;c.H=h.height}d.href&&(e.href=d.href);d.title&&(e.title=d.title);d.target&&(e.target=d.target);d.cursor&&(i.cursor=d.cursor);"blur"in d&&c.blur(d.blur);if(d.path&&c.type=="path"||k)e.path=cb(h.path);d.rotation!=null&&c.rotate(d.rotation,true);if(d.translation){j=r(d.translation)[s](b);cz.call(c,j[0],j[1]);if(c._.rt.cx!=null){c._.rt.cx+=+j[0];c._.rt.cy+=+j[1];c.setBox(c.attrs,j[0],j[1])}}if(d.scale){j=r(d.scale)[s](b);c.scale(+j[0]||1,+j[1]||+j[0]||1,+j[2]||null,+j[3]||null)}if("clip-rect"in d){var o=r(d["clip-rect"])[s](b);if(o[w]==4){o[2]=+o[2]+ +o[0];o[3]=+o[3]+ +o[1];var q=e.clipRect||g.createElement("div"),t=q.style,u=e.parentNode;t.clip=a.format("rect({1}px {2}px {3}px {0}px)",o);if(!e.clipRect){t.position="absolute";t.top=0;t.left=0;t.width=c.paper.width+"px";t.height=c.paper.height+"px";u.parentNode.insertBefore(q,u);q[l](u);e.clipRect=q}}d["clip-rect"]||e.clipRect&&(e.clipRect.style.clip=p)}c.type=="image"&&d.src&&(e.src=d.src);if(c.type=="image"&&d.opacity){e.filterOpacity=U+".Alpha(opacity="+d.opacity*100+")";i.filter=(e.filterMatrix||p)+(e.filterOpacity||p)}d.font&&(i.font=d.font);d["font-family"]&&(i.fontFamily="\""+d["font-family"][s](",")[0][Y](/^['"]+|['"]+$/g,p)+"\"");d["font-size"]&&(i.fontSize=d["font-size"]);d["font-weight"]&&(i.fontWeight=d["font-weight"]);d["font-style"]&&(i.fontStyle=d["font-style"]);if(d.opacity!=null||d["stroke-width"]!=null||d.fill!=null||d.stroke!=null||d["stroke-width"]!=null||d["stroke-opacity"]!=null||d["fill-opacity"]!=null||d["stroke-dasharray"]!=null||d["stroke-miterlimit"]!=null||d["stroke-linejoin"]!=null||d["stroke-linecap"]!=null){e=c.shape||e;var v=e.getElementsByTagName(I)&&e.getElementsByTagName(I)[0],x=false;!v&&(x=v=cd(I));if("fill-opacity"in d||"opacity"in d){var y=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+a.getRGB(d.fill).o+1||2)-1);y=A(z(y,0),1);v.opacity=y}d.fill&&(v.on=true);if(v.on==null||d.fill=="none")v.on=false;if(v.on&&d.fill){var B=d.fill.match(M);if(B){v.src=B[1];v.type="tile"}else{v.color=a.getRGB(d.fill).hex;v.src=p;v.type="solid";if(a.getRGB(d.fill).error&&(m.type in{circle:1,ellipse:1}||r(d.fill).charAt()!="r")&&bI(m,d.fill)){h.fill="none";h.gradient=d.fill}}}x&&e[l](v);var C=e.getElementsByTagName("stroke")&&e.getElementsByTagName("stroke")[0],D=false;!C&&(D=C=cd("stroke"));if(d.stroke&&d.stroke!="none"||d["stroke-width"]||d["stroke-opacity"]!=null||d["stroke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])C.on=true;(d.stroke=="none"||C.on==null||d.stroke==0||d["stroke-width"]==0)&&(C.on=false);var E=a.getRGB(d.stroke);C.on&&d.stroke&&(C.color=E.hex);y=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+E.o+1||2)-1);var F=(S(d["stroke-width"])||1)*0.75;y=A(z(y,0),1);d["stroke-width"]==null&&(F=h["stroke-width"]);d["stroke-width"]&&(C.weight=F);F&&F<1&&(y*=F)&&(C.weight=1);C.opacity=y;d["stroke-linejoin"]&&(C.joinstyle=d["stroke-linejoin"]||"miter");C.miterlimit=d["stroke-miterlimit"]||8;d["stroke-linecap"]&&(C.endcap=d["stroke-linecap"]=="butt"?"flat":d["stroke-linecap"]=="square"?"square":"round");if(d["stroke-dasharray"]){var G={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};C.dashstyle=G[f](d["stroke-dasharray"])?G[d["stroke-dasharray"]]:p}D&&e[l](C)}if(m.type=="text"){i=m.paper.span.style;h.font&&(i.font=h.font);h["font-family"]&&(i.fontFamily=h["font-family"]);h["font-size"]&&(i.fontSize=h["font-size"]);h["font-weight"]&&(i.fontWeight=h["font-weight"]);h["font-style"]&&(i.fontStyle=h["font-style"]);m.node.string&&(m.paper.span.innerHTML=r(m.node.string)[Y](/</g,"&#60;")[Y](/&/g,"&#38;")[Y](/\n/g,"<br>"));m.W=h.w=m.paper.span.offsetWidth;m.H=h.h=m.paper.span.offsetHeight;m.X=h.x;m.Y=h.y+Q(m.H/2);switch(h["text-anchor"]){case"start":m.node.style["v-text-align"]="left";m.bbx=Q(m.W/2);break;case"end":m.node.style["v-text-align"]="right";m.bbx=-Q(m.W/2);break;default:m.node.style["v-text-align"]="center";break}}};bI=function(a,b){a.attrs=a.attrs||{};var c=a.attrs,d,e="linear",f=".5 .5";a.attrs.gradient=b;b=r(b)[Y](bd,function(a,b,c){e="radial";if(b&&c){b=S(b);c=S(c);C(b-0.5,2)+C(c-0.5,2)>0.25&&(c=y.sqrt(0.25-C(b-0.5,2))*((c>0.5)*2-1)+0.5);f=b+q+c}return p});b=b[s](/\s*\-\s*/);if(e=="linear"){var g=b.shift();g=-S(g);if(isNaN(g))return null}var h=bx(b);if(!h)return null;a=a.shape||a.node;d=a.getElementsByTagName(I)[0]||cd(I);!d.parentNode&&a.appendChild(d);if(h[w]){d.on=true;d.method="none";d.color=h[0].color;d.color2=h[h[w]-1].color;var i=[];for(var j=0,k=h[w];j<k;j++)h[j].offset&&i[L](h[j].offset+q+h[j].color);d.colors&&(d.colors.value=i[w]?i[v]():"0% "+d.color);if(e=="radial"){d.type="gradientradial";d.focus="100%";d.focussize=f;d.focusposition=f}else{d.type="gradient";d.angle=(270-g)%360}}return 1};bN=function(b,c,d){var e=0,f=0,g=0,h=1;this[0]=b;this.id=a._oid++;this.node=b;b.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=c;this.paper=d;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!d.bottom&&(d.bottom=this);this.prev=d.top;d.top&&(d.top.next=this);d.top=this;this.next=null};bO=bN[e];bO.rotate=function(a,c,d){if(this.removed)return this;if(a==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][v](q);return this._.rt.deg}a=r(a)[s](b);if(a[w]-1){c=S(a[1]);d=S(a[2])}a=S(a[0]);c!=null?this._.rt.deg=a:this._.rt.deg+=a;d==null&&(c=null);this._.rt.cx=c;this._.rt.cy=d;this.setBox(this.attrs,c,d);this.Group.style.rotation=this._.rt.deg;return this};bO.setBox=function(a,b,c){if(this.removed)return this;var d=this.Group.style,e=this.shape&&this.shape.style||this.node.style;a=a||{};for(var g in a)a[f](g)&&(this.attrs[g]=a[g]);b=b||this._.rt.cx;c=c||this._.rt.cy;var h=this.attrs,i,j,k,l;switch(this.type){case"circle":i=h.cx-h.r;j=h.cy-h.r;k=l=h.r*2;break;case"ellipse":i=h.cx-h.rx;j=h.cy-h.ry;k=h.rx*2;l=h.ry*2;break;case"image":i=+h.x;j=+h.y;k=h.width||0;l=h.height||0;break;case"text":this.textpath.v=["m",Q(h.x),", ",Q(h.y-2),"l",Q(h.x)+1,", ",Q(h.y-2)][v](p);i=h.x-Q(this.W/2);j=h.y-this.H/2;k=this.W;l=this.H;break;case"rect":case"path":if(this.attrs.path){var m=bn(this.attrs.path);i=m.x;j=m.y;k=m.width;l=m.height}else{i=0;j=0;k=this.paper.width;l=this.paper.height}break;default:i=0;j=0;k=this.paper.width;l=this.paper.height;break}b=b==null?i+k/2:b;c=c==null?j+l/2:c;var n=b-this.paper.width/2,o=c-this.paper.height/2,q;d.left!=(q=n+"px")&&(d.left=q);d.top!=(q=o+"px")&&(d.top=q);this.X=ca[f](this.type)?-n:i;this.Y=ca[f](this.type)?-o:j;this.W=k;this.H=l;if(ca[f](this.type)){e.left!=(q=-n*b_+"px")&&(e.left=q);e.top!=(q=-o*b_+"px")&&(e.top=q)}else if(this.type=="text"){e.left!=(q=-n+"px")&&(e.left=q);e.top!=(q=-o+"px")&&(e.top=q)}else{d.width!=(q=this.paper.width+"px")&&(d.width=q);d.height!=(q=this.paper.height+"px")&&(d.height=q);e.left!=(q=i-n+"px")&&(e.left=q);e.top!=(q=j-o+"px")&&(e.top=q);e.width!=(q=k+"px")&&(e.width=q);e.height!=(q=l+"px")&&(e.height=q)}};bO.hide=function(){!this.removed&&(this.Group.style.display="none");return this};bO.show=function(){!this.removed&&(this.Group.style.display="block");return this};bO.getBBox=function(){if(this.removed)return this;if(ca[f](this.type))return bn(this.attrs.path);return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};bO.remove=function(){if(this.removed)return;bA(this,this.paper);this.node.parentNode.removeChild(this.node);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)delete this[a];this.removed=true};bO.attr=function(b,c){if(this.removed)return this;if(b==null){var d={};for(var e in this.attrs)this.attrs[f](e)&&(d[e]=this.attrs[e]);this._.rt.deg&&(d.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(d.scale=this.scale());d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient;return d}if(c==null&&a.is(b,"string")){if(b=="translation")return cz.call(this);if(b=="rotation")return this.rotate();if(b=="scale")return this.scale();if(b==I&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[b]}if(this.attrs&&c==null&&a.is(b,G)){var g,h={};for(e=0,g=b[w];e<g;e++)h[b[e]]=this.attr(b[e]);return h}var i;if(c!=null){i={};i[b]=c}c==null&&a.is(b,"object")&&(i=b);if(i){for(var j in this.paper.customAttributes)if(this.paper.customAttributes[f](j)&&i[f](j)&&a.is(this.paper.customAttributes[j],"function")){var k=this.paper.customAttributes[j].apply(this,[][n](i[j]));this.attrs[j]=i[j];for(var l in k)k[f](l)&&(i[l]=k[l])}i.text&&this.type=="text"&&(this.node.string=i.text);bK(this,i);i.gradient&&(({circle:1,ellipse:1})[f](this.type)||r(i.gradient).charAt()!="r")&&bI(this,i.gradient);(!ca[f](this.type)||this._.rt.deg)&&this.setBox(this.attrs)}return this};bO.toFront=function(){!this.removed&&this.Group.parentNode[l](this.Group);this.paper.top!=this&&bB(this,this.paper);return this};bO.toBack=function(){if(this.removed)return this;if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);bC(this,this.paper)}return this};bO.insertAfter=function(a){if(this.removed)return this;a.constructor==cC&&(a=a[a.length-1]);a.Group.nextSibling?a.Group.parentNode.insertBefore(this.Group,a.Group.nextSibling):a.Group.parentNode[l](this.Group);bD(this,a,this.paper);return this};bO.insertBefore=function(a){if(this.removed)return this;a.constructor==cC&&(a=a[0]);a.Group.parentNode.insertBefore(this.Group,a.Group);bE(this,a,this.paper);return this};bO.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(bY,p);if(+b!==0){this.attrs.blur=b;c.filter=d+q+U+".Blur(pixelradius="+(+b||1.5)+")";c.margin=a.format("-{0}px 0 0 -{0}px",Q(+b||1.5))}else{c.filter=d;c.margin=0;delete this.attrs.blur}};bP=function(a,b,c,d){var e=cd("group"),f=cd("oval"),g=f.style;e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";e.coordsize=b$;e.coordorigin=a.coordorigin;e[l](f);var h=new bN(f,e,a);h.type="circle";bK(h,{stroke:"#000",fill:"none"});h.attrs.cx=b;h.attrs.cy=c;h.attrs.r=d;h.setBox({x:b-d,y:c-d,width:d*2,height:d*2});a.canvas[l](e);return h};function cc(b,c,d,e,f){return f?a.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",b+f,c,d-f*2,f,-f,e-f*2,f*2-d,f*2-e):a.format("M{0},{1}l{2},0,0,{3},{4},0z",b,c,d,e,-d)}bQ=function(a,b,c,d,e,f){var g=cc(b,c,d,e,f),h=a.path(g),i=h.attrs;h.X=i.x=b;h.Y=i.y=c;h.W=i.width=d;h.H=i.height=e;i.r=f;i.path=g;h.type="rect";return h};bR=function(a,b,c,d,e){var f=cd("group"),g=cd("oval"),h=g.style;f.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";f.coordsize=b$;f.coordorigin=a.coordorigin;f[l](g);var i=new bN(g,f,a);i.type="ellipse";bK(i,{stroke:"#000"});i.attrs.cx=b;i.attrs.cy=c;i.attrs.rx=d;i.attrs.ry=e;i.setBox({x:b-d,y:c-e,width:d*2,height:e*2});a.canvas[l](f);return i};bS=function(a,b,c,d,e,f){var g=cd("group"),h=cd("image");g.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";g.coordsize=b$;g.coordorigin=a.coordorigin;h.src=b;g[l](h);var i=new bN(h,g,a);i.type="image";i.attrs.src=b;i.attrs.x=c;i.attrs.y=d;i.attrs.w=e;i.attrs.h=f;i.setBox({x:c,y:d,width:e,height:f});a.canvas[l](g);return i};bT=function(b,c,d,e){var f=cd("group"),g=cd("shape"),h=g.style,i=cd("path"),j=i.style,k=cd("textpath");f.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px";f.coordsize=b$;f.coordorigin=b.coordorigin;i.v=a.format("m{0},{1}l{2},{1}",Q(c*10),Q(d*10),Q(c*10)+1);i.textpathok=true;h.width=b.width;h.height=b.height;k.string=r(e);k.on=true;g[l](k);g[l](i);f[l](g);var m=new bN(k,f,b);m.shape=g;m.textpath=i;m.type="text";m.attrs.text=e;m.attrs.x=c;m.attrs.y=d;m.attrs.w=1;m.attrs.h=1;bK(m,{font:W.font,stroke:"none",fill:"#000"});m.setBox();b.canvas[l](f);return m};bU=function(a,b){var c=this.canvas.style;a==+a&&(a+="px");b==+b&&(b+="px");c.width=a;c.height=b;c.clip="rect(0 "+a+" "+b+" 0)";return this};var cd;g.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!g.namespaces.rvml&&g.namespaces.add("rvml","urn:schemas-microsoft-com:vml");cd=function(a){return g.createElement("<rvml:"+a+" class=\"rvml\">")}}catch(a){cd=function(a){return g.createElement("<"+a+" xmlns=\"urn:schemas-microsoft.com:vml\" class=\"rvml\">")}}bV=function(){var b=by[m](0,arguments),c=b.container,d=b.height,e,f=b.width,h=b.x,i=b.y;if(!c)throw new Error("VML container not found.");var k=new j,n=k.canvas=g.createElement("div"),o=n.style;h=h||0;i=i||0;f=f||512;d=d||342;f==+f&&(f+="px");d==+d&&(d+="px");k.width=1000;k.height=1000;k.coordsize=b_*1000+q+b_*1000;k.coordorigin="0 0";k.span=g.createElement("span");k.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";n[l](k.span);o.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d);if(c==1){g.body[l](n);o.left=h+"px";o.top=i+"px";o.position="absolute"}else c.firstChild?c.insertBefore(n,c.firstChild):c[l](n);bz.call(k,k,a.fn);return k};k.clear=function(){this.canvas.innerHTML=p;this.span=g.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[l](this.span);this.bottom=this.top=null};k.remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bF(a);return true}}var ce=navigator.userAgent.match(/Version\\x2f(.*?)\s/);navigator.vendor=="Apple Computer, Inc."&&(ce&&ce[1]<4||navigator.platform.slice(0,2)=="iP")?k.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});h.setTimeout(function(){a.remove()})}:k.safari=function(){};var cf=function(){this.returnValue=false},cg=function(){return this.originalEvent.preventDefault()},ch=function(){this.cancelBubble=true},ci=function(){return this.originalEvent.stopPropagation()},cj=(function(){{if(g.addEventListener)return function(a,b,c,d){var e=o&&u[b]?u[b]:b,g=function(e){if(o&&u[f](b))for(var g=0,h=e.targetTouches&&e.targetTouches.length;g<h;g++){if(e.targetTouches[g].target==a){var i=e;e=e.targetTouches[g];e.originalEvent=i;e.preventDefault=cg;e.stopPropagation=ci;break}}return c.call(d,e)};a.addEventListener(e,g,false);return function(){a.removeEventListener(e,g,false);return true}};if(g.attachEvent)return function(a,b,c,d){var e=function(a){a=a||h.event;a.preventDefault=a.preventDefault||cf;a.stopPropagation=a.stopPropagation||ch;return c.call(d,a)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return true};return f}}})(),ck=[],cl=function(a){var b=a.clientX,c=a.clientY,d=g.documentElement.scrollTop||g.body.scrollTop,e=g.documentElement.scrollLeft||g.body.scrollLeft,f,h=ck.length;while(h--){f=ck[h];if(o){var i=a.touches.length,j;while(i--){j=a.touches[i];if(j.identifier==f.el._drag.id){b=j.clientX;c=j.clientY;(a.originalEvent?a.originalEvent:a).preventDefault();break}}}else a.preventDefault();b+=e;c+=d;f.move&&f.move.call(f.move_scope||f.el,b-f.el._drag.x,c-f.el._drag.y,b,c,a)}},cm=function(b){a.unmousemove(cl).unmouseup(cm);var c=ck.length,d;while(c--){d=ck[c];d.el._drag={};d.end&&d.end.call(d.end_scope||d.start_scope||d.move_scope||d.el,b)}ck=[]};for(var cn=t[w];cn--;)(function(b){a[b]=bN[e][b]=function(c,d){if(a.is(c,"function")){this.events=this.events||[];this.events.push({name:b,f:c,unbind:cj(this.shape||this.node||g,b,c,d||this)})}return this};a["un"+b]=bN[e]["un"+b]=function(a){var c=this.events,d=c[w];while(d--)if(c[d].name==b&&c[d].f==a){c[d].unbind();c.splice(d,1);!c.length&&delete this.events;return this}return this}})(t[cn]);bO.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)};bO.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};bO.drag=function(b,c,d,e,f,h){this._drag={};this.mousedown(function(i){(i.originalEvent||i).preventDefault();var j=g.documentElement.scrollTop||g.body.scrollTop,k=g.documentElement.scrollLeft||g.body.scrollLeft;this._drag.x=i.clientX+k;this._drag.y=i.clientY+j;this._drag.id=i.identifier;c&&c.call(f||e||this,i.clientX+k,i.clientY+j,i);!ck.length&&a.mousemove(cl).mouseup(cm);ck.push({el:this,move:b,end:d,move_scope:e,start_scope:f,end_scope:h})});return this};bO.undrag=function(b,c,d){var e=ck.length;while(e--)ck[e].el==this&&(ck[e].move==b&&ck[e].end==d)&&ck.splice(e++,1);!ck.length&&a.unmousemove(cl).unmouseup(cm)};k.circle=function(a,b,c){return bP(this,a||0,b||0,c||0)};k.rect=function(a,b,c,d,e){return bQ(this,a||0,b||0,c||0,d||0,e||0)};k.ellipse=function(a,b,c,d){return bR(this,a||0,b||0,c||0,d||0)};k.path=function(b){b&&!a.is(b,F)&&!a.is(b[0],G)&&(b+=p);return bH(a.format[m](a,arguments),this)};k.image=function(a,b,c,d,e){return bS(this,a||"about:blank",b||0,c||0,d||0,e||0)};k.text=function(a,b,c){return bT(this,a||0,b||0,r(c))};k.set=function(a){arguments[w]>1&&(a=Array[e].splice.call(arguments,0,arguments[w]));return new cC(a)};k.setSize=bU;k.top=k.bottom=null;k.raphael=a;function co(){return this.x+q+this.y}bO.resetScale=function(){if(this.removed)return this;this._.sx=1;this._.sy=1;this.attrs.scale="1 1"};bO.scale=function(a,b,c,d){if(this.removed)return this;if(a==null&&b==null)return{x:this._.sx,y:this._.sy,toString:co};b=b||a;!(+b)&&(b=a);var e,f,g,h,i=this.attrs;if(a!=0){var j=this.getBBox(),k=j.x+j.width/2,l=j.y+j.height/2,m=B(a/this._.sx),o=B(b/this._.sy);c=+c||c==0?c:k;d=+d||d==0?d:l;var r=this._.sx>0,s=this._.sy>0,t=~(~(a/B(a))),u=~(~(b/B(b))),x=m*t,y=o*u,z=this.node.style,A=c+B(k-c)*x*(k>c==r?1:-1),C=d+B(l-d)*y*(l>d==s?1:-1),D=a*t>b*u?o:m;switch(this.type){case"rect":case"image":var E=i.width*m,F=i.height*o;this.attr({height:F,r:i.r*D,width:E,x:A-E/2,y:C-F/2});break;case"circle":case"ellipse":this.attr({rx:i.rx*m,ry:i.ry*o,r:i.r*D,cx:A,cy:C});break;case"text":this.attr({x:A,y:C});break;case"path":var G=bp(i.path),H=true,I=r?x:m,J=s?y:o;for(var K=0,L=G[w];K<L;K++){var M=G[K],N=V.call(M[0]);{if(N=="M"&&H)continue;H=false}if(N=="A"){M[G[K][w]-2]*=I;M[G[K][w]-1]*=J;M[1]*=m;M[2]*=o;M[5]=+(t+u?!(!(+M[5])):!(+M[5]))}else if(N=="H")for(var O=1,P=M[w];O<P;O++)M[O]*=I;else if(N=="V")for(O=1,P=M[w];O<P;O++)M[O]*=J;else for(O=1,P=M[w];O<P;O++)M[O]*=O%2?I:J}var Q=bn(G);e=A-Q.x-Q.width/2;f=C-Q.y-Q.height/2;G[0][1]+=e;G[0][2]+=f;this.attr({path:G});break}if(this.type in{text:1,image:1}&&(t!=1||u!=1))if(this.transformations){this.transformations[2]="scale("[n](t,",",u,")");this.node[R]("transform",this.transformations[v](q));e=t==-1?-i.x-(E||0):i.x;f=u==-1?-i.y-(F||0):i.y;this.attr({x:e,y:f});i.fx=t-1;i.fy=u-1}else{this.node.filterMatrix=U+".Matrix(M11="[n](t,", M12=0, M21=0, M22=",u,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");z.filter=(this.node.filterMatrix||p)+(this.node.filterOpacity||p)}else if(this.transformations){this.transformations[2]=p;this.node[R]("transform",this.transformations[v](q));i.fx=0;i.fy=0}else{this.node.filterMatrix=p;z.filter=(this.node.filterMatrix||p)+(this.node.filterOpacity||p)}i.scale=[a,b,c,d][v](q);this._.sx=a;this._.sy=b}return this};bO.clone=function(){if(this.removed)return null;var a=this.attr();delete a.scale;delete a.translation;return this.paper[this.type]().attr(a)};var cp={},cq=function(b,c,d,e,f,g,h,i,j){var k=0,l=100,m=[b,c,d,e,f,g,h,i].join(),n=cp[m],o,p;!n&&(cp[m]=n={data:[]});n.timer&&clearTimeout(n.timer);n.timer=setTimeout(function(){delete cp[m]},2000);if(j!=null){var q=cq(b,c,d,e,f,g,h,i);l=~(~q)*10}for(var r=0;r<l+1;r++){if(n.data[j]>r)p=n.data[r*l];else{p=a.findDotsAtSegment(b,c,d,e,f,g,h,i,r/l);n.data[r]=p}r&&(k+=C(C(o.x-p.x,2)+C(o.y-p.y,2),0.5));if(j!=null&&k>=j)return p;o=p}if(j==null)return k},cr=function(b,c){return function(d,e,f){d=bw(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;o<p;o++){i=d[o];if(i[0]=="M"){g=+i[1];h=+i[2]}else{j=cq(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cq(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);k+=["C",m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k;k=["M",m.x,m.y+"C",m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]][v]();n+=j;g=+i[5];h=+i[6];continue}if(!b&&!c){m=cq(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j;g=+i[5];h=+i[6]}k+=i}l.end=k;m=b?n:c?l:a.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],1);m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},cs=cr(1),ct=cr(),cu=cr(0,1);bO.getTotalLength=function(){if(this.type!="path")return;if(this.node.getTotalLength)return this.node.getTotalLength();return cs(this.attrs.path)};bO.getPointAtLength=function(a){if(this.type!="path")return;return ct(this.attrs.path,a)};bO.getSubpath=function(a,b){if(this.type!="path")return;if(B(this.getTotalLength()-b)<"1e-6")return cu(this.attrs.path,a).end;var c=cu(this.attrs.path,b,1);return a?cu(c,a).end:c};a.easing_formulas={linear:function(a){return a},"<":function(a){return C(a,3)},">":function(a){return C(a-1,3)+1},"<>":function(a){a=a*2;if(a<1)return C(a,3)/2;a-=2;return(C(a,3)+2)/2},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==0||a==1)return a;var b=0.3,c=b/4;return C(2,-10*a)*y.sin((a-c)*(2*D)/b)+1},bounce:function(a){var b=7.5625,c=2.75,d;if(a<1/c)d=b*a*a;else if(a<2/c){a-=1.5/c;d=b*a*a+0.75}else if(a<2.5/c){a-=2.25/c;d=b*a*a+0.9375}else{a-=2.625/c;d=b*a*a+0.984375}return d}};var cv=[],cw=function(){var b=+(new Date);for(var c=0;c<cv[w];c++){var d=cv[c];if(d.stop||d.el.removed)continue;var e=b-d.start,g=d.ms,h=d.easing,i=d.from,j=d.diff,k=d.to,l=d.t,m=d.el,n={},o;if(e<g){var r=h(e/g);for(var s in i)if(i[f](s)){switch(X[s]){case"along":o=r*g*j[s];k.back&&(o=k.len-o);var t=ct(k[s],o);m.translate(j.sx-j.x||0,j.sy-j.y||0);j.x=t.x;j.y=t.y;m.translate(t.x-j.sx,t.y-j.sy);k.rot&&m.rotate(j.r+t.alpha,t.x,t.y);break;case E:o=+i[s]+r*g*j[s];break;case"colour":o="rgb("+[cy(Q(i[s].r+r*g*j[s].r)),cy(Q(i[s].g+r*g*j[s].g)),cy(Q(i[s].b+r*g*j[s].b))][v](",")+")";break;case"path":o=[];for(var u=0,x=i[s][w];u<x;u++){o[u]=[i[s][u][0]];for(var y=1,z=i[s][u][w];y<z;y++)o[u][y]=+i[s][u][y]+r*g*j[s][u][y];o[u]=o[u][v](q)}o=o[v](q);break;case"csv":switch(s){case"translation":var A=r*g*j[s][0]-l.x,B=r*g*j[s][1]-l.y;l.x+=A;l.y+=B;o=A+q+B;break;case"rotation":o=+i[s][0]+r*g*j[s][0];i[s][1]&&(o+=","+i[s][1]+","+i[s][2]);break;case"scale":o=[+i[s][0]+r*g*j[s][0],+i[s][1]+r*g*j[s][1],2 in k[s]?k[s][2]:p,3 in k[s]?k[s][3]:p][v](q);break;case"clip-rect":o=[];u=4;while(u--)o[u]=+i[s][u]+r*g*j[s][u];break}break;default:var C=[].concat(i[s]);o=[];u=m.paper.customAttributes[s].length;while(u--)o[u]=+C[u]+r*g*j[s][u];break}n[s]=o}m.attr(n);m._run&&m._run.call(m)}else{if(k.along){t=ct(k.along,k.len*!k.back);m.translate(j.sx-(j.x||0)+t.x-j.sx,j.sy-(j.y||0)+t.y-j.sy);k.rot&&m.rotate(j.r+t.alpha,t.x,t.y)}(l.x||l.y)&&m.translate(-l.x,-l.y);k.scale&&(k.scale+=p);m.attr(k);cv.splice(c--,1)}}a.svg&&m&&m.paper&&m.paper.safari();cv[w]&&setTimeout(cw)},cx=function(b,c,d,e,f){var g=d-e;c.timeouts.push(setTimeout(function(){a.is(f,"function")&&f.call(c);c.animate(b,g,b.easing)},e))},cy=function(a){return z(A(a,255),0)},cz=function(a,b){if(a==null)return{x:this._.tx,y:this._.ty,toString:co};this._.tx+=+a;this._.ty+=+b;switch(this.type){case"circle":case"ellipse":this.attr({cx:+a+this.attrs.cx,cy:+b+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+a+this.attrs.x,y:+b+this.attrs.y});break;case"path":var c=bp(this.attrs.path);c[0][1]+=+a;c[0][2]+=+b;this.attr({path:c});break}return this};bO.animateWith=function(a,b,c,d,e){for(var f=0,g=cv.length;f<g;f++)cv[f].el.id==a.id&&(b.start=cv[f].start);return this.animate(b,c,d,e)};bO.animateAlong=cA();bO.animateAlongBack=cA(1);function cA(b){return function(c,d,e,f){var g={back:b};a.is(e,"function")?f=e:g.rot=e;c&&c.constructor==bN&&(c=c.attrs.path);c&&(g.along=c);return this.animate(g,d,f)}}function cB(a,b,c,d,e,f){var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;function m(a){return((i*a+h)*a+g)*a}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(B(f)<b)return e;j=(3*i*e+2*h)*e+g;if(B(j)<0.000001)break;e=e-f/j}c=0;d=1;e=a;if(e<c)return c;if(e>d)return d;while(c<d){f=m(e);if(B(f-a)<b)return e;a>f?c=e:d=e;e=(d-c)/2+c}return e}return n(a,1/(200*f))}bO.onAnimation=function(a){this._run=a||0;return this};bO.animate=function(c,d,e,g){var h=this;h.timeouts=h.timeouts||[];if(a.is(e,"function")||!e)g=e||null;if(h.removed){g&&g.call(h);return h}var i={},j={},k=false,l={};for(var m in c)if(c[f](m)){if(X[f](m)||h.paper.customAttributes[f](m)){k=true;i[m]=h.attr(m);i[m]==null&&(i[m]=W[m]);j[m]=c[m];switch(X[m]){case"along":var n=cs(c[m]),o=ct(c[m],n*!(!c.back)),p=h.getBBox();l[m]=n/d;l.tx=p.x;l.ty=p.y;l.sx=o.x;l.sy=o.y;j.rot=c.rot;j.back=c.back;j.len=n;c.rot&&(l.r=S(h.rotate())||0);break;case E:l[m]=(j[m]-i[m])/d;break;case"colour":i[m]=a.getRGB(i[m]);var q=a.getRGB(j[m]);l[m]={r:(q.r-i[m].r)/d,g:(q.g-i[m].g)/d,b:(q.b-i[m].b)/d};break;case"path":var t=bw(i[m],j[m]);i[m]=t[0];var u=t[1];l[m]=[];for(var v=0,x=i[m][w];v<x;v++){l[m][v]=[0];for(var y=1,z=i[m][v][w];y<z;y++)l[m][v][y]=(u[v][y]-i[m][v][y])/d}break;case"csv":var A=r(c[m])[s](b),B=r(i[m])[s](b);switch(m){case"translation":i[m]=[0,0];l[m]=[A[0]/d,A[1]/d];break;case"rotation":i[m]=B[1]==A[1]&&B[2]==A[2]?B:[0,A[1],A[2]];l[m]=[(A[0]-i[m][0])/d,0,0];break;case"scale":c[m]=A;i[m]=r(i[m])[s](b);l[m]=[(A[0]-i[m][0])/d,(A[1]-i[m][1])/d,0,0];break;case"clip-rect":i[m]=r(i[m])[s](b);l[m]=[];v=4;while(v--)l[m][v]=(A[v]-i[m][v])/d;break}j[m]=A;break;default:A=[].concat(c[m]);B=[].concat(i[m]);l[m]=[];v=h.paper.customAttributes[m][w];while(v--)l[m][v]=((A[v]||0)-(B[v]||0))/d;break}}}if(k){var G=a.easing_formulas[e];if(!G){G=r(e).match(P);if(G&&G[w]==5){var H=G;G=function(a){return cB(a,+H[1],+H[2],+H[3],+H[4],d)}}else G=function(a){return a}}cv.push({start:c.start||+(new Date),ms:d,easing:G,from:i,diff:l,to:j,el:h,t:{x:0,y:0}});a.is(g,"function")&&(h._ac=setTimeout(function(){g.call(h)},d));cv[w]==1&&setTimeout(cw)}else{var C=[],D;for(var F in c)if(c[f](F)&&Z.test(F)){m={value:c[F]};F=="from"&&(F=0);F=="to"&&(F=100);m.key=T(F,10);C.push(m)}C.sort(be);C[0].key&&C.unshift({key:0,value:h.attrs});for(v=0,x=C[w];v<x;v++)cx(C[v].value,h,d/100*C[v].key,d/100*(C[v-1]&&C[v-1].key||0),C[v-1]&&C[v-1].value.callback);D=C[C[w]-1].value.callback;D&&h.timeouts.push(setTimeout(function(){D.call(h)},d))}return this};bO.stop=function(){for(var a=0;a<cv.length;a++)cv[a].el.id==this.id&&cv.splice(a--,1);for(a=0,ii=this.timeouts&&this.timeouts.length;a<ii;a++)clearTimeout(this.timeouts[a]);this.timeouts=[];clearTimeout(this._ac);delete this._ac;return this};bO.translate=function(a,b){return this.attr({translation:a+" "+b})};bO[H]=function(){return"Raphaël’s object"};a.ae=cv;var cC=function(a){this.items=[];this[w]=0;this.type="set";if(a)for(var b=0,c=a[w];b<c;b++){if(a[b]&&(a[b].constructor==bN||a[b].constructor==cC)){this[this.items[w]]=this.items[this.items[w]]=a[b];this[w]++}}};cC[e][L]=function(){var a,b;for(var c=0,d=arguments[w];c<d;c++){a=arguments[c];if(a&&(a.constructor==bN||a.constructor==cC)){b=this.items[w];this[b]=this.items[b]=a;this[w]++}}return this};cC[e].pop=function(){delete this[this[w]--];return this.items.pop()};for(var cD in bO)bO[f](cD)&&(cC[e][cD]=(function(a){return function(){for(var b=0,c=this.items[w];b<c;b++)this.items[b][a][m](this.items[b],arguments);return this}})(cD));cC[e].attr=function(b,c){if(b&&a.is(b,G)&&a.is(b[0],"object"))for(var d=0,e=b[w];d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items[w];f<g;f++)this.items[f].attr(b,c);return this};cC[e].animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items[w],g=f,h,i=this,j;e&&(j=function(){!(--f)&&e.call(i)});d=a.is(d,F)?d:j;h=this.items[--g].animate(b,c,d,j);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,b,c,d,j);return this};cC[e].insertAfter=function(a){var b=this.items[w];while(b--)this.items[b].insertAfter(a);return this};cC[e].getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items[w];e--;){var f=this.items[e].getBBox();a[L](f.x);b[L](f.y);c[L](f.x+f.width);d[L](f.y+f.height)}a=A[m](0,a);b=A[m](0,b);return{x:a,y:b,width:z[m](0,c)-a,height:z[m](0,d)-b}};cC[e].clone=function(a){a=new cC;for(var b=0,c=this.items[w];b<c;b++)a[L](this.items[b].clone());return a};a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[f](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c][L](b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=T(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[f](e)){var g=a.glyphs[e];b.glyphs[e]={w:g.w,k:{},d:g.d&&"M"+g.d[Y](/[mlcxtrv]/g,function(a){return({l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"})[a]||"M"})+"z"};if(g.k)for(var h in g.k)g[f](h)&&(b.glyphs[e].k[h]=g.k[h])}}return a};k.getFont=function(b,c,d,e){e=e||"normal";d=d||"normal";c=+c||({normal:400,bold:700,lighter:300,bolder:800})[c]||400;if(!a.fonts)return;var g=a.fonts[b];if(!g){var h=new RegExp("(^|\\s)"+b[Y](/[^\w\d\s+!~.:_-]/g,p)+"(\\s|$)","i");for(var i in a.fonts)if(a.fonts[f](i)){if(h.test(i)){g=a.fonts[i];break}}}var j;if(g)for(var k=0,l=g[w];k<l;k++){j=g[k];if(j.face["font-weight"]==c&&(j.face["font-style"]==d||!j.face["font-style"])&&j.face["font-stretch"]==e)break}return j};k.print=function(c,d,e,f,g,h,i){h=h||"middle";i=z(A(i||0,1),-1);var j=this.set(),k=r(e)[s](p),l=0,m=p,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var o=f.face.bbox.split(b),q=+o[0],t=+o[1]+(h=="baseline"?o[3]-o[1]+ +f.face.descent:(o[3]-o[1])/2);for(var u=0,v=k[w];u<v;u++){var x=u&&f.glyphs[k[u-1]]||{},y=f.glyphs[k[u]];l+=u?(x.w||f.w)+(x.k&&x.k[k[u]]||0)+f.w*i:0;y&&y.d&&j[L](this.path(y.d).attr({fill:"#000",stroke:"none",translation:[l,0]}))}j.scale(n,n,q,t).translate(c-q,d-t)}return j};a.format=function(b,c){var e=a.is(c,G)?[0][n](c):arguments;b&&a.is(b,F)&&e[w]-1&&(b=b[Y](d,function(a,b){return e[++b]==null?p:e[b]}));return b||p};a.ninja=function(){i.was?h.Raphael=i.is:delete Raphael;return a};a.el=bO;a.st=cC[e];i.was?h.Raphael=a:Raphael=a})()
\ No newline at end of file
diff --git a/plugins/scheduler/static/js/raphael.js b/plugins/scheduler/static/js/raphael.js
deleted file mode 120000 (symlink)
index 02b8f47..0000000
+++ /dev/null
@@ -1 +0,0 @@
-raphael-1.5.2.js
\ No newline at end of file
diff --git a/plugins/scheduler/static/js/scheduler.js b/plugins/scheduler/static/js/scheduler.js
deleted file mode 100644 (file)
index c9b2096..0000000
+++ /dev/null
@@ -1,736 +0,0 @@
-/**
- * Description: display a query result in a Google map
- * Copyright (c) 2012-2013 UPMC Sorbonne Universite - INRIA
- * License: GPLv3
- */
-
-/* based on the leases.js code in PLE WWW interface for MyPLC by Thierry Parmentelat -- INRIA */
-
-/* XXX Those declarations should not be part of the js file... */
-
-/* decorations / headers */
-/* note: looks like the 'font' attr is not effective... */
-
-// vertical rules
-var attr_rules={'fill':"#888", 'stroke-dasharray':'- ', 'stroke-width':0.5};
-// set font-size separately in here rather than depend on the height
-var txt_timelabel = {"font": 'Times, "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif', 
-             stroke: "none", fill: "#008", 'font-size': 9};
-var txt_allnodes = {"font": '"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif', stroke: "none", fill: "#404"};
-var txt_nodelabel = {"font": '"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif', stroke: "none", fill: "#008"};
-
-var attr_timebutton = {'fill':'#bbf', 'stroke': '#338','stroke-width':1, 
-               'stroke-linecap':'round', 'stroke-linejoin':'miter', 'stroke-miterlimit':3};
-var attr_daymarker = {'stroke':'#000','stroke-width':2};
-var attr_half_daymarker = {'stroke':'#444','stroke-width':2};
-
-/* lease dimensions and colors */
-/* refrain from using gradient color, seems to not be animated properly */
-/* lease was originally free and is still free */
-var attr_lease_free_free={'fill':"#def", 'stroke-width':0.5, 'stroke-dasharray':''};
-/* lease was originally free and is now set for our usage */
-var attr_lease_free_mine={'fill':"green", 'stroke-width':1, 'stroke-dasharray':'-..'};
-/* was mine and is still mine */
-var attr_lease_mine_mine={'fill':"#beb", 'stroke-width':0.5, 'stroke-dasharray':''};
-/* was mine and is about to be released */
-var attr_lease_mine_free={'fill':"white", 'stroke-width':1, 'stroke-dasharray':'-..'};
-var attr_lease_other={'fill':"#f88"};
-
-/* other slices name */
-var txt_otherslice = {"font": '"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif', stroke: "none", fill: "#444", "font-size": "12px"};
-
-(function($){
-
-    var Scheduler = Plugin.extend({
-
-        init: function(options, element) 
-        {
-           this.classname="scheduler";
-            this._super(options, element);
-
-            /* Member variables */
-            this._canvas_id = this.id('leases_area');
-
-            this.query_uuid = options.query_uuid;
-            this.rows = null;
-            // XXX TODEL
-            //this.current_resources = Array();
-            //this.current_leases = Array();
-
-            /* Managing asynchronous reception of resources and leases */
-            this._resources          = Array();
-            this._leases             = Array();
-            this._received_resources = false;
-            this._received_leases    = false;
-
-            this._axisx              = Array();
-            this._nodelabels         = Array();
-            this._lease_elements     = Array();
-            //this.myLeases = Array();
-            //this.allLeases = Array();
-
-            /* The time axis is an array of tuple (time, printable time) representing timeslots */
-
-            this.data = Array();
-            this.default_granularity = 1800; /* 30 min */
-            this._initial_timestamp = null;
-
-            /* This should be updated to be the ppcm of all granularities */
-            this.min_granularity = this.default_granularity;
-
-            // the data contains slice names, and lease_id, we need this to find our own leases (mine)
-            this._paper=null;
-
-
-            /* XXX Events */
-
-            /* XXX Keys */
-
-            /* Listening to queries */
-            this.listen_query(options.query_uuid);
-            this.listen_query(options.query_all_resources_uuid, 'all_resources');
-            this.listen_query(options.query_lease_uuid, 'lease');
-
-            /* XXX GUI setup and event binding */
-            jQuery("#datepicker").datetimepicker({
-                //Timezone wise selection option
-                //timeFormat: 'hh:mm tt z',
-                //showTimezone: true,
-                
-                onSelect: function(value) { 
-                    //console.log(value);
-                    //converting time to timestamp
-                    currentDate= Math.round(Date.parse(value)/ 1000);
-                    // TODO -- DONE
-                    // convert value to timestamp --done
-                    // Get jQuery("#timepicker").val(); - no need anymore
-                    // convert timepicker into seconds - no need
-                    // Add time to date - done
-                    // pass the result to init_axisx - done
-                    //console.log(currentDate);
-                    s.clear();
-                    s._init_axisx(currentDate);
-                    s._draw();
-                    // Do we need to populate the timeslots with existing leases? 
-                    // Look how to populate with initial_leases [we have to show the leases]
-                    
-                } 
-            });
-
-            this._init_axisx('');
-            this._draw();
-
-        }, /* init */
-
-        /* Default settings */
-        default_options: {
-            leases_offset:       0,
-            leases_slots:        36,
-            leases_w:            180,
-            leases_granularity:  3600,
-
-            x_nodelabel:         200,   /* space for the nodenames */
-            x_sep:               20,    /* right space after the nodename - removed from the above */
-            y_header:            12,    /* height for the (two) rows of timelabels */
-            y_sep:               10,    /* space between nodes */
-            leases_w:            20,    /* 1-grain leases attributes */
-            y_node:              15,
-            radius:              6,
-            anim_delay:          350,
-            checkboxes:          false,
-        },
-
-        /* PLUGIN EVENTS */
-
-        /* GUI EVENTS */
-
-        /************************** GUI MANIPULATION **************************/
-
-        /* NOTE: All Raphael-dependent code should go here. Performance issues
-         * are suspected, it might be improved by a move to d3.js. The more
-         * general problem to solve is how to manipulate lots of svg objects.
-         */
-
-        /*************************** RECORD HANDLER ***************************/
-
-        /* ------------------------------------------------------------------
-         * Resources
-         * ------------------------------------------------------------------ */
-
-        on_query_in_progress: function() {
-            this.spin();
-        },
-
-        on_query_done: function() {
-            /* We have received all leases */
-            if (this._received_resources) {
-                this._draw(this._canvas_id);
-                this.unspin();
-            }
-            this._received_leases = true;
-        },
-
-        /* ------------------------------------------------------------------
-         * All resources
-         * ------------------------------------------------------------------ */
-
-        on_all_resources_query_in_progress: function() {
-            console.log("all resources query in progress");
-        },
-
-        on_all_resources_new_record: function(record)
-        {
-            if ((typeof record.exclusive != 'undefined') && (record.exclusive)) {
-                this._resources.push(Array(record.urn, record.hrn, record.type));
-            }
-            // ... if we do not have information about slivers (first update), update it
-            if (typeof record.sliver != 'undefined') {
-                // XXX
-            }
-        },
-
-        /* ------------------------------------------------------------------
-         * Leases
-         * ------------------------------------------------------------------ */
-        
-        on_lease_new_record: function(record)
-        {
-            this._leases.push(record);
-            // this.initial_leases=leases;
-        },
-
-        on_lease_field_state_changed: function(data)
-        {
-            var lease = data.value;
-            var urn = lease[0];
-            var start_time = lease[1];
-
-            var lease_element = this._lease_element_find(urn, start_time);
-            if (!lease_element) {
-                console.log("Alert: lease element not found");
-                return;
-            }
-
-            switch(data.request) {
-                case FIELD_REQUEST_ADD:
-                case FIELD_REQUEST_ADD_RESET:
-                    this._leases.push(data.value);
-                    this._lease_init_mine(lease_element);
-                    break;
-                case FIELD_REQUEST_REMOVE:
-                case FIELD_REQUEST_REMOVE_RESET:
-                    // We remove data.value (aka keep those leases different from data.value
-                    this._leases = $.grep(this._leases, function(x) { return x != data.value; });
-                    this._lease_init_free(lease_element);
-                    break;
-                default:
-                    break;
-
-            }
-        },
-
-        on_lease_query_done: function(record)
-        {
-            /* We have received all resources */
-            if (this._received_leases) {
-                this._draw(this._canvas_id);
-                this.unspin();
-            }
-            this._received_resources = true;
-        },
-
-        /************************** PRIVATE METHODS ***************************/
-
-        /**
-         * @brief Return the number of time slots
-         */
-        nb_grains: function () 
-        {
-            return this._axisx.length; 
-        },
-
-        /**
-         * @brief Returns whether there is a pending lease at this timestamp
-         */
-        _lease_find: function(urn, timestamp)
-        {
-            var scheduler = this;
-            var result = null;
-
-            $.each(scheduler._leases, function(i, lease) {
-                    if ((lease[0] == urn) &&
-                        ((timestamp >= lease[1]) && (timestamp < (lease[1] + lease[2] * 1800)))) {
-                            result = lease;
-                            return false; // stop each
-                    }
-            });
-
-/*
-            $.each(Array(scheduler.myLeases, scheduler.allLeases), function(i, array) {
-                $.each(array, function(i, lease) {
-                    if (lease[0] == urn) {
-                        if ((timestamp >= lease[1]) && (timestamp < (lease[1] + lease[2] * 1800))) {
-                            result = lease;
-                            
-                            return false;
-                        }
-                    }
-                });
-                if (result)
-                    return false;
-            });
-*/
-            return result;
-        },
-
-        /* Iterative search through raphael.js objects, no forEach, no getById in the current version */
-        _lease_element_find: function(urn, start_time)
-        {
-            var date = new Date(start_time*1000);
-            var pos = this._paper.top; 
-            while (pos) { 
-                 if (pos.key == urn + "-" + date)
-                    return pos;
-                 pos = pos.prev; 
-            } 
-            return null;
-        },
-
-        /**
-         * @brief Draw
-         */
-        _draw: function() 
-        { 
-            var canvas_id = this._canvas_id;
-            var o = this.options;
-
-            var total_width = o.x_nodelabel + this.nb_grains() * this.options.leases_w;
-            var total_height = 2 * o.y_header /* the timelabels */
-                             + 2 * o.y_sep    /* extra space */
-                             + o.y_node          /* all-nodes & timebuttons row */ 
-                             + (this._resources.length) * (o.y_node + o.y_sep);  /* the regular nodes and preceding space */
-
-            /* reuse for paper if exists with same size, or (re-)create otherwise */
-            var paper;
-            if (this._paper == null) {
-                paper = Raphael (canvas_id, total_width + o.x_sep, total_height);
-            } else if (this._paper.width==total_width && this._paper.height==total_height) {
-                paper=this._paper;
-                paper.clear();
-            } else {
-                $("#"+canvas_id)[0].innerHTML="";
-                //this.elmt().html();
-                paper = Raphael (canvas_id, total_width + o.x_sep, total_height);
-            }
-            this._paper = paper;
-
-            /* the path for the triangle-shaped buttons */
-            var timebutton_path = "M1,0L"+(this.options.leases_w-1)+",0L"+(this.options.leases_w/2)+","+o.y_header+"L1,0";
-
-            var axisx = this._axisx;
-            var axisy = this._resources;
-
-            /* maintain the list of nodelabels for the 'all nodes' button */
-            this._nodelabels = [];
-            
-
-            /* create the time slots legend */
-            var top = 0;
-            var left = o.x_nodelabel;
-
-            var daymarker_height = 2*o.y_header + 2*o.y_sep + (axisy.length + 1) * (o.y_node + o.y_sep);
-            var daymarker_path = "M0,0L0," + daymarker_height;
-
-            var half_daymarker_off= 2*o.y_header + o.y_sep;
-            var half_daymarker_path="M0," + half_daymarker_off + "L0," + daymarker_height;
-
-            var col=0;
-            for (var i=0, len = axisx.length; i < len; ++i) {
-                /* pick the printable part */
-                var timelabel = axisx[i][1];
-                var y = top + o.y_header;
-                if (col % 2 == 0) 
-                    y += o.y_header;
-                col +=1;
-                /* display time label */
-                var timelabel = paper.text(left, y, timelabel).attr(txt_timelabel).attr({"text-anchor": "middle"});
-                /* draw vertical line */
-                var path_spec = "M" + left + " " + (y+o.y_header / 2) + "L" + left + " " + this.total_height;
-                var rule = paper.path(path_spec).attr(attr_rules);
-                /* show a day marker when relevant */
-                var timestamp = parseInt(axisx[i][0]);
-                if ((timestamp % (24 * 3600)) == 0) {
-                    paper.path(daymarker_path).attr({'translation': left + ',' + top}).attr(attr_daymarker);
-                } else if ( (timestamp%(12*3600))==0) {
-                    paper.path(half_daymarker_path).attr({'translation': left + ',' + top}).attr(attr_daymarker);
-                }
-                left += o.leases_w;
-            }
-
-            ////////// the row with the timeslot buttons (the one labeled 'All nodes')
-            this.granularity = this.min_granularity; // XXX axisx[1][0]-axisx[0][0];
-
-            // move two lines down
-            top += 2 * o.y_header + 2 * o.y_sep;
-            left = o.x_nodelabel;
-            // all nodes buttons
-            var allnodes = paper.text(o.x_nodelabel - o.x_sep, top + o.y_node / 2, "All nodes").attr(txt_allnodes)
-                .attr({"font-size": o.y_node, "text-anchor": "end", "baseline": "bottom"});
-            //allnodes.scheduler = this;
-            allnodes.click(this._allnodes_click); // XXX click
-            
-            // timeslot buttons [it's the triangles above the slots]
-            for (var i = 0, len = axisx.length; i < len; ++i) {
-                var timebutton = paper.path(timebutton_path).attr({'translation':left + ',' + top}).attr(attr_timebutton);
-                timebutton.from_time = axisx[i][0];
-                timebutton.scheduler = this;
-                timebutton.click(this._timebutton_click);
-                left += (o.leases_w);
-            }
-            
-            //////// the body of the scheduler : loop on nodes
-            top += o.y_node + o.y_sep;
-
-            var data_index = 0;
-            this.leases = []; /* XXX ??? XXX */
-
-            for (var i = 0, len = axisy.length; i < len; ++i) {
-                var urn = axisy[i][0];
-                var nodename = axisy[i][1];
-                var type = axisy[i][2];
-                left = 0;
-                /*
-                 *  MODIFIED font-size
-                var nodelabel = paper.text(o.x_nodelabel-x_sep,top+y_node/2,nodename).attr(txt_nodelabel)
-                .attr ({"font-size":y_node, "text-anchor":"end","baseline":"bottom"});
-                */
-                var nodelabel = paper.text(o.x_nodelabel - o.x_sep, top + o.y_node / 3, nodename).attr(txt_nodelabel)
-                    .attr({"font-size": "12px", "text-anchor": "end","baseline": "bottom"});    
-
-                this._nodelabel_select(nodelabel, 1); // By default we select all nodes
-                nodelabel.scheduler = this;
-                nodelabel.click(this._nodelabel_click); //click action works here
-                this._nodelabels.push(nodelabel);
-
-               // lease_methods.init_free(nodelabel.click, lease_methods.click_mine);
-               //lease_methods.init_free(nodelabel.lease);
-                
-                left += o.x_nodelabel;
-
-                // data index contains the full array of leases
-                // not the same amount of grains per node
-
-                // NOTE: remembering the previous lease might help for long leases.
-                var grain=0;
-                while (grain < this.nb_grains()) {
-
-                    if (l = this._lease_find(urn, this._initial_timestamp + grain * 1800)) {
-                        slicename = l.slice_id;
-                    } else {
-                        slicename = "";
-                    }
-
-                    //lease_id  = this.data[data_index][0];
-                    //slicename = this.data[data_index][1];
-                    /* Duration should not be the lease duration, but the grain */
-                    var duration = 1; // this.data[data_index][2];
-
-                    var lease = paper.rect(left, top, o.leases_w * duration, o.y_node, o.radius);
-                    lease.scheduler = this; // we record a pointer to the scheduler in the lease element
-                    //lease.lease_id=lease_id;
-                    lease.nodename  = nodename;
-                    lease.urn       = urn;
-                    lease.nodelabel = nodelabel;
-
-                    if (slicename == "") {
-                        lease.initial = "free";
-                        this._lease_init_free(lease);
-                    } else if (slicename == o.slicename) {
-                        lease.initial = "mine";
-                        this._lease_init_mine(lease);
-                    } else {
-                        lease.initial = "other";
-                        this._lease_init_other(lease, slicename);
-                    }
-
-                    lease.from_time = axisx[grain % this.nb_grains()][0];
-                    grain += duration;
-                    lease.until_time = axisx[grain % this.nb_grains()][0];
-
-                    /* We set a key to the lease element to find it later in the paper thanks to this._lease_element_find() */
-                    lease.key        = urn + '-' + lease.from_time;
-
-                    // and vice versa
-                    this._lease_elements.push(lease);
-                    // move on with the loop
-                    left += o.leases_w * duration;
-                    data_index += 1;
-                }
-                top += o.y_node + o.y_sep;
-            };
-        }, /* _draw */
-
-        _init_axisx: function(currentDate) 
-        {
-            this._axisx = Array();
-    
-            if(currentDate == "") {
-                // creating timestamp of the current time
-                currentDate = new Date().getTime() / 1000;
-            }
-            this._initial_timestamp = currentDate;
-            //console.log(currentDate);
-    
-            // round it by granularity (becomes an Int)
-            var rounded = Math.round(currentDate / this.min_granularity) * this.min_granularity;
-            // Convert Int to Date
-            rounded = new Date(rounded * 1000);
-            // get hours and minutes in a 24h format 00:00
-            var roundedHours   = (rounded.getHours()   < 10 ? '0' : '') + rounded.getHours();
-            var roundedMinutes = (rounded.getMinutes() < 10 ? '0' : '') + rounded.getMinutes();
-    
-            this._axisx.push(Array(rounded, roundedHours + ":" + roundedMinutes));
-    
-            // Generate as many slots as we need
-            for(i = 0; i < this.options.leases_slots; i++) {
-                rounded = this.min_granularity + (rounded.getTime() / 1000);
-                rounded = new Date(rounded * 1000);
-                roundedHours   = (rounded.getHours()   < 10 ? '0' : '') + rounded.getHours();
-                roundedMinutes = (rounded.getMinutes() < 10 ? '0' : '') + rounded.getMinutes();
-    
-                this._axisx.push(Array(rounded, roundedHours + ":" + roundedMinutes));
-            }
-        },
-
-        clear: function ()
-        {
-            for (var i=0, len = this.leases.length; i<len; ++i) {
-                var lease = this.leases[i];
-                if (lease.current != lease.initial) {
-                    if (lease.initial == 'free')
-                        this._lease_init_free(lease, this._lease_click_mine);
-                    else
-                        this._lease_init_mine(lease, this._lease_methods.click_free);
-                }
-            }
-        },
-
-        // XXX Couldn't find how to inhererit from the raphael objects...
-
-        /* ---------------------------------------------------------------------
-         * The 'all nodes' button
-         */
-        _allnodes_click: function (event) {
-            var scheduler=this.scheduler;
-
-            /* decide what to do */
-            var unselected = 0;
-            for (var i = 0, len = this._nodelabels.length; i < len; ++i) 
-                if (!this._nodelabels[i].selected) 
-                    unselected++;
-
-            /* if at least one is not selected : select all */
-            var new_state = (unselected >0) ? 1 : 0;
-            for (var i=0, len=this._nodelabels.length; i<len; ++i) 
-                this._nodelabel_select(this._nodelabels[i], new_state);
-        },
-
-        /* ---------------------------------------------------------------------
-         * The buttons for managing the whole timeslot
-         */
-
-        /* clicking */
-        _timebutton_click: function (event) 
-        {
-            var scheduler  = this.scheduler;
-            var from_time  = this.from_time;
-            var until_time = new Date(from_time.getTime() + scheduler.granularity);
-            /* scan leases on selected nodes, store in two arrays */
-            var relevant_free = [], relevant_mine = [];
-            for (var i = 0, len = scheduler._lease_elements.length; i < len; ++i) {
-                var scan = scheduler._lease_elements[i];
-                if (!scan.nodelabel.selected)
-                    continue;
-                // overlap ?
-                if (scan.from_time <= from_time && scan.until_time >= until_time) {
-                    if (scan.current == "free")
-                        relevant_free.push(scan);
-                    else if (scan.current == "mine")
-                        relevant_mine.push(scan);
-                }
-            }
-            // window.console.log("Found " + relevant_free.length + " free and " + relevant_mine.length + " mine");
-            /* decide what to do, whether book or release */
-            if (relevant_mine.length == 0 && relevant_free.length == 0) {
-                alert ("Nothing to do in this timeslot on the selected nodes");
-                return;
-            }
-            // if at least one is free, let's book
-            if (relevant_free.length > 0) {
-                for (var i = 0, len = relevant_free.length; i < len; ++i) {
-                    var lease = relevant_free[i];
-                    scheduler._lease_init_mine(lease, scheduler._lease_click_free);
-                }
-            // otherwise we unselect
-            } else {
-                for (var i = 0, len = relevant_mine.length; i < len; ++i) {
-                    var lease = relevant_mine[i];
-                    scheduler._lease_init_free(lease, scheduler._lease_click_mine);
-                }
-            }
-        }, /* _timebutton_click */
-
-        /* ---------------------------------------------------------------------
-         * The nodelabel buttons
-         */
-            
-        // set selected mode and render visually
-        _nodelabel_select: function (nodelabel, flag)
-        {
-            nodelabel.selected = flag;
-            nodelabel.attr({'font-weight': (flag ? 'bold' : 'normal')});
-            // TODO
-            // 
-            // loop on axis x and select each timebutton
-            // for (var i=0, len=axisx.length; i < len; ++i)
-            // figure out how to use timebutton_methods.click();
-                
-        },
-
-        // toggle selected
-        _nodelabel_click: function (event) 
-        {
-            this.scheduler._nodelabel_select( this, ! this.selected );
-        },
-
-
-        /* ---------------------------------------------------------------------
-         * The lease buttons
-         */
-        _lease_init_free: function (lease, unclick) 
-        {
-            var o = lease.scheduler.options;
-            lease.current = "free";
-            // set color
-            lease.animate((lease.initial == "free") ? attr_lease_free_free : attr_lease_mine_free, o.anim_delay);
-            // keep track of the current status
-            // record action
-            lease.click(this._lease_click_free);
-            if (unclick) lease.unclick(unclick);
-        },
-                 
-        // find out all the currently free leases that overlap this one
-        _lease_click_free: function (event) 
-        {
-            var scheduler = this.scheduler;
-
-            scheduler._lease_init_mine(this, scheduler._lease_click_free);        
-            //publish
-            //this.from_time
-            //this.urn
-            //this.until_time
-            var urn        = this.urn
-            var start_time = this.from_time.getTime() / 1000;        
-            var end_time   = this.until_time.getTime() / 1000;
-            var duration   = (end_time - start_time) / 1800; // XXX HARDCODED LEASE GRAIN
-
-            /* Add a new lease : XXX should be replaced by a dictionary */
-            /*
-            // Do we have a lease with the same urn  just before or just after ?
-            //var removeIdBefore = null;
-            //var removeIdAfter  = null;
-            var remove_lease_before = null;
-            var remove_lease_after  = null;
-            // It is important to group leases,  while this is technically
-            // equivalent, some testbeds such as IotLab limit the number of
-            // leases a user can have.
-            // XXX we might have several leases before or after if they have
-            // XXX not been grouped like this tool does
-            $.each(scheduler._leases, function(i, lease) {
-                if (lease[0] == urn) {
-                    if (lease[1] + lease[2] * 1800 == start_time) { // XXX HARDCODED LEASE GRAIN
-                        // Merge with previous lease
-                        // removeIdBefore = i;
-                        remove_lease_before = lease;
-                        start_time          = lease[1];
-                        duration           += lease[2];
-                    }
-                    if (lease[1] == end_time) {
-                        // Merge with following lease
-                        // removeIdAfter = i;
-                        remove_lease_after  = lease;
-                        duration           += lease[2];
-                    }
-                }
-            });
-            //if (removeIdBefore != null) {
-            //    scheduler._leases.splice(removeIdBefore , 1);
-            //    if (removeIdAfter != null)
-            //        removeIdAfter -= 1;
-            //}
-            //if (removeIdAfter != null) {
-            //    scheduler._leases.splice(removeIdAfter , 1);
-            //}
-
-            // We add the new lease, no need to push
-            var new_lease = [this.urn, start_time, duration];
-
-            // We send events, manifold will inform us about the change and we will react accordingly
-            /*
-            if (remove_lease_before != null)
-                manifold.raise_event(scheduler.options.query_lease_uuid, SET_REMOVED, remove_lease_before);
-            if (remove_lease_after != null)
-                manifold.raise_event(scheduler.options.query_lease_uuid, SET_REMOVED, remove_lease_after);
-            */
-            manifold.raise_event(scheduler.options.query_lease_uuid, SET_ADD,     new_lease);
-            //scheduler._leases.push([this.urn, start_time, duration]);
-
-            //console.log(scheduler._leases);
-            //jQuery.publish('/update-set/' + scheduler.options.query_uuid, [scheduler._leases]);
-
-            /* We need to inform manifold about the whole diff, in addition to maintaining our own structure */
-            event.preventDefault();
-        },
-
-        _lease_init_mine: function (lease, unclick) 
-        {
-            var o = lease.scheduler.options;
-            lease.current = "mine";
-            lease.animate((lease.initial == "mine") ? attr_lease_mine_mine : attr_lease_free_mine, o.anim_delay);
-            lease.click(this._lease_click_mine);
-            if (unclick)
-                lease.unclick(unclick);
-        },
-        
-        /* TODO: remove selected lease from array _leases and publish change */
-        _lease_click_mine: function (event) 
-        {
-            var scheduler = this.scheduler;
-            // this lease was originally free but is now marked for booking
-            // we free just this lease
-            //console.log('this is mine');
-            scheduler._lease_init_free(this, scheduler._lease_click_mine);
-            event.preventDefault();
-        },
-
-
-        lease_init_other: function (lease, slicename) 
-        {
-            lease.animate (attr_lease_other,anim_delay);
-            /* a text obj to display the name of the slice that owns that lease */
-            var otherslicelabel = lease.scheduler.paper.text (lease.attr("x")+lease.attr("width")/2,
-                                      // xxx
-                                      lease.attr("y")+lease.attr("height")/2,slicename).attr(txt_otherslice);
-            /* hide it right away */
-            otherslicelabel.hide();
-            /* record it */
-            lease.label=otherslicelabel;
-            lease.hover ( function (e) {this.label.toFront();this.label.show();},
-                      function (e) {this.label.hide();} ); 
-        }
-
-    });
-
-    $.plugin('Scheduler', Scheduler);
-
-})(jQuery);
diff --git a/plugins/scheduler/template/scheduler.html b/plugins/scheduler/template/scheduler.html
deleted file mode 100644 (file)
index cd2e9c8..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<div id="{{domid}}__scheduler" class='scrollx scrolly'>
-<!--
-<p>
-  You have attached one or more reservable nodes to your slice.  Reservable nodes
-  show up with the '' mark. Your slivers will be available only during timeslots
-  where you have obtained leases. You can manage your leases in the tab
-  below.
-</p>
-
-<p>
-  <font color='red'>
-    This is a dummy scheduler for demonstration purposes only, adapted from the
-    MyPLC one. Do not expect it to be working.
-  </font>
-</p>
--->
-
-<!--
-<div class='center' id='leases_settings'>
-  <label id='leases_offset_label' class='leases_label'>start, in hours from now</label>
-  <input type='text' class='leases_input' id='leases_offset_input' value='$leases_offset' />
-  <label id='leases_slots_label' class='leases_label'># of timeslots</label>
-  <input type='text' class='leases_input' id='leases_slots_input' value='$leases_slots' />
-  <label id='leases_w_label' class='leases_label'>slot width, in pixels</label>
-  <input type='text' class='leases_input' id='leases_w_input' value='$leases_w' />
-</div>
--->
-
-  <p>Date: <input type='text' id='datepicker' value='2013-01-01' /></p>
-    
-  <p>Search: <input type='text' id='search' name='search' /></p>
-  <!-- <div id='date_refresh'>Submit</div> -->
-    
-  <!-- Leases_data is the name used by Scheduler.js to locate this place first
-       population will be triggered by init_scheduler from Scheduler.js -->
-  <table id='leases_data' class='hidden'></table>
-
-<!-- The general layout for the scheduler -->
-  <div id='{{domid}}__leases_area'></div>
-<!--
-<div id='leases_area'></div>
-
-<div id='leases_buttons'>
-    <button id='leases_refresh' type='submit'>Refresh (Pull)</button>
-    <button id='leases_submit' type='submit'>Submit (Push)</button>
-</div>
--->
-
-</div>
diff --git a/plugins/scheduler2/__init__.py b/plugins/scheduler2/__init__.py
new file mode 100755 (executable)
index 0000000..a1057a4
--- /dev/null
@@ -0,0 +1,74 @@
+from unfold.plugin import Plugin\r
+import datetime\r
+from datetime import timedelta\r
+\r
+class Scheduler2 (Plugin):\r
+\r
+\r
+    def __init__ (self, query, query_all_resources, query_lease = None, **settings):\r
+        Plugin.__init__ (self, **settings)\r
+        \r
+        self.query=query\r
+        self.query_all_resources = query_all_resources\r
+        self.query_all_resources_uuid = query_all_resources.query_uuid\r
+        self.query_lease = query_lease\r
+        query_lease.query_uuid if query_lease else None\r
+\r
+        #granularity in minutes\r
+        granularity = 10\r
+        #self.time_slots = []\r
+        self.time_slots = self.createTimeSlots(granularity)\r
+        self.nodes = [\r
+                        ['Grid Nodes' , ['node016', 'node017', 'node018', 'node019', 'node020', 'node021',  'node029', 'node030', 'node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031',]],\r
+                        ['Other Nodes' , ['node022', 'node023', 'node024','node025', 'node026', 'node027', 'node028',]]\r
+                    ]\r
+\r
+    def template_file (self):\r
+        return "scheduler.html"\r
+\r
+    def requirements (self):\r
+        reqs = {\r
+            'js_files' : [\r
+                'js/scheduler2.js',\r
+                'js/slider/jquery-ui-1.10.3.slider.min.js',\r
+                'js/scheduler-helpers.js',\r
+                'js/table-selector.js',\r
+            ],\r
+            'css_files': [\r
+                'css/scheduler2.css', \r
+                'css/slider/jquery-ui-1.10.3.slider.min.css', \r
+            ]\r
+        }\r
+        return reqs\r
+\r
+    # the list of things passed to the js plugin\r
+    def json_settings_list (self):\r
+        # query_uuid will pass self.query results to the javascript\r
+        # and will be available as "record" in :\r
+        # on_new_record: function(record)\r
+        return ['plugin_uuid', 'domid', 'query_uuid', 'time_slots', 'nodes', 'query_lease_uuid', 'query_all_resources_uuid']\r
+    \r
+\r
+    def export_json_settings (self):\r
+        return True\r
+    \r
+    #Creates an Array with the timespans depending on granularity\r
+    def createTimeSlots (this, granularity):\r
+        #return type\r
+        time_slots = []\r
+        #init times\r
+        time_s = datetime.time(0,00)\r
+        time_f = datetime.time(23,59)\r
+        now = datetime.datetime.now()\r
+        #calc diffs\r
+        dt_s = datetime.datetime.combine(now,time_s)\r
+        dt_f = datetime.datetime.combine(now,time_f)\r
+        #loop\r
+        while (dt_s < dt_f):\r
+            tmp = dt_s\r
+            dt_s =  dt_s + datetime.timedelta(minutes=granularity)\r
+            ts = str(tmp.hour).zfill(2) + ':' + str(tmp.minute).zfill(2) + '<span>-</span>' + str(dt_s.hour).zfill(2) + ':' + str(dt_s.minute).zfill(2)\r
+            time_slots.append(ts)\r
+        #return\r
+        return time_slots\r
+    \r
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/plugins/scheduler2/static/css/scheduler2.css b/plugins/scheduler2/static/css/scheduler2.css
new file mode 100755 (executable)
index 0000000..1133433
--- /dev/null
@@ -0,0 +1,246 @@
+/*\r
+#\r
+# Copyright (c) 2012 NITLab, University of Thessaly, CERTH, Greece\r
+#\r
+# Permission is hereby granted, free of charge, to any person obtaining a copy\r
+# of this software and associated documentation files (the "Software"), to deal\r
+# in the Software without restriction, including without limitation the rights\r
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+# copies of the Software, and to permit persons to whom the Software is\r
+# furnished to do so, subject to the following conditions:\r
+#\r
+# The above copyright notice and this permission notice shall be included in\r
+# all copies or substantial portions of the Software.\r
+#\r
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\r
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+# THE SOFTWARE.\r
+#\r
+#\r
+# This is a MySlice plugin for the NITOS Scheduler\r
+# NITOScheduler v8\r
+#\r
+*/\r
+.m-t {\r
+    margin-top:5px;\r
+}\r
+.m-b {\r
+    margin-bottom:5px;\r
+}\r
+.m-none {\r
+    margin:0;\r
+}\r
+\r
+.form-control {\r
+    padding-right: 30px;\r
+}\r
+\r
+.form-control + .glyphicon {\r
+    position: absolute;\r
+    right: 0;\r
+    padding: 8px 27px;\r
+}\r
+\r
+#time-range {\r
+    margin-top:10px;\r
+}\r
+#TopologyModal .modal-dialog {\r
+    width: 700px;\r
+}\r
+#TopologyModal .modal-body {\r
+    position: relative;\r
+    overflow-y: auto;\r
+    max-height: 100%;\r
+    padding: 15px;\r
+}\r
+#TopologyModal .modal-header, #TopologyModal .modal-body, #TopologyModal .modal-footer {\r
+    background: none repeat scroll 0 0 #FFFFFF;\r
+}\r
+#TopologyModal .modal-header {\r
+    border-radius: 11px 11px 0 0;\r
+}\r
+#TopologyModal .modal-body {\r
+    border-radius: 0 0 11px 11px;\r
+}\r
+\r
+#scheduler .table {\r
+    background:#fff;\r
+}\r
+\r
+#scheduler .control-label {\r
+    margin-top: 5px;\r
+}\r
+#lbltime {\r
+    display: inline-block;\r
+    font-size: 1.2em;\r
+    margin-top: 0;\r
+    padding: 6px;\r
+}\r
+\r
+/** tables css **/\r
+#ShedulerNodes-scroll-container {\r
+    float: left;\r
+    overflow-x: scroll;\r
+    overflow-y: hidden;\r
+    width: 15%;\r
+}\r
+#ShedulerNodes {\r
+    border-collapse: collapse;\r
+    border-spacing: 0;\r
+    max-width: 500px;\r
+    width: 450px;\r
+    margin-top:55px;\r
+}\r
+\r
+#ShedulerNodes th{\r
+    height: 60px;\r
+}\r
+\r
+#ShedulerNodes td{\r
+    background: url("../img/podcast-15-w.png") no-repeat scroll 3px 50% #30196D;\r
+    border: 1px solid #CDCDCD;\r
+    color: #FFFFFF;\r
+    height: 27px;\r
+    padding: 0 3px 0 19px;\r
+}\r
+\r
+#ShedulerNodes td.verticalIndex {\r
+    padding: 0 2px !important;\r
+}\r
+\r
+#ShedulerNodes td .verticalText {\r
+    -webkit-transform: rotate(-90deg);\r
+    -moz-transform: rotate(-90deg);\r
+    -ms-transform: rotate(-90deg);\r
+    -o-transform: rotate(-90deg);\r
+    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);\r
+    margin-left: -30px;\r
+    position: absolute;\r
+    transform: rotate(-90deg); \r
+}\r
+\r
+#reservation-table-scroll-container {\r
+    overflow-x: scroll;\r
+    overflow-y: visible;\r
+    padding-bottom: 1px;\r
+    width:85%;\r
+}\r
+\r
+\r
+#scheduler-reservation-table {\r
+    border-spacing:0;\r
+    border-collapse:collapse;\r
+    margin-bottom: 0 !important;\r
+    overflow: auto;\r
+    width: 100%;\r
+}\r
+\r
+#scheduler-reservation-table tr{\r
+    background-color: #A6C9E2 ;\r
+}\r
+\r
+#scheduler-reservation-table tr.even{\r
+    background-color: #E0E0E0 ;\r
+}\r
+\r
+/*background: url("../img/opened-lock-15.png") no-repeat scroll 50% 50% transparent;*/\r
+#scheduler-reservation-table td {\r
+    border: 1px solid #FFFFFF;\r
+    cursor: pointer;\r
+    height: 27px;\r
+    padding: 3px 0 2px;\r
+    text-align: center;\r
+    width: 25px;\r
+}\r
+\r
+#scheduler-reservation-table td img{\r
+    height: 15px;\r
+}\r
+\r
+#scheduler-reservation-table td.fixed, #scheduler-reservation-table th.fixed{\r
+    position:absolute; \r
+    width:4em; \r
+    top:auto;\r
+    border-right: 2px none black; \r
+}\r
+\r
+#scheduler-reservation-table td.info, #scheduler-reservation-table th  {\r
+    background: #30196D;\r
+    font-weight:normal;\r
+    color: #fff;\r
+    height: 25px;\r
+    padding: 0 3px;\r
+    width: auto;\r
+}\r
+\r
+#scheduler-reservation-table th span {\r
+    display: block;\r
+    line-height: 3px;\r
+    margin: 0 auto;\r
+    padding: 0 5px;\r
+    width: 3px;\r
+}\r
+\r
+#scheduler-reservation-table td.free {\r
+}\r
+\r
+#scheduler-reservation-table td.closed {\r
+    background: url("../img/closed-lock-15.png") no-repeat scroll 50% 50% #DD4444;\r
+    cursor: not-allowed;\r
+}\r
+\r
+#scheduler-reservation-table td.maintenance {\r
+    background: url("../img/tools-15.png") no-repeat scroll 50% 50% #EDA428;\r
+}\r
+\r
+#scheduler-reservation-table td.free:hover ,#scheduler-reservation-table td.selected, #scheduler-reservation-table td.selected_tmp {\r
+    background: #25BA25;\r
+}\r
+\r
+td.no-image {\r
+    background-image: none !important;\r
+    padding: 0 !important;\r
+}\r
+\r
+\r
+/*legend*/\r
+\r
+.legend ol {\r
+    font-size: 0.8em;\r
+    list-style: none;\r
+    padding: 0;\r
+}\r
+\r
+.legend ol li{\r
+    background: #a6c9e2; /* Old browsers */\r
+    background: -moz-linear-gradient(left, #a6c9e2 28px, #e0e0e0 28px); /* FF3.6+ */\r
+    background: -webkit-gradient(linear, left top, right top, color-stop(28px,#a6c9e2), color-stop(28px,#e0e0e0)); /* Chrome,Safari4+ */\r
+    background: -webkit-linear-gradient(left, #a6c9e2 28px,#e0e0e0 28px); /* Chrome10+,Safari5.1+ */\r
+    background: -o-linear-gradient(left, #a6c9e2 28px,#e0e0e0 28px); /* Opera 11.10+ */\r
+    background: -ms-linear-gradient(left, #a6c9e2 28px,#e0e0e0 28px); /* IE10+ */\r
+    background: linear-gradient(to right, #a6c9e2 28px,#e0e0e0 28px); /* W3C */\r
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a6c9e2', endColorstr='#e0e0e0',GradientType=1 ); /* IE6-9 */\r
+\r
+    padding: 3px 0 3px 30px;\r
+    width: 109px;\r
+}\r
+\r
+.legend ol li.free{\r
+\r
+}\r
+\r
+.legend ol li.closed{\r
+    background: url("../img/closed-lock-15.png") no-repeat scroll 8px 50% #DD4444;\r
+}\r
+\r
+.legend ol li.maintenance {\r
+    background: url("../img/tools-15.png") no-repeat scroll 8px 50% #EDA428;\r
+}\r
+\r
+.legend ol li.selected {\r
+    background: #25BA25;\r
+}\r
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_flat_0_aaaaaa_40x100.png b/plugins/scheduler2/static/css/slider/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100755 (executable)
index 0000000..5b5dab2
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_flat_0_aaaaaa_40x100.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_55_fbf9ee_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100755 (executable)
index 0000000..ad3d634
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_55_fbf9ee_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_65_ffffff_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100755 (executable)
index 0000000..42ccba2
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_65_ffffff_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_dadada_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100755 (executable)
index 0000000..5a46b47
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_dadada_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_e6e6e6_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100755 (executable)
index 0000000..86c2baa
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_e6e6e6_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_ffffff_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_ffffff_1x400.png
new file mode 100755 (executable)
index 0000000..e65ca12
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_ffffff_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/plugins/scheduler2/static/css/slider/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100755 (executable)
index 0000000..7c9fa6c
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/plugins/scheduler2/static/css/slider/images/ui-bg_inset-soft_95_fef1ec_1x100.png
new file mode 100755 (executable)
index 0000000..0e05810
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_inset-soft_95_fef1ec_1x100.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_222222_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_222222_256x240.png
new file mode 100755 (executable)
index 0000000..b273ff1
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_222222_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_2e83ff_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_2e83ff_256x240.png
new file mode 100755 (executable)
index 0000000..09d1cdc
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_2e83ff_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_454545_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_454545_256x240.png
new file mode 100755 (executable)
index 0000000..59bd45b
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_454545_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_888888_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_888888_256x240.png
new file mode 100755 (executable)
index 0000000..6d02426
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_888888_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_cd0a0a_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_cd0a0a_256x240.png
new file mode 100755 (executable)
index 0000000..2ab019b
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_cd0a0a_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_f6cf3b_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_f6cf3b_256x240.png
new file mode 100755 (executable)
index 0000000..c986935
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_f6cf3b_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/jquery-ui-1.10.3.slider.min.css b/plugins/scheduler2/static/css/slider/jquery-ui-1.10.3.slider.min.css
new file mode 100755 (executable)
index 0000000..3b7a2c1
--- /dev/null
@@ -0,0 +1,1614 @@
+/*!
+ * jQuery UI Bootstrap (0.5)
+ * http://addyosmani.github.com/jquery-ui-bootstrap
+ *
+ * Copyright 2012 - 2013, Addy Osmani
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Portions copyright jQuery UI & Twitter Bootstrap
+ */
+
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { 
+  border: 0; clip: rect(0 0 0 0);
+  height: 1px; 
+  margin: -1px; 
+  overflow: hidden; 
+  padding: 0; 
+  position: absolute; 
+  width: 1px; 
+}
+.ui-helper-reset { 
+  margin: 0; 
+  padding: 0; 
+  border: 0; 
+  outline: 0; 
+  line-height: 1.3; 
+  text-decoration: none; 
+  font-size: 100%; 
+  list-style: none; 
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+  content: "";
+  display: table;
+}
+.ui-helper-clearfix:after { 
+  content: "."; 
+  display: block; 
+  height: 0; 
+  clear: both; 
+  visibility: hidden; 
+}
+.ui-helper-clearfix { 
+  /*display: inline-block; */
+  display:block;
+  min-height: 0; /* support: IE7 */
+}
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { 
+  height:1%; 
+}
+
+/* end clearfix */
+.ui-helper-zfix { 
+  width: 100%; 
+  height: 100%; 
+  top: 0; 
+  left: 0; 
+  position: absolute; 
+  opacity: 0; 
+  filter:Alpha(Opacity=0); 
+}
+.ui-front {
+  z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { 
+  display: block; 
+  text-indent: -99999px; 
+  overflow: hidden; 
+  background-repeat: no-repeat; 
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { 
+  position: absolute; 
+  top: 0; 
+  left: 0; 
+  width: 100%; 
+  height: 100%; 
+}
+
+/*
+ * jQuery UI Resizable 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/resizable/
+ */
+
+.ui-resizable { 
+  position: relative;
+}
+.ui-resizable-handle { 
+  position: absolute;
+  font-size: 0.1px;
+  z-index: 99999; 
+  display: block; 
+}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { 
+  display: none; 
+}
+.ui-resizable-n { 
+  cursor: n-resize; 
+  height: 7px; 
+  width: 100%; 
+  top: -5px; 
+  left: 0; 
+}
+.ui-resizable-s { 
+  cursor: s-resize; 
+  height: 7px; 
+  width: 100%; 
+  bottom: -5px; 
+  left: 0; 
+}
+.ui-resizable-e { 
+  cursor: e-resize; 
+  width: 7px; 
+  right: -5px; 
+  top: 0; 
+  height: 100%; 
+}
+.ui-resizable-w { 
+  cursor: w-resize; 
+  width: 7px; 
+  left: -5px; 
+  top: 0; 
+  height: 100%; 
+}
+.ui-resizable-se { 
+  cursor: se-resize; 
+  width: 12px; 
+  height: 12px; 
+  right: 1px; 
+  bottom: 1px; 
+}
+.ui-resizable-sw { 
+  cursor: sw-resize; 
+  width: 9px; 
+  height: 9px; 
+  left: -5px; 
+  bottom: -5px; 
+}
+.ui-resizable-nw { 
+  cursor: nw-resize; 
+  width: 9px; 
+  height: 9px; 
+  left: -5px; 
+  top: -5px; 
+}
+.ui-resizable-ne { 
+  cursor: ne-resize; 
+  width: 9px; 
+  height: 9px; 
+  right: -5px; 
+  top: -5px;
+}
+
+/*
+ * jQuery UI Selectable 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/selectable/
+ */
+.ui-selectable-helper { 
+  position: absolute; 
+  z-index: 100; 
+  border:1px dotted black; 
+}
+
+/*
+ * jQuery UI CSS Framework 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * 
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/
+ */
+
+/* Component containers
+----------------------------------*/
+.ui-widget {   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size:13px; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_75_ffffff_1x400.png) 50% 50% repeat-x; color: #404040; }
+.ui-widget-content a { color: #404040; }
+.ui-widget-header {
+  font-weight:bold;
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  border:1px solid #666;
+
+ }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear background-image;
+  -moz-transition: 0.1s linear background-image;
+  -ms-transition: 0.1s linear background-image;
+  -o-transition: 0.1s linear background-image;
+  transition: 0.1s linear background-image;
+   overflow: visible;
+
+ }
+
+
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
+  background-position: 0 -15px;
+  color: #333;
+  text-decoration: none;
+ }
+
+.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa;  font-weight: normal; color: #212121; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+
+
+.ui-state-highlight p, .ui-state-error p, .ui-state-default p{
+  font-size: 13px;
+  font-weight: normal;
+  line-height: 18px;
+  margin:7px 15px;
+}
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {
+
+
+  position: relative;
+  margin-bottom: 18px;
+  color: #404040;
+  background-color: #eedc94;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));
+  background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));
+  background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -o-linear-gradient(top, #fceec1, #eedc94);
+  background-image: linear-gradient(top, #fceec1, #eedc94);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #eedc94 #eedc94 #e4c652;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  border-width: 1px;
+  border-style: solid;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+
+
+}
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
+
+
+  position: relative;
+  margin-bottom: 18px;
+  color: #ffffff;
+  border-width: 1px;
+  border-style: solid;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+ background-color: #c43c35;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: linear-gradient(top, #ee5f5b, #c43c35);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #c43c35 #c43c35 #882a25;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+
+
+}
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none;  }
+.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_f6cf3b_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, 
+.ui-corner-top, 
+.ui-corner-left, 
+.ui-corner-tl { 
+  -moz-border-radius-topleft: 4px; 
+  -webkit-border-top-left-radius: 4px; 
+  -khtml-border-top-left-radius: 4px; 
+  border-top-left-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-top, 
+.ui-corner-right, 
+.ui-corner-tr { 
+  -moz-border-radius-topright: 4px; 
+  -webkit-border-top-right-radius: 4px; 
+  -khtml-border-top-right-radius: 4px; 
+  border-top-right-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-bottom, 
+.ui-corner-left, 
+.ui-corner-bl { 
+  -moz-border-radius-bottomleft: 4px; 
+  -webkit-border-bottom-left-radius: 4px; 
+  -khtml-border-bottom-left-radius: 4px; 
+  border-bottom-left-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-bottom, 
+.ui-corner-right, 
+.ui-corner-br { 
+  -moz-border-radius-bottomright: 4px; 
+  -webkit-border-bottom-right-radius: 4px; 
+  -khtml-border-bottom-right-radius: 4px; 
+  border-bottom-right-radius: 4px; 
+}
+
+
+/* Overlays */
+
+.ui-widget-overlay { 
+  background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; 
+  opacity: .30;
+  filter:Alpha(Opacity=30); 
+}
+
+.ui-widget-shadow { 
+  margin: -8px 0 0 -8px; 
+  padding: 8px; 
+  background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; 
+  opacity: .30;filter:Alpha(Opacity=30); 
+  -moz-border-radius: 8px; 
+  -khtml-border-radius: 8px; 
+  -webkit-border-radius: 8px; 
+  border-radius: 8px; 
+}
+
+/*
+ * jQuery UI Accordion 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/accordion/
+ */
+
+/* IE/Win - Fix animation bug - #4615 */
+
+.ui-accordion { 
+  width: 100%; 
+}
+.ui-accordion .ui-accordion-header { 
+  cursor: pointer; 
+  position: relative; 
+  margin-top: 1px; 
+  zoom: 1; 
+  font-weight:bold; 
+}
+.ui-accordion .ui-accordion-li-fix { 
+  display: inline; 
+}
+.ui-accordion .ui-accordion-header-active { 
+  border-bottom: 0 !important; 
+}
+.ui-accordion .ui-accordion-header a { 
+  display: block; 
+  font-size: 1em; 
+  padding: .5em .5em .5em 1.7em; 
+}
+.ui-accordion-icons .ui-accordion-header a { 
+  padding-left: 2.2em; 
+}
+.ui-accordion .ui-accordion-header .ui-icon { 
+  position: absolute; 
+  left: .5em; 
+  top: 50%; 
+  margin-top: -8px; 
+}
+.ui-accordion .ui-accordion-content { 
+  padding: 1em 2.2em; 
+  border-top: 0; 
+  margin-top: -2px; 
+  position: relative; 
+  top: 1px; 
+  margin-bottom: 2px; 
+  overflow: auto; 
+  display: none; 
+  zoom: 1; 
+}
+.ui-accordion .ui-accordion-content-active { 
+  display: block; 
+}
+
+/*
+ * jQuery UI Autocomplete 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/autocomplete/
+ */
+
+.ui-autocomplete { 
+  position: absolute; 
+  top: 0;
+  left: 0;
+  cursor: default; 
+}
+
+/*
+ * jQuery UI Button 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+
+.ui-button {
+
+  cursor: pointer;
+  display: inline-block;
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+  padding: 5px 14px 6px;
+  margin: 0;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear background-image;
+  -moz-transition: 0.1s linear background-image;
+  -ms-transition: 0.1s linear background-image;
+  -o-transition: 0.1s linear background-image;
+  transition: 0.1s linear background-image;
+   overflow: visible;
+} /* the overflow property removes extra width in IE */
+
+.ui-button-primary {
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+
+.ui-button-success{
+  color:#ffffff;
+  background-color: #57a957;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
+  background-image: -moz-linear-gradient(top, #62c462, #57a957);
+  background-image: -ms-linear-gradient(top, #62c462, #57a957);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
+  background-image: -webkit-linear-gradient(top, #62c462, #57a957);
+  background-image: -o-linear-gradient(top, #62c462, #57a957);
+  background-image: linear-gradient(top, #62c462, #57a957);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #57a957 #57a957 #3d773d;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-button-error{
+  color:#ffffff;
+  background-color: #c43c35;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: linear-gradient(top, #ee5f5b, #c43c35);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #c43c35 #c43c35 #882a25;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+
+.ui-button .ui-button-text { display: block;   }
+.ui-button-text-only .ui-button-text {  }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; /*tempfix*/ display:none;}
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+/* input.ui-button { padding: .4em 1em; } */
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { top: 50%; margin-top:-3px; margin-bottom:3px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+
+
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-state-active {
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.4em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+
+
+/*
+ * jQuery UI Menu 1.10.0
+ *
+* Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+
+.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float:left; outline: none; }
+.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
+.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1;float: left;clear: left; width: 100%; }
+.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
+.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
+.ui-menu .ui-menu-item a.ui-state-focus,
+.ui-menu .ui-menu-item a.ui-state-active { 
+  font-weight: normal; 
+  margin: 0; 
+  color: #ffffff;
+  background: #0064cd;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+/* Fix problem with border in ui-state-active */
+.ui-menu .ui-menu-item a.ui-state-active {
+  padding: 1px .4em;
+}
+
+.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
+.ui-menu .ui-state-disabled a { cursor: default; }
+
+/* icon support */
+.ui-menu-icons { position: relative; }
+.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
+
+/* left-aligned */
+.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
+
+/* right-aligned */
+.ui-menu .ui-menu-icon { position: static; float: right; }
+
+.ui-menu { width: 200px; margin-bottom: 2em; }
+
+
+/*
+ * jQuery UI spinner 1.10.0
+ *
+* Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+
+.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
+.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
+.ui-spinner{}
+.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
+.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
+.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
+.ui-spinner-up { top: 0; }
+.ui-spinner-down { bottom: 0; }
+
+/* TR overrides */
+.ui-spinner .ui-icon-triangle-1-s {
+    /* need to fix icons sprite */
+    background-position:-65px -16px;
+}
+
+/*
+ * jQuery UI Dialog 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { 
+  position: absolute; 
+  top: 0; 
+  left: 0; 
+  padding: .2em; 
+  width: 300px; 
+  overflow: hidden; 
+  outline: 0; 
+  background-clip: padding-box;
+  background-color: #FFFFFF;
+  border: 1px solid rgba(0, 0, 0, 0.3);
+  border-radius: 6px 6px 6px 6px;
+  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+  /*left: 50%;
+  margin-left: -280px;*/
+  outline: medium none;
+  position: fixed;
+  /*top: 10%;
+  width: 560px;*/
+  z-index: 1050;
+}
+.ui-dialog .ui-dialog-titlebar { /*padding: .4em 1em;*/
+  position: relative;
+  padding:5px 15px;
+  border:0px 0px 0px 1px solid;
+  border-color: white;
+  padding: 5px 15px;
+  font-size: 18px;
+  text-decoration:none;
+  background:none;
+  -moz-border-radius-bottomright: 0px;
+  -webkit-border-bottom-right-radius: 0px;
+  -khtml-border-bottom-right-radius: 0px;
+
+  -moz-border-radius-bottomleft: 0px;
+  -webkit-border-bottom-left-radius: 0px;
+  -khtml-border-bottom-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+  border-bottom:1px solid #ccc;
+}
+.ui-dialog .ui-dialog-title {
+  float: left;
+  color:#404040;
+  font-weight:bold;
+  margin-top:5px;
+  margin-bottom:5px;
+  padding:5px;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
+.ui-dialog .ui-dialog-titlebar-close {
+  position: absolute;
+  right: .3em;
+  top: 50%;
+  width: 19px;
+  margin: -20px 0 0 0;
+  padding: 1px;
+  height: 18px;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 13.5px;
+  text-shadow: 0 1px 0 #ffffff;
+  filter: alpha(opacity=25);
+  -khtml-opacity: 0.25;
+  -moz-opacity: 0.25;
+  opacity: 0.25;
+  background:none;
+  border-width: 0;
+  border:none;
+  box-shadow: none;
+}
+
+.ui-dialog .ui-dialog-titlebar-close span { 
+  display: block; 
+  margin: 1px;
+  text-indent: 9999px;
+}
+
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 1px;   filter: alpha(opacity=90);
+  -khtml-opacity: 0.90;
+  -moz-opacity: 0.90;
+  opacity: 0.90;   
+}
+
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+
+.ui-dialog .ui-dialog-buttonpane {
+  text-align: left;
+  border-width: 1px 0 0 0;
+  background-image: none;
+  margin: .5em 0 0 0;
+  background-color: #f5f5f5;
+  padding: 5px 15px 5px;
+  border-top: 1px solid #ddd;
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+  -webkit-box-shadow: inset 0 1px 0 #ffffff;
+  -moz-box-shadow: inset 0 1px 0 #ffffff;
+  box-shadow: inset 0 1px 0 #ffffff;
+  zoom: 1;
+  margin-bottom: 0;
+
+}
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+
+.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button{
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0;
+
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+
+}
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
+
+/*
+ * jQuery UI Tabs 1.9.2
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/tabs/
+ */
+ .ui-tabs .ui-tabs-nav{ background:none; border-color: #ddd;border-style: solid;border-width: 0 0 1px;}
+.ui-tabs { position: relative; padding: .2em; zoom: 1; border:0px;} /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+
+
+.ui-tabs .ui-tabs-nav li:hover, .ui-tabs .ui-tabs-nav li a:hover{
+  background:whiteSmoke;
+  border-bottom:1px solid #ddd;
+  padding-bottom:0px;
+   color:#00438A;
+}
+
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; border-bottom:1px solid #DDD; }
+.ui-tabs .ui-tabs-nav li {  text-decoration: none; list-style: none; float: left; position: relative; top: 1px; padding: 0px 0px 1px 0px; white-space: nowrap; background:none; border:0px; }
+
+.ui-tabs-nav .ui-state-default{
+  -webkit-box-shadow: 0px 0px 0px #ffffff; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
+     -moz-box-shadow: 0px 0px 0px #ffffff; /* FF3.5 - 3.6 */
+          box-shadow: 0px 0px 0px #ffffff; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
+}
+.ui-tabs .ui-tabs-nav li a {
+  float: left;
+  text-decoration: none;
+  cursor: text;
+  padding: 0 15px;
+  margin-right: 2px;
+  line-height: 34px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+
+
+ }
+
+.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; padding-bottom: 0px; outline:none;}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active , .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
+  background-color: #ffffff;
+  border: 1px solid #ddd;
+  border-bottom-color: #ffffff;
+  cursor: default;
+  color:gray;
+  outline:none;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active a{background-color: #ffffff;outline:none;border:none;}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active:hover{
+  background:#ffffff;
+  outline:none;
+  margin-bottom:0px;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; color:#0069D6; background:none; font-weight:normal; margin-bottom:-1px;}
+/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs-panel .ui-button{text-decoration:none;}
+.ui-tabs .ui-tabs-hide { display: none !important; }
+
+
+/* IE fix for background inheritance from ui-widget*/
+.ui-tabs .ui-tabs-nav li{
+  filter:none;
+}
+
+/*
+ * jQuery UI Tooltip 1.9.0
+ *
+ * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/tooltip/
+ */
+.ui-tooltip {
+    padding:8px;
+    position:absolute;
+    z-index:9999;
+    max-width: 300px;
+    -o-box-shadow: 0 0 5px #ddd;
+    -moz-box-shadow: 0 0 5px #ddd;
+    -webkit-box-shadow: 0 0 5px #ddd;
+    /*box-shadow: 0 2px 5px #ddd;*/
+    box-shadow: inset 0 1px 0 #ffffff;
+}
+
+body .ui-tooltip { border-width:2px; }
+
+/*
+ * jQuery UI Datepicker 1.9.0
+ *
+ * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/datepicker/
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border:0px; font-weight: bold; width: 100%; padding: 4px 0; background-color: #f5f5f5; color: #808080; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { /*top: 1px;*/ }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+
+.ui-datepicker .ui-datepicker-prev-hover { /*left:1px;*/ }
+.ui-datepicker .ui-datepicker-next-hover { /*right:1px;*/ }
+
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+  display: none; /*sorry for IE5*/
+  display/**/: block; /*sorry for IE5*/
+  position: absolute; /*must have*/
+  z-index: -1; /*must have*/
+  filter: mask(); /*must have*/
+  top: -4px; /*must have*/
+  left: -4px; /*must have*/
+  width: 200px; /*must have*/
+  height: 200px; /*must have*/
+}
+
+.ui-datepicker th{
+  font-weight: bold;
+  color: gray;
+}
+
+.ui-datepicker-today a:hover{
+  background-color: #808080;
+  color: #ffffff;
+
+}
+.ui-datepicker-today a{
+  background-color: #BFBFBF;
+  cursor: pointer;
+  padding: 0 4px;
+  margin-bottom:0px;
+
+}
+
+
+.ui-datepicker td a{
+  margin-bottom:0px;
+  border:0px;
+}
+
+.ui-datepicker td:hover{
+    color: #ffffff;
+}
+
+.ui-datepicker td .ui-state-default {
+  border:0px;
+  background:none;
+  margin-bottom:0px;
+  padding:5px;
+  color:gray;
+  text-align: center;
+  filter:none;
+}
+
+
+.ui-datepicker td .ui-state-active{
+  background:#BFBFBF;
+  margin-bottom:0px;
+  font-size:normal;
+  text-shadow: 0px;
+  color: #ffffff;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.ui-datepicker td .ui-state-hover {
+    color: #ffffff;
+    background: #0064cd;
+    background-color: #0064cd;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+    background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+    background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+    background-image: linear-gradient(top, #049cdb, #0064cd);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    -khtml-border-radius: 4px;
+    border-radius: 4px;
+}
+
+/*
+ * jQuery UI Progressbar 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%;
+
+/*this can be removed if ui-widget-header is blue*/
+    color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ }
+
+
+
+/*** Input field styling from Bootstrap **/
+ input, textarea {
+  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+  transition: border linear 0.2s, box-shadow linear 0.2s;
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+input:focus, textarea:focus {
+  outline: 0;
+  border-color: rgba(82, 168, 236, 0.8);
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+input[type=file]:focus, input[type=checkbox]:focus, select:focus {
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+  outline: 1px dotted #666;
+}
+
+input[type="text"],
+input[type="password"],
+.ui-autocomplete-input,
+textarea,
+.uneditable-input {
+  display: inline-block;
+  padding: 4px;
+  font-size: 13px;
+  line-height: 18px;
+  color: #808080;
+  border: 1px solid #ccc;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+
+
+/**Toolbar**/
+
+.ui-toolbar{
+  padding: 7px 14px;
+  margin: 0 0 18px;
+  background-color: #f5f5f5;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));
+  background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));
+  background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: linear-gradient(top, #ffffff, #f5f5f5);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
+  border: 1px solid #ddd;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+  -webkit-box-shadow: inset 0 1px 0 #ffffff;
+  -moz-box-shadow: inset 0 1px 0 #ffffff;
+  box-shadow: inset 0 1px 0 #ffffff;
+}
+
+
+/***Dialog fixes**/
+
+.ui-dialog-buttonset .ui-button:nth-child(2){
+  cursor: pointer;
+  display: inline-block;
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+  padding: 5px 14px 6px;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear all;
+  -moz-transition: 0.1s linear all;
+  -ms-transition: 0.1s linear all;
+  -o-transition: 0.1s linear all;
+  transition: 0.1s linear all;
+   overflow: visible;
+}
+
+
+
+/***Wijmo Theming**/
+
+div.wijmo-wijmenu{
+  padding:0 20px;
+  background-color: #222;
+  background-color: #222222;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+
+.wijmo-wijmenu .ui-state-default{
+  box-shadow: none;
+  color:#BFBFBF;
+}
+
+.wijmo-wijmenu .ui-state-default .wijmo-wijmenu-text{    
+  color:#BFBFBF;
+}
+
+.wijmo-wijmenu .ui-state-hover{
+  background: #444;
+  background: rgba(255, 255, 255, 0.05);
+}
+
+.wijmo-wijmenu .ui-state-hover .wijmo-wijmenu-text{
+  color:#ffffff;
+}
+
+div.wijmo-wijmenu .ui-widget-header h3{
+  position: relative;
+  margin-top:1px;
+  padding:0;
+}
+
+.wijmo-wijmenu h3 a{
+  color: #FFFFFF;
+  display: block;
+  float: left;
+  font-size: 20px;
+  font-weight: 200;
+  line-height: 1;
+  margin-left: -20px;
+  margin-top:1px;
+  padding: 8px 20px 12px;
+}
+
+.wijmo-wijmenu h3 a:hover{
+  background-color: rgba(255, 255, 255, 0.05);
+  color: #FFFFFF;
+  text-decoration: none;
+}
+
+.wijmo-wijmenu .ui-widget-header{
+  border:0px;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-parent .wijmo-wijmenu-child{
+  padding: 0.3em 0;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child{
+  background: #333;
+  border:0;
+  margin:0;
+  padding: 6px 0;
+  width:160px;
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-item{
+  margin:0;
+  border:0;
+}
+
+.wijmo-wijmenu a.wijmo-wijmenu-link{
+  margin:0;
+  line-height: 19px;
+  padding: 10px 10px 11px;
+  border:0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius:0;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-link{
+  display:block;
+  float:none;
+  padding: 4px 15px;
+  width:auto;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-text
+{
+  float:none;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child .ui-state-hover {
+  background: #191919;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-separator{
+  padding: 5px 0;
+  background-image: none;
+  background-color: #222;
+  border-top: 1px solid #444;
+  border-bottom:0;
+  border-left:0;
+  border-right:0;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input {
+  -moz-transition: none 0s ease 0s;
+  background-color: rgba(255, 255, 255, 0.3);
+  border: 1px solid #111111;
+  border-radius: 4px 4px 4px 4px;
+  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 1px 0 rgba(255, 255, 255, 0.25);
+  color: rgba(255, 255, 255, 0.75);
+  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
+  line-height: 1;
+  margin: 5px 10px 0 10px;
+  padding: 4px 9px;
+  width:100px;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input:hover {
+  background-color: rgba(255, 255, 255, 0.5);
+  color: #FFFFFF;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input:focus {
+  background-color: #FFFFFF;
+  border: 0 none;
+  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+  color: #404040;
+  outline: 0 none;
+  padding: 5px 10px;
+  text-shadow: 0 1px 0 #FFFFFF;
+}
+
+
+.wijmo-wijmenu .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+  text-shadow:none;
+}
+
+
+.wijmo-wijmenu .ui-state-default{
+  box-shadow: none;
+  color:#BFBFBF;
+  filter: none;
+}
+
diff --git a/plugins/scheduler2/static/img/closed-lock-15.png b/plugins/scheduler2/static/img/closed-lock-15.png
new file mode 100755 (executable)
index 0000000..5f52630
Binary files /dev/null and b/plugins/scheduler2/static/img/closed-lock-15.png differ
diff --git a/plugins/scheduler2/static/img/closed-lock.png b/plugins/scheduler2/static/img/closed-lock.png
new file mode 100755 (executable)
index 0000000..806fb44
Binary files /dev/null and b/plugins/scheduler2/static/img/closed-lock.png differ
diff --git a/plugins/scheduler2/static/img/loading.gif b/plugins/scheduler2/static/img/loading.gif
new file mode 100755 (executable)
index 0000000..973571e
Binary files /dev/null and b/plugins/scheduler2/static/img/loading.gif differ
diff --git a/plugins/scheduler2/static/img/nitos_topo.png b/plugins/scheduler2/static/img/nitos_topo.png
new file mode 100755 (executable)
index 0000000..528407b
Binary files /dev/null and b/plugins/scheduler2/static/img/nitos_topo.png differ
diff --git a/plugins/scheduler2/static/img/opened-lock-15.png b/plugins/scheduler2/static/img/opened-lock-15.png
new file mode 100755 (executable)
index 0000000..da6a923
Binary files /dev/null and b/plugins/scheduler2/static/img/opened-lock-15.png differ
diff --git a/plugins/scheduler2/static/img/opened-lock.png b/plugins/scheduler2/static/img/opened-lock.png
new file mode 100755 (executable)
index 0000000..9fba7c8
Binary files /dev/null and b/plugins/scheduler2/static/img/opened-lock.png differ
diff --git a/plugins/scheduler2/static/img/podcast-15-w.png b/plugins/scheduler2/static/img/podcast-15-w.png
new file mode 100755 (executable)
index 0000000..658d142
Binary files /dev/null and b/plugins/scheduler2/static/img/podcast-15-w.png differ
diff --git a/plugins/scheduler2/static/img/podcast-15.png b/plugins/scheduler2/static/img/podcast-15.png
new file mode 100755 (executable)
index 0000000..70495da
Binary files /dev/null and b/plugins/scheduler2/static/img/podcast-15.png differ
diff --git a/plugins/scheduler2/static/img/podcast.png b/plugins/scheduler2/static/img/podcast.png
new file mode 100755 (executable)
index 0000000..6a96d4c
Binary files /dev/null and b/plugins/scheduler2/static/img/podcast.png differ
diff --git a/plugins/scheduler2/static/img/pushpin-1.png b/plugins/scheduler2/static/img/pushpin-1.png
new file mode 100755 (executable)
index 0000000..4b4bf22
Binary files /dev/null and b/plugins/scheduler2/static/img/pushpin-1.png differ
diff --git a/plugins/scheduler2/static/img/tools-15.png b/plugins/scheduler2/static/img/tools-15.png
new file mode 100755 (executable)
index 0000000..ffd9847
Binary files /dev/null and b/plugins/scheduler2/static/img/tools-15.png differ
diff --git a/plugins/scheduler2/static/img/tools.png b/plugins/scheduler2/static/img/tools.png
new file mode 100755 (executable)
index 0000000..421e5f8
Binary files /dev/null and b/plugins/scheduler2/static/img/tools.png differ
diff --git a/plugins/scheduler2/static/js/scheduler-helpers.js b/plugins/scheduler2/static/js/scheduler-helpers.js
new file mode 100755 (executable)
index 0000000..a455919
--- /dev/null
@@ -0,0 +1,32 @@
+function lookup(array, prop, value) {\r
+    for (var i = 0, len = array.length; i < len; i++)\r
+        if (array[i][prop] === value) return array[i];\r
+}\r
+\r
+function GetTimeFromInt(intTime) {\r
+    var has30 = intTime % 1;\r
+    var CurInt = parseInt(intTime / 1);\r
+    if (CurInt < 10)\r
+        CurInt = "0" + CurInt;\r
+\r
+    if (has30 == 0) {\r
+        return CurInt + ":00";\r
+    } else {\r
+        return CurInt + ":30";\r
+    }\r
+}\r
+\r
+function fixOddEvenClasses() {\r
+    $('#' + rsvrTblNm + ' tbody tr').removeClass();\r
+    $('#' + rsvrTblNm + ' tbody tr:visible:even').addClass('even');\r
+    $('#' + rsvrTblNm + ' tbody tr:visible:odd').addClass('odd');\r
+}\r
+\r
+function isRightClick(e) {\r
+    if (e.which) {\r
+        return (e.which == 3);\r
+    } else if (e.button) {\r
+        return (e.button == 2);\r
+    }\r
+    return false;\r
+}\r
diff --git a/plugins/scheduler2/static/js/scheduler2.js b/plugins/scheduler2/static/js/scheduler2.js
new file mode 100755 (executable)
index 0000000..dd0c8f8
--- /dev/null
@@ -0,0 +1,314 @@
+/*\r
+#\r
+# Copyright (c) 2013 NITLab, University of Thessaly, CERTH, Greece\r
+#\r
+# Permission is hereby granted, free of charge, to any person obtaining a copy\r
+# of this software and associated documentation files (the "Software"), to deal\r
+# in the Software without restriction, including without limitation the rights\r
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+# copies of the Software, and to permit persons to whom the Software is\r
+# furnished to do so, subject to the following conditions:\r
+#\r
+# The above copyright notice and this permission notice shall be included in\r
+# all copies or substantial portions of the Software.\r
+#\r
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\r
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+# THE SOFTWARE.\r
+#\r
+#\r
+# This is a MySlice plugin for the NITOS Scheduler\r
+# Nitos Scheduler v1\r
+#\r
+*/\r
+\r
+/* some params */\r
+var init_start_visible_index = 10;\r
+var init_end_visible_index = 21;\r
+var rsvrTblNm = "scheduler-reservation-table";\r
+var SchedulerResources = [];\r
+var schdlr_totalColums = 0;\r
+var SetPerFun = null;\r
+var Sched2 = null;\r
+var Debug = true;\r
+var schdlr_PartsInOneHour = 6;\r
+\r
+(function ($) {\r
+    var Scheduler2 = Plugin.extend({\r
+\r
+        /** XXX to check\r
+         * @brief Plugin constructor\r
+         * @param options : an associative array of setting values\r
+         * @param element : \r
+         * @return : a jQuery collection of objects on which the plugin is\r
+         *     applied, which allows to maintain chainability of calls\r
+         */\r
+        init: function (options, element) {\r
+            // Call the parent constructor, see FAQ when forgotten\r
+            this._super(options, element);\r
+\r
+            schdlr_totalColums = $("#scheduler-reservation-table th").length;\r
+\r
+            //selection from table \r
+            $(window).keydown(function (evt) {\r
+                if (evt.which == 17) { // ctrl\r
+                    ctrlPressed = true;\r
+                }\r
+            }).keyup(function (evt) {\r
+                if (evt.which == 17) { // ctrl\r
+                    ctrlPressed = false;\r
+                }\r
+            });\r
+            $("#" + rsvrTblNm).on('mousedown', 'td', rangeMouseDown).on('mouseup', 'td', rangeMouseUp).on('mousemove', 'td', rangeMouseMove);\r
+\r
+            // Explain this will allow query events to be handled\r
+            // What happens when we don't define some events ?\r
+            // Some can be less efficient\r
+\r
+            if (Debug) console.time("Listening_to_queries");\r
+            /* Listening to queries */\r
+            this.listen_query(options.query_uuid, 'all_ev');\r
+            this.listen_query(options.query_all_resources_uuid, 'all_resources');\r
+            this.listen_query(options.query_lease_uuid, 'lease');\r
+            //this.listen_query(options.query_lease_uuid, 'lease');\r
+            if (Debug) console.timeEnd("Listening_to_queries");\r
+\r
+        },\r
+\r
+        /* PLUGIN EVENTS */\r
+        // on_show like in querytable\r
+\r
+\r
+        /* GUI EVENTS */\r
+\r
+        // a function to bind events here: click change\r
+        // how to raise manifold events\r
+\r
+\r
+        /* GUI MANIPULATION */\r
+\r
+        // We advise you to write function to change behaviour of the GUI\r
+        // Will use naming helpers to access content _inside_ the plugin\r
+        // always refer to these functions in the remaining of the code\r
+\r
+        show_hide_button: function () {\r
+            // this.id, this.el, this.cl, this.elts\r
+            // same output as a jquery selector with some guarantees\r
+        },\r
+\r
+        drawResources: function () {\r
+            \r
+            //if (Debug) this.debug('foo');\r
+            if (Debug) console.time("each:SchedulerResources");\r
+\r
+            //scheduler-reservation-table main table columns\r
+            totalColums = $("#scheduler-reservation-table thead tr th").length;\r
+            //var totalCell = [];\r
+            //for (var i = 0; i < totalColums; i++) { totalCell.push("<td></td>"); }\r
+            //var srt_body = [];\r
+            var totalCell = "";\r
+            for (var i = 0; i < totalColums; i++) totalCell +="<td></td>"; \r
+            var srt_body = "";\r
+\r
+            $.each(SchedulerResources, function (i, group) {\r
+                //var groupTR = $("#ShedulerNodes tbody").html('<tr><td class="no-image verticalIndex" rowspan="' + group.resources.length + '"><div class="verticalText">' + group.groupName + '</div></td><td id="schdlr_frstTD" class="info fixed"></td></tr>');\r
+                var groupTR = $("#ShedulerNodes tbody").html('<tr><td class="no-image verticalIndex" rowspan="' + 30 + '"><div class="verticalText">' + group.groupName + '</div></td><td id="schdlr_frstTD" class="info fixed"></td></tr>');\r
+                \r
+                $.each(group.resources.slice(0,30), function (i, resource) {\r
+                    if (i == 0) {\r
+                        //$("#ShedulerNodes tbody tr:first").append('<td class="info fixed">' + resource.hostname + '</td>');\r
+                        $(groupTR).find("#schdlr_frstTD").html(resource.hostname);\r
+                        //$(srt_body).html("<tr>" + totalCell + "</tr>");\r
+                    } else {\r
+                        $(groupTR).find("tr:last").after('<tr><td class="info fixed">' + resource.hostname + '</td></tr>');\r
+                        //$(srt_body).find("tr:last").after("<tr>" + totalCell + "</tr>");\r
+                    }\r
+                    srt_body += "<tr>" + totalCell + "</tr>";\r
+                    //srt_body.push('<tr>'); srt_body = srt_body.concat(totalCell.concat()); srt_body.push('/<tr>');\r
+                });\r
+            });\r
+\r
+            //$("#scheduler-reservation-table tbody").html(srt_body.join(""));\r
+            $("#scheduler-reservation-table tbody").html(srt_body);\r
+\r
+            if (Debug) console.timeEnd("each:SchedulerResources");\r
+            \r
+\r
+            $("#" + rsvrTblNm + " tbody tr").each(function (index) { $(this).attr("data-trindex", index); });\r
+\r
+        },\r
+\r
+        /* TEMPLATES */\r
+\r
+        // see in the html template\r
+        // How to load a template, use of mustache\r
+\r
+        /* QUERY HANDLERS */\r
+        loadWithDate: function () {\r
+            // only convention, not strictly enforced at the moment\r
+        },\r
+        // How to make sure the plugin is not desynchronized\r
+        // He should manifest its interest in filters, fields or records\r
+        // functions triggered only if the proper listen is done\r
+\r
+        /* all_ev QUERY HANDLERS Start */\r
+        on_all_ev_clear_records: function (data) {\r
+            //alert('all_ev clear_records');\r
+        },\r
+        on_all_ev_query_in_progress: function (data) {\r
+           // alert('all_ev query_in_progress');\r
+        },\r
+        on_all_ev_new_record: function (data) {\r
+            //alert('all_ev new_record');\r
+        },\r
+        on_all_ev_query_done: function (data) {\r
+            //alert('all_ev query_done');\r
+        },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_all_ev_field_state_changed: function (data) {\r
+            //alert('all_ev query_done');\r
+        },\r
+        /* all_ev QUERY HANDLERS End */\r
+        /* all_resources QUERY HANDLERS Start */\r
+        on_all_resources_clear_records: function (data) {\r
+            //data is empty on load\r
+        },\r
+        on_all_resources_query_in_progress: function (data) {\r
+            //data is empty on load\r
+        },\r
+        on_all_resources_new_record: function (data) {\r
+            var tmpGroup = lookup(SchedulerResources, 'groupName', data.type);\r
+            if (tmpGroup == null) {\r
+                tmpGroup = { groupName: data.type, resources: [] };\r
+                SchedulerResources.push(tmpGroup);\r
+                //if (data.type != "node")  alert('not all node');\r
+            }\r
+            tmpGroup.resources.push(data);\r
+            //alert('new_record');\r
+        },\r
+        on_all_resources_query_done: function (data) {\r
+            this.drawResources();\r
+            //data is empty on load\r
+            /* GUI setup and event binding */\r
+            this._initUI();\r
+            this._SetPeriodInPage(init_start_visible_index, init_end_visible_index);\r
+            this.loadWithDate();\r
+        },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_all_resources_field_state_changed: function (data) {\r
+            //alert('all_resources query_done');\r
+        },\r
+        /* all_resources QUERY HANDLERS End */\r
+        /* lease QUERY HANDLERS Start */\r
+        on_lease_clear_records: function (data) { alert('clear_records'); },\r
+        on_lease_query_in_progress: function (data) { alert('query_in_progress'); },\r
+        on_lease_new_record: function (data) { alert('new_record'); },\r
+        on_lease_query_done: function (data) { alert('query_done'); },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_lease_field_state_changed: function (data) { alert('query_done'); },\r
+        /* lease QUERY HANDLERS End */\r
+\r
+\r
+        // no prefix\r
+\r
+        on_filter_added: function (filter) {\r
+\r
+        },\r
+\r
+        // ... be sure to list all events here\r
+\r
+        /* RECORD HANDLERS */\r
+        on_all_new_record: function (record) {\r
+            //\r
+            alert('on_all_new_record');\r
+        },\r
+\r
+        debug : function (log_txt) {\r
+            if (typeof window.console != 'undefined') {\r
+                console.debug(log_txt);\r
+            }\r
+        },\r
+\r
+        /* INTERNAL FUNCTIONS */\r
+        _initUI: function () {\r
+            if (Debug) console.time("_initUI");\r
+            //fix margins in tables\r
+            mtNodesTbl = $("#" + rsvrTblNm + " tr:first").outerHeight() + 6;\r
+            mtSchrollCon = $("#nodes").outerWidth();\r
+            $("#nodes").css("margin-top", mtNodesTbl);\r
+            $("#reservation-table-scroll-container").css("margin-left", mtSchrollCon);\r
+            SetPerFun = this._SetPeriodInPage;\r
+            //slider\r
+            $("#time-range").slider({\r
+                range: true,\r
+                min: 0,\r
+                max: 24,\r
+                step: 0.5,\r
+                values: [init_start_visible_index, init_end_visible_index],\r
+                slide: function (event, ui) {\r
+                    SetPerFun(ui.values[0], ui.values[1]);\r
+                }\r
+            });\r
+            $("#DateToRes").datepicker({\r
+                dateFormat: "yy-mm-dd",\r
+                minDate: 0,\r
+                numberOfMonths: 3\r
+            }).change(function () {\r
+                //Scheduler2.loadWithDate();\r
+            }).click(function () {\r
+                $("#ui-datepicker-div").css("z-index", 5);\r
+            });\r
+            //other stuff\r
+            fixOddEvenClasses();\r
+            $("#" + rsvrTblNm + " td:not([class])").addClass("free");\r
+            if (Debug) console.timeEnd("_initUI");\r
+        },\r
+        _SetPeriodInPage: function (start, end) {\r
+            if (Debug) console.time("_SetPeriodInPage");\r
+            ClearTableSelection();\r
+            $("#lbltime").html(GetTimeFromInt(start) + " - " + GetTimeFromInt(end));\r
+            \r
+            var start_visible_index = (start * schdlr_PartsInOneHour) + 1;\r
+            var end_visible_index = (end * schdlr_PartsInOneHour);\r
+\r
+            //hide - show\r
+            for (i = 0; i < start_visible_index; i++) {\r
+                $("#" + rsvrTblNm + " td:nth-child(" + i + "), #" + rsvrTblNm + " th:nth-child(" + i + ")").hide();\r
+            }\r
+            for (i = end_visible_index + 1; i <= schdlr_totalColums; i++) {\r
+                $("#" + rsvrTblNm + " td:nth-child(" + i + "), #" + rsvrTblNm + " th:nth-child(" + i + ")").hide();\r
+            }\r
+            /*$("#" + rsvrTblNm + " td:not([class*='info']), #" + rsvrTblNm + " th:not([class*='fixed'])").hide();*/\r
+            for (i = start_visible_index; i <= end_visible_index; i++) {\r
+                $("#" + rsvrTblNm + " td:nth-child(" + i + "), #" + rsvrTblNm + " th:nth-child(" + i + ")").show();\r
+            }\r
+\r
+            if ($("#" + rsvrTblNm + " th:visible:first").width() > 105) {\r
+                $("#" + rsvrTblNm + " th span").css("display", "inline")\r
+            } else {\r
+                $("#" + rsvrTblNm + " th span").css("display", "block");\r
+            }\r
+            mtNodesTbl = $("#" + rsvrTblNm + " tr:first").outerHeight() + 6;\r
+            $("#nodes").css("margin-top", mtNodesTbl);\r
+            //$("#scroll_container").width($("#Search").width() - $("#nodes").width());\r
+            //$("#nodes th").height($("#tblReservation th:visible:first").height() - 2);\r
+            if (Debug) console.timeEnd("_SetPeriodInPage");\r
+        }\r
+    });\r
+\r
+    //Sched2 = new Scheduler2();\r
+\r
+    /* Plugin registration */\r
+    $.plugin('Scheduler2', Scheduler2);\r
+\r
+    // TODO Here use cases for instanciating plugins in different ways like in the pastie.\r
+\r
+\r
+})(jQuery);\r
+\r
+\r
+\r
diff --git a/plugins/scheduler2/static/js/selectRangeWorker.js b/plugins/scheduler2/static/js/selectRangeWorker.js
new file mode 100755 (executable)
index 0000000..5f28270
--- /dev/null
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/plugins/scheduler2/static/js/slider/jquery-ui-1.10.3.slider.min.js b/plugins/scheduler2/static/js/slider/jquery-ui-1.10.3.slider.min.js
new file mode 100755 (executable)
index 0000000..b2ea00e
--- /dev/null
@@ -0,0 +1,6 @@
+/*! jQuery UI - v1.10.3 - 2013-11-26
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.slider.js
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+
+(function(e,t){function i(t,i){var s,n,r,o=t.nodeName.toLowerCase();return"area"===o?(s=t.parentNode,n=s.name,t.href&&n&&"map"===s.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&a(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&a(t)}function a(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,a){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),a&&a.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var a,s,n=e(this[0]);n.length&&n[0]!==document;){if(a=n.css("position"),("absolute"===a||"relative"===a||"fixed"===a)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,a){return!!e.data(t,a[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var a=e.attr(t,"tabindex"),s=isNaN(a);return(s||a>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,a){function s(t,i,a,s){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,a&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===a?["Left","Right"]:["Top","Bottom"],r=a.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+a]=function(i){return i===t?o["inner"+a].call(this):this.each(function(){e(this).css(r,s(this,i)+"px")})},e.fn["outer"+a]=function(t,i){return"number"!=typeof t?o["outer"+a].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,a){var s,n=e.ui[t].prototype;for(s in a)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([i,a[s]])},call:function(e,t,i){var a,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(a=0;s.length>a;a++)e.options[s[a][0]]&&s[a][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var a=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[a]>0?!0:(t[a]=1,s=t[a]>0,t[a]=0,s)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,a=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(n){}a(t)},e.widget=function(i,s,a){var n,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],n=u+"-"+i,a||(a=s,s=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:a.version,_proto:e.extend({},a),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(a,function(i,a){return e.isFunction(a)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,n=this._superApply;return this._super=e,this._superApply=t,i=a.apply(this,arguments),this._super=s,this._superApply=n,i}}(),t):(l[i]=a,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:n}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var a,n,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(a in r[o])n=r[o][a],r[o].hasOwnProperty(a)&&n!==t&&(i[a]=e.isPlainObject(n)?e.isPlainObject(i[a])?e.widget.extend({},i[a],n):e.widget.extend({},n):n);return i},e.widget.bridge=function(i,a){var n=a.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,a=e.data(this,n);return a?e.isFunction(a[r])&&"_"!==r.charAt(0)?(s=a[r].apply(a,h),s!==a&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,n);t?t.option(r||{})._init():e.data(this,n,new a(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var a,n,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},a=i.split("."),i=a.shift(),a.length){for(n=o[i]=e.widget.extend({},this.options[i]),r=0;a.length-1>r;r++)n[a[r]]=n[a[r]]||{},n=n[a[r]];if(i=a.pop(),s===t)return n[i]===t?null:n[i];n[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,a){var n,r=this;"boolean"!=typeof i&&(a=s,s=i,i=!1),a?(s=n=e(s),this.bindings=this.bindings.add(s)):(a=s,s=this.element,n=this.widget()),e.each(a,function(a,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=a.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?n.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var a,n,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(a in n)a in i||(i[a]=n[a]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,a,n){"string"==typeof a&&(a={effect:a});var r,o=a?a===!0||"number"==typeof a?i:a.effect||i:t;a=a||{},"number"==typeof a&&(a={duration:a}),r=!e.isEmptyObject(a),a.complete=n,a.delay&&s.delay(a.delay),r&&e.effects&&e.effects.effect[o]?s[t](a):o!==t&&s[o]?s[o](a.duration,a.easing,n):s.queue(function(i){e(this)[t](),n&&n.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,a=1===i.which,n="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return a&&!n&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,a=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),n="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=[];for(i=s.values&&s.values.length||1,a.length>i&&(a.slice(i).remove(),a=a.slice(0,i)),t=a.length;i>t;t++)r.push(n);this.handles=a.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):this.range=e([])},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,a,n,r,o,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),a=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(a>i||a===i&&(t===u._lastChangedValue||u.values(t)===c.min))&&(a=i,n=e(this),r=t)}),o=this._start(t,r),o===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,n.addClass("ui-state-active").focus(),h=n.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-n.width()/2,top:t.pageY-h.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,a,n;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),a=this._valueMax()-this._valueMin(),n=this._valueMin()+s*a,this._trimAlignValue(n)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,a,n;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(a=this.values(),a[t]=i,n=this._trigger("slide",e,{handle:this.handles[t],value:i,values:a}),s=this.values(t?0:1),n!==!1&&this.values(t,i,!0))):i!==this.value()&&(n=this._trigger("slide",e,{handle:this.handles[t],value:i}),n!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(t,i){var s,a,n;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),undefined;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,a=arguments[0],n=0;s.length>n;n+=1)s[n]=this._trimAlignValue(a[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,i){var s,a=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(a=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;a>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,s,a,n,r=this.options.range,o=this.options,h=this,l=this._animateOff?!1:o.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,o.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:o.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:o.animate}))),t=i}):(s=this.value(),a=this._valueMin(),n=this._valueMax(),i=n!==a?100*((s-a)/(n-a)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,o.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},o.animate),"max"===r&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:o.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},o.animate),"max"===r&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:o.animate}))},_handleEvents:{keydown:function(i){var s,a,n,r,o=e(i.target).data("ui-slider-handle-index");switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(i.target).addClass("ui-state-active"),s=this._start(i,o),s===!1))return}switch(r=this.options.step,a=n=this.options.values&&this.options.values.length?this.values(o):this.value(),i.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(a+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(a-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(a===this._valueMax())return;n=this._trimAlignValue(a+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(a===this._valueMin())return;n=this._trimAlignValue(a-r)}this._slide(i,o,n)},click:function(e){e.preventDefault()},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}})})(jQuery);
\ No newline at end of file
diff --git a/plugins/scheduler2/static/js/table-selector.js b/plugins/scheduler2/static/js/table-selector.js
new file mode 100755 (executable)
index 0000000..b499151
--- /dev/null
@@ -0,0 +1,167 @@
+////version 3\r
+var dragStart_td = 0;\r
+var dragStart_tr = 0;\r
+var dragEnd_td = 0;\r
+var dragEnd_tr = 0;\r
+//tmp gia ta loops & check gia to last state\r
+var tmp_dragStart_td;\r
+var tmp_dragStart_tr;\r
+var tmp_dragEnd_td;\r
+var tmp_dragEnd_tr;\r
+var isDragging = false;\r
+var ctrlPressed = false;\r
+// try stop \r
+var continueExecuting = false;\r
+var isExecuting = false;\r
+\r
+\r
+\r
+function rangeMouseDown(e) {\r
+    if (Debug) console.time("mouse:rangeMouseDown");\r
+    if (isRightClick(e)) {\r
+        return false;\r
+    } else {\r
+        dragStart_tr = $(this).parent().index();\r
+        dragStart_td = $(this).index();\r
+        dragEnd_tr = dragStart_tr;\r
+        dragEnd_td = dragStart_td;\r
+        //alert(dragStart_tr);\r
+        //var allCells = $("#tblReservation td");\r
+        //dragStart = allCells.index($(this));\r
+\r
+        if ( $(this).hasClass("free"))\r
+            $(this).addClass("selected_tmp");\r
+\r
+        isDragging = true;\r
+        //selectRange();\r
+\r
+        if (typeof e.preventDefault != 'undefined') { e.preventDefault(); }\r
+        document.documentElement.onselectstart = function () { return false; };\r
+    }\r
+    if (Debug) console.timeEnd("mouse:rangeMouseDown");\r
+}\r
+\r
+function rangeMouseUp(e) {\r
+    if (Debug) console.time("mouse:rangeMouseUp");\r
+    if (isRightClick(e)) {\r
+        return false;\r
+    } else {\r
+        //var allCells = $("#tblReservation td");\r
+        //dragEnd = allCells.index($(this));\r
+\r
+        dragEnd_tr = $(this).parent().index();\r
+        dragEnd_td = $(this).index();\r
+\r
+        isDragging = false;\r
+        selectRange(false);\r
+\r
+        document.documentElement.onselectstart = function () { return true; };\r
+    }\r
+    if (Debug) console.timeEnd("mouse:rangeMouseUp");\r
+}\r
+\r
+function rangeMouseMove(e) {\r
+    //if (Debug) console.time("mouse:rangeMouseMove");\r
+    if (isDragging) {\r
+        dragEnd_tr = $(this).parent().attr('data-trindex');\r
+        dragEnd_td = $(this).attr('data-tdindex');\r
+\r
+        //if (Debug) this.debug('foo');\r
+\r
+        if ((dragEnd_tr != tmp_dragEnd_tr) || (dragEnd_td != tmp_dragEnd_td)) {\r
+            //console.log(dragEnd_tr + " - " + tmp_dragEnd_tr);\r
+            //console.log(dragEnd_td + " - " + tmp_dragEnd_td);\r
+            //selectRange(true);\r
+        }\r
+    }\r
+    //if (Debug) console.timeEnd("mouse:rangeMouseMove");\r
+}\r
+\r
+function selectRange(IsTemp) {\r
+    if (Debug) console.time("mouse:---selectRange");\r
+\r
+    if (!ctrlPressed)\r
+        $("#" + rsvrTblNm + "  td:not([class='info'],[class='closed'])").removeClass('selected selected_tmp').addClass('free');\r
+\r
+    tmp_dragStart_td = dragStart_td;\r
+    tmp_dragStart_tr = dragStart_tr;\r
+    tmp_dragEnd_td = dragEnd_td;\r
+    tmp_dragEnd_tr = dragEnd_tr;\r
+\r
+    if (tmp_dragStart_td > tmp_dragEnd_td) {\r
+        var tmp = tmp_dragStart_td;\r
+        tmp_dragStart_td = tmp_dragEnd_td;\r
+        tmp_dragEnd_td = tmp;\r
+    }\r
+\r
+    if (tmp_dragStart_tr > tmp_dragEnd_tr) {\r
+        var tmp = tmp_dragStart_tr;\r
+        tmp_dragStart_tr = tmp_dragEnd_tr;\r
+        tmp_dragEnd_tr = tmp;\r
+    }\r
+\r
+    //alert("tmp_dragStart_td:" + tmp_dragStart_td + "\n tmp_dragStart_tr:" + tmp_dragStart_tr + "\n tmp_dragEnd_td:" + tmp_dragEnd_td + "\n tmp_dragEnd_tr:" + tmp_dragEnd_tr);\r
+\r
+\r
+    for (i = tmp_dragStart_tr; i <= tmp_dragEnd_tr; i++) {\r
+        for (j = tmp_dragStart_td; j <= tmp_dragEnd_td; j++) {\r
+            //alert("i:" + i + "j:" + j);\r
+            var cell = $('#' + rsvrTblNm + '  tbody tr:eq(' + i + ') td:eq(' + j + ')');\r
+            //$(cell)\r
+            curClass = $(cell).attr("class");\r
+            //alert(curClass);\r
+            switch (curClass) {\r
+                case "free_tmp":\r
+                    $(cell).removeClass();\r
+                    if (IsTemp)\r
+                        $(cell).addClass("free_tmp");\r
+                    else\r
+                        $(cell).addClass("free");\r
+                    break;\r
+                case "free":\r
+                    $(cell).removeClass();\r
+                    if (IsTemp)\r
+                        $(cell).addClass("selected_tmp");\r
+                    else\r
+                        $(cell).addClass("selected");\r
+                    break;\r
+                case "selected_tmp":\r
+                    $(cell).removeClass();\r
+                    if (IsTemp)\r
+                        $(cell).addClass("selected_tmp");\r
+                    else\r
+                        $(cell).addClass("selected");\r
+                    break;\r
+                case "selected":\r
+                    $(cell).removeClass();\r
+                    if (IsTemp)\r
+                        $(cell).addClass("free_tmp");\r
+                    else\r
+                        $(cell).addClass("free");\r
+                    break;\r
+                case "closed":\r
+                    //do nothing\r
+                    //alert("not allowed!");\r
+                    break;\r
+            }\r
+        }\r
+    }\r
+\r
+\r
+    /*if (dragEnd + 1 < dragStart) { // reverse select\r
+    //alert(1);\r
+    $("#tblReservation td:not([class='info'])").slice(dragEnd, dragStart + 1).addClass('selected');\r
+    } else {\r
+    alert(dragStart + "-" + dragEnd);\r
+    $("#tblReservation td:not([class='info'])").slice(dragStart, dragEnd).addClass('selected');\r
+    }*/\r
+\r
+\r
+    if (Debug) console.timeEnd("mouse:---selectRange");\r
+}\r
+\r
+function ClearTableSelection(){\r
+    $('#' + rsvrTblNm + ' .selected').addClass("free").removeClass("selected");\r
+}\r
+\r
+\r
diff --git a/plugins/scheduler2/templates/scheduler.html b/plugins/scheduler2/templates/scheduler.html
new file mode 100755 (executable)
index 0000000..e4605f0
--- /dev/null
@@ -0,0 +1,102 @@
+<div id="plugin-{{ domid }}" class="row">\r
+    <div class="row m-b">\r
+        <div class="col-md-1">\r
+            <label for="inputEmail3" class="col-sm-2 control-label">Date</label>\r
+        </div>\r
+        <div class="col-md-9">\r
+            <input id="DateToRes" type="text" class="form-control" placeholder="Reservation Date">\r
+            <span class="glyphicon glyphicon-calendar"></span>\r
+        </div>\r
+        <div class="col-md-2 text-center">\r
+            <div id="TopologyModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">\r
+                <div class="modal-dialog">\r
+                    <div class="modal-header">\r
+                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\r
+                        <h4 class="modal-title" id="myModalLabel">Topology</h4>\r
+                    </div>\r
+                    <div class="modal-body">\r
+                        <img src="../../static/img/nitos_topo.png" alt="nitos topology" style="width:100%;" />\r
+                    </div>\r
+                </div><!-- /.modal-dialog -->\r
+            </div><!-- /.modal TopologyModal -->\r
+            <button type="button" class="btn btn-primary btn-md" data-toggle="modal" data-target="#TopologyModal">Topology</button>\r
+\r
+        </div>\r
+    </div>\r
+    <div class="row m-b">\r
+        <div class="col-md-1">\r
+            <label for="inputEmail3" class="col-sm-1 control-label">Time</label>\r
+        </div>\r
+        <div class="col-md-9">\r
+            <div id="time-range"></div>\r
+        </div>\r
+        <div class="col-md-2">\r
+            <span id="lbltime" class="label label-primary"></span>\r
+        </div>\r
+    </div>\r
+\r
+    <div class='query-editor-spacer'>\r
+        <div id="ShedulerNodes-scroll-container">\r
+            <table id="ShedulerNodes">\r
+                <tbody>\r
+                    {% comment %}\r
+                    {% for itms in nodes %}\r
+                    <tr>\r
+                        <td class="no-image verticalIndex" rowspan="{{ itms.1|length }}"><div class="verticalText">{{ itms.0 }}</div></td>\r
+\r
+                        {% for n in itms.1 %}\r
+                        {% if not forloop.first %}\r
+                    <tr>\r
+                        {% endif %}\r
+                        <td class="info fixed">{{ n }}</td>\r
+                    </tr>\r
+                    {% endfor %}\r
+                    {% endfor %}\r
+                    {% endcomment  %}\r
+                </tbody>\r
+            </table>\r
+        </div>\r
+        <div id="reservation-table-scroll-container">\r
+            <table id='{{domid}}-reservation-table' class='table table-bordered'>\r
+                <thead>\r
+                    <tr>\r
+                        {% for ts in time_slots %}\r
+                        <th class='center info'>{{ ts|safe }}</th>\r
+                        {% endfor %}\r
+                    </tr>\r
+                </thead>\r
+                <tbody>\r
+                    {% comment %}\r
+                    {% for itms in nodes %}\r
+                    {% for n in itms.1 %}\r
+                    <tr data-trindex="">\r
+                        {% for ts in time_slots %}\r
+                        {% if n == 'node020' %}\r
+                        <td class="maintenance closed" data-tdindex="{{forloop.counter}}"></td>\r
+                        {% elif n == 'node023' or n == 'node030' %}\r
+                        <td class="closed" data-tdindex="{{forloop.counter}}"></td>\r
+                        {% else %}\r
+                        <td class="" data-tdindex="{{forloop.counter}}"></td>\r
+                        {% endif %}\r
+                        {% endfor %}\r
+                    </tr>\r
+                    {% endfor %}\r
+                    {% endfor %}\r
+                    {% endcomment  %}\r
+                </tbody>\r
+            </table>\r
+        </div>\r
+\r
+        <div class="legend">\r
+            <ol>\r
+                <li class="free">free</li>\r
+                <li class="selected">selected</li>\r
+                <li class="closed">reserved</li>\r
+                <li class="maintenance">maintenance</li>\r
+            </ol>\r
+        </div>\r
+    </div><!-- / scheduler plugin -->\r
+    <script type="text/javascript">\r
+        //alert("1");\r
+    </script>\r
+</div>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index eaec3fa..e28ef01
@@ -18,7 +18,8 @@ from plugins.querygrid               import QueryGrid
 from plugins.queryupdater            import QueryUpdater
 from plugins.googlemap               import GoogleMap
 from plugins.senslabmap              import SensLabMap
-from plugins.scheduler               import Scheduler
+#from plugins.scheduler               import Scheduler
+from plugins.scheduler2              import Scheduler2
 from plugins.querycode               import QueryCode
 # Thierry
 # stay away from query editor for now as it seems to make things go very slow
@@ -244,15 +245,29 @@ class SliceView (LoginRequiredAutoLogoutView):
                 checkboxes = True,
                 )
 
-        if do_query_leases:
-            resources_as_scheduler = Scheduler(
-                page        = page,
-                title       = 'Scheduler',
-                domid       = 'scheduler',
-                query       = sq_resource,
-                query_all_resources = query_resource_all,
-                query_lease = sq_lease,
-                )
+        
+
+        #if do_query_leases:
+        #    resources_as_scheduler = Scheduler(
+
+        #        page        = page,
+        #        title       = 'Scheduler',
+        #        domid       = 'scheduler',
+        #        query       = sq_resource,
+        #        query_all_resources = query_resource_all,
+        #        query_lease = sq_lease,
+
+        #        )
+
+        resources_as_scheduler2 = Scheduler2( 
+            page       = page,
+            domid      = 'scheduler',
+            title      = 'Scheduler',
+            # this is the query at the core of the slice list
+            query = sq_resource,
+            query_all_resources = query_resource_all,
+            query_lease = sq_lease,
+            )
 
        # with the new 'Filter' stuff on top, no need for anything but the querytable
         resources_as_list_area = resources_as_list 
@@ -260,12 +275,13 @@ class SliceView (LoginRequiredAutoLogoutView):
         resources_sons = [
             resources_as_gmap, 
             resources_as_3dmap,
-            resources_as_scheduler,
+            resources_as_scheduler2,
             resources_as_list_area,
             ] if do_query_leases else [
             resources_as_gmap, 
             resources_as_3dmap,
             resources_as_list_area,
+            resources_as_scheduler2,
             ]
         if insert_grid:
             resources_sons.append(resources_as_grid)
@@ -276,7 +292,8 @@ class SliceView (LoginRequiredAutoLogoutView):
                                 title="Resources",
                                 outline_complete=True,
                                 sons= resources_sons,
-                                active_domid = 'resources-map',
+
+                                active_domid = 'scheduler',
                                 persistent_active=True,
                                 )
         main_stack.insert (resources_area)