// jquery code for billing demo

// JavaScript Document
 jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
  return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);  
 };
 jQuery.fn.fadeToggle = function(speed, easing, callback) {
  return this.animate({opacity: 'toggle'}, speed, easing, callback);  
 };
 jQuery.fn.slideUpFade = function(speed, easing) {
  return this.animate({opacity:'.9', height: 'show'}, speed, easing); 
 };
 jQuery.fn.slideDownFade = function(speed, easing) {
  return this.animate({opacity:'0', height: 'hide'}, speed, easing);  
 };
 
$(document).ready(function() {
 
 // hide dynamic elements
	//$('.billingDetails:not(:first)').hide();
	$('.billingDetails').hide();
// hover slowly
	$('.bill-menu ul li a').hover(function(){
		$(this).addClass('billDemoHover',1000);	
	},function(){
		$(this).removeClass('billDemoHover',500);
	}); 

// click - show details
 $('.bill-menu ul li a').click(function(){   
   $('.bill-menu ul li a').removeClass('billSelected');
   $(this).addClass('billSelected',1000);
   var billDetail = $(this).attr('href');
   $('.billingDetails:visible').hide();
   $("div#" + billDetail).animate({slideDown: "slow", opacity: "show"});
   return false;
  });
 
 
 
 
 
 
 
 
 //End functions
});
