﻿////For options, go to http://users.tpg.com.au/j_birch/plugins/superfish/#options
//(function(j$) {
//	j$(document).ready(function() {
//		j$('.superfish ul.L1').superfish({
//			delay: 500,                            // one second delay on mouseout 
//			animation: { opacity: 'show' },  // fade-in and slide-down animation 
//			speed: 'fast',                          // faster animation speed 
//			autoArrows: false,
//			dropShadows: false
//		}).css({'clear':'left'});
//		// Webkit: apply top border to tables with .list and .list-no_lines
//		j$.each(j$.browser, function(i, val) {
//			if (i=='safari' && val==true) {
//				j$('.list tr:first td').css("border-top", "2px solid #43848C");
//				j$('.list-no_lines tr:first td').css("border-top", "2px solid #43848C");
//			}
//		});
//		//Put in the word "Search" and remove it on focus.
//	    if(j$('.search_bar').get(0).value == '')
//			j$('.search_bar').get(0).value == 'Search';
//		j$('.search_bar').focus(function() {
//			j$(this).get(0).value = '';
//		});
//	}); 
//})(jQuery);


// Functions specific to a site.
/*	jQuery(document).ready(function() { 
        	jQuery('#mainnav ul.L1').superfish({ 
            delay:       500,                            // one second delay on mouseout 
            animation:   {opacity:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed 
            autoArrows:	false,
            dropShadows:  false
        }); 
    }); */

//Cufon.replace("h1", {fontFamily: 'ITC Officina Serif'});
$('.banners').hide();

$(document).ready(function(){
  	$("#sliding-text li").fadeIn(1500, function() { 
		$(".banners")
			.show(function() {
		});					
		 $('.banners').cycle({
				fx: 'fade',
				random: 1,
				speed: 5000
		});		
		$("#first-banner")
			.delay(3000).fadeOut(4000, function() {
		});	
	});
});


$(document).ready(function(){
	lastBlock = $("#a1");
	maxWidth = 502;
	minWidth = 200;	

	$("ul.sliding-article li .article-containers").hover(
	  function(){
		$(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
	$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
	lastBlock = this;
	  }
	);
	
	if($(".ourexpertise ul.L2 li.first-child span").length != 0) {
	    //alert($(".ourexpertise ul.L2 li.first-child span").text());
	    $(".ourexpertise ul.L2 li.first-child span").addClass("menu-item-bold");
	}
});

$(document).ready(function(){
	$('.tab').hover( function() {
		$('.active-tab').attr('class', 'tab');
		$(this).attr('class', 'active-tab');
	}, 	function() {
			$('.tab').attr('class', 'active-tab');
			$(this).attr('class', 'tab');
	});

});
$(document).ready(function() {
	$('a:contains("Back to Lawyers by Name")').addClass( function() {
		$(this).addClass('back-btn');
	});
	$('p:contains("Back to Paralegals")').addClass( function() {
		$(this).addClass('back-btn');
	});
	$('#ctas a:contains("Download vCard")').addClass( function() {
		$(this).addClass('back-btn');
	});
	$('img.pic-content').wrap('<div class="overview-pic" />');
	$('img.rightpic-content').wrap('<div class="rightpic-content-wrap" />');
});
