Cufon.replace('.myriad', { fontFamily: 'Myriad_Pro' });
Cufon.replace('h1', { fontFamily: 'Myriad_Pro' });

$(document).ready(function(){

//TableStyle
/*
	var row = 0;
	
	$('.content_text table tr').each(function() {
			row++;
			if ( row % 2 == 0 ) {
			
			$(this).addClass('even');
		}
	});
*/

// Add pdf icons to pdf links
	$(".content_text a[href$='.pdf']").addClass("pdf").addClass("png");
 
	// Add txt icons to document links (doc, rtf, txt)
	$(".content_text a[href$='.doc'], .content_text a[href$='.txt']").addClass("txt").addClass("png");
	$(".content_text a[href$='.rtf']").addClass("txt").addClass("png");
 
	// Add zip icons to Zip file links (zip, rar)
	$(".content_text a[href$='.zip'], .content_text a[href$='.rar']").addClass("zip").addClass("png"); 
 
	// Add email icons to email links
	$(".content_text a[href^='mailto:']").addClass("mail").addClass("png");
 
	$('.content_text a').filter(function() {
		//Compare the anchor tag's host name with location's host name
	    return this.hostname && this.hostname !== location.hostname;
	  }).addClass("ExternalLink").addClass("png").attr("target", "_blank");
	

	

$('.hid_openator').click(function() {
	$(this).next("div").slideToggle(500);
});

$('.banner_pic').hover(function () {
    $('.slogan_sh').stop().animate({ opacity: 1}, 500);
	$('.slogan').stop().animate({ opacity: 1}, 500);
  },
  function () {
    $('.slogan_sh').stop().animate({ opacity: 0}, 500);
	$('.slogan').stop().animate({ opacity: 0}, 500);
  }
);


/*
$('.gal_prev').hover(function () {
    $(this).next('div').show(100);
  },
  function () {
    $(this).next('div').hide(100);
  }
);
*/

//AC list

$('.ac_link').click(function() {
	$(this).addClass("ac_link_sel");
	$(this).siblings('a').removeClass("ac_link_sel");
	var $curDIV = $(this).html();
	var $curDIVtext = $(this).next("div").html();
	$("#selected_ac").html($curDIV);
	$("#ac_list_descr_sel").html($curDIVtext);
	$('.ac_list_descr').jScrollPane();
	$('body').scrollTo( $('div.ac_list_selected'), 800);
});

$('.ac_list_descr').jScrollPane();	

//faq

$(".faq_ans").addClass("hidden");
$(".q_link").click(function() {
	$(this).addClass("q_active");
	$(this).siblings("a").removeClass("q_active");
	$(this).siblings("div").slideUp(300);
	$(this).next("div").slideDown(500);
});

//INDEX BANNER


    $(".slogan_text_c").jCarouselLite({
        btnNext: ".sl_right",
        btnPrev: ".sl_left",
		easing: "easeInOutExpo",  //easeInOutExpo
		auto: 5500,
		speed: 1000
    });
	 $(".banner_slider").jCarouselLite({
        btnNext: ".sl_right",
        btnPrev: ".sl_left",
		easing: "easeInOutExpo",  //easeInOutExpo
		auto: 5500,
		speed: 1000
    });


//MENU

$("ul.sub").hide();
$("a.active").next('ul.sub').slideDown(5);
t=1000;
var t;
$('ul.toplevel li a').mouseover(function(){
		t=clearTimeout(t);
		if (!$(this).next('ul:visible').get(0)) {
			$curDiv = $(this).next('ul');
			t=setTimeout(function(){
			//$('ul.sub').next('div').hide(500);
			$curDiv.slideDown(500);
	
		},300);
		}
});
	
	$('ul.toplevel li a').mouseout(function(){
		t=clearTimeout(t);
	}); 


$("a.fancybox").fancybox({
	'titlePosition'	: 'over'
});

});
