// JavaScript Document

$(document).ready(function() {

    $(".tab_content").hide(); //Hide all content
    $(".tabs_links ul li:first").addClass("active").show(); //Activate first tab
    $(".tab_content:first").show(); //Show first tab content
//On Click Event
    $(".tabs_links ul li").click(function() {
        $(".tabs_links ul 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 rel attribute value to identify the active tab + content
        $(activeTab).fadeIn(); //Fade in the active content
        return false;
    });
    $(".toggle_buton").click(function () {
        $(".mars_bg").toggle("slow");
    });
    $("#mesaj_buton").click(function () {
        $(".leave_reply_form").toggle("slow");
    });
    $(".anket_show").click(function () {
         answer_name = $(this).attr('name');
        $(".answer_show"+ answer_name).toggle("slow");
    });
    $(".anket_show_success").click(function () {
         answer__success_name = $(this).attr('name');
        $(".answer_show_success"+ answer__success_name).toggle("slow");
    });
	 $("#resim_js").fancybox();
     $("a#mezunresim").fancybox();
	 $("a.grouped_elements").fancybox({
        'titlePosition' : 'inside',
		'overlayColor'  : '#000',
        'transitionIn' : 'none',
        'transitionOut' : 'none'
    });
   


    $(".rtab_content").hide(); //Hide all content
    $(".tab_navigation ul li:first").addClass("active").show(); //Activate first tab
    $(".rtab_content:first").show(); //Show first tab content
//On Click Event
    $(".tab_navigation ul li").click(function() {
        $(".tab_navigation ul li").removeClass("active"); //Remove any "active" class
        $(this).addClass("active"); //Add "active" class to selected tab
        $(".rtab_content").hide(); //Hide all tab content
        var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
        $(activeTab).fadeIn(); //Fade in the active content
        return false;
    });
  
});

$(function() {
    $(".slider1").jCarouselLite({
        btnNext: ".leftarrow",
        btnPrev: ".rightarrow"
    });
    $("a.galleryimg").fancybox({
        'titlePosition'        : 'inside',
        'overlayColor'        : '#000',
        'overlayOpacity'    : 0.9,
        'changeSpeed'       :300,
        'changeFade'        :'fast'
        
   
    });
    $("#fancybox-loading").ajaxStart(function() {
       $.fancybox.showActivity();
    })
  
});


// cufon script
Cufon.replace('h1,h2,h3,h4,h5, h6, .txtcufon');
