/* Copyright (C) 2007 - 2011 YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */

(function(a){var b=function(){};a.extend(b.prototype,{name:"Calendar",options:{translations:[],timepicker_translations:[]},initialize:function(b,c){this.options=a.extend({},this.options,c);a.datepicker.regional.xx=this.options.translations;a.datepicker.setDefaults(a.datepicker.regional.xx);a.timepicker.regional.xx=this.options.timepicker_translations;a.timepicker.setDefaults(a.timepicker.regional.xx);b.delegate("img.zoo-calendar","click",function(){var b=a(this).prev("input");b.length&&(b.attr("rel")==
"timepicker"?(a(this).data("initialized-timepicker")||(b.datetimepicker({showOn:"button",dateFormat:a.datepicker.ISO_8601,constrainInput:!1,timeFormat:"hh:mm:ss"}),a(this).prevUntil("input").remove(),a(this).data("initialized-timepicker",!0)),b.datetimepicker("show")):(a(this).data("initialized-datepicker")||(b.datepicker({showOn:"button",dateFormat:a.datepicker.ISO_8601,constrainInput:!1}),a(this).prevUntil("input").remove(),a(this).data("initialized-datepicker",!0)),b.datepicker("show")))})}});
a.fn[b.prototype.name]=function(){var e=arguments,c=e[0]?e[0]:null;return this.each(function(){var d=a(this);if(b.prototype[c]&&d.data(b.prototype.name)&&c!="initialize")d.data(b.prototype.name)[c].apply(d.data(b.prototype.name),Array.prototype.slice.call(e,1));else if(!c||a.isPlainObject(c)){var f=new b;b.prototype.initialize&&f.initialize.apply(f,a.merge([d],e));d.data(b.prototype.name,f)}else a.error("Method "+c+" does not exist on jQuery."+b.name)})}})(jQuery);
