/*tab 1*/
$(function () {
	var tabContainers = $('div.tabs > div');
	if(tabContainers.length > 0) {

		tabContainers.hide();
		 		
		if ($('div.tabs ul.tabNavigation a').length > 0) {			
			$('div.tabs ul.tabNavigation a').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).show();
				$('div.tabExtra a').hide();
				$('div.tabExtra .' + this.hash.replace('#','')).show();
				$('div.tabs ul.tabNavigation a').removeClass('selected');
				$(this).addClass('selected');
				// need to sifr on tab change because non-visible tabs at page load won't have been sifr'd
				sIFR.replace(frutiger, {
					selector: 'div.tabs h2',
					wmode: 'transparent',  
					css: '.sIFR-root { color: #63532f; text-transform:uppercase; font-size:16px;}'
				});
				return false;
			}).filter(':first').click();
		} else {
			// if there are no tabs, show the first one with content
			tabContainers.each(function () {
				if($(this).html().length > 0) {
					$(this).show();
					return false;
				}
			});
		}
	}
});
		
/*tab 2*/		
$(function () {
	var tabContainers = $('div.tabs2 > div');
	if(tabContainers.length > 0) {
		
		tabContainers.hide();
		
		if ($('div.tabs2 ul.tabNavigation a').length > 0) {
			$('div.tabs2 ul.tabNavigation a').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).show();
				$('div.tabs2 ul.tabNavigation a').removeClass('selected');
				$(this).addClass('selected');
				return false;
			}).filter(':first').click();
		} else {		
			// if there are no tabs, show the first one with content
			tabContainers.each(function () {
				if($(this).html().length > 0) {
					$(this).show();
					return false;
				}
			});
		}
	}		
});


		
