$(function() {

$('#news_slider').cycle({
		fx:     'scrollHorz',
		speed:  'slow',
		timeout: 4000,
		next:   '#next',
		prev:   '#prev',
 	    cleartype:  true,
  	    cleartypeNoBg:  true
	});

		Cufon.replace('.dobrovoljno_lb, .telefoni_lb, .menu li, .galerija_bt, .linkovi_bt, h2, h3, h4, .title', {hover: true});
		Cufon.replace('h1', {color: '-linear-gradient(#e04147, #bd0b12)'});

   // Load theme
    Galleria.loadTheme('/script/galleria.classic.js');

    // run galleria and add some options
    $('#galleria').galleria({
        image_crop: false, // crop all images to fit
        thumb_crop: true, // crop all thumbnails to fit
        transition: 'fade', // crossfade photos
        transition_speed: 700, // slow down the crossfade
        data_config: function(img) {
            // will extract and return image captions from the source:
            return  {
                title: $(img).parent().next('strong').html(),
                description: $(img).parent().next('strong').next().html()
            };
        },
        extend: function() {
            this.bind(Galleria.IMAGE, function(e) {
                // bind a click event to the active image
                $(e.imageTarget).css('cursor','pointer').click(this.proxy(function() {
                    // open the image in a lightbox
                    this.openLightbox();
                }));
            });
        }
    });

});
