var slide_status = 0;

$(document).ready(function() {


    if($("a[rel^='prettyPhoto']").length>0) {
         $("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});
    }
    if($("a[class^='zumiraj']").length>0) {
         $("a[class^='zumiraj']").prettyPhoto({theme:'dark_rounded'});
    }
    
    $(".blank").click(function(){
       window.open(this.href);
       return false;
    });

    
    $("ul.sf-menu").superfish(); 
    
    $(".view").slideDown();
    
    $("#menuBar li").click(function(){

         var id = $(this).attr("id");
         $("#menuBar li").removeClass("current");
         $(this).addClass("current").show(1000);
         
         if (slide_status == 1){
             $("#content").slideUp(function(){
             
             
             $("#content").load("/includes/loadContent.php?id="+id,function(){
                   $("#content").slideDown();
                   slide_status = 1;

         });

             
             
             });
         } else {
         
                   $("#content").slideUp();
                   $("#content").load("/includes/loadContent.php?id="+id,function(){
                   $("#content").slideDown();
                   slide_status = 1;

         });
       } 
    });
    
});

