function recentjobs_initCallback(carousel) {
    $("a#jobs-newest").bind("mouseover click", function() {
        carousel.scroll($.jcarousel.intval(1));
        $("a#jobs-mostviewed").removeClass().addClass("rnd-button");
        $("a#jobs-newest").removeClass().addClass("rnd-button-on");
        $(".rnd-button-on").liquidCanvas("gradient{from:#ffffff; to:#fbfbfb;} => rect");
        $(".rnd-button-on").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} fill{color:#fff}] => roundedRect{radius:10}");
        $(".rnd-button").liquidCanvas("gradient{from:#ffffff; to:#fbfbfb;} => rect");
        return false;
    });    
    $("a#jobs-mostviewed").bind("mouseover click", function() {
        carousel.scroll($.jcarousel.intval(4));
        $("a#jobs-newest").removeClass().addClass("rnd-button");
        $("a#jobs-mostviewed").removeClass().addClass("rnd-button-on");
        $(".rnd-button-on").liquidCanvas("gradient{from:#ffffff; to:#fbfbfb;} => rect");
        $(".rnd-button-on").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} fill{color:#fff}] => roundedRect{radius:10}");
        $(".rnd-button").liquidCanvas("gradient{from:#ffffff; to:#fbfbfb;} => rect");
        return false;
    });     
};


//$(document).ready(function(){
$(window).load(function(){
    // Reset Font Size
    var originalFontSize = $('html').css('font-size');
    $(".resetFont").click(function(){
        $('html').css('font-size', originalFontSize);
    });
    // Increase Font Size
    $(".increaseFont").click(function(){
        var currentFontSize = $('html').css('font-size');
        var currentFontSizeNum = parseFloat(currentFontSize, 10);
        var newFontSize = currentFontSizeNum*1.2;
        $('html').css('font-size', newFontSize);
        return false;
    });
    // Decrease Font Size
    $(".decreaseFont").click(function(){
        var currentFontSize = $('html').css('font-size');
        var currentFontSizeNum = parseFloat(currentFontSize, 10);
        var newFontSize = currentFontSizeNum*0.8;
        $('html').css('font-size', newFontSize);
        return false;
    });
    $(".jcarousel-jobs li").mouseover(function() {
        $(".details",this).show();
    });
    $(".jcarousel-jobs li").mouseout(function() {
        $(".details",this).hide();
    });
    $('#totop').click(function() {
        $('html').animate({scrollTop: 0}, 500);
        $('#int_body').animate({scrollTop: 0}, 500);
    });
    $('#advices-back').click(function() {
        var dataString = 'func=prev' + '&id=' + $('#advices-back').html();
        $.ajax({
            type: "POST",
            url: 'ajax/item_advices_carousel.php',
            data: dataString,
            dataType: 'json',
            success: function(data) {
                $('#advices-inner').html(data.advice);
                $('#advices-back').html(data.prev);
                $('#advices-forward').html(data.next);
            }
        });        
    });
    $('#advices-forward').click(function() {
        var dataString = 'func=forw' + '&id=' + $('#advices-forward').html();
        $.ajax({
            type: "POST",
            url: 'ajax/item_advices_carousel.php',
            data: dataString,
            dataType: 'json',
            success: function(data) {
                $('#advices-inner').html(data.advice);
                $('#advices-back').html(data.prev);
                $('#advices-forward').html(data.next);
            }
        });        
    });
    $("div#btn-neto").click(function() {
        dataString="paymentValue="+$("#nlBrutoNetoValue").val()+"&lang="+$("#nlLang").val()+"&paymentType=neto";
        $.ajax({
            type: "GET",
            url: 'ajax/item_ajax_bruto_neto_value.php',
            data: dataString,
            success: function(data) {
                $('#bruto-neto-izracun').html(data);
            }
        });
        return false;         
    });
    $("div#btn-bruto").click(function() {
        dataString="paymentValue="+$("#nlBrutoNetoValue").val()+"&lang="+$("#nlLang").val()+"&paymentType=bruto";
        $.ajax({
            type: "GET",
            url: 'ajax/item_ajax_bruto_neto_value.php',
            data: dataString,
            success: function(data) {
                $('#bruto-neto-izracun').html(data);
            }
        });       
        return false;  
    });
    
    $("#int_top_container_video").liquidCanvas("[shadow{width:3;color:'#000';shift:2;alpha:'0.08'} fill{color:#fff}] => roundedRect{radius:10}");
    $("#int_top_row2_jobsearch").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#fff; to:#f0f0f0;}] => roundedRect{radius:10}");
    $("#int_top_row2_brutoneto").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#fff; to:#f0f0f0;}] => roundedRect{radius:10}");
    $("#int-testimonial").liquidCanvas("[shadow{width:1;color:'#000';shift:2;alpha:'0.08'} fill{color:#fff}] => partialRoundedRect{radius:10; tl:'yes'; tr:'yes'; bl:'no'; br:'no' }");
    $("#int_center_area_carousel").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#fff; to:#f0f0f0;}] => roundedRect{radius:10}");
    $("#int_center_area").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#fff; to:#f0f0f0;}] => roundedRect{radius:10}");
    $("#int_menu").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} fill{color:#e1e2e3}] => roundedRect{radius:10}");
    $("#int_center_advices").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#fff; to:#f0f0f0;}] => roundedRect{radius:10}");
    $("#int_bottom_row3_1").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#53a615; to:#448911;}] => roundedRect{radius:10}");
    $("#int_bottom_row3_2").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#53a615; to:#448911;}] => roundedRect{radius:10}");
    $("#int_bottom_row3_3").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#53a615; to:#448911;}] => roundedRect{radius:10}");
    $("#int_center_area_carousel").jcarousel({scroll: 3, initCallback: recentjobs_initCallback, buttonNextHTML: null, buttonPrevHTML: null});                
    $(".jobs-image").liquidCanvas("[shadow{width:1;color:'#000';shift:1;alpha:'0.08'} fill{color:#fff}] => rect");
    $(".image-shadow").liquidCanvas("[shadow{width:1;color:'#000';shift:1;alpha:'0.08'} fill{color:#fff}] => rect");
    $(".rnd-button-on").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} fill{color:#fff}] => roundedRect{radius:10}");
    $(".rnd-button-gray-on").liquidCanvas("[shadow{width:2;color:'#000';shift:1;alpha:'0.08'} gradient{from:#7a7b7a; to:#545554;}] => roundedRect{radius:10}");
    //helium.init();
    
    $("a.fancy_image").fancybox({
        'showCloseButton'   : true,
        'titleShow'     : false,
        'transitionIn'    : 'elastic',
        'transitionOut'    : 'elastic'
    })
   
    $("a.fancy_various").fancybox({
        'width'                : '75%',
        'height'            : '75%',
        'autoScale'         : false,
        'transitionIn'        : 'none',
        'transitionOut'        : 'none',
        'type'                : 'iframe'
    });    
    $("#btn-search").click(function() {
        var job_select = $("#job-search-knowledge").val();
        if (job_select == "1") window.location =  "prosta-delovna-mesta/I-IV-stopnja-izobrazbe/1/";
        if (job_select == "2") window.location = "prosta-delovna-mesta/V-ali-visja-stopnja-izobrazbe/2/";
                

    });    
    $("#btn-all-jobs").click(function() {
        window.location = "prosta-delovna-mesta/";
    });
    $("a.fancy_job").fancybox({
            ajax : {
                type    : "POST",
                data    : 'mydata=test'
            }    
    });
});
