
// iCarousel is an open source (free) javascript tool for creating carousel like widgets. Copyright (c) 2007 Fabio Zendhi Nagao, http://zend.lojcomm.com.br/icarousel/, MIT Style License.
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('q Z=C z({5:{7:{i:"1x",D:"18",s:1,r:13.12.1I.14,u:1K,l:{i:"1J",R:1X,1z:"G"}},j:{W:"j",p:1T},P:"1Y",S:"1H",T:"21",1d:z.H,1b:z.H,1F:z.H,1t:z.H,1A:z.H},1L:8(1i,1k){4.1N(1k);4.m=$(1i);4.9=$A($$("."+4.5.j.W));4.x=U;d(4.5.P!="10"&&$(4.5.P)){$(4.5.P).17("11",8(1o){C 1a(1o).G();4.1B();4.J("1d",4,20)}.h(4))}d(4.5.S!="10"&&$(4.5.S)){$(4.5.S).17("11",8(1g){C 1a(1g).G();4.15();4.J("1b",4,20)}.h(4))}d(4.5.T!="10"&&$(4.5.T)){$(4.5.T).17("11",8(1e){C 1a(1e).G();4.1r()}.h(4))}q w=4.5.7;K(4.5.7.i.N()){t"L":4.9.Y(8(E){E.e=E.19("B",{u:w.u,r:w.r});E.O("B",0);E.1l({"1n":8(){4.x=1m;d(4.5.7.l.i=="I"){4.v=$1h(4.v)}}.h(4),"1c":8(){4.x=U;d(4.5.7.l.i=="I"){4.v=4.V.X(4.5.7.l.R,4)}}.h(4)})}.h(4));4.y=4.m.1p("y").1q();4.6=0;4.o(4.6);k;M:(2).1R(8(){4.9.Y(8(1f){1f.1V().1U(4.m)}.h(4))}.h(4));4.9=$A($$("."+4.5.j.W));4.9.Y(8(1j){1j.1l({"1n":8(){4.x=1m;d(4.5.7.l.i=="I"){4.v=$1h(4.v)}}.h(4),"1c":8(){4.x=U;d(4.5.7.l.i=="I"){4.v=4.V.X(4.5.7.l.R,4)}}.h(4)})}.h(4));4.e=4.m.1S({u:w.u,r:w.r,1Z:U});4.6=4.9.g/3;4.m.O(w.D,-4.6*4.5.j.p);k}d(4.5.7.l.i=="I"){4.v=4.V.X(4.5.7.l.R,4)}},1P:8(n){K(4.5.7.i.N()){t"L":q 1D=4.6;4.6=1E.1C(n%(4.9.g/3));4.o(4.6,1D);k;M:4.6=1E.1C(n%(4.9.g/3));4.6+=4.9.g/3;4.o(4.6);k}4.J("1A",4,20)},1B:8(){K(4.5.7.i.N()){t"L":q 1G=4.6;4.6-=4.5.7.s;d(4.6<0){4.6=(4.9.g-1)}4.o(4.6,1G);k;M:4.6-=4.5.7.s;d(4.6<4.9.g/3){4.m.O(4.5.7.D,-4.5.j.p*4.9.g*2/3);4.6=4.9.g*2/3-4.5.7.s}4.o(4.6);k}4.J("1F",4,20)},15:8(){K(4.5.7.i.N()){t"L":q 1s=4.6;4.6+=4.5.7.s;d(4.6>=4.9.g){4.6=0}4.o(4.6,1s);k;M:4.6+=4.5.7.s;d(4.6>4.9.g*2/3){4.m.O(4.5.7.D,-4.5.j.p*4.9.g/3);4.6=4.9.g/3+4.5.7.s}4.o(4.6);k}4.J("1t",4,20)},1r:8(){(4.m.1p("y").1q()==0)?4.m.19("y",{u:1u,r:13.12.1y.14}).f(4.y):4.m.19("y",{u:1u,r:13.12.1y.14}).f(0)},V:8(){d(4.5.7.l.1z=="G"&&!4.x){4.15()}},o:8(a,b){K(4.5.7.i){t"L":d($1W(b)){4.9[b].e.f(0).F(8(){4.9[a].e.f(1)}.h(4))}16{4.9[a].e.f(1)}k;t"1Q":q c=4;d(c.5.7.D=="Q"){c.e.f({"Q":-a*c.5.j.p})}16{c.e.f({"18":-a*c.5.j.p})}k;t"1x":q c=4;d(c.5.7.D=="Q"){c.e.f({"B":0.1v}).F(8(){c.e.f({"Q":-a*c.5.j.p}).F(8(){c.e.f({"B":1})})})}16{c.e.f({"B":0.1v}).F(8(){c.e.f({"18":-a*c.5.j.p}).F(8(){c.e.f({"B":1})})})}k}}});Z.1w(C 1O);Z.1w(C 1M);',62,126,'||||this|options|atScreen|animation|function|aItems|||_10|if|fx|start|length|bind|type|item|break|rotate|container||_animate|size|var|transition|amount|case|duration|timer|_6|isMouseOver|height|Class||opacity|new|direction|_7|chain|stop|empty|auto|fireEvent|switch|fade|default|toLowerCase|setStyle|idPrevious|top|interval|idNext|idToggle|false|_autoRotate|klass|periodical|each|iCarousel|undefined|click|Transitions|Fx|easeInOut|_next|else|addEvent|left|effect|Event|onClickNext|mouseleave|onClickPrevious|_5|_8|_4|clear|_1|_9|_2|addEvents|true|mouseenter|_3|getStyle|toInt|_toggle|_d|onNext|1000|75|implement|fadeNscroll|Sine|onMouseOver|onGoTo|_previous|abs|_b|Math|onPrevious|_c|next|Cubic|manual|500|initialize|Options|setOptions|Events|goTo|scroll|times|effects|100|injectInside|clone|defined|5000|previous|wait||toggle'.split('|'),0,{}))






window.addEvent('domready', function() {

//debug.create(); 

	try {
		$("printpage").addEvent("click", function(e) {
			window.print();
			e = new Event(e);
			e.stop();
		});
	} catch(e) {
		//nothing important
		//debug.log('could not attach print button'+e);
	}
	
		
	try {
		var szNormal = 224, szSmall  = 165, szFull   = 404;
		
		if (window.ie6) {
			var szNormal = 221, szSmall  = 162, szFull   = 399;
		} else {
			var szNormal = 224, szSmall  = 165, szFull   = 401;
		}
		 
		var kwicks = $$("#posters a");
		var fx = new Fx.Elements(kwicks, {wait: false, duration: 300});
		kwicks.each(function(kwick, i) {
			
			kwick.addEvent("mouseenter", function(event) {
				var o = {};
				o[i] = {width: [kwick.getStyle("width").toInt(), szFull]}
				kwicks.each(function(other, j) {
					if(i != j) {
						var w = other.getStyle("width").toInt();
						if(w != szSmall) o[j] = {width: [w, szSmall]};
					}
				});
				fx.start(o);
			});
		});
		
		$("posters").addEvent("mouseleave", function(event) {
			var o = {};
			kwicks.each(function(kwick, i) {
				o[i] = {width: [kwick.getStyle("width").toInt(), szNormal]}
			});
			fx.start(o);
		});
		
		//set them up in the first place. don't know how to make this any better
		$("posters").fireEvent("mouseleave");
	} catch(ee) {
		//nothing major
	}
	
	//set up slidey events on whatson page etc:
	
	var calevents = $$('#content-container .readmorecallinkcontainer');
	calevents.each(function(calevent) {
		var eventSlider = new Fx.Slide(calevent.getNext());
		eventSlider.hide();
		
		var link = calevent.getChildren();
		link[0].addEvent('click', function(e){
			e = new Event(e);
			eventSlider.toggle();
			e.stop();
		});
		
		//alert(calevent);
		//alert(calevent.getNext());
		//calevent.getNext().style.display = 'none';
		//calevent.style.display="none";

	});
	
	// Share Links
	$$('ul.share-list').setStyle('display', 'none');

	$$('span.share-this').addEvent('mouseover', function(e) {
		$$('ul.share-list').setStyle('display', 'block');
	});
	
	$$('ul.share-list').addEvent('mouseleave' , function(e) {
		$$('ul.share-list').setStyle('display', 'none');
	});
	
});



var fader = new Class({
	Implements: Options,
	options: {
		speed: '1000',
		activeclass: 'current',
		elementtag: 'a',
		counter: 1
	},
	initialize: function(parent,options){
		this.parent = $(parent);
		this.setOptions(options);
		this.currentitem = this.parent.getFirst(this.options.elementtag);
		this.currentitem.set('class','current');
		

	},
	fade: function() {
		this.next = null;
		this.current = null;
		this.current = this.parent.getChildren(this.options.elementtag+'.'+this.options.activeclass);
		this.next = this.current.getNext(this.options.elementtag);
		if (this.next == '') this.next = this.currentitem;
		this.next.addClass('current');
		this.current.removeClass('current');
	},
	start: function() {
		this.fade.periodical(this.options.speed,this);
	}
});


/*//////////////////////////////////////////////////////////////
//	Set Up Carousel
/////////////////////////////////////////////////////////////*/

window.addEvent("domready", function() {  
     
     if(document.getElementById("example_3_content")){
     
     
          new iCarousel("example_3_content", {  
        idPrevious: "example_3_previous",  
        idNext: "example_3_next",  
        idToggle: "undefined",  
         item: {  
             klass: "item",  
             size: 130  
         },  
         animation: {  
             type: "scroll", 
             amount: 3 
         }  
     });  
     
     
     
     
     
     
     }
 
     
 });  





