function eptaf(thetitle,theurl){
  var thestring = "";
  for (var i = 0; i < theurl.length; i++) {
    if (theurl.charAt(i) == "&") thestring = thestring + "^"
    else thestring = thestring + theurl.charAt(i)
  }
  window.open("http://www.musiciansmart.com/eptaf/eptaf.asp?thetitle=" + thetitle + "&theurl=" + thestring, "eptaf", "scrollbars,resizable=no,width=316");
}
$("#order-form [href='hearforyourself.htm#order']").live('click', function () {
  $("#order-form").load("order-form-perfect-pitch.htm #order-form-div", function () {
    var destination = $("#order-form").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
$("#order-form [href='41powerlessons.htm#order']").live('click', function () {
  $("#order-form").load("order-form-relative-pitch.htm #order-form-div", function () {
    var destination = $("#order-form").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
$("#order-form [href='perfectrelative.htm#order']").live('click', function () {
  $("#order-form").load("order-form-combo.htm #order-form-div", function () {
    var destination = $("#order-form").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
$("#order-form [href='hearforyourself.htm#orderhere']").live('click', function () {
  $("#order-form").load("order-form-perfect-pitch.htm #order-form-div", function () {
    var destination = $("a:[name='orderhere']").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
$("#order-form [href='41powerlessons.htm#orderhere']").live('click', function () {
  $("#order-form").load("order-form-relative-pitch.htm #order-form-div", function () {
    var destination = $("a:[name='orderhere']").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
$("#order-form [href='perfectrelative.htm#orderhere']").live('click', function () {
  $("#order-form").load("order-form-combo.htm #order-form-div", function () {
    var destination = $("a:[name='orderhere']").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
$('.menu-section-inactive .menu-section-links').hide();
$('.menu-section-active .menu-section-links').show();
$('.menu-section').live('mouseenter mouseleave', function(event) {
  if (event.type == 'mouseenter') {
    $(this).clearQueue();
  } else {
    $(this).delay(2000).queue(function(){
      $('.menu-section-active').removeClass('menu-section-active').addClass('menu-section-inactive');
      if (!$.url.attr('file') || $.url.attr('file') == 'home.htm') {
        $('.menu-section .menu-section-links').first().parents('.menu-section-inactive').removeClass('menu-section-inactive').addClass('menu-section-active');
        $('.menu-section .menu-section-links').first().parents('.menu-section-active').children('.menu-section-head').find('a').removeClass('Softwhite-small').addClass('Gold-small');
        $('.menu-section .menu-section-links').first().parents('.menu-section-active').children('.menu-section-head').find('a').children('span').removeClass('Softwhite-link-xlarge').addClass('Gold-xlarge');
      } else {
        $('.menu-section .menu-section-links .Green-small').parents('.menu-section-inactive').removeClass('menu-section-inactive').addClass('menu-section-active');
        $('.menu-section .menu-section-links .Green-small').parents('.menu-section-active').children('.menu-section-head').find('a').removeClass('Softwhite-small').addClass('Gold-small');
        $('.menu-section .menu-section-links .Green-small').parents('.menu-section-active').children('.menu-section-head').find('a').children('span').removeClass('Softwhite-link-xlarge').addClass('Gold-xlarge');
      }
      $('.menu-section-inactive .menu-section-head a').removeClass('Gold-small').addClass('Softwhite-small');
      $('.menu-section-inactive .menu-section-head a').children('span').removeClass('Gold-xlarge').addClass('Softwhite-link-xlarge');
      $('.menu-section-inactive .menu-section-links').fadeOut(500);
      $('.menu-section-active .menu-section-links').delay(500).fadeIn(750);
    });
  }
});
$('.menu-section-active').live('mouseenter', function() {
  if(!$(this).children('.menu-section-order').length){
    $('.menu-section-order .menu-section-head a').removeClass('Gold-small').addClass('Softwhite-small');
    $('.menu-section-order .menu-section-head a').children('span').removeClass('Gold-xlarge').addClass('Softwhite-link-xlarge');
    $('.menu-section-order .menu-section-head a').parents('.menu-section-active').removeClass('menu-section-active').addClass('menu-section-inactive');
    $('.menu-section-order .menu-section-links').fadeOut(500);
  }
});
$('.menu-section-inactive').live('mouseenter', function() {
  $('.menu-section-head a', this).removeClass('Softwhite-small').addClass('Gold-small');
  $('.menu-section-head a', this).children('span').removeClass('Softwhite-link-xlarge').addClass('Gold-xlarge');
  if(!$(this).children('.menu-section-order').length){
    $('.menu-section-active .menu-section-head a').removeClass('Gold-small').addClass('Softwhite-small');
    $('.menu-section-active .menu-section-head a').children('span').removeClass('Gold-xlarge').addClass('Softwhite-link-xlarge');
    $('.menu-section-active').removeClass('menu-section-active').addClass('menu-section-inactive');
  }
  $('.menu-section-head a', this).parents('.menu-section-inactive').removeClass('menu-section-inactive').addClass('menu-section-active');
  if(!$(this).children('.menu-section-order').length){
    $('.menu-section-inactive .menu-section-links').fadeOut(500);
  }
  $('.menu-section-active .menu-section-links').delay(500).fadeIn(500);
});
$('.menu-section-inactive .menu-section-head a').live('click', function(){
  $(this).blur();
  return false;
});
$('.menu-section-active .menu-section-head a').live('click', function () {
  $(this).blur();
  return false;
});
$(".menu-section-order [href='hearforyourself.htm#order']").live('click', function () {
  $("#order-form").load("order-form-perfect-pitch.htm #order-form-div", function () {
    var destination = $("#order-form").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
$(".menu-section-order [href='41powerlessons.htm#order']").live('click', function () {
  $("#order-form").load("order-form-relative-pitch.htm #order-form-div", function () {
    var destination = $("#order-form").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
$(".menu-section-order [href='perfectrelative.htm#order']").live('click', function () {
  $("#order-form").load("order-form-combo.htm #order-form-div", function () {
    var destination = $("#order-form").offset().top;
    $("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 750);
  });
  return false;
});
jQuery.url=function()
{var segments={};var parsed={};var options={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var parseUri=function()
{str=decodeURI(options.url);var m=options.parser[options.strictMode?"strict":"loose"].exec(str);var uri={};var i=14;while(i--){uri[options.key[i]]=m[i]||"";}
uri[options.q.name]={};uri[options.key[12]].replace(options.q.parser,function($0,$1,$2){if($1){uri[options.q.name][$1]=$2;}});return uri;};var key=function(key)
{if(jQuery.isEmptyObject(parsed))
{setUp();}
if(key=="base")
{if(parsed.port!==null&&parsed.port!=="")
{return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/";}
else
{return parsed.protocol+"://"+parsed.host+"/";}}
return(parsed[key]==="")?null:parsed[key];};var param=function(item)
{if(jQuery.isEmptyObject(parsed))
{setUp();}
return(parsed.queryKey[item]===null)?null:parsed.queryKey[item];};var setUp=function()
{parsed=parseUri();getSegments();};var getSegments=function()
{var p=parsed.path;segments=[];segments=parsed.path.length==1?{}:(p.charAt(p.length-1)=="/"?p.substring(1,p.length-1):path=p.substring(1)).split("/");};return{setMode:function(mode)
{options.strictMode=mode=="strict"?true:false;return this;},setUrl:function(newUri)
{options.url=newUri===undefined?window.location:newUri;setUp();return this;},segment:function(pos)
{if(jQuery.isEmptyObject(parsed))
{setUp();}
if(pos===undefined)
{return segments.length;}
return(segments[pos]===""||segments[pos]===undefined)?null:segments[pos];},attr:key,param:param};}();

