
if (typeof console == "undefined" || typeof console.log == "undefined") var console = { log: function() {} }; 
$(document).ready(function(){
 
	// LIGHTBOX
	$('a.lightbox').lightBox({
		txtImage : 'Obr�zek',
		txtOf	: 'z',
		overlayBgColor : '#fff',
		imageLoading:			'/public/images/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
		imageBtnPrev:			'/public/images/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
		imageBtnNext:			'/public/images/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
		imageBtnClose:			'/public/images/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
		imageBlank:				'/public/images/lightbox-blank.gif'
	});
	
	 if($('#fb-feed ul li').length>1) {
	        $newsObjs = $('#fb-feed-source li');
	        $destinationObj = $('#fb-feed-content .facebook>span');
	        NEWS.switchThem($newsObjs,$destinationObj);
	        var timeout =  setInterval( function() {NEWS.switchThem($newsObjs,$destinationObj)}, 5000 );
	}
	

});

NEWS = {
	    counter:0,
	    switchThem:function($newsobjs,$destinactionobj) {
	        NEWS.counter++;
	        if (NEWS.counter > $newsobjs.size() -1 ) NEWS.counter = 0;
	        $destinactionobj.fadeOut( 'fast', function() {
	                $destinactionobj.html( $newsobjs.eq( NEWS.counter ).html() );
	                $destinactionobj.fadeIn();
	            }
	        );
	    }
	}



