jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
 return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

document.calendar = new CalendarPopup( 'calendar' );

setupCalendar( document.calendar );



$(document).ready(function(){ 
	
	// png w IE6
	$(document).pngFix(); 
	
	// lapka
//	var api = $( ".scrollable" ).scrollable( {vertical:true,size:5});
	$( ".photoOnList" ).mouseover( function() {
		this.style.cursor = 'pointer';
	});
	$( ".photoOnList" ).mouseout( function() {
		this.style.cursor='normal';
	});
	
	// przesuwanie
	var inter = null;
	var ypos = 0;
	if( $.browser.msie ) {	
		var offsety = 230;
	} else {
		var offsety = 240;
	} 
	var hotspot = 80;	
	var sc = $( ".scrollable" );
	
	function scrollToPosition() {

		var h = sc.innerHeight( false );
		var mover = false;		
		if( ypos < hotspot ) {
			var sign = '-';
			mover = true;
		} else if( h - ypos < hotspot ) {
			var sign = '+';
			mover = true;			
		}
		if( mover ) {
			var str = sign+'=2px';
			sc.scrollTo( str, 4 );
			$("#tester2" ).html( h+' '+str );
		} else {
			clearInterval( inter );
		}
	}
	
	sc.mousemove( function( e ) {
  		ypos = e.pageY - this.offsetTop - offsety;
	});
	sc.mouseover( function(e) {
		inter = setInterval( scrollToPosition, 5 );
	});
	sc.mouseout( function() {
		clearInterval( inter );
	});
	
	 //$('.shadowbox').attr( 'href', $('.shadowbox').attr( 'href' ).substr( 1 ) );
	Sbinit(); 
}); 


var zurich = {	src: '/swf/zurich_bkr.swf', wmode:'transparent'	};
sIFR.activate( zurich );

sIFR.replace( zurich, {
	selector: 'h1'
	,css: [
		  	'.sIFR-root		{	color:#787878;	font-size:10px;	margin:0;	padding:0;	}',	
			'.white			{	color:#ffffff;	}',	
			'.number		{	color:#5d6905;	}',
			'.blue			{	color:#7290c4;	}'
	]	
});		
sIFR.replace( zurich, {selector: 'h1#blue',css: ['.sIFR-root {color:#7290c4;	font-size:20px;	margin:0;	padding:0;	}']	});		
sIFR.replace( zurich, {
	selector: '#menu'
	,css: [
		'.sIFR-root		{ color:#ffffff;	font-size:12px;	background-color:#868789; }',
		'a				{ color:#ffffff;	text-decoration:none;	letter-spacing: 1.1; }',
		'a:hover		{ color:#ffffff;	text-decoration:none;	letter-spacing: 1.1; }',
		'span			{ color:#ffffff;	font-size:12px;	background-color:#868789; }',
	]
});

sIFR.replace( zurich, {
	selector: 'h2.white'
	,css: [
		'.sIFR-root		{	color:#ffffff;	font-size:11px;	margin:0;	padding:0; width:100%	}',
		'a				{ color:#ffffff;	text-decoration:none;	width:100%; }',		
		'a:hover		{ color:#ffffff;	text-decoration:none;	width:100% }'		
	]
});


sIFR.replace( zurich, {
	selector: 'h2'
	,css: [
		'.sIFR-root		{	color:#868789;	font-size:11px;	margin:0;	padding:0;	}',
		'.white			{	color:#ffffff;	}',
		'.cblue			{	color:#7290c4;	}',
		'.number		{	color:#5d6905;	}'
	]
});

sIFR.replace( zurich, {
	selector: 'div.num'
	,css: [
		'.sIFR-root		{	color:#ffffff;	font-size:11px;	margin:0;	padding:0;	}'
	]
});

sIFR.replace( zurich, {
	selector: 'div.zur'
	,css: [
		'.sIFR-root		{	color:#868789;	font-size:11px;	margin:0;	padding:0;	text-align:center;	}'
	]
});


