/***Skin Custom CSS**/
jQuery(document).ready(function($) {
/* Auto Align Scroll */
var c5_scroll_auto_align = function (){
var window_height =$( window ).height();
var screen_scroll_top = $(window).scrollTop();
var total_height = window_height + screen_scroll_top;
var main_wrap = $('.c5-main-row');
var content_refrence = $('#main').height();
var main_wrap_offset_top = main_wrap.offset().top;
var main_wrap_height = main_wrap.height();
var total_main_wrap = main_wrap_offset_top + main_wrap_height;
$('.c5-sidebar-parent-wrap ').each(function() {
var this_elem = $(this).children('.c5-sidebar-wrap');
var this_elem_offset_top = main_wrap.offset().top;
var this_elem_height = this_elem.height();
var total_this_elem = main_wrap_offset_top + this_elem_height;
if( (main_wrap_height - this_elem_height) > 100 && ( this_elem_height < content_refrence) ){
if( total_height > total_this_elem && total_height < total_main_wrap ){
this_elem.parent().addClass( 'c5-fixed' );
this_elem.parent().css('top','');
}
else if (total_height > total_main_wrap ) {
this_elem.parent().removeClass( 'c5-fixed' );
this_elem.parent().addClass( 'c5-border' );
var margin = main_wrap_height - this_elem_height -35;
this_elem.parent().css('top',margin);
}else {
this_elem.parent().removeClass( 'c5-fixed' );
this_elem.parent().css('top','');
}
}else {
this_elem.parent().removeClass( 'c5-fixed' );
this_elem.parent().css('top','');
}
});
}
var responsive_viewport = $(window).width();
if(responsive_viewport >= 768 ){
$(window).scroll(c5_scroll_auto_align);
c5_scroll_auto_align();
}
});
Shareradio usa i coockie per fornire ai naviganti un'esperienza migliore. Utilizzando il sito, accetti l'utilizzo dei cookie da parte nostra. more information
POST A COMMENT.