1 $(document).ready(function() {
3 function page_transist(event) {
4 event.preventDefault();
5 newLocation = $('.js_next')[0].href;
6 var top = $('.cover_footer').offset().top;
7 $('.cover_footer').animate({
8 height: $(window).height()+'px'
10 $('html, body').animate({
12 }, 300, 'swing', function() {
13 window.location.href = newLocation;
16 function animate(event) {
17 event.preventDefault();
18 event.stopImmediatePropagation();
19 var target = $(this.hash);
20 $('html, body').stop().animate({
21 'scrollTop': target.offset().top - 32
22 }, 500, 'swing', function () {
23 window.location.hash = 'blog_content';
27 var content = $("div[enable_chatter_discuss='True']").find('p[data-chatter-id]');
29 openerp.jsonRpc("/blog/get_user/", 'call', {}).then(function(data){
30 $('#discussions_wrapper').empty();
31 new openerp.website.blog_discussion({'content' : content, 'public_user':data[0]});
35 $('.js_fullheight').css('min-height', $(window).height());
36 $(".js_tweet").share({'author_name':$('#blog_author').text()});
37 $('.cover_footer').on('click',page_transist);
38 $('a[href^="#blog_content"]').on('click', animate);