jQuery(document).ready(function (){
    //*******************************responsive blog on home page
    jQuery(".blog-content").width(function(i,val){
        var widthBlock = val;
        if(widthBlock >=668) {
            var widthItem = widthBlock/3;
             if(jQuery(".one-posts")) {
                jQuery(".one-posts").css({"width":widthItem,"left": 0})
            }
             if(jQuery(".two-posts")) {
                jQuery(".two-posts").css({"width":widthItem,"left": widthItem})
            }
            if(jQuery(".tree-posts")) {
                jQuery(".tree-posts").css({"width":widthItem,"left": widthItem*2})
            }
        } else if(widthBlock >=414) {
            var widthItem = widthBlock;
             if(jQuery(".one-posts")) {
                jQuery(".one-posts").css({"width":widthItem,"left": 0})
            }
             if(jQuery(".two-posts")) {
                jQuery(".two-posts").css({"width":widthItem,"left": 0})
            }
            if(jQuery(".tree-posts")) {
                jQuery(".tree-posts").css({"width":widthItem,"left": 0})
            }
        }else {
            var widthItem = widthBlock;
            if(jQuery(".one-posts")) {
                jQuery(".one-posts").css({"width":widthItem,"left": 0})
            }
             if(jQuery(".two-posts")) {
                jQuery(".two-posts").css({"width":widthItem,"left": 0})
            }
            if(jQuery(".tree-posts")) {
                jQuery(".tree-posts").css({"width":widthItem,"left": 0})
            }
        }
    });
});
jQuery('.top-up').attr('href','#home-content');
jQuery(window).scroll(function(){
    if(jQuery(window).scrollTop() >= 20) {
     jQuery('.go-bottom').addClass('go-top-fixed');
     jQuery('.top-up').attr('href','#');
    } else {
     jQuery('.go-bottom').removeClass('go-top-fixed');
     jQuery('.top-up').attr('href','#home-content');
   }
});


( function( $ ) {


$(document).ready(function() {
    $("a[href^='#']").click(function(){
    var el = $(this).attr("href");
    $("html,body").animate({
        scrollTop: $(el).offset().top}, 1000);
    return false;
    });
});

} )( jQuery );