﻿$(function() {
    $('#userQuoteSlideshow').cycle({
        timeout: 9000,
        speed: 800
    });
});
$(function() {
    $('#PtPOffersSlideshow').cycle({
        timeout: 5000,
        speed: 800
    });
});

$(document).ready(function() {
    $('#tabMenu > li').click(function() {
        if ($(this).hasClass('menuForum')) {
            window.open("http://forum.pelantas.com");
        }
        else if (!$(this).hasClass('selected') && !$(this).hasClass('ignore')) {
            $('#tabMenu > li').removeClass('selected');
            $(this).addClass('selected');
            $('.boxBody > div').slideUp('1500');
            $('.boxBody > div:eq(' + $('#tabMenu > li').index(this) + ')').slideDown('1500');
        }
    })

    $('#leftMenu > li').click(function() {
        if (!$(this).hasClass('selected')){
            $(this).parent().children().removeClass('selected');
            $(this).addClass('selected');
            $('.rightColumn > div').slideUp('1500');
            $('.rightColumn > div:eq(' + $('#leftMenu > li').index(this) + ')').slideDown('1500');
        }
    })  
    
    $('.boxBody #category li').mouseover(function() {
        if ($(parent).hasClass('tabMenu') || $(parent).hasClass('ulList') || $(parent).hasClass('linkList')) {
            $(this).css('backgroundColor', '#666');
            $(this).children().animate({ paddingLeft: "20px" }, { queue: false, duration: 300 });
        }
    }).mouseout(function() {
        if ($(this).parent.hasClass('tabMenu') || $(this).parent.hasClass('ulList') || $(parent).hasClass('linkList')) {
            $(this).css('backgroundColor', '');
            $(this).children().animate({ paddingLeft: "0" }, { queue: false, duration: 300 });
        }
    });
    $('.boxBody .highlight li').mouseover(function() {
        $(this).css('backgroundColor', '#D9C590');
        $(this).addClass('mouseover');
    }).mouseout(function() {
        $(this).css('backgroundColor', '');
        $(this).removeClass('mouseover');
    });
});  
