(function(){
   if(typeof u!="undefined")var q=u; var u=window.jQuery=function(a, c){
      if(window==this||!this.init)return new u(a, c); return this.init(a, c)
   }
   ; if(typeof $!="undefined")var v=$; window.$=u; var w=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/; u.fn=u.prototype={
      init:function(a, c){
         a=a||document; if(typeof a=="string"){
            var m=w.exec(a); if(m&&(m[1]||!c)){
               if(m[1])a=u.clean([m[1]]); else{
                  var b=document.getElementById(m[3]); if(b)if(b.id!=m[3])return u().find(a); else{
                     this[0]=b; this.length=1; return this
                  }
                  else a=[]
               }
            }
            else return new u(c).find(a)
         }
         else if(u.isFunction(a))return new u(document)[u.fn.ready?"ready":"load"](a); return this.setArray(a.constructor==Array&&a||(a.jquery||a.length&&a!=window&&!a.nodeType&&a[0]!=undefined&&a[0].nodeType)&&u.makeArray(a)||[a])
      }
      , jquery:"1.1.4", size:function(){
         return this.length
      }
      , length:0, get:function(a){
         return a==undefined?u.makeArray(this):this[a]
      }
      , pushStack:function(a){
         var b=u(a); b.prevObject=this; return b
      }
      , setArray:function(a){
         this.length=0; Array.prototype.push.apply(this, a); return this
      }
      , each:function(a, b){
         return u.each(this, a, b)
      }
      , index:function(a){
         var b=-1; this.each(function(i){
            if(this==a)b=i
         }
         ); return b
      }
      , attr:function(c, d, e){
         var f=c; if(c.constructor==String)if(d==undefined)return this.length&&u[e||"attr"](this[0], c)||undefined; else{
            f={
            }
            ; f[c]=d
         }
         return this.each(function(a){
            for(var b in f)u.attr(e?this.style:this, b, u.prop(this, f[b], e, a, b))
         }
         )
      }
      , css:function(a, b){
         return this.attr(a, b, "curCSS")
      }
      , text:function(e){
         if(typeof e!="object"&&e!=null)return this.empty().append(document.createTextNode(e)); var t=""; u.each(e||this, function(){
            u.each(this.childNodes, function(){
               if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:u.fn.text([this])
            }
            )
         }
         ); return t
      }
      , wrap:function(){
         var a, args=arguments; return this.each(function(){
            if(!a)a=u.clean(args, this.ownerDocument); var b=a[0].cloneNode(true); this.parentNode.insertBefore(b, this); while(b.firstChild)b=b.firstChild; b.appendChild(this)
         }
         )
      }
      , append:function(){
         return this.domManip(arguments, true, 1, function(a){
            this.appendChild(a)
         }
         )
      }
      , prepend:function(){
         return this.domManip(arguments, true, -1, function(a){
            this.insertBefore(a, this.firstChild)
         }
         )
      }
      , before:function(){
         return this.domManip(arguments, false, 1, function(a){
            this.parentNode.insertBefore(a, this)
         }
         )
      }
      , after:function(){
         return this.domManip(arguments, false, -1, function(a){
            this.parentNode.insertBefore(a, this.nextSibling)
         }
         )
      }
      , end:function(){
         return this.prevObject||u([])
      }
      
	  , find:function(t){
         var b=u.map(this, function(a){
            return u.find(t, a)
         }
         ); return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?u.unique(b):b)
      }
      , clone:function(d){
         d=d!=undefined?d:true; var e=this.add(this.find("*")); if(u.browser.msie){
            e.each(function(){
               this._$events={
               }
               ; for(var a in this.$events)this._$events[a]=u.extend({
               }
               , this.$events[a])
            }
            ).unbind()
         }
         var r=this.pushStack(u.map(this, function(a){
            return a.cloneNode(d)
         }
         )); if(u.browser.msie){
            e.each(function(){
               var a=this._$events; for(var b in a)for(var c in a[b])u.event.add(this, b, a[b][c], a[b][c].data); this._$events=null
            }
            )
         }
         if(d){
            var f=r.add(r.find('*')).filter('select,input[@type=checkbox]'); e.filter('select,input[@type=checkbox]').each(function(i){
               if(this.selectedIndex)f[i].selectedIndex=this.selectedIndex; if(this.checked)f[i].checked=true
            }
            )
         }
         return r
      }
      , filter:function(t){
         return this.pushStack(u.isFunction(t)&&u.grep(this, function(a, b){
            return t.apply(a, [b])
         }
         )||u.multiFilter(t, this))
      }
      , not:function(t){
         return this.pushStack(t.constructor==String&&u.multiFilter(t, this, true)||u.grep(this, function(a){
            return(t.constructor==Array||t.jquery)?u.inArray(a, t)<0:a!=t
         }
         ))
      }
      , add:function(t){
         return this.pushStack(u.merge(this.get(), t.constructor==String?u(t).get():t.length!=undefined&&(!t.nodeName||t.nodeName=="FORM")?t:[t]))
      }
      , is:function(a){
         return a?u.multiFilter(a, this).length>0:false
      }
      , val:function(a){
         return a==undefined?(this.length?this[0].value:null):this.attr("value", a)
      }
      , html:function(a){
         return a==undefined?(this.length?this[0].innerHTML:null):this.empty().append(a)
      }
      , slice:function(){
         return this.pushStack(Array.prototype.slice.apply(this, arguments))
      }
      , domManip:function(c, d, e, f){
         var g=this.length>1, a; return this.each(function(){
            if(!a){
               a=u.clean(c, this.ownerDocument); if(e<0)a.reverse()
            }
            var b=this; if(d&&u.nodeName(this, "table")&&u.nodeName(a[0], "tr"))b=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody")); u.each(a, function(){
               if(u.nodeName(this, "script")){
                  if(this.src)u.ajax({
                     url:this.src, async:false, dataType:"script"
                  }
                  ); else u.globalEval(this.text||this.textContent||this.innerHTML||"")
               }
               else f.apply(b, [g?this.cloneNode(true):this])
            }
            )
         }
         )
      }
   }
   ; u.extend=u.fn.extend=function(){
      var b=arguments[0]||{
      }
      , a=1, al=arguments.length, deep=false; if(b.constructor==Boolean){
         deep=b; b=arguments[1]||{
         }
      }
      if(al==1){
         b=this; a=0
      }
      var c; for(; a<al; a++)if((c=arguments[a])!=null)for(var i in c){
         if(b==c[i])continue; if(deep&&typeof c[i]=='object'&&b[i])u.extend(b[i], c[i]); else if(c[i]!=undefined)b[i]=c[i]
      }
      return b
   }
   ; u.extend({
      noConflict:function(a){
         window.$=v; if(a)window.jQuery=q; return u
      }
      , isFunction:function(a){
         return!!a&&typeof a!="string"&&!a.nodeName&&a.constructor!=Array&&/function/i.test(a+"")
      }
      , isXMLDoc:function(a){
         return a.documentElement&&!a.body||a.tagName&&a.ownerDocument&&!a.ownerDocument.body
      }
      , globalEval:function(a){
         a=u.trim(a); if(a){
            if(window.execScript)window.execScript(a); else if(u.browser.safari)window.setTimeout(a, 0); else eval.call(window, a)
         }
      }
      , nodeName:function(a, b){
         return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()
      }
      , each:function(a, b, c){
         if(c){
            if(a.length==undefined)
				for(var i in a)
					b.apply(a[i], c); 
			else 
			for(var i=0, ol=a.length; i<ol; i++)
				if(b.apply(a[i], c)===false)
            		break
         }
         else{
			if(a!=undefined){
			
				if(a.length==undefined)
					for(var i in a)b.call(a[i], i, a[i]); 
				else 
					
					for(var i=0, ol=a.length, val=a[0]; i<ol&&b.call(val, i, val)!==false; val=a[++i])
					{}
			}
         }
         return a
      }
      , prop:function(a, b, c, d, e){
         if(u.isFunction(b))b=b.call(a, [d]); var f=/z-?index|font-?weight|opacity|zoom|line-?height/i; return b&&b.constructor==Number&&c=="curCSS"&&!f.test(e)?b+"px":b
      }
      , className:{
         add:function(b, c){
            u.each((c||"").split(/\s+/), function(i, a){
               if(!u.className.has(b.className, a))b.className+=(b.className?" ":"")+a
            }
            )
         }
         , remove:function(b, c){
            b.className=c!=undefined?u.grep(b.className.split(/\s+/), function(a){
               return!u.className.has(c, a)
            }
            ).join(" "):""
         }
         , has:function(t, c){
            return u.inArray(c, (t.className||t).toString().split(/\s+/))>-1
         }
      }
      , swap:function(e, o, f){
         for(var i in o){
            e.style["old"+i]=e.style[i]; e.style[i]=o[i]
         }
         f.apply(e, []); for(var i in o)e.style[i]=e.style["old"+i]
      }
      , css:function(e, p){
         if(p=="height"||p=="width"){
            var b={
            }
            , oHeight, oWidth, d=["Top", "Bottom", "Right", "Left"]; u.each(d, function(){
               b["padding"+this]=0; b["border"+this+"Width"]=0
            }
            ); u.swap(e, b, function(){
               if(u(e).is(':visible')){
                  oHeight=e.offsetHeight; oWidth=e.offsetWidth
               }
               else{
                  e=u(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({
                     visibility:"hidden", position:"absolute", display:"block", right:"0", left:"0"
                  }
                  ).appendTo(e.parentNode)[0]; var a=u.css(e.parentNode, "position")||"static"; if(a=="static")e.parentNode.style.position="relative"; oHeight=e.clientHeight; oWidth=e.clientWidth; if(a=="static")e.parentNode.style.position="static"; e.parentNode.removeChild(e)
               }
            }
            ); return p=="height"?oHeight:oWidth
         }
         return u.curCSS(e, p)
      }
      , curCSS:function(d, e, f){
         var g, stack=[], swap=[]; function color(a){
            if(!u.browser.safari)return false; var b=document.defaultView.getComputedStyle(a, null); return!b||b.getPropertyValue("color")==""
         }
         if(e=="opacity"&&u.browser.msie){
            g=u.attr(d.style, "opacity"); return g==""?"1":g
         }
         if(e.match(/float/i))e=A; if(!f&&d.style[e])g=d.style[e]; else if(document.defaultView&&document.defaultView.getComputedStyle){
            if(e.match(/float/i))e="float"; e=e.replace(/([A-Z])/g, "-$1").toLowerCase(); var h=document.defaultView.getComputedStyle(d, null); if(h&&!color(d))g=h.getPropertyValue(e); else{
               for(var a=d; a&&color(a); a=a.parentNode)stack.unshift(a); for(a=0; a<stack.length; a++)if(color(stack[a])){
                  swap[a]=stack[a].style.display; stack[a].style.display="block"
               }
               g=e=="display"&&swap[stack.length-1]!=null?"none":document.defaultView.getComputedStyle(d, null).getPropertyValue(e)||""; for(a=0; a<swap.length; a++)if(swap[a]!=null)stack[a].style.display=swap[a]
            }
            if(e=="opacity"&&g=="")g="1"
         }
         else if(d.currentStyle){
            var i=e.replace(/\-(\w)/g, function(m, c){
               return c.toUpperCase()
            }
            ); g=d.currentStyle[e]||d.currentStyle[i]
         }
         return g
      }
      , clean:function(a, c){
         var r=[]; c=c||document; u.each(a, function(i, a){
            if(!a)return; if(a.constructor==Number)a=a.toString(); if(typeof a=="string"){
               var s=u.trim(a).toLowerCase(), div=c.createElement("div"), tb=[]; var b=!s.indexOf("<opt")&&[1, "<select>", "</select>"]||!s.indexOf("<leg")&&[1, "<fieldset>", "</fieldset>"]||s.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1, "<table>", "</table>"]||!s.indexOf("<tr")&&[2, "<table><tbody>", "</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3, "<table><tbody><tr>", "</tr></tbody></table>"]||!s.indexOf("<col")&&[2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"]||u.browser.msie&&[1, "div<div>", "</div>"]||[0, "", ""]; div.innerHTML=b[1]+a+b[2]; while(b[0]--)div=div.lastChild; if(u.browser.msie){
                  if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)tb=div.firstChild&&div.firstChild.childNodes; else if(b[1]=="<table>"&&s.indexOf("<tbody")<0)tb=div.childNodes; for(var n=tb.length-1; n>=0; --n)if(u.nodeName(tb[n], "tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n]); if(/^\s/.test(a))div.insertBefore(c.createTextNode(a.match(/^\s*/)[0]), div.firstChild)
               }
               a=u.makeArray(div.childNodes)
            }
            if(0===a.length&&(!u.nodeName(a, "form")&&!u.nodeName(a, "select")))return; if(a[0]==undefined||u.nodeName(a, "form")||a.options)r.push(a); else r=u.merge(r, a)
         }
         ); return r
      }
      , attr:function(a, c, d){
         var e=u.isXMLDoc(a)?{
         }
         :u.props; if(c=="selected"&&u.browser.safari)a.parentNode.selectedIndex; if(e[c]){
            if(d!=undefined)a[e[c]]=d; return a[e[c]]
         }
         else if(u.browser.msie&&c=="style")return u.attr(a.style, "cssText", d); else if(d==undefined&&u.browser.msie&&u.nodeName(a, "form")&&(c=="action"||c=="method"))return a.getAttributeNode(c).nodeValue; else if(a.tagName){
            if(d!=undefined)a.setAttribute(c, d); if(u.browser.msie&&/href|src/.test(c)&&!u.isXMLDoc(a))return a.getAttribute(c, 2); return a.getAttribute(c)
         }
         else{
            if(c=="opacity"&&u.browser.msie){
               if(d!=undefined){
                  a.zoom=1; a.filter=(a.filter||"").replace(/alpha\([^)]*\)/, "")+(parseFloat(d).toString()=="NaN"?"":"alpha(opacity="+d*100+")")
               }
               return a.filter?(parseFloat(a.filter.match(/opacity=([^)]*)/)[1])/100).toString():""
            }
            c=c.replace(/-([a-z])/ig, function(z, b){
               return b.toUpperCase()
            }
            ); if(d!=undefined)a[c]=d; return a[c]
         }
      }
      , trim:function(t){
         return(t||"").replace(/^\s+|\s+$/g, "")
      }
      , makeArray:function(a){
         var r=[]; if(typeof a!="array")for(var i=0, al=a.length; i<al; i++)r.push(a[i]); else r=a.slice(0); return r
      }
      , inArray:function(b, a){
         for(var i=0, al=a.length; i<al; i++)if(a[i]==b)return i; return-1
      }
      , merge:function(a, b){
         if(u.browser.msie){
            for(var i=0; b[i]; i++)if(b[i].nodeType!=8)a.push(b[i])
         }
         else for(var i=0; b[i]; i++)a.push(b[i]); return a
      }
      , unique:function(a){
         var r=[], num=u.mergeNum++; try{
            for(var i=0, fl=a.length; i<fl; i++)if(num!=a[i].mergeNum){
               a[i].mergeNum=num; r.push(a[i])
            }
         }
         catch(e){
            r=a
         }
         return r
      }
      , mergeNum:0, grep:function(a, b, c){
         if(typeof b=="string")b=eval("false||function(a,i){return "+b+"}"); var d=[]; for(var i=0, el=a.length; i<el; i++)if(!c&&b(a[i], i)||c&&!b(a[i], i))d.push(a[i]); return d
      }
      , map:function(a, b){
         if(typeof b=="string")b=eval("false||function(a){return "+b+"}"); var c=[]; for(var i=0, el=a.length; i<el; i++){
            var d=b(a[i], i); if(d!==null&&d!=undefined){
               if(d.constructor!=Array)d=[d]; c=c.concat(d)
            }
         }
         return c
      }
   }
   ); var x=navigator.userAgent.toLowerCase(); u.browser={
      version:(x.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1], safari:/webkit/.test(x), opera:/opera/.test(x), msie:/msie/.test(x)&&!/opera/.test(x), mozilla:/mozilla/.test(x)&&!/(compatible|webkit)/.test(x)
   }
   ; var A=u.browser.msie?"styleFloat":"cssFloat"; u.extend({
      boxModel:!u.browser.msie||document.compatMode=="CSS1Compat", styleFloat:u.browser.msie?"styleFloat":"cssFloat", props:{
         "for":"htmlFor", "class":"className", "float":A, cssFloat:A, styleFloat:A, innerHTML:"innerHTML", className:"className", value:"value", disabled:"disabled", checked:"checked", readonly:"readOnly", selected:"selected", maxlength:"maxLength"
      }
   }
   ); u.each({
      parent:"a.parentNode", parents:"jQuery.parents(a)", next:"jQuery.nth(a,2,'nextSibling')", prev:"jQuery.nth(a,2,'previousSibling')", siblings:"jQuery.sibling(a.parentNode.firstChild,a)", children:"jQuery.sibling(a.firstChild)"
   }
   , function(i, n){
      u.fn[i]=function(a){
         var b=u.map(this, n); if(a&&typeof a=="string")b=u.multiFilter(a, b); return this.pushStack(u.unique(b))
      }
   }
   ); u.each({
      appendTo:"append", prependTo:"prepend", insertBefore:"before", insertAfter:"after"
   }
   , function(i, n){
      u.fn[i]=function(){
         var a=arguments; return this.each(function(){
            for(var j=0, al=a.length; j<al; j++)u(a[j])[n](this)
         }
         )
      }
   }
   ); u.each({
      removeAttr:function(a){
         u.attr(this, a, ""); this.removeAttribute(a)
      }
      , addClass:function(c){
         u.className.add(this, c)
      }
      , removeClass:function(c){
         u.className.remove(this, c)
      }
      , toggleClass:function(c){
		 u.className[u.className.has(this, c)?"remove":"add"](this, c)
      }
      , remove:function(a){
         if(!a||u.filter(a, [this]).r.length)this.parentNode.removeChild(this)
      }
      , empty:function(){
         while(this.firstChild)this.removeChild(this.firstChild)
      }
   }
   , function(i, n){
      u.fn[i]=function(){
         return this.each(n, arguments)
      }
   }
   ); u.each(["eq", "lt", "gt", "contains"], function(i, n){
      u.fn[n]=function(a, b){
         return this.filter(":"+n+"("+a+")", b)
      }
   }
   ); u.each(["height", "width"], function(i, n){
      u.fn[n]=function(h){
         return h==undefined?(this.length?u.css(this[0], n):null):this.css(n, h.constructor==String?h:h+"px")
      }
   }
   ); var B=u.browser.safari&&parseInt(u.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)", quickChild=new RegExp("^[/>]\\s*("+B+"+)"), quickID=new RegExp("^("+B+"+)(#)("+B+"+)"), quickClass=new RegExp("^([#.]?)("+B+"*)"); u.extend({
      expr:{
         "":"m[2]=='*'||jQuery.nodeName(a,m[2])", "#":"a.getAttribute('id')==m[2]", ":":{
            lt:"i<m[3]-0", gt:"i>m[3]-0", nth:"m[3]-0==i", eq:"m[3]-0==i", first:"i==0", last:"i==r.length-1", even:"i%2==0", odd:"i%2", "first-child":"a.parentNode.getElementsByTagName('*')[0]==a", "last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a", "only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')", parent:"a.firstChild", empty:"!a.firstChild", contains:"(a.textContent||a.innerText||'').indexOf(m[3])>=0", visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"', hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"', enabled:"!a.disabled", disabled:"a.disabled", checked:"a.checked", selected:"a.selected||jQuery.attr(a,'selected')", text:"'text'==a.type", radio:"'radio'==a.type", checkbox:"'checkbox'==a.type", file:"'file'==a.type", password:"'password'==a.type", submit:"'submit'==a.type", image:"'image'==a.type", reset:"'reset'==a.type", button:'"button"==a.type||jQuery.nodeName(a,"button")', input:"/input|select|textarea|button/i.test(a.nodeName)", has:"jQuery.find(m[3],a).length"
         }
         , "[":"jQuery.find(m[2],a).length"
      }
      , parse:[/^\[ *(@)([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+B+"+)")],multiFilter:function(a,b,c){var d,cur=[];while(a&&a!=d){d=a;var f=u.filter(a,b,c);a=f.t.replace(/^\s*,\s*/,"");
cur=c?b=f.r:u.merge(cur, f.r)
}

//  ---------------------------------------

return cur
}

//  ---------------------------------------

//  ---------------------------------------

, find:function(t, a){
   if(typeof t!="string")return[t]; if(a&&!a.nodeType)a=null; a=a||document; if(!t.indexOf("//")){
      t=t.substr(2, t.length)
   }
   else if(!t.indexOf("/")&&!a.ownerDocument){
      a=a.documentElement; t=t.substr(1, t.length); if(t.indexOf("/")>=1)t=t.substr(t.indexOf("/"), t.length)
   }
   var b=[a], done=[], last; while(t&&last!=t){
      var r=[]; last=t; t=u.trim(t).replace(/^\/\//, ""); var d=false; var e=quickChild; var m=e.exec(t); if(m){
         var f=m[1].toUpperCase(); for(var i=0; b[i]; i++)for(var c=b[i].firstChild; c; c=c.nextSibling)if(c.nodeType==1&&(f=="*"||c.nodeName.toUpperCase()==f.toUpperCase()))r.push(c); b=r; t=t.replace(e, ""); if(t.indexOf(" ")==0)continue; d=true
      }
      else{
         e=/^((\/?\.\.)|([>\/+~]))\s*(\w*)/i; if((m=e.exec(t))!=null){
            r=[]; var f=m[4], mergeNum=u.mergeNum++; m=m[1]; for(var j=0, rl=b.length; j<rl; j++)if(m.indexOf("..")<0){
               var n=m=="~"||m=="+"?b[j].nextSibling:b[j].firstChild; for(; n; n=n.nextSibling)if(n.nodeType==1){
                  if(m=="~"&&n.mergeNum==mergeNum)
                  break; if(!f||n.nodeName.toUpperCase()==f.toUpperCase()){
                     if(m=="~")n.mergeNum=mergeNum; r.push(n)
                  }
                  if(m=="+")
                  break
               }
            }
            else r.push(b[j].parentNode); b=r; t=u.trim(t.replace(e, "")); d=true
         }
      }
      if(t&&!d){
         if(!t.indexOf(",")){
            if(a==b[0])b.shift(); done=u.merge(done, b); r=b=[a]; t=" "+t.substr(1, t.length)
         }
         else{
            var g=quickID; var m=g.exec(t); if(m){
               m=[0, m[2], m[3], m[1]]
            }
            else{
               g=quickClass; m=g.exec(t)
            }
            m[2]=m[2].replace(/\\/g,"");var h=b[b.length-1];if(m[1]=="#"&&h&&h.getElementById&&!u.isXMLDoc(h)){var k=h.getElementById(m[2]);if((u.browser.msie||u.browser.opera)&&k&&typeof k.id=="string"&&k.id!=m[2])k=u('[@id="'+m[2]+'"]',h)[0];b=r=k&&(!m[3]||u.nodeName(k,m[3]))?[k]:[]}else{for(var i=0;b[i];i++){var l=m[1]!=""||m[0]==""?"*":m[2];if(l=="*"&&b[i].nodeName.toLowerCase()=="object")l="param";r=u.merge(r,b[i].getElementsByTagName(l))}if(m[1]==".")r=u.classFilter(r,m[2]);if(m[1]=="#"){var o=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){o=[r[i]];break}r=o}b=r}t=t.replace(g,"")}}if(t){var p=u.filter(t,r);b=r=p.r;t=u.trim(p.t)}}if(t)b=[];if(b&&a==b[0])b.shift();done=u.merge(done,b);return done},classFilter:function(r,m,a){m=" "+m+" ";var b=[];for(var i=0;r[i];i++){var c=(" "+r[i].className+" ").indexOf(m)>=0;if(!a&&c||a&&!c)b.push(r[i])}return b},filter:function(t,r,b){var d;while(t&&t!=d){d=t;var p=u.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");
            break
         }
      }
      if(!m)
      break; if(m[1]==":"&&m[2]=="not")r=u.filter(m[3], r, true).r; else if(m[1]==".")r=u.classFilter(r, m[2], b); else if(m[1]=="@"){
         var e=[], type=m[3]; for(var i=0, rl=r.length; i<rl; i++){
            var a=r[i], z=a[u.props[m[2]]||m[2]]; if(z==null||/href|src|selected/.test(m[2]))z=u.attr(a, m[2])||''; if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^b)e.push(a)
         }
         r=e
      }
      else if(m[1]==":"&&m[2]=="nth-child"){
         var g=u.mergeNum++, e=[], test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]), first=(test[1]||1)-0, d=test[2]-0; for(var i=0, rl=r.length; i<rl; i++){
            var h=r[i], parentNode=h.parentNode; if(g!=parentNode.mergeNum){
               var c=1; for(var n=parentNode.firstChild; n; n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++; parentNode.mergeNum=g
            }
            var j=false; if(first==1){
               if(d==0||h.nodeIndex==d)j=true
            }
            else if((h.nodeIndex+d)%first==0)j=true; if(j^b)e.push(h)
         }
         r=e
      }
      else{
         var f=u.expr[m[1]]; if(typeof f!="string")f=u.expr[m[1]][m[2]]; f=eval("false||function(a,i){return "+f+"}"); r=u.grep(r, f, b)
      }
   }
   return{
      r:r, t:t
   }
}

//  ---------------------------------------

, parents:function(a){
   var b=[]; var c=a.parentNode; while(c&&c!=document){
      b.push(c); c=c.parentNode
   }
   return b
}

//  ---------------------------------------

, nth:function(a, b, c, d){
   b=b||1; var e=0; for(; a; a=a[c])if(a.nodeType==1&&++e==b)
   break; return a
}

//  ---------------------------------------

, sibling:function(n, a){
   var r=[]; for(; n; n=n.nextSibling){
      if(n.nodeType==1&&(!a||n!=a))r.push(n)
   }
   return r
}

//  ---------------------------------------

}

//  ---------------------------------------

); u.event={
add:function(b, c, d, e){
   if(u.browser.msie&&b.setInterval!=undefined)b=window; if(!d.guid)d.guid=this.guid++; if(e!=undefined){
      var f=d; d=function(){
         return f.apply(this, arguments)
      }
      ; d.data=e; d.guid=f.guid
   }
   if(!b.$events)b.$events={
   }
   ; if(!b.$handle)b.$handle=function(){
      var a; if(typeof u=="undefined"||u.event.triggered)return a; a=u.event.handle.apply(b, arguments); return a
   }
   ; var g=b.$events[c]; if(!g){
      g=b.$events[c]={
      }
      ; if(b.addEventListener)b.addEventListener(c, b.$handle, false); else b.attachEvent("on"+c, b.$handle)
   }
   g[d.guid]=d; this.global[c]=true
}

//  ---------------------------------------

, guid:1, global:{
}

//  ---------------------------------------

, remove:function(a, b, c){
   var d=a.$events, ret, index; if(d){
      if(b&&b.type){
         c=b.handler; b=b.type
      }
      if(!b){
         for(b in d)this.remove(a, b)
      }
      else if(d[b]){
         if(c)delete d[b][c.guid]; else for(c in a.$events[b])delete d[b][c]; for(ret in d[b])
         break; if(!ret){
            if(a.removeEventListener)a.removeEventListener(b, a.$handle, false); else a.detachEvent("on"+b, a.$handle); ret=null; delete d[b]
         }
      }
      for(ret in d)
      break; if(!ret)a.$handle=a.$events=null
   }
}

//  ---------------------------------------

, trigger:function(a, b, c){
   b=u.makeArray(b||[]); if(!c){
      if(this.global[a])u("*").add([window, document]).trigger(a, b)
   }
   else{
      var d, ret, fn=u.isFunction(c[a]||null); b.unshift(this.fix({
         type:a, target:c
      }
      )); if(u.isFunction(c.$handle))d=c.$handle.apply(c, b); if(!fn&&c["on"+a]&&c["on"+a].apply(c, b)===false)d=false; if(fn&&d!==false&&!(u.nodeName(c, 'a')&&a=="click")){
         this.triggered=true; c[a]()
      }
      this.triggered=false
   }
}

//  ---------------------------------------

, handle:function(a){
   var b; a=u.event.fix(a||window.event||{
   }
   ); var c=this.$events&&this.$events[a.type], args=Array.prototype.slice.call(arguments, 1); args.unshift(a); for(var j in c){
      args[0].handler=c[j]; args[0].data=c[j].data; if(c[j].apply(this, args)===false){
         a.preventDefault(); a.stopPropagation(); b=false
      }
   }
   if(u.browser.msie)a.target=a.preventDefault=a.stopPropagation=a.handler=a.data=null; return b
}

//  ---------------------------------------

, fix:function(a){
   var c=a; a=u.extend({
   }
   , c); a.preventDefault=function(){
      if(c.preventDefault)c.preventDefault(); c.returnValue=false
   }
   ; a.stopPropagation=function(){
      if(c.stopPropagation)c.stopPropagation(); c.cancelBubble=true
   }
   ; if(!a.target&&a.srcElement)a.target=a.srcElement; if(u.browser.safari&&a.target.nodeType==3)a.target=c.target.parentNode; if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement==a.target?a.toElement:a.fromElement; if(a.pageX==null&&a.clientX!=null){
      var e=document.documentElement, b=document.body; a.pageX=a.clientX+(e&&e.scrollLeft||b.scrollLeft||0); a.pageY=a.clientY+(e&&e.scrollTop||b.scrollTop||0)
   }
   if(!a.which&&(a.charCode||a.keyCode))a.which=a.charCode||a.keyCode; if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey; if(!a.which&&a.button)a.which=(a.button&1?1:(a.button&2?3:(a.button&4?2:0))); return a
}

//  ---------------------------------------

}

//  ---------------------------------------

; u.fn.extend({
bind:function(a, b, c){
   return a=="unload"?this.one(a, b, c):this.each(function(){
      u.event.add(this, a, c||b, c&&b)
   }
   )
}

//  ---------------------------------------

, one:function(b, c, d){
   return this.each(function(){
      u.event.add(this, b, function(a){
         u(this).unbind(a); return(d||c).apply(this, arguments)
      }
      , d&&c)
   }
   )
}

//  ---------------------------------------

, unbind:function(a, b){
   return this.each(function(){
      u.event.remove(this, a, b)
   }
   )
}

//  ---------------------------------------

, trigger:function(a, b){
   return this.each(function(){
      u.event.trigger(a, b, this)
   }
   )
}

//  ---------------------------------------

, toggle:function(){
   var a=arguments; return this.click(function(e){
      this.lastToggle=0==this.lastToggle?1:0; e.preventDefault(); return a[this.lastToggle].apply(this, [e])||false
   }
   )
}

//  ---------------------------------------

, hover:function(f, g){
   function handleHover(e){
      var p=e.relatedTarget; while(p&&p!=this)try{
         p=p.parentNode
      }
      catch(e){
         p=this
      }
      ; if(p==this)return false; return(e.type=="mouseover"?f:g).apply(this, [e])
   }
   return this.mouseover(handleHover).mouseout(handleHover)
}

//  ---------------------------------------

, ready:function(f){
   bindReady(); if(u.isReady)f.apply(document, [u]); else u.readyList.push(function(){
      return f.apply(this, [u])
   }
   ); return this
}

//  ---------------------------------------

}

//  ---------------------------------------

); u.extend({
isReady:false, readyList:[], ready:function(){
   if(!u.isReady){
      u.isReady=true; if(u.readyList){
         u.each(u.readyList, function(){
            this.apply(document)
         }
         ); u.readyList=null
      }
      if(u.browser.mozilla||u.browser.opera)document.removeEventListener("DOMContentLoaded", u.ready, false); if(!window.frames.length)u(window).load(function(){
         u("#__ie_init").remove()
      }
      )
   }
}

//  ---------------------------------------

}

//  ---------------------------------------

); u.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","), function(i, o){
u.fn[o]=function(f){
   return f?this.bind(o, f):this.trigger(o)
}

//  ---------------------------------------

}

//  ---------------------------------------

); var C=false; function bindReady(){
if(C)return; C=true; if(u.browser.mozilla||u.browser.opera)document.addEventListener("DOMContentLoaded", u.ready, false); else if(u.browser.msie){
   document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>"); var a=document.getElementById("__ie_init"); if(a)a.onreadystatechange=function(){
      if(document.readyState!="complete")return; u.ready()
   }
   ; a=null
}

//  ---------------------------------------

else if(u.browser.safari)u.safariTimer=setInterval(function(){
   if(document.readyState=="loaded"||document.readyState=="complete"){
      clearInterval(u.safariTimer); u.safariTimer=null; u.ready()
   }
}

//  ---------------------------------------

, 10); u.event.add(window, "load", u.ready)
}

//  ---------------------------------------

u.fn.extend({
loadIfModified:function(a, b, c){
   this.load(a, b, c, 1)
}

//  ---------------------------------------

, load:function(c, d, e, f){
   if(u.isFunction(c))return this.bind("load", c); e=e||function(){
   }
   ; var g="GET"; if(d)if(u.isFunction(d)){
      e=d; d=null
   }
   else{
      d=u.param(d); g="POST"
   }
   var h=this; u.ajax({
      url:c, type:g, data:d, ifModified:f, complete:function(a, b){
         if(b=="success"||!f&&b=="notmodified")h.html(a.responseText); setTimeout(function(){
            h.each(e, [a.responseText, b, a])
         }
         , 13)
      }
   }
   ); return this
}

//  ---------------------------------------

, serialize:function(){
   return u.param(this)
}

//  ---------------------------------------

, evalScripts:function(){
}

//  ---------------------------------------

}

//  ---------------------------------------

); u.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i, o){
u.fn[o]=function(f){
   return this.bind(o, f)
}

//  ---------------------------------------

}

//  ---------------------------------------

); u.extend({
get:function(a, b, c, d, e){
   if(u.isFunction(b)){
      c=b; b=null
   }
   return u.ajax({
      type:"GET", url:a, data:b, success:c, dataType:d, ifModified:e
   }
   )
}

//  ---------------------------------------

, getIfModified:function(a, b, c, d){
   return u.get(a, b, c, d, 1)
}

//  ---------------------------------------

, getScript:function(a, b){
   return u.get(a, null, b, "script")
}

//  ---------------------------------------

, getJSON:function(a, b, c){
   return u.get(a, b, c, "json")
}

//  ---------------------------------------

, post:function(a, b, c, d){
   if(u.isFunction(b)){
      c=b; b={
      }
   }
   return u.ajax({
      type:"POST", url:a, data:b, success:c, dataType:d
   }
   )
}

//  ---------------------------------------

, ajaxTimeout:function(a){
   u.ajaxSettings.timeout=a
}

//  ---------------------------------------

, ajaxSetup:function(a){
   u.extend(u.ajaxSettings, a)
}

//  ---------------------------------------

, ajaxSettings:{
   global:true, type:"GET", timeout:0, contentType:"application/x-www-form-urlencoded", processData:true, async:true, data:null
}

//  ---------------------------------------

, lastModified:{
}

//  ---------------------------------------

, ajax:function(s){
   s=u.extend(true, s, u.extend(true, {
   }
   , u.ajaxSettings, s)); if(s.data){
      if(s.processData&&typeof s.data!="string")s.data=u.param(s.data); if(s.type.toLowerCase()=="get"){
         s.url+=(s.url.indexOf("?")>-1?"&":"?")+s.data; s.data=null
      }
   }
   if(s.global&&!u.active++)u.event.trigger("ajaxStart"); var f=false; var g=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest(); g.open(s.type, s.url, s.async); if(s.data)g.setRequestHeader("Content-Type", s.contentType); if(s.ifModified)g.setRequestHeader("If-Modified-Since", u.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT"); g.setRequestHeader("X-Requested-With", "XMLHttpRequest"); if(s.beforeSend)s.beforeSend(g); if(s.global)u.event.trigger("ajaxSend", [g, s]); var h=function(a){
      if(!f&&g&&(g.readyState==4||a=="timeout")){
         f=true; if(i){
            clearInterval(i); i=null
         }
         var b=a=="timeout"&&"timeout"||!u.httpSuccess(g)&&"error"||s.ifModified&&u.httpNotModified(g, s.url)&&"notmodified"||"success"; if(b=="success"){
            try{
               var c=u.httpData(g, s.dataType)
            }
            catch(e){
               b="parsererror"
            }
         }
         if(b=="success"){
            var d; try{
               d=g.getResponseHeader("Last-Modified")
            }
            catch(e){
            }
            if(s.ifModified&&d)u.lastModified[s.url]=d; if(s.success)s.success(c, b); if(s.global)u.event.trigger("ajaxSuccess", [g, s])
         }
         else u.handleError(s, g, b); if(s.global)u.event.trigger("ajaxComplete", [g, s]); if(s.global&&!--u.active)u.event.trigger("ajaxStop"); if(s.complete)s.complete(g, b); if(s.async)g=null
      }
   }
   ; if(s.async){
      var i=setInterval(h, 13); if(s.timeout>0)setTimeout(function(){
         if(g){
            g.abort(); if(!f)h("timeout")
         }
      }
      , s.timeout)
   }
   try{
      g.send(s.data)
   }
   catch(e){
      u.handleError(s, g, null, e)
   }
   if(!s.async)h(); return g
}

//  ---------------------------------------

, handleError:function(s, a, b, e){
   if(s.error)s.error(a, b, e); if(s.global)u.event.trigger("ajaxError", [a, s, e])
}

//  ---------------------------------------

, active:0, httpSuccess:function(r){
   try{
      return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||u.browser.safari&&r.status==undefined
   }
   catch(e){
   }
   return false
}

//  ---------------------------------------

, httpNotModified:function(a, b){
   try{
      var c=a.getResponseHeader("Last-Modified"); return a.status==304||c==u.lastModified[b]||u.browser.safari&&a.status==undefined
   }
   catch(e){
   }
   return false
}

//  ---------------------------------------

, httpData:function(r, a){
   var b=r.getResponseHeader("content-type"); var c=a=="xml"||!a&&b&&b.indexOf("xml")>=0; data=c?r.responseXML:r.responseText; if(c&&data.documentElement.tagName=="parsererror")throw"parsererror"; if(a=="script")u.globalEval(data); if(a=="json")data=eval("("+data+")"); return data
}

//  ---------------------------------------

, param:function(a){
   var s=[]; if(a.constructor==Array||a.jquery)u.each(a, function(){
      s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value))
   }
   ); else for(var j in a)if(a[j]&&a[j].constructor==Array)u.each(a[j], function(){
      s.push(encodeURIComponent(j)+"="+encodeURIComponent(this))
   }
   ); else s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j])); return s.join("&")
}

//  ---------------------------------------

}

//  ---------------------------------------

); u.fn.extend({
show:function(a, b){
   return a?this.animate({
      height:"show", width:"show", opacity:"show"
   }
   , a, b):this.filter(":hidden").each(function(){
      this.style.display=this.oldblock?this.oldblock:""; if(u.css(this, "display")=="none")this.style.display="block"
   }
   ).end()
}

//  ---------------------------------------

, hide:function(a, b){
   return a?this.animate({height:"hide", width:"hide", opacity:"hide"}, a, b):this.filter(":visible").each(function(){
      this.oldblock=this.oldblock||u.css(this, "display"); 
	  if(this.oldblock=="none")this.oldblock="block"; 
	  this.style.display="none"}).end()
}

//  ---------------------------------------

, _toggle:u.fn.toggle, toggle:function(a, b){
   return u.isFunction(a)&&u.isFunction(b)?this._toggle(a, b):a?this.animate({
      height:"toggle", width:"toggle", opacity:"toggle"
   }
   , a, b):this.each(function(){
      u(this)[u(this).is(":hidden")?"show":"hide"]()
   }
   )
}

//  ---------------------------------------

, slideDown:function(a, b){
   return this.animate({height:"show"}, a, b)
}

//  ---------------------------------------

, slideUp:function(a, b){
   return this.animate({height:"hide"}, a, b)
}

//  ---------------------------------------

, slideToggle:function(a, b){
   return this.animate({height:"toggle"}, a, b)
}

//  ---------------------------------------

, fadeIn:function(a, b){
   return this.animate({
      opacity:"show"
   }
   , a, b)
}

//  ---------------------------------------

, fadeOut:function(a, b){
   return this.animate({
      opacity:"hide"
   }
   , a, b)
}

//  ---------------------------------------

, fadeTo:function(a, b, c){
   return this.animate({
      opacity:b
   }
   , a, c)
}

//  ---------------------------------------

, animate:function(d, f, g, h){
   return this.queue(function(){
      var c=u(this).is(":hidden"), opt=u.speed(f, g, h), self=this; 
	  for(var p in d){
         if(d[p]=="hide"&&c||d[p]=="show"&&!c)
		 return 
		 u.isFunction(opt.complete)&&opt.complete.apply(this); 
		 if(p=="height"||p=="width"){
            opt.display=u.css(this, "display"); 
			opt.overflow=this.style.overflow
         }
      }
      if(opt.overflow!=null)
	  	this.style.overflow="hidden"; this.curAnim=u.extend({}, d);
		u.each(d, function(a, b){var e=new u.fx(self, opt, a);
		 if(b.constructor==Number)
		 	e.custom(e.cur()||0, b); 
		 else 
		 	e[b=="toggle"?c?"show":"hide":b](d)
      }
      ); return true
   }
   )
}

//  ---------------------------------------

, queue:function(a, b){
   if(!b){
      b=a; a="fx"
   }
   return this.each(function(){
      if(!this.queue)this.queue={
      }
      ; if(!this.queue[a])this.queue[a]=[]; this.queue[a].push(b); if(this.queue[a].length==1)b.apply(this)
   }
   )
}

//  ---------------------------------------

}

//  ---------------------------------------

); u.extend({
speed:function(a, b, c){
   var d=a&&a.constructor==Object?a:{
      complete:c||!c&&b||u.isFunction(a)&&a, duration:a, easing:c&&b||b&&b.constructor!=Function&&b
   }
   ; d.duration=(d.duration&&d.duration.constructor==Number?d.duration:{
      slow:600, fast:200
   }
   [d.duration])||400; d.old=d.complete; d.complete=function(){
      u.dequeue(this, "fx"); if(u.isFunction(d.old))d.old.apply(this)
   }
   ; return d
}

//  ---------------------------------------

, easing:{
   linear:function(p, n, a, b){
      return a+b*p
   }
   , swing:function(p, n, a, b){
      return((-Math.cos(p*Math.PI)/2)+0.5)*b+a
   }
}

//  ---------------------------------------

, queue:{
}

//  ---------------------------------------

, dequeue:function(a, b){
   b=b||"fx"; if(a.queue&&a.queue[b]){
      a.queue[b].shift(); var f=a.queue[b][0]; if(f)f.apply(a)
   }
}

//  ---------------------------------------

, timers:[], fx:function(e, f, g){
   var z=this; var y=e.style; z.a=function(){
      if(f.step)f.step.apply(e, [z.now]); if(g=="opacity")u.attr(y, "opacity", z.now); else{
         y[g]=parseInt(z.now)+"px"; if(g=="height"||g=="width")y.display="block"
      }
   }
   ; z.max=function(){
      return parseFloat(u.css(e, g))
   }
   ; z.cur=function(){
      var r=parseFloat(u.curCSS(e, g)); return r&&r>-10000?r:z.max()
   }
   ; z.custom=function(b, c){
      z.startTime=(new Date()).getTime(); z.now=b; z.a(); u.timers.push(function(){
         return z.step(b, c)
      }
      ); if(u.timers.length==1){
         var d=setInterval(function(){
            var a=u.timers; for(var i=0; i<a.length; i++)if(!a[i]())a.splice(i--, 1); if(!a.length)clearInterval(d)
         }
         , 13)
      }
   }
   ; z.show=function(){
      if(!e.orig)e.orig={
      }
      ; e.orig[g]=u.attr(e.style, g); f.show=true; z.custom(0, this.cur()); if(g!="opacity")y[g]="1px"; u(e).show()
   }
   ; z.hide=function(){
      if(!e.orig)e.orig={
      }
      ; e.orig[g]=u.attr(e.style, g); f.hide=true; z.custom(this.cur(), 0)
   }
   ; z.step=function(a, b){
      var t=(new Date()).getTime(); if(t>f.duration+z.startTime){
         z.now=b; z.a(); if(e.curAnim)e.curAnim[g]=true; var c=true; for(var i in e.curAnim)if(e.curAnim[i]!==true)c=false; if(c){
            if(f.display!=null){
               y.overflow=f.overflow; y.display=f.display; if(u.css(e, "display")=="none")y.display="block"
            }
            if(f.hide)y.display="none"; if(f.hide||f.show)for(var p in e.curAnim)u.attr(y, p, e.orig[p])
         }
         if(c&&u.isFunction(f.complete))f.complete.apply(e); return false
      }
      else{
         var n=t-this.startTime; var p=n/f.duration; z.now=u.easing[f.easing||(u.easing.swing?"swing":"linear")](p, n, a, (b-a), f.duration); z.a()
      }
      return true
   }
}

//  ---------------------------------------

}

//  ---------------------------------------

)
}

//  ---------------------------------------

)(); jQuery.iUtil={
getPosition:function(e){
var x=0; var y=0; var a=e.style; var b=false; if(jQuery(e).css('display')=='none'){
   var c=a.visibility; var d=a.position; b=true; a.visibility='hidden'; a.display='block'; a.position='absolute'
}

//  ---------------------------------------

var f=e; while(f){
   x+=f.offsetLeft+(f.currentStyle&&!jQuery.browser.opera?parseInt(f.currentStyle.borderLeftWidth)||0:0); y+=f.offsetTop+(f.currentStyle&&!jQuery.browser.opera?parseInt(f.currentStyle.borderTopWidth)||0:0); f=f.offsetParent
}

//  ---------------------------------------

f=e; while(f&&f.tagName&&f.tagName.toLowerCase()!='body'){
   x-=f.scrollLeft||0; y-=f.scrollTop||0; f=f.parentNode
}

//  ---------------------------------------

if(b==true){
   a.display='none'; a.position=d; a.visibility=c
}

//  ---------------------------------------

return{
   x:x, y:y
}

//  ---------------------------------------

}

//  ---------------------------------------

, getPositionLite:function(a){
var x=0, y=0; while(a){
   x+=a.offsetLeft||0; y+=a.offsetTop||0; a=a.offsetParent
}

//  ---------------------------------------

return{
   x:x, y:y
}

//  ---------------------------------------

}

//  ---------------------------------------

, getSize:function(e){
var w=jQuery.css(e, 'width'); var h=jQuery.css(e, 'height'); var a=0; var b=0; var c=e.style; if(jQuery(e).css('display')!='none'){
   a=e.offsetWidth; b=e.offsetHeight
}

//  ---------------------------------------

else{
   var d=c.visibility; var f=c.position; c.visibility='hidden'; c.display='block'; c.position='absolute'; a=e.offsetWidth; b=e.offsetHeight; c.display='none'; c.position=f; c.visibility=d
}

//  ---------------------------------------

return{
   w:w, h:h, wb:a, hb:b
}

//  ---------------------------------------

}

//  ---------------------------------------

, getSizeLite:function(a){
return{
   wb:a.offsetWidth||0, hb:a.offsetHeight||0
}

//  ---------------------------------------

}

//  ---------------------------------------

, getClient:function(e){
var h, w, de; if(e){
   w=e.clientWidth; h=e.clientHeight
}

//  ---------------------------------------

else{
   de=document.documentElement; w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth; h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight
}

//  ---------------------------------------

return{
   w:w, h:h
}

//  ---------------------------------------

}

//  ---------------------------------------

, getScroll:function(e){
var t=0, l=0, w=0, h=0, iw=0, ih=0; if(e&&e.nodeName.toLowerCase()!='body'){
   t=e.scrollTop; l=e.scrollLeft; w=e.scrollWidth; h=e.scrollHeight; iw=0; ih=0
}

//  ---------------------------------------

else{
   if(document.documentElement){
      t=document.documentElement.scrollTop; l=document.documentElement.scrollLeft; w=document.documentElement.scrollWidth; h=document.documentElement.scrollHeight
   }
   else if(document.body){
      t=document.body.scrollTop; l=document.body.scrollLeft; w=document.body.scrollWidth; h=document.body.scrollHeight
   }
   iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0; ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0
}

//  ---------------------------------------

return{
   t:t, l:l, w:w, h:h, iw:iw, ih:ih
}

//  ---------------------------------------

}

//  ---------------------------------------

, getMargins:function(e, a){
var c=jQuery(e); var t=c.css('marginTop')||''; var r=c.css('marginRight')||''; var b=c.css('marginBottom')||''; var l=c.css('marginLeft')||''; if(a)return{
   t:parseInt(t)||0, r:parseInt(r)||0, b:parseInt(b)||0, l:parseInt(l)
}

//  ---------------------------------------

; else return{
   t:t, r:r, b:b, l:l
}

//  ---------------------------------------

}

//  ---------------------------------------

, getPadding:function(e, a){
var c=jQuery(e); var t=c.css('paddingTop')||''; var r=c.css('paddingRight')||''; var b=c.css('paddingBottom')||''; var l=c.css('paddingLeft')||''; if(a)return{
   t:parseInt(t)||0, r:parseInt(r)||0, b:parseInt(b)||0, l:parseInt(l)
}

//  ---------------------------------------

; else return{
   t:t, r:r, b:b, l:l
}

//  ---------------------------------------

}

//  ---------------------------------------

, getBorder:function(e, a){
var c=jQuery(e); var t=c.css('borderTopWidth')||''; var r=c.css('borderRightWidth')||''; var b=c.css('borderBottomWidth')||''; var l=c.css('borderLeftWidth')||''; if(a)return{
   t:parseInt(t)||0, r:parseInt(r)||0, b:parseInt(b)||0, l:parseInt(l)||0
}

//  ---------------------------------------

; else return{
   t:t, r:r, b:b, l:l
}

//  ---------------------------------------

}

//  ---------------------------------------

, getPointer:function(a){
var x=a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0; var y=a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0; return{
   x:x, y:y
}

//  ---------------------------------------

}

//  ---------------------------------------

, traverseDOM:function(a, b){
b(a); a=a.firstChild; while(a){
   jQuery.iUtil.traverseDOM(a, b); a=a.nextSibling
}

//  ---------------------------------------

}

//  ---------------------------------------

, purgeEvents:function(c){
jQuery.iUtil.traverseDOM(c, function(a){
   for(var b in a){
      if(typeof a[b]==='function'){
         a[b]=null
      }
   }
}

//  ---------------------------------------

)
}

//  ---------------------------------------

, centerEl:function(a, b){
var c=jQuery.iUtil.getScroll(); var d=jQuery.iUtil.getSize(a); if(!b||b=='vertically')jQuery(a).css({
   top:c.t+((Math.max(c.h, c.ih)-c.t-d.hb)/2)+'px'
}

//  ---------------------------------------

); if(!b||b=='horizontally')jQuery(a).css({
   left:c.l+((Math.max(c.w, c.iw)-c.l-d.wb)/2)+'px'
}

//  ---------------------------------------

)
}

//  ---------------------------------------

, fixPNG:function(a, b){
var c=jQuery('img[@src*="png"]', a||document), png; c.each(function(){
   png=this.src; this.src=b; this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+png+"')"
}

//  ---------------------------------------

)
}

//  ---------------------------------------

}

//  ---------------------------------------

; [].indexOf||(Array.prototype.indexOf=function(v, n){
n=(n==null)?0:n; var m=this.length; for(var i=n; i<m; i++)if(this[i]==v)return i; return-1
}

//  ---------------------------------------

); jQuery.iDrag={
helper:null, dragged:null, destroy:function(){
return this.each(function(){
   if(this.isDraggable){
      this.dragCfg.dhe.unbind('mousedown', jQuery.iDrag.draginit); 
	  this.dragCfg=null; 
	  this.isDraggable=false; 
	  if(jQuery.browser.msie){
         this.unselectable="off"
      }
      else{
         this.style.MozUserSelect=''; this.style.KhtmlUserSelect=''; this.style.userSelect=''
      }
   }
}

//  ---------------------------------------

)
}

//  ---------------------------------------

, draginit:function(e){
if(e.target!=this)
return; 
if(jQuery.iDrag.dragged!=null){
   jQuery.iDrag.dragstop(e); 
   return false
}

//  ---------------------------------------

var a=this.dragElem; 
jQuery(document).bind('mousemove', jQuery.iDrag.dragmove).bind('mouseup', jQuery.iDrag.dragstop); 
a.dragCfg.pointer=jQuery.iUtil.getPointer(e); 
a.dragCfg.currentPointer=a.dragCfg.pointer; 
a.dragCfg.init=false; 
a.dragCfg.fromHandler=this!=this.dragElem; 
jQuery.iDrag.dragged=a; 

if(a.dragCfg.si&&this!=this.dragElem)
{
   parentPos=jQuery.iUtil.getPosition(a.parentNode); 
   sliderSize=jQuery.iUtil.getSize(a); 
   sliderPos={x:parseInt(jQuery.css(a, 'left'))||0, y:parseInt(jQuery.css(a, 'top'))||0};
   dx=a.dragCfg.currentPointer.x-parentPos.x-sliderSize.wb/2-sliderPos.x; 
   dy=a.dragCfg.currentPointer.y-parentPos.y-sliderSize.hb/2-sliderPos.y; 
   jQuery.iSlider.dragmoveBy(a, [dx, dy])}

	return jQuery.selectKeyHelper||false
	
}

//  ---------------------------------------

, dragstart:function(e){
var a=jQuery.iDrag.dragged; 
a.dragCfg.init=true; 
var b=a.style; 
a.dragCfg.oD=jQuery.css(a, 'display'); 
a.dragCfg.oP=jQuery.css(a, 'position'); 
if(!a.dragCfg.initialPosition)
a.dragCfg.initialPosition=a.dragCfg.oP; 
a.dragCfg.oR={x:parseInt(jQuery.css(a, 'left'))||0, y:parseInt(jQuery.css(a, 'top'))||0}; 
a.dragCfg.diffX=0; a.dragCfg.diffY=0; 

if(jQuery.browser.msie)
{
	var c=jQuery.iUtil.getBorder(a, true); 
	a.dragCfg.diffX=c.l||0; 
	a.dragCfg.diffY=c.t||0
}

//  ---------------------------------------

a.dragCfg.oC=jQuery.extend(jQuery.iUtil.getPosition(a), jQuery.iUtil.getSize(a)); 

if(a.dragCfg.oP!='relative'&&a.dragCfg.oP!='absolute'){
   b.position='relative'
}

//  ---------------------------------------

jQuery.iDrag.helper.empty(); 

var d=a.cloneNode(true); 
jQuery(d).css({display:'block', left:'0px', top:'0px'}); 

d.style.marginTop='0'; 
d.style.marginRight='0'; 
d.style.marginBottom='0'; 
d.style.marginLeft='0'; 
jQuery.iDrag.helper.append(d); 
var f=jQuery.iDrag.helper.get(0).style; 

if(a.dragCfg.autoSize){
   f.width='auto'; 
   f.height='auto'
}

//  ---------------------------------------

else{
   f.height=a.dragCfg.oC.hb+'px'; f.width=a.dragCfg.oC.wb+'px'
}

//  ---------------------------------------

f.display='block'; f.marginTop='0px'; f.marginRight='0px'; f.marginBottom='0px'; f.marginLeft='0px'; jQuery.extend(a.dragCfg.oC, jQuery.iUtil.getSize(d)); if(a.dragCfg.cursorAt){
   if(a.dragCfg.cursorAt.left){
      a.dragCfg.oR.x+=a.dragCfg.pointer.x-a.dragCfg.oC.x-a.dragCfg.cursorAt.left; a.dragCfg.oC.x=a.dragCfg.pointer.x-a.dragCfg.cursorAt.left
   }
   if(a.dragCfg.cursorAt.top){
      a.dragCfg.oR.y+=a.dragCfg.pointer.y-a.dragCfg.oC.y-a.dragCfg.cursorAt.top; a.dragCfg.oC.y=a.dragCfg.pointer.y-a.dragCfg.cursorAt.top
   }
   if(a.dragCfg.cursorAt.right){
      a.dragCfg.oR.x+=a.dragCfg.pointer.x-a.dragCfg.oC.x-a.dragCfg.oC.hb+a.dragCfg.cursorAt.right; a.dragCfg.oC.x=a.dragCfg.pointer.x-a.dragCfg.oC.wb+a.dragCfg.cursorAt.right
   }
   if(a.dragCfg.cursorAt.bottom){
      a.dragCfg.oR.y+=a.dragCfg.pointer.y-a.dragCfg.oC.y-a.dragCfg.oC.hb+a.dragCfg.cursorAt.bottom; a.dragCfg.oC.y=a.dragCfg.pointer.y-a.dragCfg.oC.hb+a.dragCfg.cursorAt.bottom
   }
}

//  ---------------------------------------

a.dragCfg.nx=a.dragCfg.oR.x; a.dragCfg.ny=a.dragCfg.oR.y; if(a.dragCfg.insideParent||a.dragCfg.containment=='parent'){
   parentBorders=jQuery.iUtil.getBorder(a.parentNode, true); a.dragCfg.oC.x=a.offsetLeft+(jQuery.browser.msie?0:jQuery.browser.opera?-parentBorders.l:parentBorders.l); a.dragCfg.oC.y=a.offsetTop+(jQuery.browser.msie?0:jQuery.browser.opera?-parentBorders.t:parentBorders.t); jQuery(a.parentNode).append(jQuery.iDrag.helper.get(0))
}

//  ---------------------------------------

if(a.dragCfg.containment){
   jQuery.iDrag.getContainment(a); a.dragCfg.onDragModifier.containment=jQuery.iDrag.fitToContainer
}

//  ---------------------------------------

if(a.dragCfg.si){
   jQuery.iSlider.modifyContainer(a)
}

//  ---------------------------------------

f.left=a.dragCfg.oC.x-a.dragCfg.diffX+'px'; f.top=a.dragCfg.oC.y-a.dragCfg.diffY+'px'; f.width=a.dragCfg.oC.wb+'px'; f.height=a.dragCfg.oC.hb+'px'; jQuery.iDrag.dragged.dragCfg.prot=false; if(a.dragCfg.gx){
   a.dragCfg.onDragModifier.grid=jQuery.iDrag.snapToGrid
}

//  ---------------------------------------

if(a.dragCfg.zIndex!=false){
   jQuery.iDrag.helper.css('zIndex', a.dragCfg.zIndex)
}

//  ---------------------------------------

if(a.dragCfg.opacity){
   jQuery.iDrag.helper.css('opacity', a.dragCfg.opacity); if(window.ActiveXObject){
      jQuery.iDrag.helper.css('filter', 'alpha(opacity='+a.dragCfg.opacity*100+')')
   }
}

//  ---------------------------------------

if(a.dragCfg.frameClass){
   jQuery.iDrag.helper.addClass(a.dragCfg.frameClass); jQuery.iDrag.helper.get(0).firstChild.style.display='none'
}

//  ---------------------------------------

if(a.dragCfg.onStart)a.dragCfg.onStart.apply(a, [d, a.dragCfg.oR.x, a.dragCfg.oR.y]); if(jQuery.iDrop&&jQuery.iDrop.count>0){
   jQuery.iDrop.highlight(a)
}

//  ---------------------------------------

if(a.dragCfg.ghosting==false){
   b.display='none'
}

//  ---------------------------------------

return false
}

//  ---------------------------------------

, getContainment:function(a){
if(a.dragCfg.containment.constructor==String){
   if(a.dragCfg.containment=='parent'){
      a.dragCfg.cont=jQuery.extend({
         x:0, y:0
      }
      , jQuery.iUtil.getSize(a.parentNode)); var b=jQuery.iUtil.getBorder(a.parentNode, true); a.dragCfg.cont.w=a.dragCfg.cont.wb-b.l-b.r; a.dragCfg.cont.h=a.dragCfg.cont.hb-b.t-b.b
   }
   else if(a.dragCfg.containment=='document'){
      var c=jQuery.iUtil.getClient(); a.dragCfg.cont={
         x:0, y:0, w:c.w, h:c.h
      }
   }
}

//  ---------------------------------------

else if(a.dragCfg.containment.constructor==Array){
   a.dragCfg.cont={
      x:parseInt(a.dragCfg.containment[0])||0, y:parseInt(a.dragCfg.containment[1])||0, w:parseInt(a.dragCfg.containment[2])||0, h:parseInt(a.dragCfg.containment[3])||0
   }
}

//  ---------------------------------------

a.dragCfg.cont.dx=a.dragCfg.cont.x-a.dragCfg.oC.x; a.dragCfg.cont.dy=a.dragCfg.cont.y-a.dragCfg.oC.y
}

//  ---------------------------------------

, hidehelper:function(a){
if(a.dragCfg.insideParent||a.dragCfg.containment=='parent'){
   jQuery('body', document).append(jQuery.iDrag.helper.get(0))
}

//  ---------------------------------------

jQuery.iDrag.helper.empty().hide().css('opacity', 1); if(window.ActiveXObject){
   jQuery.iDrag.helper.css('filter', 'alpha(opacity=100)')
}

//  ---------------------------------------

}

//  ---------------------------------------

, dragstop:function(e){
jQuery(document).unbind('mousemove', jQuery.iDrag.dragmove).unbind('mouseup', jQuery.iDrag.dragstop); 
if(jQuery.iDrag.dragged==null){
   return
}

//  ---------------------------------------

var a=jQuery.iDrag.dragged; jQuery.iDrag.dragged=null; if(a.dragCfg.init==false){
   return false
}

//  ---------------------------------------

if(a.dragCfg.so==true){
   jQuery(a).css('position', a.dragCfg.oP)
}

//  ---------------------------------------

var b=a.style; if(a.si){
   jQuery.iDrag.helper.css('cursor', 'move')
}

//  ---------------------------------------

if(a.dragCfg.frameClass){
   jQuery.iDrag.helper.removeClass(a.dragCfg.frameClass)
}

//  ---------------------------------------

if(a.dragCfg.revert==false){
   if(a.dragCfg.fx>0){
      if(!a.dragCfg.axis||a.dragCfg.axis=='horizontally'){
         var x=new jQuery.fx(a, {
            duration:a.dragCfg.fx
         }
         , 'left'); x.custom(a.dragCfg.oR.x, a.dragCfg.nRx)
      }
      if(!a.dragCfg.axis||a.dragCfg.axis=='vertically'){
         var y=new jQuery.fx(a, {
            duration:a.dragCfg.fx
         }
         , 'top'); y.custom(a.dragCfg.oR.y, a.dragCfg.nRy)
      }
   }
   else{
      if(!a.dragCfg.axis||a.dragCfg.axis=='horizontally')a.style.left=a.dragCfg.nRx+'px'; if(!a.dragCfg.axis||a.dragCfg.axis=='vertically')a.style.top=a.dragCfg.nRy+'px'
   }
   jQuery.iDrag.hidehelper(a); if(a.dragCfg.ghosting==false){
      jQuery(a).css('display', a.dragCfg.oD)
   }
}

//  ---------------------------------------

else if(a.dragCfg.fx>0){
   a.dragCfg.prot=true; var c=false; if(jQuery.iDrop&&jQuery.iSort&&a.dragCfg.so){
      c=jQuery.iUtil.getPosition(jQuery.iSort.helper.get(0))
   }
   jQuery.iDrag.helper.animate({
      left:c?c.x:a.dragCfg.oC.x, top:c?c.y:a.dragCfg.oC.y
   }
   , a.dragCfg.fx, function(){
      a.dragCfg.prot=false; if(a.dragCfg.ghosting==false){
         a.style.display=a.dragCfg.oD
      }
      jQuery.iDrag.hidehelper(a)
   }
   )
}

//  ---------------------------------------

else{
   jQuery.iDrag.hidehelper(a); if(a.dragCfg.ghosting==false){
      jQuery(a).css('display', a.dragCfg.oD)
   }
}

//  ---------------------------------------

if(jQuery.iDrop&&jQuery.iDrop.count>0){
   jQuery.iDrop.checkdrop(a)
}

//  ---------------------------------------

if(jQuery.iSort&&a.dragCfg.so){
   jQuery.iSort.check(a)
}

//  ---------------------------------------

if(a.dragCfg.onChange&&(a.dragCfg.nRx!=a.dragCfg.oR.x||a.dragCfg.nRy!=a.dragCfg.oR.y)){
   a.dragCfg.onChange.apply(a, a.dragCfg.lastSi||[0, 0, a.dragCfg.nRx, a.dragCfg.nRy])
}

//  ---------------------------------------

if(a.dragCfg.onStop)a.dragCfg.onStop.apply(a); return false
}

//  ---------------------------------------

, snapToGrid:function(x, y, a, b){
if(a!=0)a=parseInt((a+(this.dragCfg.gx*a/Math.abs(a))/2)/this.dragCfg.gx)*this.dragCfg.gx; if(b!=0)b=parseInt((b+(this.dragCfg.gy*b/Math.abs(b))/2)/this.dragCfg.gy)*this.dragCfg.gy; return{
   dx:a, dy:b, x:0, y:0
}

//  ---------------------------------------

}

//  ---------------------------------------

, fitToContainer:function(x, y, a, b){
a=Math.min(Math.max(a, this.dragCfg.cont.dx), this.dragCfg.cont.w+this.dragCfg.cont.dx-this.dragCfg.oC.wb); b=Math.min(Math.max(b, this.dragCfg.cont.dy), this.dragCfg.cont.h+this.dragCfg.cont.dy-this.dragCfg.oC.hb); return{
   dx:a, dy:b, x:0, y:0
}

//  ---------------------------------------

}

//  ---------------------------------------

, dragmove:function(e){
if(jQuery.iDrag.dragged==null||jQuery.iDrag.dragged.dragCfg.prot==true){
   return
}

//  ---------------------------------------

var a=jQuery.iDrag.dragged; 
a.dragCfg.currentPointer=jQuery.iUtil.getPointer(e); 
if(a.dragCfg.init==false){
   distance=Math.sqrt(Math.pow(a.dragCfg.pointer.x-a.dragCfg.currentPointer.x, 2)+Math.pow(a.dragCfg.pointer.y-a.dragCfg.currentPointer.y, 2));
   if(distance<a.dragCfg.snapDistance){
      return
   }
   else{
      jQuery.iDrag.dragstart(e)
   }
}

//  ---------------------------------------

var b=a.dragCfg.currentPointer.x-a.dragCfg.pointer.x; var c=a.dragCfg.currentPointer.y-a.dragCfg.pointer.y; 
for(var i in a.dragCfg.onDragModifier){
   var d=a.dragCfg.onDragModifier[i].apply(a, [a.dragCfg.oR.x+b, a.dragCfg.oR.y+c, b, c]); 
   if(d&&d.constructor==Object){
      b=i!='user'?d.dx:(d.x-a.dragCfg.oR.x); c=i!='user'?d.dy:(d.y-a.dragCfg.oR.y)
   }
}

//  ---------------------------------------

a.dragCfg.nx=a.dragCfg.oC.x+b-a.dragCfg.diffX; a.dragCfg.ny=a.dragCfg.oC.y+c-a.dragCfg.diffY; if(a.dragCfg.si&&(a.dragCfg.onSlide||a.dragCfg.onChange)){
   jQuery.iSlider.onSlide(a, a.dragCfg.nx, a.dragCfg.ny)
}

//  ---------------------------------------

if(a.dragCfg.onDrag)a.dragCfg.onDrag.apply(a, [a.dragCfg.oR.x+b, a.dragCfg.oR.y+c]); if(!a.dragCfg.axis||a.dragCfg.axis=='horizontally'){
   a.dragCfg.nRx=a.dragCfg.oR.x+b; jQuery.iDrag.helper.get(0).style.left=a.dragCfg.nx+'px'
}

//  ---------------------------------------

if(!a.dragCfg.axis||a.dragCfg.axis=='vertically'){
   a.dragCfg.nRy=a.dragCfg.oR.y+c; jQuery.iDrag.helper.get(0).style.top=a.dragCfg.ny+'px'
}

//  ---------------------------------------

if(jQuery.iDrop&&jQuery.iDrop.count>0){
   jQuery.iDrop.checkhover(a)
}

//  ---------------------------------------

return false
}

//  ---------------------------------------

, build:function(o){
if(!jQuery.iDrag.helper){
   jQuery('body', document).append('<div id="dragHelper"></div>'); jQuery.iDrag.helper=jQuery('#dragHelper'); var c=jQuery.iDrag.helper.get(0); var d=c.style; d.position='absolute'; d.display='none'; d.cursor='move'; d.listStyle='none'; d.overflow='hidden'; if(window.ActiveXObject){
      c.unselectable="on"
   }
   else{
      d.mozUserSelect='none'; d.userSelect='none'; d.KhtmlUserSelect='none'
   }
}

//  ---------------------------------------

if(!o){
   o={
   }
}

//  ---------------------------------------

return this.each(function(){
   if(this.isDraggable||!jQuery.iUtil)return; if(window.ActiveXObject){
      this.onselectstart=function(){
         return false
      }
      ; this.ondragstart=function(){
         return false
      }
   }
   var a=this; var b=o.handle?jQuery(this).find(o.handle):jQuery(this); if(jQuery.browser.msie){
      b.each(function(){
         this.unselectable="on"
      }
      )
   }
   else{
      b.css('-moz-user-select', 'none'); b.css('user-select', 'none'); b.css('-khtml-user-select', 'none')
   }
   this.dragCfg={
      dhe:b, revert:o.revert?true:false, ghosting:o.ghosting?true:false, so:o.so?o.so:false, si:o.si?o.si:false, insideParent:o.insideParent?o.insideParent:false, zIndex:o.zIndex?parseInt(o.zIndex)||0:false, opacity:o.opacity?parseFloat(o.opacity):false, fx:parseInt(o.fx)||null, hpc:o.hpc?o.hpc:false, onDragModifier:{
      }
      , pointer:{
      }
      , onStart:o.onStart&&o.onStart.constructor==Function?o.onStart:false, onStop:o.onStop&&o.onStop.constructor==Function?o.onStop:false, onChange:o.onChange&&o.onChange.constructor==Function?o.onChange:false, axis:/vertically|horizontally/.test(o.axis)?o.axis:false, snapDistance:o.snapDistance?parseInt(o.snapDistance)||0:0, cursorAt:o.cursorAt?o.cursorAt:false, autoSize:o.autoSize?true:false, frameClass:o.frameClass||false
   }
   ; if(o.onDragModifier&&o.onDragModifier.constructor==Function)this.dragCfg.onDragModifier.user=o.onDragModifier; if(o.onDrag&&o.onDrag.constructor==Function)this.dragCfg.onDrag=o.onDrag; if(o.containment&&((o.containment.constructor==String&&(o.containment=='parent'||o.containment=='document'))||(o.containment.constructor==Array&&o.containment.length==4))){
      this.dragCfg.containment=o.containment
   }
   if(o.fractions){
      this.dragCfg.fractions=o.fractions
   }
   if(o.grid){
      if(typeof o.grid=='number'){
         this.dragCfg.gx=parseInt(o.grid)||1; this.dragCfg.gy=parseInt(o.grid)||1
      }
      else if(o.grid.length==2){
         this.dragCfg.gx=parseInt(o.grid[0])||1; this.dragCfg.gy=parseInt(o.grid[1])||1
      }
   }
   if(o.onSlide&&o.onSlide.constructor==Function){
      this.dragCfg.onSlide=o.onSlide
   }
   this.isDraggable=true; b.each(function(){
      this.dragElem=a
   }
   ); b.bind('mousedown', jQuery.iDrag.draginit)
}

//  ---------------------------------------

)
}

//  ---------------------------------------

}

//  ---------------------------------------

; jQuery.fn.extend({
DraggableDestroy:jQuery.iDrag.destroy, Draggable:jQuery.iDrag.build
}

//  ---------------------------------------

); jQuery.iDrop={
fit:function(a, b, c, d){
return a<=jQuery.iDrag.dragged.dragCfg.nx&&(a+c)>=(jQuery.iDrag.dragged.dragCfg.nx+jQuery.iDrag.dragged.dragCfg.oC.w)&&b<=jQuery.iDrag.dragged.dragCfg.ny&&(b+d)>=(jQuery.iDrag.dragged.dragCfg.ny+jQuery.iDrag.dragged.dragCfg.oC.h)?true:false
}

//  ---------------------------------------

, intersect:function(a, b, c, d){
return!(a>(jQuery.iDrag.dragged.dragCfg.nx+jQuery.iDrag.dragged.dragCfg.oC.w)||(a+c)<jQuery.iDrag.dragged.dragCfg.nx||b>(jQuery.iDrag.dragged.dragCfg.ny+jQuery.iDrag.dragged.dragCfg.oC.h)||(b+d)<jQuery.iDrag.dragged.dragCfg.ny)?true:false
}

//  ---------------------------------------

, pointer:function(a, b, c, d){
return a<jQuery.iDrag.dragged.dragCfg.currentPointer.x&&(a+c)>jQuery.iDrag.dragged.dragCfg.currentPointer.x&&b<jQuery.iDrag.dragged.dragCfg.currentPointer.y&&(b+d)>jQuery.iDrag.dragged.dragCfg.currentPointer.y?true:false
}

//  ---------------------------------------

, overzone:false, highlighted:{
}

//  ---------------------------------------

, count:0, zones:{
}

//  ---------------------------------------

, highlight:function(a){
if(jQuery.iDrag.dragged==null){
   return
}

//  ---------------------------------------

var i; jQuery.iDrop.highlighted={
}

//  ---------------------------------------

; var b=false; for(i in jQuery.iDrop.zones){
   if(jQuery.iDrop.zones[i]!=null){
      var c=jQuery.iDrop.zones[i].get(0); if(jQuery(jQuery.iDrag.dragged).is('.'+c.dropCfg.a)){
         if(c.dropCfg.m==false){
            c.dropCfg.p=jQuery.extend(jQuery.iUtil.getPositionLite(c), jQuery.iUtil.getSizeLite(c)); c.dropCfg.m=true
         }
         if(c.dropCfg.ac){
            jQuery.iDrop.zones[i].addClass(c.dropCfg.ac)
         }
         jQuery.iDrop.highlighted[i]=jQuery.iDrop.zones[i]; if(jQuery.iSort&&c.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){
            c.dropCfg.el=jQuery('.'+c.dropCfg.a, c); a.style.display='none'; 
			jQuery.iSort.measure(c); c.dropCfg.os=jQuery.iSort.serialize(jQuery.attr(c, 'id')).hash; a.style.display=a.dragCfg.oD; b=true
         }
         if(c.dropCfg.onActivate){
            c.dropCfg.onActivate.apply(jQuery.iDrop.zones[i].get(0), [jQuery.iDrag.dragged])
         }
      }
   }
}

//  ---------------------------------------

if(b){
   jQuery.iSort.start()
}

//  ---------------------------------------

}

//  ---------------------------------------

, remeasure:function(){
jQuery.iDrop.highlighted={
}

//  ---------------------------------------

; for(i in jQuery.iDrop.zones){
   if(jQuery.iDrop.zones[i]!=null){
      var a=jQuery.iDrop.zones[i].get(0); if(jQuery(jQuery.iDrag.dragged).is('.'+a.dropCfg.a)){
         a.dropCfg.p=jQuery.extend(jQuery.iUtil.getPositionLite(a), jQuery.iUtil.getSizeLite(a)); if(a.dropCfg.ac){
            jQuery.iDrop.zones[i].addClass(a.dropCfg.ac)
         }
         jQuery.iDrop.highlighted[i]=jQuery.iDrop.zones[i]; if(jQuery.iSort&&a.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){
            a.dropCfg.el=jQuery('.'+a.dropCfg.a, a); elm.style.display='none'; jQuery.iSort.measure(a); elm.style.display=elm.dragCfg.oD
         }
      }
   }
}

//  ---------------------------------------

}

//  ---------------------------------------

, checkhover:function(e){
if(jQuery.iDrag.dragged==null){
   return
}

//  ---------------------------------------

jQuery.iDrop.overzone=false; var i; var a=false; var b=0; for(i in jQuery.iDrop.highlighted){
   var c=jQuery.iDrop.highlighted[i].get(0); if(jQuery.iDrop.overzone==false&&jQuery.iDrop[c.dropCfg.t](c.dropCfg.p.x, c.dropCfg.p.y, c.dropCfg.p.wb, c.dropCfg.p.hb)){
      if(c.dropCfg.hc&&c.dropCfg.h==false){
         jQuery.iDrop.highlighted[i].addClass(c.dropCfg.hc)
      }
      if(c.dropCfg.h==false&&c.dropCfg.onHover){
         a=true
      }
      c.dropCfg.h=true; jQuery.iDrop.overzone=c; if(jQuery.iSort&&c.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){
         jQuery.iSort.helper.get(0).className=c.dropCfg.shc; jQuery.iSort.checkhover(c)
      }
      b++
   }
   else if(c.dropCfg.h==true){
      if(c.dropCfg.onOut){
         c.dropCfg.onOut.apply(c, [e, jQuery.iDrag.helper.get(0).firstChild, c.dropCfg.fx])
      }
      if(c.dropCfg.hc){
         jQuery.iDrop.highlighted[i].removeClass(c.dropCfg.hc)
      }
      c.dropCfg.h=false
   }
}

//  ---------------------------------------

if(jQuery.iSort&&!jQuery.iDrop.overzone&&jQuery.iDrag.dragged.so){
   jQuery.iSort.helper.get(0).style.display='none'
}

//  ---------------------------------------

if(a){
   jQuery.iDrop.overzone.dropCfg.onHover.apply(jQuery.iDrop.overzone, [e, jQuery.iDrag.helper.get(0).firstChild])
}

//  ---------------------------------------

}

//  ---------------------------------------

, checkdrop:function(e){
var i; for(i in jQuery.iDrop.highlighted){
   var a=jQuery.iDrop.highlighted[i].get(0); if(a.dropCfg.ac){
      jQuery.iDrop.highlighted[i].removeClass(a.dropCfg.ac)
   }
   if(a.dropCfg.hc){
      jQuery.iDrop.highlighted[i].removeClass(a.dropCfg.hc)
   }
   if(a.dropCfg.s){
      jQuery.iSort.changed[jQuery.iSort.changed.length]=i
   }
   if(a.dropCfg.onDrop&&a.dropCfg.h==true){
      a.dropCfg.h=false; a.dropCfg.onDrop.apply(a, [e, a.dropCfg.fx])
   }
   a.dropCfg.m=false; a.dropCfg.h=false
}

//  ---------------------------------------

jQuery.iDrop.highlighted={
}

//  ---------------------------------------

}

//  ---------------------------------------

, destroy:function(){
return this.each(function(){
   if(this.isDroppable){
      if(this.dropCfg.s){
         id=jQuery.attr(this, 'id'); jQuery.iSort.collected[id]=null; jQuery('.'+this.dropCfg.a, this).DraggableDestroy()
      }
      jQuery.iDrop.zones['d'+this.idsa]=null; this.isDroppable=false; this.f=null
   }
}

//  ---------------------------------------

)
}

//  ---------------------------------------

, build:function(o){
return this.each(function(){
   if(this.isDroppable==true||!o.accept||!jQuery.iUtil||!jQuery.iDrag){
      return
   }
   this.dropCfg={
      a:o.accept, ac:o.activeclass||false, hc:o.hoverclass||false, shc:o.helperclass||false, onDrop:o.ondrop||o.onDrop||false, onHover:o.onHover||o.onhover||false, onOut:o.onOut||o.onout||false, onActivate:o.onActivate||false, t:o.tolerance&&(o.tolerance=='fit'||o.tolerance=='intersect')?o.tolerance:'pointer', fx:o.fx?o.fx:false, m:false, h:false
   }
   ; if(o.sortable==true&&jQuery.iSort){
      id=jQuery.attr(this, 'id'); jQuery.iSort.collected[id]=this.dropCfg.a; this.dropCfg.s=true; if(o.onChange){
         this.dropCfg.onChange=o.onChange;
		 this.dropCfg.os=jQuery.iSort.serialize(id).hash
      }
   }
   this.isDroppable=true; this.idsa=parseInt(Math.random()*10000); jQuery.iDrop.zones['d'+this.idsa]=jQuery(this); jQuery.iDrop.count++
}

//  ---------------------------------------

)
}

//  ---------------------------------------

}

//  ---------------------------------------

; jQuery.fn.extend({
DroppableDestroy:jQuery.iDrop.destroy, Droppable:jQuery.iDrop.build
}

//  ---------------------------------------

); jQuery.recallDroppables=jQuery.iDrop.remeasure; jQuery.iSort={
changed:[], collected:{
}

//  ---------------------------------------

, helper:false, inFrontOf:null, start:function(){
if(jQuery.iDrag.dragged==null){
   return
}

//  ---------------------------------------

var a, margins, c, cs; jQuery.iSort.helper.get(0).className=jQuery.iDrag.dragged.dragCfg.hpc; a=jQuery.iSort.helper.get(0).style; a.display='block'; jQuery.iSort.helper.oC=jQuery.extend(jQuery.iUtil.getPosition(jQuery.iSort.helper.get(0)), jQuery.iUtil.getSize(jQuery.iSort.helper.get(0))); a.height=jQuery.iDrag.dragged.dragCfg.oC.hb+'px'; if(jQuery.iDrag.dragged.dragCfg.ghosting==true){
   c=jQuery.iDrag.dragged.cloneNode(true); cs=c.style; cs.marginTop='0px'; cs.marginRight='0px'; cs.marginBottom='0px'; cs.marginLeft='0px'; cs.display='block'; jQuery.iSort.helper.empty().append(c)
}

//  ---------------------------------------

jQuery(jQuery.iDrag.dragged).after(jQuery.iSort.helper.get(0)); jQuery.iDrag.dragged.style.display='none'
}

//  ---------------------------------------

, check:function(e){
if(!e.dragCfg.so&&jQuery.iDrop.overzone.sortable){
   if(e.dragCfg.onStop)e.dragCfg.onStop.apply(dragged); jQuery(e).css('position', e.dragCfg.initialPosition||e.dragCfg.oP); jQuery(jQuery.iDrop.overzone).SortableAddItem(e)
}

//  ---------------------------------------

jQuery.iSort.helper.removeClass(e.dragCfg.hpc).html('&nbsp;'); jQuery.iSort.inFrontOf=null; var a=jQuery.iSort.helper.get(0).style; a.display='none'; jQuery.iSort.helper.after(e); if(e.dragCfg.fx>0){
   jQuery(e).fadeIn(e.dragCfg.fx)
}

//  ---------------------------------------

jQuery('body').append(jQuery.iSort.helper.get(0)); var b=[]; var c=false; for(var i=0; i<jQuery.iSort.changed.length; i++){
   var d=jQuery.iDrop.zones[jQuery.iSort.changed[i]].get(0); var f=jQuery.attr(d, 'id'); var g=jQuery.iSort.serialize(f); if(d.dropCfg.os!=g.hash){
      d.dropCfg.os=g.hash; if(c==false&&d.dropCfg.onChange){
         c=d.dropCfg.onChange
      }
      g.id=f; b[b.length]=g
   }
}

//  ---------------------------------------

jQuery.iSort.changed=[]; if(c!=false&&b.length>0){
   c(b)
}

//  ---------------------------------------

}

//  ---------------------------------------

, checkhover:function(e, o){
if(!jQuery.iDrag.dragged)return; var a=false; var i=0; if(e.dropCfg.el.size()>0){
   for(i=e.dropCfg.el.size(); i>0; i--){
      if(e.dropCfg.el.get(i-1)!=jQuery.iDrag.dragged){
         if(!e.sortCfg.floats){
            if((e.dropCfg.el.get(i-1).pos.y+e.dropCfg.el.get(i-1).pos.hb/2)>jQuery.iDrag.dragged.dragCfg.ny){
               a=e.dropCfg.el.get(i-1)
            }
            else{
               break
            }
         }
         else{
            if((e.dropCfg.el.get(i-1).pos.x+e.dropCfg.el.get(i-1).pos.wb/2)>jQuery.iDrag.dragged.dragCfg.nx&&(e.dropCfg.el.get(i-1).pos.y+e.dropCfg.el.get(i-1).pos.hb/2)>jQuery.iDrag.dragged.dragCfg.ny){
               a=e.dropCfg.el.get(i-1)
            }
         }
      }
   }
}

//  ---------------------------------------

if(a&&jQuery.iSort.inFrontOf!=a){
   jQuery.iSort.inFrontOf=a; jQuery(a).before(jQuery.iSort.helper.get(0))
}

//  ---------------------------------------

else if(!a&&(jQuery.iSort.inFrontOf!=null||jQuery.iSort.helper.get(0).parentNode!=e)){
   jQuery.iSort.inFrontOf=null; jQuery(e).append(jQuery.iSort.helper.get(0))
}

//  ---------------------------------------

jQuery.iSort.helper.get(0).style.display='block'
}

//  ---------------------------------------

, measure:function(e){
if(jQuery.iDrag.dragged==null){
   return
}

//  ---------------------------------------

e.dropCfg.el.each(function(){
   this.pos=jQuery.extend(jQuery.iUtil.getSizeLite(this), jQuery.iUtil.getPositionLite(this))
}

//  ---------------------------------------

)
}

//  ---------------------------------------

, serialize:function(a){
var b=[];
var k=[], 
l=0; 
var o={}; 

if(a){
   var c=document.getElementById(a); 
   var d=c.childNodes; 
   o[a]=[]; 
   for(var j=0; j<d.length; j++){
    var k=[], l=0; if(d[j].id){
         k[l++]=a; k[l++]=d[j].id; 
		 o[a][o[a].length]=d[j].id; 
		 b[b.length]=k.join('[]=')
      }
   }
}else{

if(Homepage.p == "Home"){
   var e=['hpColOne', 'hpColTwo', 'hpColThree']; 
   var colcnt = 0;
   var breakcnt = 0;
   var toSave = '';
     //vinci edit remember cookie
   for(var i=0; i<3; i++){
	  
	var c=document.getElementById(e[i]); 
	//vnow
	  var d=c.childNodes;
	  //Loop Column for menu boxes
	  if(d.length>0){
		for(var j=0; j<d.length; j++)
	  	{
			//var openclose=$(this).is('.hpCollapsed')?'Open':'Close';
			//alert(openclose);
			
			if(breakcnt < i)
			{
				if(breakcnt>0){
					Homepage.cols[colcnt] = '**';	
				}else{
					Homepage.cols[colcnt] = '*';
				}
				colcnt++;
				breakcnt++;
			}
			Homepage.cols[colcnt] = d[j].id;
			colcnt++;	
      	}
	  }else{//if none in the column add next hpColTwo or hpColThree
		  if(breakcnt>0){
			  Homepage.cols[colcnt] = '**';
		  }else{
			  Homepage.cols[colcnt] = '*';
		  }
		  colcnt++;
		  breakcnt++;
	  }
   }
 
   for(var m=0; m<colcnt;m++){
		toSave+=Homepage.cols[m];
		if(m<(colcnt-1))
		{
			toSave+=",";
		}
   }
   setCookie('colsetup',toSave,365);
}
}

hash=b.join('&'); 
return{hash:hash, o:o}

}

//  ---------------------------------------

, addItem:function(e){
if(!e.childNodes){
   return
}

//  ---------------------------------------

return this.each(function(){
   if(!this.sortCfg||!jQuery(e).is('.'+this.sortCfg.accept))jQuery(e).addClass(this.sortCfg.accept); jQuery(e).Draggable(this.sortCfg.dragCfg)
}

//  ---------------------------------------

)
}

//  ---------------------------------------

, destroy:function(){
return this.each(function(){
   jQuery('.'+this.sortCfg.accept).DraggableDestroy(); jQuery(this).DroppableDestroy(); this.sortCfg=null; this.isSortable=null
}

//  ---------------------------------------

)
}

//  ---------------------------------------

, build:function(o){
if(o.accept&&jQuery.iUtil&&jQuery.iDrag&&jQuery.iDrop){
   if(!jQuery.iSort.helper){
      jQuery('body', document).append('<div id="sortHelper"><div class="box">&nbsp;</div></div>'); jQuery.iSort.helper=jQuery('#sortHelper'); jQuery.iSort.helper.get(0).style.display='none'
   }
   this.Droppable({
      accept:o.accept, activeclass:o.activeclass?o.activeclass:false, hoverclass:o.hoverclass?o.hoverclass:false, helperclass:o.helperclass?o.helperclass:false, onHover:o.onHover||o.onhover, onOut:o.onOut||o.onout, sortable:true, onChange:o.onChange||o.onchange, fx:o.fx?o.fx:false, ghosting:o.ghosting?true:false, tolerance:o.tolerance?o.tolerance:'intersect'
   }
   ); return this.each(function(){
      var a={
         revert:o.revert?true:false, zindex:3000, opacity:o.opacity?parseFloat(o.opacity):false, hpc:o.helperclass?o.helperclass:false, fx:o.fx?o.fx:false, so:true, ghosting:o.ghosting?true:false, handle:o.handle?o.handle:null, containment:o.containment?o.containment:null, onStart:o.onStart&&o.onStart.constructor==Function?o.onStart:false, onDrag:o.onDrag&&o.onDrag.constructor==Function?o.onDrag:false, onStop:o.onStop&&o.onStop.constructor==Function?o.onStop:false, axis:/vertically|horizontally/.test(o.axis)?o.axis:false, snapDistance:o.snapDistance?parseInt(o.snapDistance)||0:false, cursorAt:o.cursorAt?o.cursorAt:false
      }
      ; jQuery('.'+o.accept, this).Draggable(a); this.isSortable=true; this.sortCfg={
         accept:o.accept, revert:o.revert?true:false, zindex:3000, opacity:o.opacity?parseFloat(o.opacity):false, hpc:o.helperclass?o.helperclass:false, fx:o.fx?o.fx:false, so:true, ghosting:o.ghosting?true:false, handle:o.handle?o.handle:null, containment:o.containment?o.containment:null, floats:o.floats?true:false, dragCfg:a
      }
   }
   )
}



}



}



; 
jQuery.fn.extend({Sortable:jQuery.iSort.build, SortableAddItem:jQuery.iSort.addItem, SortableDestroy:jQuery.iSort.destroy});
jQuery.SortSerialize=jQuery.iSort.serialize; 

/*var Homepage={OptionsCustomiseOpen:false, OptionsLocalOpen:false, EnhancePage:function(){Homepage.Cookie.Apply(); Homepage.Add.Collapsables(); Homepage.Add.Sortables(); Homepage.Add.EditYourHomePage(); Homepage.UE.FeedSelection(); Homepage.UE.ColourSelection(); Homepage.Add.StationListings(); Homepage.Add.TvTabs(); Homepage.Add.LargeQuotes(); Homepage.Add.FeedControls(); Homepage.Add.FeatureSlides(); Homepage.Add.newsSlides(); Homepage.EditBox.Toggle(); Homepage.Add.Userfeedback(); Homepage.Add.RevealAll(); Homepage.Popups.Add(); Homepage.Localise.SetEvents(); Homepage.Add.HeadingHover()}
*/

var Homepage={OptionsCustomiseOpen:false, OptionsLocalOpen:false, EnhancePage:function(){Homepage.Cookie.Apply(); Homepage.Add.Collapsables();Homepage.Add.Sortables();}





//  ---------------------------------------

, Add:{
HeadingHover:function(){
   $('div.hpMod h2').bind("mouseover", function(e){
      if(e.target!=this)return; var a=this; Homepage.Timer=setTimeout(function(){
         Homepage.Add.Highlighter(a)
      }
      , 800)
   }
   ).bind("mouseout", function(e){
      clearTimeout(Homepage.Timer); Homepage.Add.UnHighlighter(this)
   }
   ).bind("mousedown", function(e){
      clearTimeout(Homepage.Timer); if(e.target!=this)return; if(!$(this).parents('.hoverState').get(0))Homepage.Add.Highlighter(this)
   }
   ).bind("mouseup", function(e){
      clearTimeout(Homepage.Timer); Homepage.Add.UnHighlighter(this)
   }
   )
}

//  ---------------------------------------

, Highlighter:function(a){
   $(a).parents('.hpMod').addClass('hoverState').prepend('<div class="hoverCorners top"></div><div class="hoverCorners bottom"></div>')
}

//  ---------------------------------------

, UnHighlighter:function(a){
   $(a).parents('.hpMod').removeClass('hoverState').children('div.hoverCorners').remove()
}

//  ---------------------------------------

, Sortables:function(){
   $('div.hpCol').Sortable({
      accept:'hpMod', helperclass:'hpSortHelper', handle:'h2', revert:true, tolerance:'pointer', onStart:function(e){
		 Homepage.Userfeedback.CloseAll(); 
		 Homepage.UE.ColHeights()
      }
      , onStop:function(){
         Homepage.Cookie.Set();
		 $('.hpCol').removeAttr('style')
      }
   }
   )
}

//  ---------------------------------------

, Collapsables:function(f){
   if(!f){
	   	$('#hpDirectory').prepend('<p class="dirCollapse"><a href="#occ"><span class="hide">Collapse the directory</span></a></p>');
		$('#hpDirectory p.dirCollapse a').bind("click", function(e){$('#hpDirectory').toggleClass('dirCollapsed');return false}); 
		f='div.hpMod'
	}
   $(f).each(function(b, c){
    //vinciworks edit 2008
	var testPage;
	var cpageVal;
	var t = this.getElementsByTagName("input");
	if(t.length==1){
		testPage = t[0].value;
		cpageVal = t[0].id;
	}
	var x=$(this).find('div.utils'); 
	var d=$(this).is('.hpCollapsed')?'Open':'Close';
	if(cpageVal!="shevron"){
		//this is for the little orange icon ' (display if not a shevron)
		x.append('<p class="collapse"><a href="#occ"><span class="hide">'+d+' the '+$(this).find('h2').text()+' box</span></a></p>'); 
	}
	//vinci
	if(Homepage.p != testPage && Homepage.p != "Home" && Homepage.cpage != testPage){//Close all pages other than variable testPage
		$(this).find('div.options:visible').slideUp().end().toggleClass('hpCollapsed').children('.hpSet').slideToggle().end();
	}else{
		//edit out close div tags
		//$(this).find('div.options:visible').slideUp().end().toggleClass('hpCollapsed').children('.hpSet').slideToggle().end();
		if(Homepage.p != "Home" && cpageVal != "shevron"){
			//this puts the orange bar on the side of the opened box
			var t=$(this).find('div.hpSet'); 
			t.append('<div style="width:14px;top:-36px;height:35px;left:-15px;background:#FFCC00;position:absolute;"></div>'); 
			var t=$(this).find('div.hpSet'); 
			t.append('<div style="width:14px;top:0px;height:100%;left:-15px;background:#FF9900;position:absolute;"></div>');
			//put little orange box next to closed heading
			$(this).append('<div style="width:14px;height:36px;top:-0px;left:-15px;background:#FFCC00;position:absolute;"></div>');
		}
		
	}
			
	
	 x.find('p.collapse a').bind("click", function(e){
		//vinci edit make top little ' TO MAKE IT A LINK INSTEAD OF ANIMATE
		/*if(Homepage.p != "Home" && cpageVal != "shevron"){
			location.href = "page.asp?p="+testPage;
		}else{*/
			var y=$(this).parents('div.hpMod');
			y.find('div.options:visible').slideUp().end().toggleClass('hpCollapsed').children('.hpSet').slideToggle().end();
			var a=y.is('.hpCollapsed')?'Open':'Close'; 
			$(this).html('<span class="hide">'+a+' the '+y.find('h2').text()+' box</span>');
			$(this).parent().focus();
			Homepage.Cookie.Set();
			return false
			
      }).bind("mouseup", function(){
         this.blur()
      }
      )
	  
	  x.find('p.shevron a').bind("click", function(e){

			var y=$(this).parents('div.hpMod');
			y.find('div.options:visible').slideUp().end().toggleClass('hpCollapsed').children('.hpSet').slideToggle().end();
			var a=y.is('.hpCollapsed')?'Open':'Close'; 
			$(this).html('<span class="hide">'+a+' the '+y.find('h2').text()+' box</span>');
			$(this).parent().focus(); 
			Homepage.Cookie.Set(); 
			return false
      }
	  
      ).bind("mouseup", function(){
         this.blur()
      }
      )
   }
   )
}

//  ---------------------------------------

, FeedControls:function(f){
   if(!f)f='div.hpMod p.addremove'; f=$(f); f.find('a.add').bind("click", function(e){
      var a=$(this).parents('div.hpData'); var b=a.find('ul li.blocked:first'); if(b.removeClass('blocked').get(0)){
         if($(this).parents('div.hpMod').attr('id')=='d'||$(this).parents('div.hpMod').attr('id')=='j'){
            var c=$(this).parents('div.hpMod').attr('id')=='d'?'iplayer':'teens'; var d=a.find('ul li').index(b.get(0))-3; if(d>-1){
               Homepage.Add.ImgListAdd(b.find('h4 a'), a.find('ul li').index(b.get(0))-3, c)
            }
         }
         a.find('a.remove').css({
            opacity:'1'
         }
         ).attr('href', '#'); hpCookie.plus($(this).parents('div.hpMod').attr('id'), a.children('ul').attr('class')); 
		 Homepage.Cookie.Set()
      }
      if(!a.find('ul li.blocked').get(0)){
         $(this).css({
            opacity:'0.4'
         }
         ).removeAttr('href')
      }
      return false
   }
   ).bind("mouseup", function(){
      this.blur()
   }
   ); f.find('a.remove').bind("click", function(e){
      var a=$(this).parents('div.hpData'); if(a.find('ul li:gt(0):not(.blocked):last').addClass('blocked').get(0)){
         a.find('a.add').css({
            opacity:'1'
         }
         ).attr('href', '#'); hpCookie.minus($(this).parents('div.hpMod').attr('id'), a.children('ul').attr('class')); 
		 Homepage.Cookie.Set()
      }
      if(!a.find('ul li:gt(0):not(.blocked)').get(0)){
         $(this).css({
            opacity:'0.4'
         }
         ).removeAttr('href')
      }
      return false
   }
   ).bind("mouseup", function(){
      this.blur()
   }
   )
}

//  ---------------------------------------

, ImgListAdd:function(a, b, c){
   $(a).prepend('<span class="ly"><img width="146" height="82" src="'+Homepage[c][b].src+'" alt="'+Homepage[c][b].alt+'"/></span>')
}

//  ---------------------------------------

, EditYourHomePage:function(){
   $('#hpOptionsBar').after($('#hpEditYourHomePage').hide()); 
   if(00==00)$('#hpEditYourHomePage ul').removeClass('static'); $('a.contentLinks').toggleClass("closed"); 
   $.each($('#hpEditYourHomePage .feedSelection input:checkbox'), function(a, b){$(b).val($(b).val().length>1?$(b).val().substring(0, 1):$(b).val())});
   
   
   $('<input type="reset" value="Cancel" id="feedSelectionCancel" class="hpButton cancel" />').insertAfter('#feedSelectionSave'); 
   $('#feedSelectionCancel').bind("click", 
function(){
	$('#hpEditYourHomePage').slideUp();
	Homepage.OptionsCustomiseOpen=!Homepage.OptionsCustomiseOpen; 
	openClass = Homepage.OptionsCustomiseOpen||Homepage.OptionsLocalOpen?'optionsOpen':''; 
	$('#hpOptionsBar').attr('class', openClass); 
	this.blur(); 
	return false})}
   
   
   //  ---------------------------------------

, StationListings:function(){
   $('div.tv').each(function(){
      var a=$(this).parent().attr('id'); if(hpCookie.val[a]&&hpCookie.val[a].prop){
         var b='ol > li:eq('+parseInt(hpCookie.val[a].prop-1)+')'; if($(this).find(b).get(0)){
            $(this).find('li.focus').removeClass('focus').children('h4.dy').removeClass('dy'); $(this).find(b).addClass('focus').children('h4').addClass('dy')
         }
      }
   }
   ); $('#g p.hide').removeClass('hide'); if(Homepage.audience=='d'&&$('#g').get(0)){
      if($("#g ol>li.a").get(0))hpCookie.add('g', 'a'); else hpCookie.remove('g', 'a'); if($("#g ol>li.b").get(0))hpCookie.add('g', 'b'); else hpCookie.remove('g', 'b')
   }
}

//  ---------------------------------------

, TvTabs:function(a){
   if(!a)a='div.tv ol > li'; $(a).bind("click", function(e){
      if($(this).is('.focus')){
         return true
      }
      $(this).siblings('li.focus').removeClass('focus').children('h4.dy').removeClass('dy'); $(this).addClass('focus').children('h4').addClass('dy'); hpCookie.set($(this).parents('div.hpMod').attr('id'), 'prop', parseInt($(this).parent().children('li').index(this)+1)); Homepage.Cookie.Set(); return false
   }
   )
}

//  ---------------------------------------

, FeatureSlides:function(){
   var b=$('#hpFeatureBox'); b.find('ul.hpFeatureList > li:not(.current)').each(function(i){
      $(this).children('a:not(.image)').bind("click", i, function(){
         $(this).siblings('a.image:not(:has(img))').prepend('<img src="'+featureBoxImages[i].src+'" alt="'+featureBoxImages[i].alt+'" />'); return false
      }
      )
   }
   ); b.find('ul.hpFeatureList > li > a:not(.image)').bind("click", function(e){
      $('ul.hpFeatureList .current').removeClass('current'); $(this).addClass('current').parent().addClass('current'); if(!hpCookie.colour>0){
         var a=$(this).parent().attr('class').match(/hp[0-9]+/); $('body').attr('class', $('body').attr('class').replace(/hp[0-9]+/, a))
      }
      this.blur(); return false
   }
   )
}

//  ---------------------------------------

, newsSlides:function(){
   $('#nhlines').find('p:not(.story1) a').each(function(i){
      $(this).prepend('<img src="'+newsBoxImages[i].src+'" height="113" width="150" alt="'+newsBoxImages[i].alt+'" />')
   }
   ); $('#shlines').find('p:not(.story1) a').each(function(i){
      $(this).prepend('<img src="'+sportBoxImages[i].src+'" height="113" width="150" alt="'+sportBoxImages[i].alt+'" />')
   }
   ); $('#ehlines').find('p:not(.story1) a').each(function(i){
      $(this).prepend('<img src="'+entBoxImages[i].src+'" height="113" width="150" alt="'+entBoxImages[i].alt+'" />')
   }
   ); $('#scihlines').find('p:not(.story1) a').each(function(i){
      $(this).prepend('<img src="'+sciBoxImages[i].src+'" height="113" width="150" alt="'+sciBoxImages[i].alt+'" />')
   }
   ); $('#teenhlines').find('p:not(.story1) a').each(function(i){
      $(this).prepend('<img src="'+switchBoxImages[i].src+'" height="113" width="150" alt="'+switchBoxImages[i].alt+'" />')
   }
   ); $('#bushlines').find('p:not(.story1) a').each(function(i){
      $(this).prepend('<img src="'+busBoxImages[i].src+'" height="113" width="150" alt="'+busBoxImages[i].alt+'" />')
   }
   ); $('div.carousel ol').children('li.one').addClass('dy').end().find('li a').mouseover(function(){
      var a=$(this).parents('li'); a.siblings('li').removeClass('dy'); a.addClass('dy')
   }
   )
}

//  ---------------------------------------

, LargeQuotes:function(a){
   if(!a)a='blockquote.quote'; $(a).prepend('<span class="hpQuoteOpen"><span>&nbsp;</span><span>&nbsp;</span></span>'); $(a).append('<span class="hpQuoteClose"><span>&nbsp;</span><span>&nbsp;</span></span>')
}

//  ---------------------------------------

, Userfeedback:function(){
   $('#hpOptionsBar').find('#editLink').after('<a class="question" href="?help"><span><span class="hide">Further information</span></span></a>').end().find('a.question').click(function(){
      this.blur(); if(!$('#hpTooltip_Customise')[0]){
         
      }
      else{
         Homepage.Userfeedback.Close('hpTooltip_Customise')
      }
      return false
   }
   ); $('#e h2').append('&nbsp;&nbsp;<a class="question dy" href="?help"><span><span class="hide">Further information</span></span></a>').find('a.question').click(function(){
      this.blur(); if(!$('#hpTooltip_Blog')[0]){
        
      }
      else{
         Homepage.Userfeedback.Close('hpTooltip_Blog')
      }
      return false
   }
   ); $('#hpReset').click(function(){
      if(!$('#hpPopup_Reset')[0]){
         Homepage.Userfeedback.Popup('hpPopup_Reset', 'Are you sure?', "",function(){
            window.location=$('#hpReset').attr("href")
         }
         )
      }
      return false
   }
   )
}

//  ---------------------------------------

, RevealAll:function(){
}

//  ---------------------------------------

}

//  ---------------------------------------

, EditBox:{
Checkboxes:function(c){
   var c=c; var d=c.find('div.options'); d.find('input:not(:radio)').each(function(a, b){
      if(hpCookie.val[c.attr('id')][$(b).val()])$(b).attr('checked', 'checked'); else $(b).removeAttr('checked'); if($('li#'+$(b).val()).get(0))$(b).attr('checked', 'checked')
   }
   )
}

//  ---------------------------------------

}

//  ---------------------------------------

, Popups:{
DoPop:function(a, b, c, d, e){
   var f=window.open(a.attr('href'), 'PopupWindow', "width="+b+", height="+c+", toolbar=0, location=0, status=0, menubar=0, scrollbars="+d+", resizable="+e+", top=30, left=30"); 
   f.focus(); 
   return f
}
}

//  ---------------------------------------

, none:{requesting:false, ToggleUnits:function(){var a=$('#loc input:radio:checked').val()||1; 

if(hpCookie.val.c.prop!=a){
	hpCookie.set('c', 'prop', a); 
	  Homepage.Cookie.Set(); 
	  Homepage.Weather.Update()
   }
}




//  ---------------------------------------


//  ---------------------------------------

, Cookie:{
   PCLookup:[{CookieVal:'PST', Lookup:'postcode'}, {CookieVal:'QRY', Lookup:'name:first'}, {CookieVal:'LEA', Lookup:'lea id'}, {CookieVal:'WEA', Lookup:'weather id'}, {CookieVal:'CCI', Lookup:'county_council id'}, {CookieVal:'CON', Lookup:'constituency id'}, {CookieVal:'CTY', Lookup:'county id'}, {CookieVal:'DST', Lookup:'district id'}, {CookieVal:'EUR', Lookup:'euro_region id'}, {CookieVal:'LAU', Lookup:'local_authority id'}, {CookieVal:'LST', Lookup:'listings id'}, {CookieVal:'NHS', Lookup:'health_authority id'}, {CookieVal:'TWN', Lookup:'post_town id'}, {CookieVal:'RAD', Lookup:'radio id'}, {CookieVal:'WRD', Lookup:'ward id'}, {CookieVal:'WIL', Lookup:'wil:first id'}, {CookieVal:'MAT', Lookup:'match_type'}], 
   
   Build:function(){
      var a=$(a).find('result'); var b='postcoder='; 
	  jQuery.each(Homepage.Localise.Cookie.PCLookup, 
				  function(){
         b+=Homepage.Localise.Cookie.GetVar(this.CookieVal, this.Lookup)
      }
      ); 
	  
	  return true
   }
   , GetVar:function(a, b){
      return a+Homepage.Localise.Cookie.SetData(b)+':'
   }
   , SetData:function(a){
      return $(data).find(a).get(1)?$(data).find(a+':eq(0)').text()+'.'+$(data).find(a+':eq(1)').text():$(data).find(a).text()
   }
}

//  ---------------------------------------
}

//  ---------------------------------------

, Cookie:{
Clean:false, Properties:function(){
   var a=new Date(); a.setTime(a.getTime()+(100*24*60*60*1000)); var b="; expires="+a.toGMTString(); b+='; domain=bbc.co.uk; path=/';return b
}

//  ---------------------------------------

, CleanUp:function(){
   for(var i in Homepage.Removed){
      if(hpCookie.val[i]){
         for(var j=0; j<Homepage.Removed[i].length; j++){
            hpCookie.remove(i, Homepage.Removed[i][j])
         }
      }
   }
   Homepage.Cookie.Clean=true; return true
}

//  ---------------------------------------

, Get:function(){
   var a=""; 
   var b=document.cookie; 
   var c=b.indexOf("hp="); 
   
   if(c!=-1){
      var d=c+2; var e=b.indexOf(";", d); if(e==-1){
         a=b.substring(d+1)
      }
      else{
         a=b.substring(d+1, e)
      }
   }
   
   if(!/[+\-a-zA-Z0-9]*\*[+\-a-zA-Z0-9]*\*[+\-a-zA-Z0-9]*/.test(a)){
      if(Homepage.audience=='d'){
         a='+acv+ba+e*+c1+f1+da*-i+g12'
      }
      else{
         a='+aca+p*+ba+f1+i*+c1+g1'
      }
   }
   return a
}

//  ---------------------------------------

, Set:function(){
   var c=$.SortSerialize(); 
   var d=''; 
   var toSave='';
   //vinci edit
   if(hpCookie.colour>0)
   d+=hpCookie.colour; 
   
   if(!Homepage.Cookie.Clean)
   Homepage.Cookie.CleanUp(); 

   if(Homepage.p == "Home"){
	   //vinci remember SET and save cookie - closed or not
	   var shutem=Homepage.shutRef;
	
	   for(var wa=0;wa<shutem.length;wa++){
		   if($('#'+shutem[wa]+'.hpCollapsed').get(0)?'-':'+' == '-'){
				toSave += shutem[wa];
		   }
		   if(wa<(shutem.length-1)){
				toSave += '-';
		   }
	   }
	   setCookie('shut',toSave,365);
   }
      
}

//  ---------------------------------------

, Delete:function(){
   
}

//  ---------------------------------------

, Apply:function(){
  
   var h=hpCookie.cookie.match(/-[a-zA-Z]{1}/g); 
   
   //h=-3;
   
  $.each(hpCookie.val, function(f, g){
								$.each(hpCookie.val[f], function(b, c){
																  var d=$('#'+f+' .'+b); 
																  d.children('li:gt('+parseInt(c-1)+')').addClass('blocked'); 
																  d.children('li:lt('+parseInt(c)+')').removeClass('blocked'); 
																  if(f=='d'||f=='j'){
																	  var e=f=='d'?'iplayer':'teens'; 
																	  d.children('li:lt('+parseInt(c)+')').each(function(){
																														 var a=$(d).find('li').index($(this).get(0))-3; 
																														 if(a>-1){
																															 Homepage.Add.ImgListAdd($(this).find('a'), a, e)
																															}
																														}
																		)
																	}
																if(c==1)d.parents('.hpData').find('a.remove').css({opacity:'0.4'}); 
																if(c==d.children().length)d.parents('.hpData').find('a.add').css({opacity:'0.4'})})}); 
   
   if(h){
	   
	  //vinci edit shut cookie
	  //remember close/open based on cookie
	  
	  var shutCook = getCookie('shut');
	  
	  if(shutCook == ""){
		  shutCook = "b-c-d-e-f-g-h-j-l";
	  }
	  
	  var shut = shutCook.split("-");  
	   
	 for(var v=0;v<shut.length;v++){
		$.each(h, function(a, b){b=shut[v]; $('#'+b.charAt(0)).toggleClass('hpCollapsed').children('.hpSet').addClass('blocked')})
	  }
   }
}

//  ---------------------------------------

}

//  ---------------------------------------

, UE:{
FeedSelection:function(){
   $.each($('#hpEditYourHomePage .feedSelection input'), function(a, b){
      if(hpCookie.val[$(b).val()]){
         $(b).attr('checked', 'checked'); $(b).parent().removeClass('disabled').addClass('enabled')
      }
      $(b).siblings('label').bind("click", function(e){
         if($.browser.safari&&(parseInt($.browser.version)<500)){
            $(b)[0].checked=!$(b)[0].checked
         }
         $(this).parent().toggleClass('enabled').toggleClass('disabled')
      }
      )
   }
   ); $('#hpEditYourHomePage form').bind("submit", function(){
      var d=$(this).find('.feedSelection input:not(:checked)'); $.each(d, function(a, b){
         if(hpCookie.remove($(b).val())){
            $('#'+$(b).val()).remove()
         }
      }
      ); var e=$(this).find('.feedSelection input:checked'); $.each(e, function(a, b){
         if(!$('#'+$(b).val()).get(0)){
            var c=$(b).val(); if(Homepage.Defaults[c]){
               for(var i=0; i<Homepage.Defaults[c].length; i++){
                  hpCookie.add($(b).val(), Homepage.Defaults[c][i])
               }
            }
            $('#hpColOne').prepend('<div id="'+$(b).val()+'" class="hpMod blocked"></div>')
         }
      }
      ); 
	  hpCookie.colour=parseInt($(this).find('.colourSelection .current input').attr('value')); 
	  Homepage.Cookie.Set(); 
	  location.reload(true); 
	  return false
   }
   )
}

//  ---------------------------------------

, ColourSelection:function(){
   $('#hpEditYourHomePage .colourSelection input:checked').parent().addClass('current'); $.each($('#hpEditYourHomePage .colourSelection input'), function(a, b){
      $(b).siblings('label').bind("click", function(e){
         if($.browser.safari&&(parseInt($.browser.version)<500)){
            $(b)[0].checked=!$(b)[0].checked
         }
         $('.colourSelection .current').removeClass('current'); $(b).parent().addClass('current')
      }
      ); $(b).siblings('label').bind("mouseover", function(){
         $(this).css({
            borderColor:'#aaa'
         }
         )
      }
      ); $(b).siblings('label').bind("mouseout", function(){
         $(this).removeAttr('style')
      }
      )
   }
   )
}

//  ---------------------------------------

, ColHeights:function(){
   var a=document.getElementById("hpLowerPanel").offsetTop-15; 
   var b=[document.getElementById('hpColOne'), document.getElementById('hpColTwo'), document.getElementById('hpColThree')]; 
   if($.browser.msie&&(parseInt($.browser.version)<7)){
      var c='height'
   }
   else{
      var c='minHeight'
   }
   for(var i=0; i<b.length; i++){
      b[i].style[c]=(a-b[i].offsetTop)+"px"
   }
}

//  ---------------------------------------

}

//  ---------------------------------------

, Userfeedback:{
Register:[], Box:function(a){
   
      
   
}

//  ---------------------------------------

, Close:function(a){
   if($.browser.msie&&parseInt($.browser.version)==7){
      $('#'+a).remove()
   }
   else{
      $('#'+a).fadeOut(function(){
         $('#'+a).remove()
      }
      )
   }
   Homepage.Userfeedback.Overlay.Remove()
}

//  ---------------------------------------

, CloseAll:function(){
   if(Homepage.Userfeedback.Register.length){
      for(var i=0; i<Homepage.Userfeedback.Register.length; i++){
         Homepage.Userfeedback.Close(Homepage.Userfeedback.Register[i])
      }
   }
}

//  ---------------------------------------

, Overlay:{
   fix:[], Add:function(){
      var f=Homepage.Userfeedback.Overlay.fix; $('input:checked').each(function(i, a){
         var b='fix'+f.length; $(a).attr('id', b); f[f.length]=b
      }
      ); var c=$('#blq-main'); c.css('margin-left', c.get(0).offsetLeft); $('body').addClass('overlay'); var d=document.getElementById('noScroll')||document.createElement("div"); d.id="noScroll"; var e=document.createElement("div"); e.id="overlay"; document.body.appendChild(e); document.body.appendChild(d); var g=document.body.childNodes; while(g[0]!=d){
         d.appendChild(g[0])
      }
      $('input:checked').each(function(i, a){
         $(a)[0].checked=false
      }
      ); var h; for(var i=0; i<f.length; i++){
         if(h=document.getElementById(f[i])){
            h.checked=true
         }
      }
   }
   , Remove:function(){
      var f=Homepage.Userfeedback.Overlay.fix; var b=false; if(b=$('#noScroll').get(0)){
         var c=b.childNodes; while(c[0]){
            document.body.appendChild(c[0])
         }
         $('body').removeClass('overlay'); $('#overlay').removeAttr('id').addClass('blocked'); $('#blq-main').css('margin-left', 'auto'); $('input:checked').each(function(i, a){
            $(a)[0].checked=false
         }
         ); for(var i=0; i<f.length; i++){
            var d=document.getElementById(f[i]); if(d){
               d.checked=true; d.removeAttribute('id')
            }
         }
         f=[]; b=false; document.body.childNodes[0].id=""
      }
   }
}

//  ---------------------------------------

, Popup:function(a, b, c, d, e){
   Homepage.Userfeedback.CloseAll(); 
   return Homepage.Userfeedback.Box({
      id:a, message:c, title:b, onSuccess:d, onCancel:e, className:'hpPopup', overlay:true, closeButton:false, confirmButton:true, contentHeight:((Homepage.Userfeedback.CalculateHeight(c)+70)/Homepage.Userfeedback.CalculateText())
   }
   )
}

//  ---------------------------------------

, CalculateText:function(){
   var a; textElement=document.createElement("div"); textElement.style.height='1em'; textElement.style.lineHeight='1'; document.body.appendChild(textElement); a=textElement.offsetHeight; document.body.removeChild(textElement); return a
}

//  ---------------------------------------

, CalculateHeight:function(a){
   var b; heightElement=document.createElement("div"); heightElement.className='hpTooltip'; heightElement.style.width="280px"; heightElement.style.visibility="hidden"; heightElement.innerHTML=a; document.body.appendChild(heightElement); b=heightElement.offsetHeight; document.body.removeChild(heightElement); return b
}

//  ---------------------------------------

, Tooltip:function(a, b, c, d, e, f){
   if(a=$(a)){
      var g, left=0, top=0, heightElement, height; g=a.get(0); while(g){
         top+=g.offsetTop; g=g.offsetParent
      }
      g=a.get(0); while(g){
         left+=g.offsetLeft; g=g.offsetParent
      }
      height=Homepage.Userfeedback.CalculateHeight(d)
   }
   arrowLeft=26+((48-a.width())/2); if((left+320)>document.body.clientWidth){
      var h=(left+320)-document.body.clientWidth; var i=left-h; arrowLeft+=h; left=i
   }
   var j=[left-47]; height+=115; switch(e){
      case'above':
         if(top>(height)){
            j[1]=top-(height)
         }
         else{
            j[1]=(top+(height+a.height())-13); e='below'
         }
         break;
      case'below':
         var k=parseInt(a.css('padding-top')); var l=parseInt(a.css('padding-bottom')); if((height)<($('#blq-content').height()-(top-a.height()-k-l))){
            j[1]=(top+a.height()+k+l)
         }
         else{
            j[1]=top-(height); e='above'
         }
         break;
      default:
         j[1]=top
   }
   Homepage.Userfeedback.CloseAll();
   return Homepage.Userfeedback.Box({
      id:b, message:d, title:c, onCancel:f, className:'hpTooltip', position:j, closeButton:true, arrow:e, arrowLeft:arrowLeft, contentHeight:(height-80)/10
   }
   )
}

//  ---------------------------------------

}

//  ---------------------------------------

}

//  ---------------------------------------

; var hpCookie=function(){
this.cookie=Homepage.Cookie.Get(); var e=this.cookie.replace(/[*]/g, ''); e=this.cookie.replace('NaN', 1); var f=e.match(/([+-][a-z]{1})/g); this.val={
}

//  ---------------------------------------

; if(f)this.colour=e.substring(0, e.indexOf(f[0])); if(f){
for(var i=0; i<f.length; i++){
   this.val[f[i].charAt(1)]={
   }
   ; var g=e.indexOf(f[i])+1; var h=e.indexOf(f[i+1]); if(h==-1){
      h=e.length
   }
   var k=e.substring(g+1, h); k=k.match(/[a-z]?[0-9]*/g); if(k){
      for(var j=0; j<k.length-1; j++){
         if(k[j].length>0){
            if(!isNaN(k[j]*1)){
               this.val[f[i].charAt(1)]['prop']=parseInt(k[j])
            }
            else{
               this.val[f[i].charAt(1)][k[j].charAt(0)]=3; if(k[j].length>1)this.val[f[i].charAt(1)][k[j].charAt(0)]=parseInt(k[j].charAt(1))
            }
         }
      }
   }
}

//  ---------------------------------------

}

//  ---------------------------------------

this.get=function(c){
var d=c; if(this.val[c]){
   if(this.val[c].hasOwnProperty('prop'))d+=this.val[c].prop; $.each(this.val[c], function(a, b){
      d+=(a=='prop')?'':(b==3)?a:a+b
   }
   )
}

//  ---------------------------------------

return d
}

//  ---------------------------------------

; this.add=function(a, b){
if(!this.val[a])this.val[a]={
}

//  ---------------------------------------

; this.val[a][b]=3
}

//  ---------------------------------------

; this.remove=function(a, b){
if(b&&this.val[a][b]){
   delete this.val[a][b]; return true
}

//  ---------------------------------------

else if(!b&&this.val[a]){
   delete this.val[a]; return true
}

//  ---------------------------------------

return false
}

//  ---------------------------------------

; this.set=function(a, b, c){
if(!this.val[a][b])this.add(a, b); this.val[a][b]=c
}

//  ---------------------------------------

; this.plus=function(a, b){
if(!this.val[a][b])this.add(a, b); if(this.val[a][b]<8)this.val[a][b]++
}

//  ---------------------------------------

; this.minus=function(a, b){
if(!this.val[a][b])this.add(a, b); if(this.val[a][b]>1)this.val[a][b]--
}

//  ---------------------------------------

}

//  ---------------------------------------

; var glow=(function(){
var g=navigator.userAgent.toLowerCase(); return{
onDomReady:(function(){
   var d=document; if(/msie/.test(g)&&!(/opera/.test(g))){
      return function(c){
         if(this.isReady){
            c(); return
         }
         (function(){
            try{
               d.documentElement.doScroll('left')
            }
            catch(e){
               setTimeout(arguments.callee, 50); return
            }
            c()
         }
         )()
      }
   }
   else if(typeof d.readyState!='undefined'&&!(/webkit/i.test(navigator.userAgent)&&navigator.userAgent.match(/[\d.]+$/)[0]<312)){
      return function(c){
         if(this.isReady){
            c(); return
         }
         var f=function(){
            /loaded|complete/.test(d.readyState)?c():setTimeout(f, 10)
         }
         ; f()
      }
   }
   else{
      return function(c){
         if(this.isReady){
            c(); return
         }
         var a=function(){
            if(arguments.callee.fired){
               return
            }
            arguments.callee.fired=true; c()
         }
         ; d.addEventListener("DOMContentLoaded", a, false); var b=window.onload; window.onload=function(){
            if(b){
               b()
            }
            a()
         }
      }
   }
}

//  ---------------------------------------

)()
}

//  ---------------------------------------

}

//  ---------------------------------------

)(); glow.onDomReady(function(){
if(/\*/.test(Homepage.OriginalCookie)&&Homepage.OriginalCookie!=hpCookie.cookie&&hpCookie.cookie.charAt(hpCookie.cookie.length-1)!='+'){

window.location.reload(true)
}

//  ---------------------------------------

else if(hpCookie.cookie.charAt(hpCookie.cookie.length-1)=='+'){
hpCookie.cookie=hpCookie.cookie.substring(0, hpCookie.cookie.length-1); 

}

//  ---------------------------------------

Homepage.EnhancePage(); window.onunload=function(){
$('*').unbind()
}

//  ---------------------------------------

}

//  ---------------------------------------

);

