/*
 $(window).resize(function(){
 });
 */
$(document).ready(function(){

    $(".faq .question a").click(function(){
        $(".faq.fopen").removeClass("fopen");
        cls = $(this).parents(".faq").attr("class");
        if (cls == "faq fopen" || cls == "faq ffirst fopen") {
            $(this).parents(".faq").removeClass("fopen");
        }
        else 
            if (cls == "faq" || cls == "faq ffirst") {
                $(this).parents(".faq").toggleClass("fopen");
            }
        
    });
    
    
    $('.rcbody a').each(function() {
        if ($(this).attr('title') != undefined) {
            var t = $(this).attr('title');           
        }
        else if ($(this).attr('alt') != undefined) {
            var t = $(this).attr('alt'); 
        }
        if (t) {
            $(this).removeAttr('alt');
            $(this).removeAttr('title');
            $(this).attr({
                alt_title: t
            });             
        }
        
        $(this).hover(function(event){
            if ($(this).attr('alt_title') == undefined || $(this).attr('alt_title') == "") {
                return;
            } 
            $('body').append('<div id="popup"><div>' + $(this).attr('alt_title') + '</div></div>');
            $('#popup').css({
                'top': event.pageY,
                'left': event.pageX
            });
        }, function(){
            $('#popup').remove();
        }).mousemove(function(event){
            $('#popup').css({
                'top': event.pageY,
                'left': event.pageX
            });
        });
    });
    
    
});

/*

 function faq(){

 $(".faq .question a").click(function(){

 $(".faq.fopen").removeClass("fopen");

 cls = $(this).parents(".faq").attr("class");

 if(cls=="faq fopen"||cls=="faq ffirst fopen") {

 $(this).parents(".faq").removeClass("fopen");

 }

 else if(cls=="faq"||cls=="faq ffirst") {

 $(this).parents(".faq").toggleClass("fopen");

 }

 

 });

 }

 */

