var $j = jQuery.noConflict();

$j(document).ready(function() {
    // teaser image transitions
    $j('#teaser .teaser-content').cycle({
                                        timeout: 5000,
                                        speed:1000
                                    });
    //Labels inside inputs
    smartLabel();

    //Fixing ie6
    fixIE6();
    
    $j('#newsletter').mouseover(function() {
        $j(this).addClass('button-over');
    });
    
    $j('#newsletter').mouseleave(function() {
        $j(this).removeClass('button-over');
    });
    
    if($j.os.name != 'win') {$j("#section h2 a").css('font-size', '14px');}

});

function smartLabel() {
    // clearing values after reload
    $j('#subscribe input').attr('value', '');

    // Show/hide label
    $j('#subscribe input').focus(function(){
        $j(this).siblings('span').fadeOut('fast');
    }).blur(function(){
            if (!$j(this).attr('value')) $j(this).siblings('span').fadeIn('fast');
    });

}

function fixIE6() {
    $j('#nav li ').mouseover(function(){
        $j(this).addClass('hovered');
    });
    
    $j('#nav li').mouseleave(function(){
        $j(this).removeClass('hovered');
    });
}

