$(document).ready(function(){	
	$(function(){$('a[href][rel*=external]').each(function(i){this.target = "_blank";});});
	$('ul.nav ul li:first-child').addClass('first');
	$('ul.footer-bottom-left li:first-child').addClass('first');
	$('ul.tab-links li:first-child').addClass('first');
	$('ul.tab-links li:last-child').addClass('last');
	$('.service-block ul li:first-child').addClass('first');
	$('ul.nav > li.current_page_item').append('<img src="/wp-content/themes/4tel/images/icon/nav-current.gif" alt="" />');
	$('ul.nav ul li a').append('<span>&raquo;</span>');
	$('ul.nav > li.current_page_ancestor').append('<img src="/wp-content/themes/4tel/images/icon/nav-current.gif" alt="" />');
	//$('ul.side-nav > li.current_page_item').append('<img src="/wp-content/themes/4tel/images/icon/nav-current.gif" alt="" />');
	//$('ul.side-nav > li.current_page_ancestor').append('<img src="/wp-content/themes/4tel/images/icon/nav-current.gif" alt="" />');
	$('ul.nav > li > ul').append('<img src="/wp-content/themes/4tel/images/icon/nav-ul.gif" alt="" />');
	$("ul.nav").superfish({
		delay:750,
		animation:{opacity:'show'},
		speed:'fast',
		autoArrows:false
	});
	$('#features').easyAccordion({ 
		autoStart:true, 
		slideInterval:7000,
		slideNum:false
	});
	$('.tab').hide();
	$('.tab-1').fadeIn(1200);
	$('.tab-1-link').addClass('current-tab');
	$("a.tab-1-link").click(function() {
		$('.tab').hide();
		$('.tab-1').fadeIn(1200);
		$('.tab-link').removeClass('current-tab');
		$('.tab-1-link').addClass('current-tab');
		return false;
	});
	$("a.tab-2-link").click(function() {
		$('.tab').hide();
		$('.tab-2').fadeIn(1200);
		$('.tab-link').removeClass('current-tab');
		$('.tab-2-link').addClass('current-tab');
		return false;
	});
	$("a.tab-3-link").click(function() {
		$('.tab').hide();
		$('.tab-3').fadeIn(1200);
		$('.tab-link').removeClass('current-tab');
		$('.tab-3-link').addClass('current-tab');
		return false;
	});
	$("a.tab-4-link").click(function() {
		$('.tab').hide();
		$('.tab-4').fadeIn(1200);
		$('.tab-link').removeClass('current-tab');
		$('.tab-4-link').addClass('current-tab');
		return false;
	});
	$('.pop').popupWindow({ 
		height:500, 
		width:800, 
		top:50, 
		left:50,
		scrollbars:1
	});
});

Cufon.set('fontFamily', 'Arial Rounded');
Cufon.replace('h1');
Cufon.replace('h2', { hover: true });
Cufon.replace('h3', { hover: true });
Cufon.replace('h4', { hover: true });
Cufon.replace('p.tel');
Cufon.replace('.nav > li > a', { hover: true });
Cufon.replace('a.button', { hover: true });
Cufon.replace('.quick-links p a', { hover: true });
Cufon.replace('p.edit-link a', { hover: true });
Cufon.replace('.service-block ul li.first', { hover: true });
Cufon.replace('.side-nav a.side-nav-title', { hover: true });
