/* 
 * DasÖrtliche Javascript Library
 * Copyright (C) 2008 TENSQUARE gmbh
 */
if(!$oe$||!$||!$oe$.ui){throw new Error("Core libs missing");}(function(){var A=$oe$.getNamespace("scroller");function E(I,J){var G=this;var I=I;this.itemCount=I;var J=J;var F=null;this.bindEvents=function(){var N={size:I,scroll:1,initCallback:D.getBinding(G),itemFirstInCallback:C.getBinding(G),itemLastInCallback:B.getBinding(G),buttonNextHTML:null,buttonPrevHTML:null};F=$("#oe_scroller");if(F.lebgth==0){return ;}F=$(F.get(0));var K=F.children("li");for(var L=0;L<K.length;L++){var M=$(K[L]);M.removeClass("sc_gone");M.bind("click",G,H);M.attr("oeScrollerIdx",L);}F.jcarousel(N);};function H(L){var K=$(this).attr("oeScrollerIdx");if($oe$.val.isFunction(J)){J($(this),K);}}}function D(F){$("#oe_scroller_first").bind("click",this,function(){F.scroll(1);return false;});$("#oe_scroller_next").bind("click",this,function(){if(F.last<F.size()){F.next();}return false;});$("#oe_scroller_prev").bind("click",this,function(){F.prev();return false;});$("#oe_scroller_last").bind("click",this,function(){F.scroll(F.size());return false;});}function C(I,G,F,H){if(F==1){$("a#oe_scroller_prev").removeClass("previous_activated").addClass("previous_deactivated");$("a#oe_scroller_first").removeClass("first_activated").addClass("first_deactivated");}else{$("a#oe_scroller_prev").removeClass("previous_deactivated").addClass("previous_activated");$("a#oe_scroller_first").removeClass("first_deactivated").addClass("first_activated");}}function B(I,G,F,H){if(F<I.size()){$("a#oe_scroller_next").removeClass("next_deactivated").addClass("next_activated");$("a#oe_scroller_last").removeClass("last_deactivated").addClass("last_activated");}else{$("a#oe_scroller_next").removeClass("next_activated").addClass("next_deactivated");$("a#oe_scroller_last").removeClass("last_activated").addClass("last_deactivated");}}A.ScrollerHandler=E;}());