$(document).ready(function(){
    $('#contentLoaderP').html($('#location_lucknow').html()).addClass('sub').find('a.thumb').click(function(){
						var newSubTab = $(this).attr('id').substring(1);
						var currentSubTab = $('a.thumbActive').attr('id').substring(1);

						if ($(this).hasClass('thumbActive')){
							//THE CLICKED TAB IS ALREADY ACTIVE
						} else {
							$('#'+currentSubTab).hide('fast', function(){
								$('#'+newSubTab).show();
							});
							$('#a'+currentSubTab).removeClass('thumbActive');
							$('#a'+newSubTab).addClass('thumbActive');
						}
						return false;
					});;
    $('#linkP a').click(function(){
		var newTab = $(this).attr('id').substring(1);
		var currentTab = $('#linkP a.tnActiveP').attr('id').substring(1);
		//alert(currentTab);
		//alert(newTab);
		if ($(this).hasClass('tnActiveP')){
			//THE CLICKED TAB IS ALREADY ACTIVE
		} else {
			$('#contentLoaderP').html($('#'+newTab).html()).addClass('sub').find('a.thumb').click(function(){
						var newSubTab = $(this).attr('id').substring(1);
						var currentSubTab = $('a.thumbActive').attr('id').substring(1);

						if ($(this).hasClass('thumbActive')){
							//THE CLICKED TAB IS ALREADY ACTIVE
						} else {
							$('#'+currentSubTab).hide('fast', function(){
								$('#'+newSubTab).show();
							});
							$('#a'+currentSubTab).removeClass('thumbActive');
							$('#a'+newSubTab).addClass('thumbActive');
						}
						return false;
					});
				
			$('#a'+currentTab).removeClass('tnActiveP');
			$('#a'+newTab).addClass('tnActiveP');
		}
		
		return false;
    });

  });


function toggleDivs(hide,show){
	$('#'+hide).fadeOut('fast', function(){
		$('#'+show).fadeIn();
	});
}