$(document).ready(function() {
	 
	//$('.offerGallery a').lightBox(); zahashowane przez Janka

	//$('.OfferTabs > div').tabs();

	
	$('.Tab').mousedown(function() {
		$('.OfferTabs').children().removeClass('Selected');
		$(this).addClass('Selected');
	});
	
	$('.Param').mousedown(function() {
		$('.ConditionsParams').children().removeClass('SelectParam');
		$(this).addClass('SelectParam');
	});
	$('.ParamL').mousedown(function() {
		$('.ConditionsParamsL').children().removeClass('SelectParamL');
		$(this).addClass('SelectParamL');
	});		//dodane przez Janka	$('#user_form').validate({        rules: {            nazwisko: 'required',            telefon: 'required',            email: {                email: true            }        }        ,        errorPlacement: function(error, element) {            error.appendTo(element.next());        }        ,        messages: {            email: 'Wprowad poprawny adres e-mail'        }                    });
});
function monitTravel()
{
	$.fancybox({
		'padding'		: 0,
		'autoScale'		: false,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'title'			: this.title,
		'width'		: 680,
		'height'		: 495,
		'href'			: 'http://www.pkssuwalki.pl/monitTravel.jpg'
	});
}
function jById(href,id) {
	var h=$('#'+id);
	h.load(href,{},function(){
		loadEnd(id);
	});
	
	loadStart(id);
}

function loadEnd(id){$('.Loadrek').remove();}


function loadStart(id)
{
	var h=$('#'+id);
	var wi = h.css('width');
	wid = wi.replace('px','');
	widt = (Math.round((wid)/2));
	h.append('<div style=\'height:'+ h.height() +'px; width: '+wid+'px;\' class=\'Loadrek\'></div>');
}
