$(document).ready(function() {

    $.fn.wait = function(time, type) {
        time = time || 200;
        type = type || "fx";
        return this.queue(type, function() {
            var self = this;
            setTimeout(function() {
                $(self).dequeue();
            }, time);
        });
    };


    $('.csc-textpic-imagerow').hide().wait().fadeIn(2000);
    
    $('#menu ul ul').hide().wait().fadeIn(1000);   

$('.request').focus(
    function(){
        $(this).animate( { backgroundColor: '#ffffff' }, 500)
    }
);
$('.request').blur(
    function(){
        $(this).animate( { backgroundColor: '#bbbbbb' }, 500)
    }
);
$('.news-latest-title a').hover(
    function(){
        $(this).animate( { color: '#e99f00' }, 300)
    },
    function(){
        $(this).animate( { color: '#5a5a5a' }, 300)
    }
);


$('#menu a.animated_menu').hover(
    function(){
        $(this).animate( { paddingLeft: '8px' }, 200)
    },
    function(){
        $(this).animate( { paddingLeft: '0px' }, 200)
    }
);


$('.rightcontent div.content_left a').hover(
    function(){
        $(this).animate( { paddingLeft: '5px' }, 300)
    },
    function(){
        $(this).animate( { paddingLeft: '0px' }, 300)
    }
);

$('.rightcontent div.content_right a').hover(
    function(){
        $(this).animate( { paddingLeft: '5px' }, 300)
    },
    function(){
        $(this).animate( { paddingLeft: '0px' }, 300)
    }
);

$('.submit').hover(
    function(){
        $(this).animate( { color: '#ffffff' }, 300)
    },
    function(){
        $(this).animate( { color: '#000000' }, 300)
    }
);

    $('.requesterror').hide().wait().slideDown(1000).wait().animate( { color: '#f63c11' }, 500);

    $('#manufactureCycle') 
        .cycle({ 
            fx:     'fade', 
            speed:   1200, 
            timeout: 4000, 
            next:   '#manufactureCycle', 
            pause:   1,
            random:  1
    });	
    
    $('.hifiimages') 
        .cycle({ 
            fx:     'fade', 
            speed:   1000, 
            timeout: 5000, 
            pause:   1
    });	    

    $('.hififancy').fancybox();
    
    $('div.tx-aksthifi-pi1 div.hifientry').css({opacity:'0.7'}).hover(function() {
       $(this).stop().animate({opacity:1}); 
    },
    function() {
       $(this).stop().animate({opacity:'0.7'});        
    });
    


});
