// JavaScript Document



$(document).ready(function()
{

	//Hide (Collapse) the toggle containers on load

	
		$("#bc_top_search_closer").animate({ 
        width: "0px"
      }, 500 );
		
	  $('li#bc_privicy').hide();
	  $('li#bc_disclaimer').hide();
	  $('li#bc_copyright').hide();
	  
	//Footer Animations
	
		$('a#bc_privicy_but').click(function() {
    	$('li#bc_privicy').slideToggle();
		$('html, body').animate({
		scrollTop: $("li#bc_privicy").offset().top
		}, 2000);
		return false; 
		});
		
		
		$('a#bc_disclaimer_but').click(function() {
    	$('li#bc_disclaimer').slideToggle();
		$('html, body').animate({
		scrollTop: $("li#bc_disclaimer").offset().top
		}, 2000);
		return false; 
		});
		
		$('a#bc_copyright_but').click(function() {
    	$('li#bc_copyright').slideToggle();
		$('html, body').animate({
		scrollTop: $("li#bc_copyright").offset().top
		}, 2000);
		return false; 
		});
		
		$('a#bc_footer_closer').click(function() {
		$('li#bc_privicy').hide();
	  	$('li#bc_disclaimer').hide();
	  	$('li#bc_copyright').hide();
		$('html, body').animate({
		scrollTop: $("div#bc_header_cont").offset().top
		}, 2000);
		return false; 
		});
		
   //About us animations
   		
		$('a#bc_about_top_return').click(function() {
		$('html, body').animate({
		scrollTop: $("div#bc_header_cont").offset().top
		}, 2000);
		return false; 
		});
   
   		
		
	
	//Switch the "Open" and "Close" state per click
	$("h2.trigger").toggle(function(){
		$(this).addClass("active");
		$("ul#bc_top_nav_closer").animate({ width: "470px"}, 700 );
		$("#bc_top_search_closer").animate({ width: "0px"}, 700 );
		}, function () {
		$(this).removeClass("active");
		$("ul#bc_top_nav_closer").animate({ width: "0px"}, 700 );
		return false;
	});

	//Slide up and down on click
	$("h2.trigger","h2.triggers").click(function(){
		$(this).next; 
		return false;
	});
	
	
		//Switch the "Open" and "Close" state per click
	$("h2.triggers").toggle(function(){
		$(this).addClass("active");
		$("ul#bc_top_nav_closer").animate({ width: "0px"}, 700 );
		$("#bc_top_search_closer").animate({ width: "200px"}, 700 );
		}, function () {
		$(this).removeClass("active");
		$("#bc_top_search_closer").animate({ width: "0px"}, 700 );
		return false;
		
	});



	$("#bc_form_tabberer").tabs();
	
	$('#bc_form_tabberer ul li:last-child').addClass('tab_last');  
		


	//Hide (Collapse) the toggle containers on load
	
	
		//Switch the "Open" and "Close" state per click
	$("h2.triggers").toggle(function(){
		jQuery(this).addClass("active");
		jQuery("ul#bc_top_nav_closer").animate({ width: "0px"}, 700 );
		jQuery("#bc_top_search_closer").animate({ width: "200px"}, 700 );
		}, function () {
		jQuery(this).removeClass("active");
		jQuery("#bc_top_search_closer").animate({ width: "0px"}, 700 );
		return false;
		
	});
	
	$("div.directions_toggle").hide(); 
	
		//Switch the "Open" and "Close" state per click
		$("h2.triggerer").toggle(function(){
		$(this).addClass("actives");
		}, function () {
		$(this).removeClass("actives");
		});

	//Slide up and down on click
		$("h2.triggerer").click(function(){
		$(this).next("div.directions_toggle").slideToggle("slow");
		});


});