jQuery(function($){
	$('.page_item a').removeAttr("title");
	var li = $('#navigation li');
	li.hover(function(){
  		$(this).addClass('sfHover');
	},function(){
  		$(this).removeClass('sfHover');
	});
	$('a[href^="http://"]').not($('a[href^="http://www.perlustro.com"]')).add($('a[href$=".jpg"],a[href$=".pdf"]')).click(function(){
		this.target = '_blank';
	});
	
	$('#page-399 .page h4,#page-620 .page h4').each(function(i){
		var group = new Array();
		$(this).nextAll().not('p.edit').each(function(j){
			if ($(this).is(':header')){ return false; }
			else { group.push(this); }
		});
		$(group).wrapAll($('<div class="highlight"></div>'));
	}).css('cursor','pointer').click(function(){
		$(this).next('div').slideToggle('fast').children().show();
    }).hover(
      function() { $(this).css('color','#0000ff'); }, 
      function() { $(this).css('color','#0777c5'); }
    );

	var cssObj = {
        "background-color": "transparent",
        "border": "none",
		"margin-left": 0,
		"margin-right": 0
      }
	$('#page-399 .page a[href$=399],#page-620 .page a[href$=620]').parent('p').css(cssObj);
	$('#page-633 .page a').each(function (i){
		if ($(this).text()=='view supporting graphic'){
			$(this).html('<img src="http://www.perlustro.com/wp-content/themes/starkers/images/view.gif" width="117" height="64" />').css('border-bottom','none').click(function(){ this.target = '_blank'; });
		}
	});
});
