$(document).ready(function() {

/*top right mini menu fade effect*/
fadeSpeed= 100;
$('#top-right-mini-menu a').fadeTo(fadeSpeed, .5);
 $('#top-right-mini-menu a').hover(function(){
    $(this).fadeTo(fadeSpeed,1);
 }, function(){
    $(this).fadeTo(fadeSpeed,.5);
 });

 /*footer fade effect*/
fadeSpeed= 100;
$('#footer-table a').fadeTo(fadeSpeed, .5);
 $('#footer-table a').hover(function(){
    $(this).fadeTo(fadeSpeed,1);
 }, function(){
    $(this).fadeTo(fadeSpeed,.5);
 })

 function onAfter(curr, next, opts) {
    var index = opts.currSlide;
    $(".slideshow li:nth-child(" + (index+1) +")").fadeIn('fast');
   
}

 function onBefore(curr, next, opts) {
    var index = opts.currSlide;
    $(".slideshow li:nth-child(" + (index+1) +")").fadeOut('fast');

}


    $('.slideshow_container').cycle({
		fx: 'scrollHorz', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
                pager: '#pager',
                after: onAfter,
                before: onBefore
	});

        $('.home-box').hover(function(){
           $(this).find('.hover').fadeIn(100);
        }, function(){
            $(this).find('.hover').fadeOut(100);
        });

       /* $('.home-box .hover').click(function(){
           id = $(this).parent().attr('id');
           $('#' + id + '-link').click();
        });*/



});

