$(document).ready(function(){

	if($('#szyba').length > 0) {
		$("#szyba").showcase({
		    css: { width: "634px", height: "316px" },
		    animation: { interval: 5000,
		                stopOnHover: true,
		                easefunction: "swing",
		                speed: 600,
		                type: "fade" },

		    navigator: {
		        position: "bottom-right",
		        css: { display:"none" },
		        showNumber: false
		    },
		    titleBar: {
		    	enabled: true,
		    	autoHide: false,
		    	css: {
		    		width: "100%",
		    		padding:"0px",
		    		height:"auto",
		    		margin:"0",
		    		"font-weight":"normal",
		    		"font-style":"normal",
		    		opacity:"0.8",
		    		backgroundColor:"transparent"
		    	}
		    }
		});
	}
	
	if($('#scroller').length > 0) {
		$("#scroller").simplyScroll({
			autoMode: 'loop'
		});
	}
	
	if($('#searchMenu').length > 0) {
		$('#searchMenu a').each(function() {
			$(this).click(function() {
				$('#searchMenu a').removeClass('on');
				$(this).addClass('on');
			});
		});
	}
	
	
	$('input.clear').clearDefault();

});


(function($){
	$.fn.clearDefault = function(){
		return this.each(function(){
			var default_value = $(this).val();
			$(this).focus(function(){
				$(this).removeClass('inputClear'); 
				if ($(this).val() == default_value) $(this).val("");
			});
			$(this).blur(function(){
				if ($(this).val() == "") { $(this).val(default_value); $(this).addClass('inputClear'); }
			});
		});
	};
})(jQuery);

