// JavaScript Document
$(document).ready(function() {

    //When page loads...
    $(".tab_content").hide(); //Hide all content
    $("ul.tabs li:first").addClass("active").show(); //Activate first tab
    $(".tab_content:first").show(); //Show first tab content

    //On Click Event
    $("ul.tabs li").click(function() {

        $("ul.tabs li").removeClass("active"); //Remove any "active" class
        $(this).addClass("active"); //Add "active" class to selected tab
        $(".tab_content").hide(); //Hide all tab content

        var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
        $(activeTab).fadeIn(); //Fade in the active ID content
        return false;
    });

});
$(document).ready(function() {

    //When page loads...
    $(".tab_content2").hide(); //Hide all content
    $("ul.tabs2 li:first").addClass("active").show(); //Activate first tab
    $(".tab_content2:first").show(); //Show first tab content

    //On Click Event
    $("ul.tabs2 li").mouseover(function() {

        $("ul.tabs2 li").removeClass("active"); //Remove any "active" class
        $(this).addClass("active"); //Add "active" class to selected tab
        $(".tab_content2").hide(); //Hide all tab content

        var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
        $(activeTab).show(); //Fade in the active ID content
        return false;
    });

});

// Fancy Box
$(document).ready(function() {
    $("#linkMother").fancybox({
        'titlePosition': 'inside',
        'transitionIn': 'none',
        'transitionOut': 'none',
        'autoScale': false,
        'type': 'iframe',
        'width': 420,
        'height': 540,
        'scrolling': 'no'

    });

    $("#various1").fancybox({
        'titlePosition': 'inside',
        'transitionIn': 'none',
        'transitionOut': 'none'
    });
    $("#various2").fancybox({
        'titlePosition': 'inside',
        'transitionIn': 'none',
        'transitionOut': 'none'
    });
    $("#various3").fancybox({
        'titlePosition': 'inside',
        'transitionIn': 'none',
        'transitionOut': 'none'
    });
    $("#subcribeBox").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'autoScale': false,
        'type': 'iframe',
        'width': 350,
        'height': 350,
        'scrolling': 'no'
    });
    $('#linkMother').trigger('click');
});



$(function() {
    $('b').jqTransform({ imgPath: 'formselect/img/' });
});


$(document).ready(function() {
    $('div.pngFix').pngFix();
});

$(document).ready(function() {
    $("#slider").SexySlider({
        width: 530,
        height: 277,
        delay: 3000,
        strips: 20,
        autopause: false,
        navigation: '#navigation',
        control: '#control',
        effect: 'random'
    });
});



$(document).ready(function() {

    $(".cate").click(function(e) {
        e.preventDefault();
        $("fieldset#cate_menu").toggle();
        $(".cate").toggleClass("menu-open");
    });

    $("fieldset#cate_menu").mouseup(function() {
        return false
    });
    $(document).mouseup(function(e) {
        if ($(e.target).parent("a.cate").length == 0) {
            $(".cate").removeClass("menu-open");
            $("fieldset#cate_menu").hide();
        }
    });

});

