//$(function() {
//
//	$(".tabs").tabs({
//      	event: 'mouseover',
//		select: function(e, ui){
//               setTimeout(function() {
//                       Cufon.replace('#tabs li a', {}, false);
//                }, 40);
//
//       },
//		fx: { 
//			//height: 'toggle', 
//			opacity: 'toggle', 
//			duration: 'fast' 
//		} 
//       
//    });
//
//});

Cufon.replace('#containerImagine .headerArea h2');
Cufon.replace('#breadcrumbs', {hover: true});
Cufon.replace('h1.cufon');


$(document).ready(function(){

	$('#portfolioFilter').tabs({ fx: {opacity: 'toggle' } });
	$('.tabs').tabs( {event: 'mouseover'} );
	$('.thumbTabs').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 5000); 
	$("#orangeFeatureBox").css("display","inline"); 
	
	function onAfter() { 
		$('#slideCaption').html("") 
			.append(this.alt);  
	}
	
	$('#slideshow') 
	.after('<div id="portfolioSlideNav">') 
	.cycle({ 
		fx:     'fade', 
		speed:  '4000', 
		timeout: 5000, 
		pager:  '#portfolioSlideNav',
		pause:   1,
		after: onAfter
	});
	
	$('#slideshowHomeFeed') 
	.before('<div id="slideNav">') 
	.cycle({ 
		fx:     'fade', 
		speed:  '4000', 
		timeout: 5000, 
		pager:  '#slideNav',
		pause:   1
	});
	
	$("#projectDetials").hide();
	
	$("#projectDetialsBtn").click(function() {
	  $("#projectDetials").slideToggle();
	});
	
	//$("a > img[@alt^='external']"
//	  ).parent().attr("class","external");
//	$("a[@title^='external']"
//	  ).attr("class","external");
//	$("a[@class*='external']"
//	  ).attr("target","_blank");

	 $("ul.dropdown li").hover(function(){
	   $(this).addClass("hover");
	   $('> .dir',this).addClass("open");
	   $('ul:first',this).css('visibility', 'visible');
	 },function(){
	   $(this).removeClass("hover");
	   $('.open',this).removeClass("open");
	   $('ul:first',this).css('visibility', 'hidden');
	 });

   
});

