
//SUBMENU
$(document).ready(function() {
	$('a.arrow-click').click(function() {
		$('#submenu').slideToggle(200);
		$(this).toggleClass("arrow-click-up");
	});
});


//TABS
$(document).ready(function() {
    var tabContainers = $('div.tabs > div');
    
    $('div.tabs ul.tabNavigation a').click(function () {
        tabContainers.hide().filter(this.hash).show();
        
        $('div.tabs ul.tabNavigation a').removeClass('selected');
        $(this).addClass('selected');
        
        return false;
    }).filter(':first').click();
});


//FANCYBOX
$(document).ready(function() {
	$("p.note-photos a, p.note-photos-items a").fancybox({
		'hideOnContentClick': true
	});
});

//IMAGES
$(document).ready(function () {
	var img = new Image();
  $(img)
    .load(function () {
      $(this).hide();
      $('#photo-a')
        .removeClass('loading')
        .append(this);
      $(this).fadeIn();
    }) 
    .error(function () {
    })
    .attr('src', '/images/ill-a.jpg');
});

$(document).ready(function () {
	var img = new Image();
  $(img)
    .load(function () {
      $(this).hide();   
      $('#photo-b')
        .removeClass('loading')
        .append(this);    
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', '/images/ill-b.jpg');
});

$(document).ready(function () {
	var img = new Image();
  $(img)
    .load(function () {
      $(this).hide();   
      $('#photo-c')
        .removeClass('loading')
        .append(this);    
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', '/images/ill-c.jpg');
});

$(document).ready(function () {
	var img = new Image();
  $(img)
    .load(function () {
      $(this).hide();   
      $('#photo-d')
        .removeClass('loading')
        .append(this);    
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', '/images/ill-d.jpg');
});

$(document).ready(function () {
	var img = new Image();
  $(img)
    .load(function () {
      $(this).hide();   
      $('#photo-e')
        .removeClass('loading')
        .append(this);    
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', '/images/ill-e.jpg');
});