    Shadowbox.init();

	
	function strpos (haystack, needle, offset) {
		var i = (haystack+'').indexOf(needle, (offset || 0));
		return i === -1 ? false : i;
	}

	
    // create custom animation algorithm for jQuery called "bouncy"
		$.easing.bouncy = function (x, t, b, c, d) {
		    var s = 1.70158;
		    if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		    return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
		}
		
		// create custom tooltip effect for jQuery Tooltip
		$.tools.tooltip.addEffect("bouncy",
		
			// opening animation
			function(done) {
				this.getTip().animate({top: '+=-15'}, 500, 'bouncy', done).show();
			},
		
			// closing animation
			function(done) {
				this.getTip().animate({top: '-=30'}, 500, 'bouncy', function()  {
					$(this).hide();
					done.call();
				});
			}
		);		

		var do_debug = 1;
        $(document).ready(function(){
// 			$('input.cena').priceFormat();
			$("#form_kontaktni_formular").validationEngine();
			$(".connect_widget_not_connected_text").hide();

		$("[title]").not('.notooltip').tooltip({
		   // tweak the position
		   offset: [10, 2],
		   // use the "slide" effect
		   effect: 'slide'
		// add dynamic plugin with optional configuration for bottom edge
		}).dynamic({ bottom: { direction: 'down', bounce: true } });

		if ($('img.qtip').html()) {
			$('img.qtip').qtip(
				{ content: $(this).attr("alt"), show: 'mouseover', hide: 'mouseout' }
			);
		}

		$.datepicker.setDefaults($.datepicker.regional['cs']);
		$("input.datum").datepicker({ dateFormat: 'dd.mm.yy', firstDay: '1', changeMonth: true, changeYear: true });
		$("input.datum").datepicker('option', 'monthNames', ['Leden','Únor','Březen','Duben','Květen','Červen','Červenec','Srpen','Září','Říjen','Listopad','Prosinec']);
		$("input.datum").datepicker('option', 'dayNamesMin', ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So']);
		

		});
