jQuery(document).ready(function($){    
    $(".map").click(function(e){
        e.preventDefault();
        var url = this.href;
        var content = "<iframe width='480' height='480' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='" + url + "'></iframe><br /><small>See <a target='_blank' href='" + url + "' style='color:#0000FF;text-align:left'>Driving directions</a> on the larger size map</small>";
        var color = $('.map').css('color');
        $('.map').css({'color': '#484848'});
        $.nyroModalManual({
            content: content
        });
        $('.map').css({'color': color});
        return false;
   });
});

jQuery(document).ready(function ($) {
	var tabContainers = jQuery('div.textContent div.tab'); // get the array of tab containers 
	tabContainers.hide().filter(':first').show(); // hide all containers except first
	// Click handlers
	$('table.tabs td a').click(function () {
	        tabContainers.hide(); // hide all tabs
	        tabContainers.filter(this.hash).show(); // show current
	        $('table.tabs td').removeClass('act'); // deselect all the tabs
	        $(this).parent().addClass('act'); // select current one
	        return false;
	}).filter(':first').click();
});

jQuery(document).ready(function($){
	(function($) {
		$.fn.formHighlight = function() { 
				$(this).click(function() {
					$(this).parent().parent().parent().parent().children().removeClass("active");
					$(this).parent().parent().parent().addClass("active");
				});
		};
	})
	(jQuery);
	$(".form textarea, .form .textField").formHighlight();
});

jQuery(document).ready(function($){
    $(".secNav").accordion({ autoHeight: false,active: 1 });
});

jQuery(document).ready(function($){
	$(".video").click(function(e){
		var videoId = this.id;
	        e.preventDefault();
	        $.nyroModalManual({
			minHeight: 200,
			minWidth: 200,
			width: 526,
			height: 402,
			content: '<div id="videoWrapper"><!-- --></div>',
			endFillContent: function() {
				swfobject.embedSWF("/wp-content/themes/tlg_attorneys/swf/flowplayer-3.1.5.swf", 
				"videoWrapper", "525", "400", "9.0.0", null, {config: "{'clip': '/wp-content/uploads/video.flv'}"}, {bgcolor: '#000000'});
			}
		});

       		return false;
	   });          	
});