function konsert(id){ $("#program").stop(); $("#content").slideUp(); $(".mkonsert").removeClass('active'); $("#mkonsert"+id).addClass('active'); $(".info").removeClass("active"); setTimeout(function(){ $.get( "ajax.php?konsert="+id, function( data ) { $("#content").html(data); $("#content").addClass("konsert"); $("#content").slideDown(); }); },410); var ofs=$("#mkonsert"+id).offset(); var currscroll=$("#program").scrollLeft(); console.dir(ofs); //if(ofs.left > ($(window).width()-100) && ofs.left>0 ){ //console.dir(ofs); $("#program").animate({scrollLeft: (currscroll+ofs.left-180)}, 1000); //} totop(); function gaTrack(path, title) { ga('set', { page: "ajax.php?konsert="+id, title: "Konsert "+id }); ga('send', 'pageview'); } } function size(){ console.log("sizecss.php?w="+$(window).width() +"&height="+ $(window).height()); $("#sizecss").attr("href","sizecss.php?w="+$(window).width() +"&height="+ $(window).height()); } function start(){ $("#content").slideUp(); $(".mkonsert").removeClass('active'); setTimeout(function(){ $.get( "ajax.php?what=start", function( data ) { $("#content").html(data); $("#content").removeClass("konsert"); $("#content").slideDown(); }); },410); totop(); } function info(id){ $("#content").slideUp(); $(".mkonsert").removeClass('active'); $(".info").removeClass('active'); setTimeout(function(){ $.get( "ajax.php?info="+id, function( data ) { $("#content").html(data); $("#content").removeClass("konsert"); $("#info"+id).addClass('active'); $("#content").slideDown(); }); },410); totop(); function gaTrack(path, title) { ga('set', { page: "ajax.php?info="+id, title: "Info "+id }); ga('send', 'pageview'); } } function togprog(){ if( $("#tblprogc:visible").length > 0){ $("#tblprogc").effect('slide', { direction: 'right', mode: 'hide' }, 500); //$("#tblprogc").hide('slide'); $("#togprog").show(); $("#tblprog").removeClass('open'); $('#allContentW').removeClass('blurred'); } else{ //$("#tblprogc").show('slide'); $("#tblprogc").effect('slide', { direction: 'right', mode: 'show' }, 500); $("#tblprog").addClass('open'); $("#togprog").hide(); $('#allContentW').addClass('blurred'); } } function totop(){ $("html, body").animate({ scrollTop: 0 }, 300); }