$(document).ready(function(){

    $('.cycle_slow').cycle({
        timeout: 7000
    });

    $('.cycle_fast').cycle();

    $('.replace_text').each(function(){
        if(($(this).val())!=($(this).attr("title"))){
            $(this).addClass("focused");
        }
    });

    $('.replace_text').click(function(){
        if($(this).val()==$(this).attr('title')){
            $(this).val("");
            $(this).addClass("focused");
        }
    });

    $('.replace_text').blur(function(){
        if($(this).val()==""){
            $(this).val($(this).attr("title"));
            $(this).removeClass("focused");
        }
    });

    $('#menu li').children('.sublevel').each(function() {
        $(this).parent().children("a").addClass("arrow");
    });

    $('#menu li').hover(function(){
        width = $(this).width();
        height = $(this).height();
        $(this).children('.sublevel').css("margin-left",(width-1)+"px");
        $(this).children('.sublevel').css("margin-top",(0-(height+1))+"px");
        $(this).addClass('hover');
        $(this).children('.level_1, .sublevel').css("display","block");
    },function(){
        $(this).children('.level_1, .sublevel').css("display","none");
        $(this).removeClass('hover');
    });

    $('.colorbox').colorbox();

    $('.newsletter_colorbox').colorbox({width: "720px", height: "500px"});

});



