/**
 *
 * jQuery functions
 * Author: Jakub Samulski CSIN (www.enter-price.pl)
 * 
 */

$(document).ready(
	function(){
		$('a.lightbox').lightBox(); // Select all links that contains lightbox in the attribute rel
		
        $('#newsSlideshow').after('<div id="nav">').cycle({
			fx: 'fade',
			cleartype:  0,
			cleartypeNoBg: true,
			speed: 500,
			timeout: 5000,
			pager: '#nav',
			pagerAnchorBuilder: function(index, el) {
				return '<a href="#"></a>'; // whatever markup you want
			}
		});

		 $('#galSlideshow').after('<div id="navGal">').cycle({
			fx: 'scrollRight',
			cleartype:  0,
			cleartypeNoBg: true,
			speed: 1500,
			timeout: 5000,
			pager: '#navGal',
			pagerAnchorBuilder: function(index, el) {
				return '<a href="#"></a>'; // whatever markup you want
			},
			after: function(){
				$('#caption').children().html(this.title);
			}
		});
	}
);
