var oParts = {};

oParts.version = '20100819.015159';

oParts.client = {
  online : !!navigator.onLine,
     w3c : !!window.getComputedStyle,
    MSIE : /*@cc_on!@*/false,
     IE6 : false/*@||!window.XMLHttpRequest@*/,
     IE7 : false/*@||!!window.XMLHttpRequest@*/,
     IE8 : false/*@||!!document.documentMode@*/,
     IE9 : false/*@||!!(document.documentMode > 8)@*/,
   Opera : !!(navigator.userAgent.match(/opera/i)),
   Gecko : !!(navigator.userAgent.match(/gecko\//i)),
  Webkit : !!(navigator.userAgent.match(/webkit/i))
};

oParts.events = [];
oParts.callee = [];
oParts.queryCache = {};


try {
 var scripts = document.getElementsByTagName('script');
 oParts.baseURL = scripts[scripts.length - 1].src.replace(/js\/.+$/, '');
} catch(e){ oParts.baseURL = '';}

(function(){

 var w = window, d = document, de = d.documentElement, UD = 'undefined';
 var client = oParts.client;

 function Parts(parts, context){
  this.oparts = [];
  var _o;
  switch (typeof parts){
   case 'string' :
    _o = oParts.query(parts, context);
    this.size = (_o && _o.length) ? _o.length : _o ? 1 : 0;
    if(this.size){ 
     for(var j = 0; j < this.size; j++){
      att(this, _o[j]);
      this.oparts[this.oparts.length] = _o[j];
     }
    }
    break;
   case 'object' :
    if(parts instanceof Array){
     this.size = 0;
     for (var j = 0; _o = parts[j++];){
      if(_o){
       this.size++;
       this.oparts[this.oparts.length] = _o.$;
      }
     }
    } else {
     this.size = 1;
     att(this, parts);
     this.oparts[this.oparts.length] = parts;
    }
    break;
  }
  return this;
 }
 
 function att(a, b){
  a.$ = b;
  try { a.id = b.id; } catch(e) { a.id = null;};
  try { a.className = b.className; } catch(e){ a.className = null;};
 };
 Parts.prototype = {
  attr : function(att, val){ if(val === UD) return this.$[att] = val; else return this.$[att]; },
  item : function(i){ return o(this.oparts[i]);},
  parent : function(n){
   var N = !n ? 1 : n, p = 'this.$';
   for(var i = 1; i <= N; i++){
    p += '.parentNode';
    if(!eval(p)) return null;
   }
   return o(eval(p));
  },
  child : function(n){
   if(this.children()){
    return this.children().item(n) || null;
   } else oParts.alert("Debug: No .children() in " + this.$.innerHTML);
  },
  children : function(){
   var cn = this.$.childNodes, cs = [];
   for(var i = 0, l = cn.length; i < l; i++){
    if(cn[i].nodeType == 1) cs.push(o(cn[i]));
   }
   return cs.length ? o(cs) : null;
  },
  sib : function(n){
   var N = n < 0 ? -n : n, sb = n < 0 ? '.previousSibling' : '.nextSibling', s = 'this.$';
   for(var i = 1; i <= N; i++){
    s += sb;
    if(!eval(s)) return null;
    if(eval(s).nodeType != 1) N++;
   }
   return o(eval(s));
  },
  lastItem : function(){ return this.item(this.size - 1);},
  visible : function(){ return (this.css('display') != 'none') * 1;},
  show : function(mode){
   switch (mode){
    case 1 : case 'inline' :
     var s;
     if(client.Gecko){
      s = 'display: -moz-inline-stack; display:inline-block;';
     } else if(client.MSIE){
      s = 'overflow:hidden; zoom: 1; display:inline;';
     } else s = 'display: inline;'; this.css(s); break;
    case 0 : case 'visible' : this.css('visibility: visible'); break;
    default : this.css('display: block');
   }
   return this;
  },
  hide : function(mode){
   switch (mode){
    case 0 : case 'hidden' : this.css('visibility: hidden'); break;
    default : this.css('display: none;');
   }
   return this;
  },
  toggle : function(){
   this.each(function(o){
    o.style.display = o.style.display !== 'none' ? 'none' : 'block';
   });
   return this;
  },
  view : function(b){
   if(b === 2) {this.show().$.scrollIntoView(true); return this;}
   if(this.visible()) this.$.scrollIntoView(b);
   return this;
  },
  focus : function(a){ !a ? this.$.focus() : this.view(0).$.focus(); return this;},
  blur : function(){ this.$.blur(); return this;},
  html : function(s, add){
   if(typeof s !== UD){
    if(add){
     switch (add){
      case 'before' : case -1 : this.$.innerHTML = (s + this.$.innerHTML); break;
      default  : this.$.innerHTML += s;
     }
    } else this.$.innerHTML = s;
   } else return this.$.innerHTML;
   return this;
  },
  title : function(s){
   var v = []; this.each(function(o){
    if(s) o.title = s; else v[v.length] = o.title;
   });
   return s ? this : v.length == 1 ? v[0] : v;
  },
  value : function(s){
   var v = []; this.each(function(o){
    if(s || s == '') o.value = s; else v[v.length] = o.value;
   });
   return s ? this : v.length == 1 ? v[0] : v;
  },
  checked : function(){
   var v = []; this.each(function(o){
    v[v.length] = (o.checked ? 1 : 0);
   });
   return v.length == 1 ? v[0] : v;
  },
  src : function(s){
   if(s) this.$.src = s; else return this.$.src;
   return this;
  },
  clone : function(b){ return o(this.$.cloneNode(b));},
  cssClass : function(c){
   if(c){
    return !this.className ? false : (' ' + this.className + ' ').indexOf(c) !== -1 ? true : false;
   } else return this.className;
  },
  setClass : function(name, add){
   this.each(function(o){ add ? o.className += " name" : o.className = name;});
   return this;
  },
  css : function(exp){
   return exp.indexOf(':') > 0 ? this.setCSS(exp) : this.getCSS(exp);
  },
  setCSS : function(css){
   this.each(function(o){
    css.split(/;/).forEach(function(v){
     if(v.indexOf(':') > 0){
      v = v.split(/:/); var p = v.shift().trim(), s = v.join(':').trim() || '';
      if(/^0\.\d+$/.test(s) && s < 0.001) s = 0;
      p = p.replace(/-\D/g, function(m){ return m.charAt(1).toUpperCase()});
      if(p.indexOf('pacity') > 0){
       if(client.MSIE) o.style.zoom = 1;
       p = client.MSIE ? 'filter' : 'opacity';
       s = client.MSIE ? 'alpha(opacity=' + (parseFloat(s) * 100).toFixed(3) + ')' : parseFloat(s).toFixed(3);
       if(client.MSIE){
        if(o.childNodes && o.childNodes.length){
         for(var i = 0, len = o.childNodes.length; i < len; i++)if(o.childNodes[i].nodeType == 1) o.childNodes[i].style[p] = s;
        }
       }
      }
      if(p == 'borderRadius' || p == 'boxShadow'){
       p = (client.Gecko ? 'Moz' : client.Webkit ? 'webkit' : '') + p.replace('b', 'B');
      }
      if(p=='float') p = client.MSIE ? 'styleFloat' : 'cssFloat';
      if(s != UD){ try { o.style[p] = s; } catch (e){;}}
     }
    });
   });
   return this;
  },
  getCSS : function(prop){
   var v = null, o = this.$;
   if(d.defaultView){
    prop = prop.replace(/([A-Z])/g, '-$1').toLowerCase();
    if(prop.indexOf('border') != -1){
     prop = prop.replace(/border\-(\w+)$/, 'border-left-$1');
    }
    v = d.defaultView.getComputedStyle(o, null).getPropertyValue(prop);
   } else if(o.currentStyle){
    prop = prop.replace(/-\D/g, function(m){ return m.charAt(1).toUpperCase()});
    var os = o.style, cs = o.currentStyle, rs = o.runtimeStyle;
    if(prop == 'opacity'){
      o.style.zoom = 1;
      v = cs.filter ? cs.filter.match(/opacity=([^)]+)/)[1] / 100 : 1;
    } else if(prop == 'float'){
     v = cs.styleFloat;
    } else v = cs[prop];
    var m = prop.match(/left|top|width|height/i);
    if(m){
     if(v == 'auto'){
      m = m[0].trim().replace(/^./g, function(a){ return a.charAt(0).toUpperCase()});
      v = o['offset' + m] || 'auto';
     } else {
      if(v.lastIndexOf('%') !== -1 || v.lastIndexOf('em') !== -1){
       rs[prop] = cs[prop]; os[prop] = v;
       var pxl = os['pixel' + prop.replace(/^./g, function(a){ return a.charAt(0).toUpperCase()})] || 0;
       rs[prop] = ''; v = pxl;
      }
     }
    }
   } else v = o.style[prop];
   return /px$/.test(v) ? parseInt(v) : v;
  },
  moveTo : function(x, y){
   this.each(function(o){
    if(o.style.position == '' || o.style.position == 'static') o.style.position = 'absolute';
    if(x != null) {o.style.left = parseInt(x) + 'px'; this.X = x;}
    if(y != null) {o.style.top = parseInt(y) + 'px'; this.Y = y;}
   });
   return this;
  },
  sizeTo : function(w, h){
   this.each(function(o){
    if(w != null) {o.style.width = parseInt(w) + 'px'; this.W = w;}
    if(h != null) {o.style.height = parseInt(h) + 'px'; this.H = h;}
   });
   return this;
  },
  dimension : function(x, y, w, h, pos){
   this.moveTo(x, y).sizeTo(w, h); if(pos) this.css('position:relative;'); return this;
  },
  rect : function(s){
   var self = this.$;
   return s === 0 ? self.offsetWidth : s === 1 ? self.offsetHeight : [self.offsetWidth, self.offsetHeight];
  },
  fix : function(x, y){
   this.each(function(o){
    o.style.position = client.IE6 ? 'absolute' : 'fixed';
    if(x == 'center') x = (oParts.metrics(0) - o.offsetWidth) * .5;
    if(y == 'center') y = (oParts.metrics(1) - o.offsetHeight) * .5 + (client.IE6 ? oParts.metrics(3) : 0);
    if(!isNaN(x)) o.style.left = x + 'px'; else o.style.left = x;
    if(!isNaN(y)){
     o.style.top = y + 'px';
    } else {
     if(client.IE6){
      o.style.top = y.replace('%', '') * 0.01 * oParts.metrics(1) + 'px';
      o.runtimeStyle.top = parseInt(o.style.top) + oParts.metrics(3) + 'px';
     } else o.style.top = y;
    }
   });
   return this;
  },
  unfix : function(){
   this.each(function(o){
    o.style.position = "absolute";
   });
   return this;
  },
  offset : function(s){
   var v, $ = this.$;
   if($.getBoundingClientRect){
    var r = $.getBoundingClientRect(), x = window.pageXOffset || de.scrollLeft || d.body.scrollLeft;
    if(s === 0) v = parseInt(r.left) + x - de.clientLeft;
    else if(s === 1) v = parseInt(r.top) + oParts.metrics(3) - de.clientTop;
    else v = [parseInt(r.left) + x - de.clientLeft, parseInt(r.top) + oParts.metrics(3) - de.clientTop];
   } else {
    var x = 0, y = 0;
    while ($.offsetParent){
     x += ($.offsetLeft); y += $.offsetTop; $ = $.offsetParent;
    }
    v = s === 0 ? parseInt(x) : s === 1 ? parseInt(y) : [parseInt(x), parseInt(y)];
   }
   return v;
  },
  joinBefore : function(el){
   if(el.$) el = el.$;
   this.each(function(o){ el.parentNode.insertBefore(o, el);}); return this;
  },
  joinAfter : function(el){
   if(el.$) el = el.$;
   this.each(function(o){ el.parentNode.insertBefore(o, el.nextSibling);}); return this;
  },
  addChild : function(a, b){
   if(!(a instanceof Array)) a = [a];
   for(var el, i = 0; el = a[i++];){
    if(el.$) el = el.$;
    if(b){
     if(b.$) b = b.$;
     this.$.insertBefore(el, b);
    } else this.$.appendChild(el);
   }
   return this;
  },
  deleteChild : function(a){
   if(!(a instanceof Array)) a = [a];
   for(var i = 0; el = a[i++];){
    if(el.$) el = el.$; this.$.removeChild(el);
   }
   return this;
  },
  away : function(){
   this.each(function(o){
    o.parentNode.removeChild(o); o = null;
   });
   return this;
  },
  await : function(ms){
   this.each(function(o){
    oParts.queue.enqueue('await:' + ms);
   });
   return this;
  },
  queue : function(F){
   var _this = this;
   oParts.queue.enqueue(function(){F(_this)});
   oParts.queue.flush();
   return this;
  },
  fadeOut : function(delay, callback){
   var _this = this, delay = delay || 100;
   this.css('opacity:1');
   this.await(delay);
   oParts.queue.enqueue(
    function(){
     var begin = new Date()*1, duration = 1200;
     var eng = setInterval(function(){
      var time = new Date()*1 - begin;
      var progress = (oParts.easingType['easeOutPow3'])(time, 1, -1, duration);
      if(time >= duration || progress <= 0){
       clearInterval(eng);
       _this.hide().css('opacity:1');
       if(callback) callback();
      } else _this.css('opacity:' + progress);
     }, 10);
    }
   );//#enque
   oParts.queue.flush();
   return this;
  },
  fadeIn : function(delay, callback){
   var _this = this, delay = delay || 100;
   this.css('opacity: 0');
   this.await(delay);
   oParts.queue.enqueue(
    function(){
     var begin = new Date()*1;
     var eng = setInterval(function(){
      var time = new Date()*1 - begin, duration = 1200;
      var progress = (oParts.easingType['easeInPow3'])(time, 0, 1, duration);
      if(time >= duration || progress >= 100){
       clearInterval(eng);
       _this.show().css('opacity:1');
       if(callback) callback();
      } else _this.css('opacity:' + progress);
     }, 10);
    }
   );//#enque
   oParts.queue.flush();
   return this;
  },
  fadeOut2 : function(delay){ var _this = this;
   delay = delay || 300;
   setTimeout(function(){
    if(client.MSIE){
     _this.clip(0);
    } else {
    _this.tween({opacity:0}, {
     easing : 'easeOutPow3', duration : 1200,
     complete : function(){_this.hide().css('opacity:1'); }});
    }
   }, delay);
   return this;
  },
  rollUp : function(easingType){
   easingType = easingType || 'easeInPow2';
   var orgH = this.css('height'), _this = this, to;
   this.css('overflow:hidden; display:block;').tween({'height':0},
    {  easing: easingType,
     duration: 750,
     complete: function(){_this.css('height:'+orgH+'px').hide();}
    });
   return this;
  },
  rollOut : function(easingType){
   easingType = easingType || 'easeOutBounce';
   var to = this._orgHeight || this.css('height');
   if(to == 'auto' || !to){
    var clone = this.clone(true).css('opacity:0').show();
    clone.joinBefore(this); to = clone.css('height'); clone.away();
    this._orgHeight = to;
   }
   this.css('height:0; overflow:hidden').show().tween({'height':{from:0, to:to}},
    {   easing: easingType,
      complete: function(){;}
    });
   return this;
  },
  popUp : function(relative){
   var to, h;
   var clone = this.clone(true).show().css('opacity:0');
   clone.children().css('opacity:0;float:none;');
   clone.joinBefore(this); h = clone.$.offsetHeight; clone.away();
   to = this.offset(1) - h;
   if(this.css("position") == 'static') this.css('position:relative;');
   if(relative) to = -h;
   this.css('overflow:hidden').show().tween({'top':to},
    {  easing: 'easeOutElastic',
     complete: function(){;}
    });
   return this;
  },
  collapse : function(F){
   var _this = this, begin = new Date()*1, duration = 1000;
   var h = this.$.offsetHeight;
   this.css('position:absolute; overflow:hidden;');
   var eng = setInterval(function(){
    var time = new Date()*1 - begin;
    var progress = (oParts.easingType['easeOutBounce'])(time, 0, 1, duration); // c = to - from
    if(time >= duration || progress <= 0){
     clearInterval(eng);
     _this.hide().css('clip:rect(auto,auto,auto,auto)');
     if(F) F();
    } else _this.css('clip:rect('+(progress * h)+'px,auto,auto,0)');
   }, 10);
   return this;
  },
  clip : function(mode){
   var _this = this, begin = new Date()*1, duration = 3000, progress, clip;
   var w = this.$.offsetWidth, h = this.$.offsetHeight;
   if(/static|relative/.test(this.css('position'))){
    if(this.parent().css('position') == 'static') this.parent().css('position: relative;');
    this.css('position:absolute; overflow:hidden;');
   }
   var eng = setInterval(function(){
    var time = new Date()*1 - begin;
    switch (mode){
     case 'shrink' : case 0 :
      progress = (oParts.easingType['easeOutPow3'])(time, 0, 1, duration);
      clip = 'clip:rect('+(progress*h)+'px,'+(1-progress)*w+'px,'+(1-progress)*h+'px,'+(progress*w)+'px)'; break;
     case 'spread' : case 1 :
      progress = (oParts.easingType['easeInOutPow3'])(time, 1, -1, duration);
      clip = 'clip:rect('+(progress*h)+'px,'+(1-progress)*w+'px,'+(1-progress)*h+'px,'+(progress*w)+'px)'; break;
    }
    if(time >= duration || progress <= 0){
     clearInterval(eng);
     _this.hide().css('clip:rect(auto,auto,auto,auto)');
    } else _this.css(clip);
   }, 10);
   return this;
  },
  intoView : function(offset){
   offset = offset || 0;
   this.show(); oParts.scroll(this.offset(1) - oParts.metrics(3) - offset); return this;
  },
  tween : function(params, options){
   var _this = this, begin = new Date()*1, _params = [], _progress = [];
   var _opts = {duration:1000, complete:null, easing:'easeOutPow4'};
   if(options){
    for(var o in _opts) if(options[o] !== void 0) _opts[o] = options[o];
   }
   var easingFx = oParts.easingType[_opts['easing']] || function(t, b, c, d){return c*t/d + b};
   var duration = _opts['duration'], from = to = 0, x = y = w = h = null;
   for(var p in params){
    if(typeof this.css(p) !== UD){
     if(typeof params[p] == 'object'){
      var _from = typeof params[p]['from'] === UD ? 0 : 1;
      switch (p){
       case 'left' :
        if(params[p]['from'] == 'auto' || !_from){from = x = this.$.offsetLeft || 0;} else from = x = params[p]['from']; break;
       case 'top' :
        if(params[p]['from'] == 'auto' || !_from){from = y = this.$.offsetTop || 0;} else from = y = params[p]['from']; break;
       case 'width' :
        if(params[p]['from'] == 'auto' || !_from){from = this.$.offsetWidth || 0;} else from = params[p]['from']; break;
       case 'height' :
        if(params[p]['from'] == 'auto' || !_from){from = this.$.offsetHeight || 0;} else from = params[p]['from']; break;
       default : from = _from ? params[p]['from'] : 0;
      }
      _params.push({'css': p, 'from': from, 'to': params[p]['to'], 'suffix':params[p]['suffix'] || 'px'});
     } else {
      switch(p){
       case 'left' : from = x = isNaN(this.css(p)) ? this.$.offsetLeft : parseInt(this.css(p)) || 0; break;
       case 'top'  : from = y = isNaN(this.css(p)) ? this.$.offsetTop : parseInt(this.css(p)) || 0; break;
       case 'width': from = w = isNaN(this.css(p)) ? this.$.offsetWidth : parseInt(this.css(p)) || 0; break;
       case 'height': from = h = isNaN(this.css(p)) ? this.$.offsetHeight : parseInt(this.css(p)) || 0; break;
       default : from = parseInt(this.css(p)) || 0;
      }
      _params.push({'css': p, 'from': from, 'to': parseInt(params[p]), 'suffix':params[p]['suffix'] || 'px'});
     }
    }
   }
   //console.log(_params[0].toSource());//+"|"+_params[1].toSource());
   //console.log(_params[2].toSource()+"|"+_params[3].toSource());
   if(x !== null || y !== null) this.moveTo(x, y);
   var eng = setInterval(function(){
    var time = new Date()*1 - begin;
    if(time > duration){
     clearInterval(eng);
     for (var i = 0, len = _params.length; i < len; i++){
      _this.css(_params[i]['css'] + ':' + _params[i]['to'] + _params[i]['suffix']);
     }
     if(_opts['complete']) _opts['complete']();
    } else {
     for (var i = 0, len = _params.length; i < len; i++){
      _progress[i] = parseFloat(easingFx(time, _params[i]['from'], _params[i]['to'] - _params[i]['from'], duration));
      _this.css(_params[i]['css'] + ':' + _progress[i] + _params[i]['suffix']);
     }
    }
   }, 10);
   return this;
  },
  each : function(F, index){
   for (var i = 0, l = this.oparts.length; i < l; ++i){
    if(this.$break) break;
    F.call(this, this.oparts[i], i);
   }
   return this;
  },
  cancelEvent : function(){
   this.each(function(){
    if(oParts.evt){
     oParts.evt.preventDefault();
     oParts.evt.stopPropagation();
    }
   });
   return this;
  },
  on : function(evType, F){
   var listener = function(t){
    var ev = evType.split('|');
    for (var i = 0, l = ev.length; i < l; i++){
     var evi = ev[i], evRef = '_' + evi;
     if(typeof t[evRef] != 'object'){
      t[evRef] = [];
      if(t['on' + evi]) t[evRef].push(t['on' + evi]);
     }
     if(!t[evRef][F]) t[evRef].push(F);
     t['on' + evi] = function(e){
      e = e || ieev(window.event);
      if(client.MSIE && !client.IE9) e.currentTarget = this;
      for(var j in this[evRef]){
       this[evRef][j].call(this, e);
      }
     }
    }
    t = null;
   }
   this.each(function(t){ listener(t)});
  },
  off : function(evType, F){
   var listener = function(o){
    var evRef = '_' + evType;
    if(o[evRef]){
     for(var i in o[evRef]) if(F.toString() == o[evRef][i].toString()) delete o[evRef][i];
     if(oParts.isEmpty(o[evRef])) delete o[evRef];
    }
   }
   this.each(function(o){ listener(o)});
  },
  click : function(F){ this.on('click', F);},
  hover : function(F, R){
   this.on('mouseover', F); this.on('mouseout', R); return this;
  }
 }; //#prototype
 
 Parts.extend = function(name, method){
  if(!Parts.prototype[name]){
   Parts.prototype[name] = method;
  }
 };

 w.o = function(a, context, htmlelement){
  var element = new Parts(a, context || d);
  if(!element.size) delete element;
  return element.size ? element : null;
 }

 function ieev(e){
  e.preventDefault = new Function('event.returnValue = false;');
  e.stopPropagation = new Function('event.cancelBubble = true;');
  e.target = e.srcElement;
  e.relatedTarget = e[(e.target == e.fromElement ? 'to' : 'from') + 'Element'];
  e.pageX = de.scrollLeft + e.clientX || d.body.scrollLeft + e.clientX || 0;
  e.pageY = de.scrollTop + e.clientY || 0;
  return e;
 };

 oPartsUnloadEvent = function(){
  if(!oParts || !oParts.events) return;
  for (var i = 0, ev, oe; oe = oParts.events[i++];){
   ev = oe[i]; if(ev && ev[0]) ev[0][ev[1]] = null;
  }
  oParts = null;
 }
 
 o(w).on('unload', oPartsUnloadEvent);

 oParts.start = function(F){
  for(var i in oParts.callee) if(oParts.callee[i] !== F) oParts.callee.push(F);
  if(client.Gecko || client.Opera || client.Webkit){
   d.addEventListener('DOMContentLoaded', F, false);
  } else if(client.MSIE){
   (function(){try{new Image().doScroll();}catch(e){setTimeout(arguments.callee,1);return;}F();})();
  } else o(w).on('load', F);
 };
 
 [].forEach || (Array.prototype.forEach = function(F){
  var i, l = this.length;
  for (i = 0; i < l; i++){
   if(typeof F != 'function') return;
   if(i in this) F.call(arguments[0], this[i], i, this);
  }
 });
 var EVENTS = 'MOUSEDOWN|MOUSEUP|MOUSEOVER|MOUSEOUT|MOUSEMOVE|MOUSEDRAG|CLICK|DBLCLICK|KEYPRESS|KEYDOWN|KEYUP';
 if(client.w3c){
  EVENTS.split('|').forEach(function(e){
   w.addEventListener(e.toLowerCase(), function(e){ oParts.evt = e}, true);
  });
 } else {
  EVENTS.split('|').forEach(function(e){
   d.attachEvent('on' + e.toLowerCase(), function(){ oParts.evt = ieev(event);});
  });
 }

 oParts.target = function(a){
  try {
   var tar = oParts.evt.target;
   if(a === 0) return o(tar).offset(0); // x-offset
   if(a === 1) return o(tar).offset(1); // y-offset
   if(a === 2) return [o(tar).offset(0), o(tar).offset(1)]; // x, y-offset
   return o(tar);
  } catch(e){ return null;}
 }

 oParts.create = function(tag, css, parent, fly){
  var I = tag.indexOf('#'), C = tag.indexOf('.'); fly = fly || false;
  var el = d.createElement(tag.split(/[#\.]/)[0]);
  var context = parent || d.body;
  if(I > 0) el.id = tag.slice(I + 1);
  if(C > 0) el.className = tag.slice(C + 1);
  if(!fly){
   if(context.$) context = context.$;
   context.appendChild(el);
   el = el.id ? o(tag.slice(I)) : el.className ? o(tag.slice(C)) : o(el);
  } else el = o(el);
  if(css) el.setCSS(css);
  return el;
 };
 
 oParts.fragment = function(nodes){
  var frag, div = d.createElement('div'); div.innerHTML = nodes;
  frag = d.createDocumentFragment();
  while (div.firstChild) frag.appendChild(div.firstChild);
  return frag;
 };

})();

oParts.isEmpty = function(ob){
 for(var i in ob) return false; return true;
};
 
oParts.search = function(rex, array){
 for (var i = 0, l = array.length, m = null; i < l; i++){
  m = rex.test(array[i]);
  if(m) return array[i];
 }
 return m;
};

oParts.metrics = function(w){
 var d = document, de = d.documentElement;
 switch (w){
  case 'w' : case 0 : return de.clientWidth || self.innerWidth || d.body.clientWidth || 0;
  case 'h' : case 1 : return self.innerHeight || de.clientHeight || d.body.clientHeight || 0;
  case 'dh': case 2 : return de.scrollHeight || d.body.scrollHeight || 0;
  case 'sc': case 3 : return window.pageYOffset || de.scrollTop || d.body.scrollTop || 0;
  default: return 0;
 }
}

oParts.queue = {
 entries : [],
 inprocess : null,
 enqueue : function(entry){
  this.entries.push(entry);
 },
 flush : function(){
  if(this.inprocess) return;
  while (this.entries.length){
   var entry = this.entries.shift();
   if(entry.toString().indexOf('await:') !== -1){
    var ms = Number(entry.split(':')[1]);
    var _this = this;
    this.inprocess = setTimeout(function(){
     _this.inprocess = null;
     _this.flush();
    }, ms);
    return;
   }
   entry();
  }
 }
}

oParts.scroll = function(amountY, easingType){
 easingType = oParts.easingType[easingType] || oParts.easingType['easeOutPow4'];
 var begin = new Date()*1;
 var ms = oParts.client.Webkit ? 30 : 15;
 var from = oParts.metrics(3), duration = 1000;
 var eng = setInterval(function(){
  var time = new Date()*1 - begin;
  var progress = easingType(time, from, amountY, duration);
  if(time >= duration){
   clearInterval(eng);
   window.scrollTo(0, from + amountY);
  } else window.scrollTo(0, progress);
 }, ms);
};

oParts.easingType = {
 easeNone: function(t, b, c, d){return c*t/d + b},
 easeOutPow2: function (t, b, c, d) {return -c *(t/=d)*(t-2) + b},
 easeOutPow3: function (t, b, c, d){return c*((t=t/d-1)*t*t + 1) + b},
 easeOutPow4: function(t, b, c, d){return -c *((t=t/d-1)*t*t*t - 1) + b},
 easeOutPow5: function(t, b, c, d){return c*((t=t/d-1)*t*t*t*t + 1) + b},
 easeOutMixed: function(t, b, c, d){return (t < -0.1) ? c*((t=t/d-1)*t*t*t*t + 1) + b : -c *(t/=d)*(t-2) + b},
 easeOutElastic : function(t, b, c, d, a, p){ var s;
  if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3;
  if(!a || a < Math.abs(c)){ a=c; s=p/4; } else s = p/(2*Math.PI) * Math.asin(c/a);
  return(a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p ) + c + b)},
 easeInPow2: function (t, b, c, d){return c*(t/=d)*t + b},
 easeInPow3: function (t, b, c, d){return c*(t/=d)*t*t + b},
 easeInPow4: function (t, b, c, d){return c*(t/=d)*t*t*t + b},
 easeInPow5: function (t, b, c, d){return c*(t/=d)*t*t*t*t + b},
 easeInOutPow3: function (t, b, c, d){return ((t/=d/2) < 1) ? c/2*t*t*t + b : c/2*((t-=2)*t*t + 2) + b},
 easeInMixed: function (t, b, c, d){ return (b < 0.1) ? -c *((t=t/d-1)*t*t - 1) + b : c*(t/=d)*t*t*t + b},
 easeOutExpo: function (t, b, c, d){return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b},
 easeOutBack: function(t, b, c, d, s){ if(s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b},
 easeOutBounce: function(t, b, c, d){if((t/=d) <(1/2.75)){return c*(7.5625*t*t) + b;} else if(t <(2/2.75)){
   return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b} else if(t <(2.5/2.75)){
   return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b} else {
   return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
  }
 },
 easeInBounce: function(t,b,c,d){
  return c - oParts.easingType.easeOutBounce(d-t, 0, c, d) + b;
 }
};

oParts.imgloader = function(hash, path){
 for(var name in hash){
  eval(name+'= new Image().src = "'+path+hash[name]+'";');
 }
}

oParts.server = {
 request_count : 0,
 queue : [],
 request : function(){
  if(window.XMLHttpRequest) return new XMLHttpRequest();
  if(window.ActiveXObject){
   try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch (e){
    try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch (e){ return null;}
   }
  }
  return null;
 },
 get : function(url, func, async, type){
  var timer, r = oParts.server.queue[oParts.server.request_count++] = oParts.server.request();
  async = !async ? true : false;
  type = type || 'responseText';
  try {
   r.open("GET", url, async);
   r.onreadystatechange = function(){
    if(r.readyState==4){
     clearTimeout(timer);
     if(func) func(r[type]);
    }
   }
   if(oParts.client.MSIE) r.setRequestHeader("If-Modified-Since", "Thu, 01 Jun 1970 00:00:00 GMT");
   r.send(null);
   timer = setTimeout(function(){r.abort();}, 5000);
  } catch (e){;}
 },
 post : function(url, data, func, async){
  var r = oParts.server.request();
  async = !async ? true : false;
  try {
   r.open("POST", url, async);
   r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
   r.onreadystatechange = function(){
    if(r.readyState==4){
     if(func) func(r.responseText);
    }
   }
   r.send(data);
  } catch (e){;}
 },
 abort : function(index){
  if(typeof index == "undefined"){
   for(var i = 0; i < oParts.server.queue.length; i++){
    if(oParts.server.queue[i]) oParts.server.queue[i].abort();
    oParts.server.queue[i] = null;
   }
   oParts.server.queue = [];
  } else {
   if(oParts.server.queue[index]) oParts.server.queue[index].abort();
  }
 }
}

oParts.loadScript = function(src){
 if(!oParts.scripts) oParts.scripts = {};
 var r, s, async = arguments[1] ? true : false, d = document, safari = oParts.client.Webkit;
 if(!oParts.scripts[src]){
  try {
   r = oParts.server.request();
   r.open('GET', src, async);
   r.send(null);
   if(r.readyState==4){
    if(r.status==200){
     s = d.createElement('script');
     s.type = 'text/javascript'; s.charset = 'utf-8';
     if(safari) s.src = src;
     s.text = r.responseText;
     o('head').addChild(s);
     if(safari) eval(s.text);
     oParts.scripts[src] = 1;
     return true;
    }
   }
  } catch(e){
   d.write('<script type="text/javascript" src="'+src+'"><\/scr'+'ipt>');
  }
 } else return true; // cached
 return false;
}

oParts.cookie = {
 set : function(name, value, days){
  days = days || 30;
  if(value === void 0 || value === '') return;
  var expire = new Date(); expire.setTime(expire.getTime() + (days*60*60*24*1000));
  document.cookie = name + "=" + escape(value) + "; expires=" + expire.toGMTString() + "; path=/";
 },
 get : function(name){
  for(var i = 0, c = document.cookie.split(";"); i < c.length; i++){
   if(c[i].indexOf(name) !== -1){
    if(c[i].trim().split('=')[0] === name) return unescape(c[i].split('=')[1].trim());
   }
  }
  return null;
 },
 del : function(name) { oParts.cookie.set(name, 'del', -1); }
}

oParts.alert = function(s){
 if(!confirm(s)) this.alert = function(){ return false};
}

String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g, '');}

oParts.query = (function(rule, context, parts){
function q(rule, context){
 var items, nodes = [], d = document;
 if(d.querySelectorAll){
  items = (context.$ || context || d).querySelectorAll(rule);
  for (var i = 0, l = items.length; i < l; i++) nodes[nodes.length] = items[i];
  return nodes;
 }
 var TAG, ATT = rule.indexOf('['), SID = rule.indexOf('#'), CLS = rule.indexOf('.');
 
 if(SID !== -1){
  TAG = SID > 0 ? rule.split('#')[0] : null;
  items = (context || d).getElementById(rule.slice(SID + 1));
  if(TAG){
   return (items.nodeName.toLowerCase() == TAG) ? [items] : null;
  } else return [items];
 } else if(CLS !== -1){
  return getC(rule.slice(CLS + 1), CLS > 0 ? rule.slice(0, CLS) : null, context);
 } else if(ATT !== -1){
  return getA(rule, ATT, rule.slice(0, ATT), context || d);
 } else {
  var m = /^\w+$/.exec(rule);
  if(m){
   items = context.getElementsByTagName(m[0]);
   for (var i = 0, l = items.length; i < l; i++) nodes[nodes.length] = items[i];
   return nodes;
  }
 }
 return nodes;
}

function getC(c, tag, context){
 var nodes = [], item, itemc, items = (context.$ || context || d).getElementsByTagName((tag || '*'));
 for(var i = 0, l = items.length; i < l; i++){
  item = items[i], itemc = item.className;
  if(itemc && (" " + itemc + " ").indexOf(" " + c + " ") != -1){
   nodes[nodes.length] = item;
  }
 }
 return nodes;
}
function getA(rule, apos, tag, context){
 var attr = rule.slice(apos + 1, -1);
 attr = (attr.indexOf('][') > 0) ? attr.split('][') : [attr];
 var s = '', a, e, k, ks, v, z, i = 0, l = attr.length;
 if(!oParts.queryCache[rule]){
 for(; a = attr[i++];){
  e = (i != l ? ' && ' : '');
  z = a.split('=');
  if(z[1]){
   k = z[0], ks = k.slice(-1);
   v = z[1].indexOf('"')===0 ? z[1].slice(1, -1) : z[1];
   k = k.indexOf('class') !== -1 ? k.replace('class', 'className') : k;
   switch (ks){
    case '^' : k = k.slice(0, -1); s += 'n["'+k+'"].indexOf("'+v+'")===0' + e; break;
    case '$' : k = k.slice(0, -1); s += 'n["'+k+'"].lastIndexOf("'+v+'")===(n["'+k+'"].length - "'+v+'".length)' + e; break;
    case '~' : k = k.slice(0, -1); s += '(n["'+k+'"]=="'+v+'" || n["'+k+'"].indexOf("'+v+' ")===0 || n["'+k+'"].indexOf(" '+v+' ")!==-1 || ((z=n["'+k+'"].indexOf(" '+v+'"))>0 && !n["'+k+'"].charAt(z+"'+v+'".length+1)))' + e; break;
    case '*' : k = k.slice(0, -1); s += 'n["'+k+'"] && n["'+k+'"].indexOf("'+v+'")!=-1' + e; break;
    case '|' : k = k.slice(0, -1); s += '(n["'+k+'"]=="'+v+'" || n["'+k+'"].indexOf("'+v+'-")!= -1)' + e; break;
    default  : s += 'n["'+k+'"]=="'+ v +'"' + e;
   }
  } else {
   s += 'n["'+(a==='class'?'className':a)+'"]' + e;
  }
 }
  oParts.queryCache[rule] = s;
 } else {
  s = oParts.queryCache[rule];
 }
 var r = [];
 var items = (context.$ || context || d).getElementsByTagName(tag||'*'), j = 0, n;
 var v = new Function('n', 'return ('+s+')');
 for (;n = items[j++];){
  if(v(n)){
   r[r.length] = n;
  }
 }
 return r;
}

return function(rule, context, parts) {
 var d = document, nodes = [];
 if (rule.indexOf(',') > 0) {
  var i, r, rs = rule.split(','), x = rs.length, unique = [], u = {}, ns;
  while (x--) {
   r = rs[x].replace(/^\s|\s$/g, '');
   if (u[r] == void 0) unique[unique.length] = u[r] = r;
  }
  for (i = 0; u = unique[i++];) {
   ns = $S(u, context);
   for (x = 0; r = ns[x++];) nodes[nodes.length] = r;
  }
 } else nodes = q(rule, context, parts);
 if (nodes == null || nodes == '') return null;
 if (parts) return o(nodes);
 return nodes;
}

})();

window.alert = function(s){
 /*if(typeof s == 'string' && s.indexOf('\t') > 0){
  var _s = s.split('\t'), __s = [];
  var e = eval(_s[0]);
  //for (var i = 0, len = _s.length; i < len; i++) __s.push(eval(_s[i]));
 }*/
 if(!confirm(s)) this.alert = function(){ return false};
}
