$(document).ready(function(){
	 
	
	 $("a[rel^='prettyPhoto']").prettyPhoto({
        animationSpeed: 'normal', /* fast/slow/normal */
        padding: 40, /* padding for each side of the picture */
        opacity: 0.35, /* Value betwee 0 and 1 */
        showTitle: true, /* true/false */
        allowresize: true, /* true/false */
        counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
        theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
        callback: function() { }
    });
    
	//$('marquee').marquee();
	
	//by default, the scroll is only done vertically ('y'), change it to both.
	$.scrollTo.defaults.axis = 'y'; 			
	//this one is important, many browsers don't reset scroll on refreshes
	$('#content_wrapper').scrollTo( 0 );//reset all scrollable panes to (0,0)
	//$.scrollTo( 0 );//reset the screen to (0,0)
	
	
	
	//Target examples bindings
	//var $paneTarget = $('#content_wrapper');			
	
	$('a#down').click(function(){		
  	  	$('#content_wrapper').stop().scrollTo( {top:'+=120px'}, 500 );
  	  	
  	  	return false;
	});
	
	$('a#up').click(function(){		
  	  	$('#content_wrapper').stop().scrollTo( {top:'-=120px'}, 500 );
  	  	return false;
	});
	
	$("a#down, a#up").mouseup(function(){
      	$(this).css({ backgroundPosition: '0 0' });
    }).mousedown(function(){
    	$(this).css({ backgroundPosition: '100% 0' });
    });


	
	
	var visinaVani = $('#content_wrapper').height();
	var visinaNutra = $('#content').height();
	//alert( visinaVani );
	//alert( visinaNutra );
	if ( visinaNutra < visinaVani ) { 
		$('.content_navigacija').hide();
	}
	
	$(".head_gallery").cycle({ 
    fx:    'fade', 
    speed:  3000,
    pause: 1 
    });

    $("#videoControler").cycle({ 
        fx:    'fade', 
        speed:  800,
        pause: 1 
        });
        
        $("#novostiControler").cycle({ 
        fx:    'fade', 
        speed:  1500,
        pause: 4 
        });

// KRAJ	
});
