$(document).ready(function(){

	
	/*-- focus input
	--------------------------------------------------------*/
	
	$("#menu .searchForm input[type='text']").focus(function() {
		if ($(this).val() == translator['doSearch']) {
			$(this).val("");
		};
	}).blur(function() {
		if ($(this).val() == "") {
			$(this).val(translator['doSearch']);
		};
	});
	
	
	/*-- homepage tabs  !!!!! TO DO
	--------------------------------------------------------
	
	$.tools.tabs.addEffect("default1", function(tabIndex, done) {
		Cufon.replace("#tabs .panel ul li a", {
			color: '#fff'
		});	
		
	
		this.getPanes().not(tabIndex).animate({
			left: '1000px'
		})
	
		Cufon.replace("#tabs .panel ul li a:eq("+tabIndex+")", {
			color: '#333',
			textShadow: '1px 1px #dfdfdf'
			//textShadow: '-1px -1px #cbcbcb'	
		});
		this.getPanes().eq(tabIndex).animate({
			left: '0'
		 });
		
	
		
		done.call();
	});

	$("#tabs ul.mainTabs").tabs(".panes > .panesItem", {
		effect: 'default1',
		rotate: true					
	}).slideshow({
		clickable: false
	});*/
	
		if ($.browser.safari && document.readyState != "complete"){
			setTimeout(arguments.callee, 100);
    	return;
		} 
	
	$('#tabs .coda-slider').codaSlider({
		dynamicTabs: false
	});

	

	$('.prevBtn, .nextBtn').click(function(){
		return false;									  
	});
	
	
	/*-- wysokosc tla w headerze
	--------------------------------------------------------*/
	$(".jqform").livequery(function(){
			 $(this).jqTransform();						
	});
	
	/*-- filesupload btn style
	--------------------------------------------------------*/
	
	$("input.file").filestyle({ 
          image: "../gfx/fileupload.jpg",
          imageheight : 25,
          imagewidth : 77,
          width : 100
      });


	/*-- ocenianie gwiazdkami
	--------------------------------------------------------*/

	$('div.starsWrapper').stars({ captionEl: $(".starsCaption2") });
	/*
	$('div.starsWrapper a').livequery(function() {
		$(this).hover(function() {
			$(this).parent().parent().next('div.starsCaption').text($('#hiddenStarsCaption').text());
		}, function() {
			$(this).parent().parent().next('div.starsCaption').text('');
		});
	});
	*/
	
						   
	/*-- Cufon - font replacement
	--------------------------------------------------------*/

	Cufon.replace("#tabs .panelTabs ul li a, .boxSidebar h3, .boxWrapper h3:not(.noCufon), .boxBlack h3, #introSection h1, .notAccount h4");
	
	Cufon.replace("#tabs .panel ul li a.current", {
			textShadow: '-1px -1px #cbcbcb'			  
		});
	
	Cufon.replace(".coda-slider .panel h2, .thankYou h2", {
		textShadow: '3px 3px #dfdfdf'		  
	});

	Cufon.replace('#menu ul li a', {
				//  textShadow: '-1px -1px #cbcbcb',
				  hover: {
					color: '#3e3e3f'
				  }
	});
	
	Cufon.replace('#tabs a.registerBtn span', {
		textShadow: '-1px -1px #000'					  
	});
	
	/*-- datepicker
	--------------------------------------------------------*/
	
	$(".datepicker").datepicker({
      dateFormat: 'yy-mm-dd',
      altFormat: 'yy-mm-dd',
      firstDay: 1
	});
	

	
});

