$(document).ready(function(){    Cufon.replace('.main-menu, h1, h2,h3, h4, .galerias, .top-text', {        hover: true,        fontFamily: 'Cooper Black'    });    Cufon.replace('.dates, .dates-mini', {        hover: true,        fontFamily: 'Arial Narrow'    });        $('.edic-list li:odd').addClass('odd');    $('.edic-list li:even').addClass('even');    $('.noticias ul.list li').mouseenter(function(){        $(this).addClass('item-active');    });        $('.noticias ul.list li').mouseleave(function(){        $(this).removeClass('item-active');    });        $('.noticias ul.list li').click(function(){        var url = $(this).find(".read-more").attr('href');        window.location = url;    });        $('.upcoming').jScrollPane({        verticalDragMinHeight: 42,        verticalDragMaxHeight: 42    });    $('.slider-ediciones').bxSlider({        controls: true,        auto: true,        pause: 5000,        mode: 'vertical'    });    $('.slider-eventos').bxSlider({        controls: false,        auto: true,        pager: true,        mode: 'fade',        pause: 12000    });    $(".gal-img a, a.fancy").fancybox({        arrows: true,        keys: true,        padding: 3    });    $('.comment-opinion').live('click',function(){        $.post($(this).parent('form').attr('action'), $(this).parent('form').serialize()+'&ajax=1');        $(this).remove();        return false;    });    $.each($('form.rates'),function(i,e){        var val = $(this).attr('rel') - 1;        if(val >= 0){            $(this).children('.star').eq(val).attr('checked','checked');        }        });    $('.star').rating({        callback: function(value, link){            $.post($(this).parent('form').attr('action'), $(this).parent('form').serialize()+'&ajax=1');            $(this).rating('disable');        }    });                $('ul.list-gal').wrap('<div class="gal-wrapper"></div>');        var $slider = $('ul.img-slideshow').bxSlider({        controls: false,        auto: true,        pager: false,        pause: 12000,        mode: 'fade'    });if($slider){    $('ul.img-slideshow img').click($slider.goToNextSlide);    $('ul.img-slideshow img').css('cursor','pointer');}            if($("ul.galerias").length){        var $scrollingDiv = $("ul.galerias"); //scrolling div        var position = $(".to-top").position(); // div before you want to stop        var height = $("ul.galerias").height(); //scrolling div can have dynamic height        var pos = position.top - (height + 10);         $(window).scroll(function(){            if($(window).scrollTop() > 100 && $(window).scrollTop() < pos){                 $scrollingDiv                .stop()                .animate({                    "marginTop": ($(window).scrollTop() - 100) + "px"                }, "slow" );             }else{                $scrollingDiv                .stop()                .animate({                    "marginTop": 0 + "px"                }, "slow" );            }        });    }});
