$(document).ready(function () {
//home

//Default Action
$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_content:first").show(); //Show first tab content

//Faux Category Heading in Menu
$("#Menu li").each(function (i) {i = i+1;$(this).addClass("item"+i);});

//On Click Event
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$(".tab_content").hide(); //Hide all tab content
var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active content
return false;
});						
		
$(".accordion blockquote").hide();
$(".accordion h4").click(function(){
$(this).next("blockquote").slideToggle("slow")
.siblings("blockquote:visible").slideUp("slow");
$(this).toggleClass("active");
$(this).siblings("h4").removeClass("active");
});

$('input[title]').each(function() {
  if($(this).val() === '') {
   $(this).val($(this).attr('title')); 
  }
  
  $(this).focus(function() {
   if($(this).val() === $(this).attr('title')) {
    $(this).val('').addClass('focused'); 
   }
  });
  
  $(this).blur(function() {
   if($(this).val() === '') {
    $(this).val($(this).attr('title')).removeClass('focused'); 
   }
  });
 });

//$('a').each(function() {
  // var a = new RegExp('/' + window.location.host + '/');
   //if(!a.test(this.href)) {
     //  $(this).click(function(event) {
       //    event.preventDefault();
         //  event.stopPropagation();
           //window.open(this.href, '_blank');
       //});
   //}
//});


});
