function checkBlank(el, name){
	var value = document.getElementById(el).value;
	if(value == ""){
		document.getElementById(el).value=name;	
	}
}

var myCarousel;
var featuredCarousel;
		
function portfolio_initCallback(carousel){
	myCarousel = carousel;
}
function featured_initCallback(carousel){
	featuredCarousel = carousel;
}

$(document).ready(function(){
	$('.scroll_pane').jScrollPane({scrollbarWidth:27});
	
	$('.Page:not(.default_page)').each(function(){
		$(this).css("top", "-1000px");											
	});
	
	jQuery('#mycarousel').jcarousel({
		vertical: false,
		scroll: 1,
		size: 0,
		scroll: 3,
		initCallback: portfolio_initCallback
	});
	
	jQuery('#featuredcarousel').jcarousel({
		vertical: false,
		scroll: 1,
		size: 0,
		scroll: 3,
		initCallback: featured_initCallback
	});
	
	$('ul#Primary').superfish();
	
	$(".TextGroup").hide();
	$("#PortfolioThumbs").hide();
	$(".ImageGroup").hide();
	
	$("#MyText1").show();
	$("#MyImage0").show();
	
	$("a.Image").click(function(){
		return loadImage($(this).parent().attr("id").charAt($(this).parent().attr("id").length-1));
	});
	
	$(".websites_tab").click(function(){
		$("#PortfolioMenu a").removeClass("Active");
		$(".numbering_tabs a").removeClass("Active");
		$(this).addClass("Active");
		$(".websites_tab").addClass("Active");
		showCategory("websites");
		$("#our_work_buttons").hide();
		$(".Page").css("background-image", "url(http://images.adventuresdesign.com/bg_page_ourwork_websites.jpg)");
		return false;
	});
	$(".print_tab").click(function(){
		$("#PortfolioMenu a").removeClass("Active");
		$(".numbering_tabs a").removeClass("Active");
		$(this).addClass("Active");
		$(".print_tab").addClass("Active");
		showCategory("print");
		$("#our_work_buttons").hide();
		$(".Page").css("background-image", "url(http://images.adventuresdesign.com/bg_page_ourwork_print.jpg)");
		return false;
	});
	$(".identity_tab").click(function(){
		$("#PortfolioMenu a").removeClass("Active");
		$(".numbering_tabs a").removeClass("Active");
		$(this).addClass("Active");
		$(".identity_tab").addClass("Active");
		showCategory("identity");
		$("#our_work_buttons").hide();
		$(".Page").css("background-image", "url(http://images.adventuresdesign.com/bg_page_ourwork_identity.jpg)");
		return false;
	});
	$(".copywriting_tab").click(function(){
		$("#PortfolioMenu a").removeClass("Active");
		$(".numbering_tabs a").removeClass("Active");
		$(this).addClass("Active");
		$(".copywriting_tab").addClass("Active");
		showCategory("copywriting");
		$("#our_work_buttons").hide();
		$(".Page").css("background-image", "url(http://images.adventuresdesign.com/bg_page_ourwork_copywriting.jpg)");
		return false;
	});
	$(".default_tab").click(function(){
		$("#PortfolioMenu a").removeClass("Active");
		$(".numbering_tabs a").removeClass("Active");
		$(this).addClass("Active");		
		$("#MyTitle").show();
		$(".TextGroup").html("");
		$(".ImageGroup").hide();
		$("#MyImage0").show();
		$("#PortfolioThumbs").hide();
		$("#our_work_buttons").show();
		$(".jcarousel-skin-tango").remove();
		$(".Page").css("background-image", "url(http://images.adventuresdesign.com/bg_page_ourwork.jpg)");
		return false;
	});
	$(".featured").click(function(){
		$(".Page").css("top", "-1000px");
		$("#featured_page").css("top", 0);
		$("#SignLinks a").removeClass("Active");
		$("#nav_work a").removeClass("Active");
		$(".featured").addClass("Active");
		
		
		//$("#SignLinks a").removeClass("Active");
		//$(this).addClass("Active");
		//$(".Page").css("background-image", "url(http://images.adventuresdesign.com/bg_page_featured_client.jpg)");
		$(".Page").addClass("featured");
		$("#our_work_buttons").hide()
		$("#PortfolioMenu").hide();
		showFeatured();
		return false;
	});
	
	$(".creativeservices").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#creative_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_services a").removeClass("Active");
			$(".creativeservices").addClass("Active");
			return false;
		});
	});
	$(".marketingstrategy").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#marketing_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_services a").removeClass("Active");
			$(".marketingstrategy").addClass("Active");
			return false;
		});
	});
	$(".websitedesign").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#website_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_services a").removeClass("Active");
			$(".websitedesign").addClass("Active");
			return false;
		});
	});
	$(".brandidentity").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#brand_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_services a").removeClass("Active");
			$(".brandidentity").addClass("Active");
			return false;
		});
	});
	$(".graphicdesign").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#graphic_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_services a").removeClass("Active");
			$(".graphicdesign").addClass("Active");
			return false;
		});
	});
	$(".advertising").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#advertising_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_services a").removeClass("Active");
			$(".advertising").addClass("Active");
			return false;
		});
	});
	$(".copywriting").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#copywriting_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_services a").removeClass("Active");
			$(".copywriting").addClass("Active");
			return false;
		});
	});
	$(".internetmarketing").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#internet_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_services a").removeClass("Active");
			$(".internetmarketing").addClass("Active");
			return false;
		});
	});
	$(".about").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#about_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_company a").removeClass("Active");
			$(".about").addClass("Active");
			return false;
		});
	});
	$(".experience").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#experience_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_company a").removeClass("Active");
			$(".experience").addClass("Active");
			return false;
		});
	});
	$(".ourplace").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#ourplace_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_company a").removeClass("Active");
			$(".ourplace").addClass("Active");
			return false;
		});
	});
	$(".creativeteam").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#creativeteam_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_company a").removeClass("Active");
			$(".creativeteam").addClass("Active");
			return false;
		});
	});
	$(".ourapproach").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#ourapproach_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_company a").removeClass("Active");
			$(".ourapproach").addClass("Active");
			return false;
		});
	});
	$(".highfives").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#highfives_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_company a").removeClass("Active");
			$(".highfives").addClass("Active");
			return false;
		});
	});
	$(".contactus").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#contactus_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_contact a").removeClass("Active");
			$(".contactus").addClass("Active");
			return false;
		});
	});
	$(".generalinquiry").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#generalinquiry_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_contact a").removeClass("Active");
			$(".generalinquiry").addClass("Active");
			return false;
		});
	});
	$(".employment").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#employment_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_contact a").removeClass("Active");
			$(".employment").addClass("Active");
			return false;
		});
	});
	$(".enewsletter").each(function(){
		$(this).click(function(){
			$(".Page").css("top", "-1000px");
			$("#enewsletter_page").css("top", 0);
			$("#SignLinks a").removeClass("Active");
			$("#nav_contact a").removeClass("Active");
			$(".enewsletter").addClass("Active");
			return false;
		});
	});

	$("#MarketingFooter .link_service1").mouseenter(function(){
		$(".marketingfooter_content div").hide();
		$(".marketingfooter_content .arrow_marketing").css("left", "370px");
		$(".marketingfooter_content .service1").show();
	});
	$("#MarketingFooter .link_service2").mouseenter(function(){
		$(".marketingfooter_content div").hide();
		$(".marketingfooter_content .arrow_marketing").css("left", "610px");
		$(".marketingfooter_content .service2").show();
	});
	$("#MarketingFooter .link_service3").mouseenter(function(){
		$(".marketingfooter_content div").hide();
		$(".marketingfooter_content .arrow_marketing").css("left", "850px");
		$(".marketingfooter_content .service3").show();
	});
	
	$("#BrandFooter .link_service1").mouseenter(function(){
		$(".brandfooter_content div").hide();
		$(".brandfooter_content .arrow_marketing").css("left", "370px");
		$(".brandfooter_content .service1").show();
	});
	$("#BrandFooter .link_service2").mouseenter(function(){
		$(".brandfooter_content div").hide();
		$(".brandfooter_content .arrow_marketing").css("left", "610px");
		$(".brandfooter_content .service2").show();
	});
	$("#BrandFooter .link_service3").mouseenter(function(){
		$(".brandfooter_content div").hide();
		$(".brandfooter_content .arrow_marketing").css("left", "850px");
		$(".brandfooter_content .service3").show();
	});
	
	$("#GraphicFooter .link_service1").mouseenter(function(){
		$(".graphicfooter_content div").hide();
		$(".graphicfooter_content .arrow_marketing").css("left", "370px");
		$(".graphicfooter_content .service1").show();
	});
	$("#GraphicFooter .link_service2").mouseenter(function(){
		$(".graphicfooter_content div").hide();
		$(".graphicfooter_content .arrow_marketing").css("left", "610px");
		$(".graphicfooter_content .service2").show();
	});
	$("#GraphicFooter .link_service3").mouseenter(function(){
		$(".graphicfooter_content div").hide();
		$(".graphicfooter_content .arrow_marketing").css("left", "850px");
		$(".graphicfooter_content .service3").show();
	});
	
	$("#WebsiteFooter .link_service1").mouseenter(function(){
		$(".websitefooter_content div").hide();
		$(".websitefooter_content .arrow_marketing").css("left", "370px");
		$(".websitefooter_content .service1").show();
	});
	$("#WebsiteFooter .link_service2").mouseenter(function(){
		$(".websitefooter_content div").hide();
		$(".websitefooter_content .arrow_marketing").css("left", "610px");
		$(".websitefooter_content .service2").show();
	});
	$("#WebsiteFooter .link_service3").mouseenter(function(){
		$(".websitefooter_content div").hide();
		$(".websitefooter_content .arrow_marketing").css("left", "850px");
		$(".websitefooter_content .service3").show();
	});
	
	$("#InternetFooter .link_service1").mouseenter(function(){
		$(".internetfooter_content div").hide();
		$(".internetfooter_content .arrow_marketing").css("left", "370px");
		$(".internetfooter_content .service1").show();
	});
	$("#InternetFooter .link_service2").mouseenter(function(){
		$(".internetfooter_content div").hide();
		$(".internetfooter_content .arrow_marketing").css("left", "610px");
		$(".internetfooter_content .service2").show();
	});
	$("#InternetFooter .link_service3").mouseenter(function(){
		$(".internetfooter_content div").hide();
		$(".internetfooter_content .arrow_marketing").css("left", "850px");
		$(".internetfooter_content .service3").show();
	});
	
	$("#AdvertisingFooter .link_service1").mouseenter(function(){
		$(".advertisingfooter_content div").hide();
		$(".advertisingfooter_content .arrow_marketing").css("left", "370px");
		$(".advertisingfooter_content .service1").show();
	});
	$("#AdvertisingFooter .link_service2").mouseenter(function(){
		$(".advertisingfooter_content div").hide();
		$(".advertisingfooter_content .arrow_marketing").css("left", "610px");
		$(".advertisingfooter_content .service2").show();
	});
	$("#AdvertisingFooter .link_service3").mouseenter(function(){
		$(".advertisingfooter_content div").hide();
		$(".advertisingfooter_content .arrow_marketing").css("left", "850px");
		$(".advertisingfooter_content .service3").show();
	});
	
	$("#CopywritingFooter .link_service1").mouseenter(function(){
		$(".copywritingfooter_content div").hide();
		$(".copywritingfooter_content .arrow_marketing").css("left", "370px");
		$(".copywritingfooter_content .service1").show();
	});
	$("#CopywritingFooter .link_service2").mouseenter(function(){
		$(".copywritingfooter_content div").hide();
		$(".copywritingfooter_content .arrow_marketing").css("left", "610px");
		$(".copywritingfooter_content .service2").show();
	});
	$("#CopywritingFooter .link_service3").mouseenter(function(){
		$(".copywritingfooter_content div").hide();
		$(".copywritingfooter_content .arrow_marketing").css("left", "850px");
		$(".copywritingfooter_content .service3").show();
	});

});

