Cufon.replace('.header .contactus, .top_nav .fstlevel, .bot_nav .menus .hd, .bot_nav .copyright, .footer label, .index_services_box .text .hd, .right_column .right_hd, .right_column .estimate_block .callus, .right_simple_hd', {fontFamily: 'Arial Narrow Special', hover: true, hoverables: { a: true } });
Cufon.replace('.featured .description p b', {fontFamily: 'Arial Narrow Special', color: '-linear-gradient(#FFFFFF, #646464)' });
Cufon.replace('.right_column .estimate_block .callus b', {fontFamily: 'Arial Narrow Special', color: '-linear-gradient(#92ACDC, #657FAE)' });
Cufon.replace('.featured .description .hd', {fontFamily: 'Abadi MT Cond Light', color: '-linear-gradient(#FC6C6C, #A61616)' });
Cufon.replace('.left_column .index_services_hd', {fontFamily: 'Abadi MT Cond Light', color: '-linear-gradient(#B9DFF6, #58709A)' });
Cufon.replace('h1', {fontFamily: 'Abadi MT Cond Light', color: '-linear-gradient(#FFFFFF, #646464)' });
Cufon.replace('h3', {fontFamily: 'Abadi MT Cond Light', color: '#7DA6F1' });

$(document).ready(function() {

	$(".top_nav li").not(".top_nav ul ul li").hover(
		function(){$(this).addClass('li_hover');},
		function(){$(this).removeClass('li_hover');}
	);
	$(".top_nav ul ul").not(".top_nav ul ul.wide").wrap('<div class="popup_div"></div>');
	$(".top_nav ul ul.wide").wrapAll('<div class="popup_div" style="width:340px"></div>');
	$(".top_nav ul ul.wide:last").after('<br clear="all" />');
	
	$(".index_services_box li:last-child").css('border','none');
	
	if ($.cookie('atakinteractive_collapsed')=='collapsed'){$(".featured").css("height", "0px"); $("body").css("paddingTop", "216px"); $(".featured").removeClass('expanded')}
	else {$(".featured").addClass('expanded')}

	$(".content .toggle").click(function(){
		if ($(".featured").hasClass('expanded')){
			$.cookie('atakinteractive_collapsed', 'collapsed');
			$(".featured").animate({height: "0px"}, 1300, 'swing',function(){$(this).removeClass('expanded');}).add($("body").animate({paddingTop: "216px"}, 1300, 'swing'));
			$("#toggle").hide();
			$("#toggle1").show();
		}
		else {
			$.cookie('atakinteractive_collapsed', 'expanded');
			$("#toggle1").hide();
			$("#toggle").show();
			$(".featured").animate({height: "300px"}, 1300, 'swing',function(){$(this).addClass('expanded')}).add($("body").animate({paddingTop: "516px"}, 1300, 'swing'));
		}
	});
	
	$(".right_column .resources ul:first-child").css('float','left').css('width','144px');
	$(".right_column .resources li:last-child").css('border','none');
	
	$('ul.second_level_ul').not($('ul.second_level_ul:first')).hide();
	$('li.first_level_li .trigger').click(function()
	{
		$('ul.second_level_ul a').css('position','static');
		$('ul.second_level_ul:visible').not($('ul.second_level_ul', this.parentNode).slideDown(1000)).slideUp(1000, function(){$('ul.second_level_ul a').css('position','relative');});
		return false;
	});
	
	$(".right_column .latest_projects_right_item:odd").css('float','right').css('margin-right','0px');

	$(".right_column .sites_we_use:last").css('float','right');
	
	$(function(){
		$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
			&& location.hostname == this.hostname) {
				var $target = $(this.hash);
				$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
				if ($target.length) {
					var targetOffset = $target.offset().top;
					$('html,body').animate({scrollTop: targetOffset}, 1000);
					return false;
				}
			}
		});
	});

	var cur_page = document.location.pathname;
	cur_page=cur_page.replace('/','');
	$(".top_nav a.fstlevel[href="+cur_page+"]").parent().addClass('active');
	if ($(".top_nav a.fstlevel[href="+cur_page+"]").size()>0){}
	else {$(".top_nav ul ul a[href="+cur_page+"]").addClass('sub_active').parent().parent().parent().parent().addClass('active');}
	$(".right_column .all_services a[href="+cur_page+"]").addClass('active');
	

	$(".right_column .dark_box .right_hd:contains('Related Pages')").parent().css('font-size','11px');





	Cufon.now();

});

//FLASH INTEGRATION
var flashvars = {
	xml_path: "http://www.atakinteractive.com/images/flash/_main.xml"
};
var params = {
	menu: "false",
	scale: "noScale",
	allowFullscreen: "true",
	allowScriptAccess: "always",
	bgcolor: "#0",
	wmode: "opaque"
};
var attributes = {
	id:"Atak"
};
swfobject.embedSWF("http://www.atakinteractive.com/images/flash/atak.swf", "altContent", "1007", "261", "9.0.0", "http://www.atakinteractive.com/images/flash/expressInstall.swf", flashvars, params, attributes);
