(function($){
$.fn.bindStep=function(_1,_2){
var _3=$.extend({},$.fn.bindStep.defaults,_2);
var _4=new Image();
var _5=new Image();
_4.src=_3.nextBtn;
_5.src=_3.prevBtn;
return this.each(function(){
$currStep=$(this);
$currStep.addClass("jQueryBabyStep");
var o=$.meta?$.extend({},_3,$this.data()):_3;
if(_4.src!=o.nextBtn){
_4.src=o.nextBtn;
}
if(_5.src!=o.prevBtn){
_5.src=o.prevBtn;
}
$(_1).each(function(){
$nextStep=$(this);
$nextStep.addClass("jQueryBabyStep");
_6($currStep,$nextStep,o,"next");
if(o.bindPrev){
_6($nextStep,$currStep,o,"prev");
}
});
});
};
jQuery.goToStep=function(_7,_8){
if(_8===undefined){
_8=$.fn.bindStep.defaults.transition;
}
_8($(".jQueryBabyStep:visible"),$(_7));
};
function _6(s1,s2,_9,_a){
var _b=s1.attr("id")+"_to_"+s2.attr("id")+"_btn";
var _c=_b+"_container";
var _d=(_a=="next"?_9.nextBtn:_9.prevBtn);
var _e=_9.generateMarkup(_c,_b,_d);
_9.layoutButton(s1,_e,_a);
var _f=$("#"+_c);
_10(_f,_9.transition,s1,s2,_9.nextValidator);
};
function _10(_11,_12,s1,s2,_13){
_11.click(function(){
if(_13&&_13()){
_12(s1,s2);
}
});
};
function _14(_15){
if(window.console&&window.console.log){
window.console.log("babySteps: "+_15);
}
};
$.fn.bindStep.defaults={nextBtn:"assets/tibiaimage/button-next.png",prevBtn:"assets/tibiaimage/button-back.png",bindPrev:true,nextValidator:function(){
return true;
},transition:function(_16,_17){
_16.hide();
_17.show();
},layoutButton:function(_18,_19,_1a){
if(_1a=="next"||_1a=="prev"){
_18.append(_19);
}
},generateMarkup:function(id1,id2,img){
return (["<img style=\"margin-top: 5px; border: none; cursor: pointer;\"","src=\"",img,"\" ","id=\"",id1,"\" ","/>"].join(""));
}};
})(jQuery);

