$(document).ready(function(){

// Facebox	
$('a[rel*=facebox]').facebox() 

// For the SIFR Image replacement techniques
$.sifr({ path: '/fonts/'}); 
$('h2, h3').sifr({font: 'fontin_sans_bold', color:'#47b1e6'
});
$('h2.italic').sifr({font: 'fontin_sans_italic_bold', color:'#47b1e6'
});
$('h4.phonetic').sifr({font: 'marker_felt', color:'#fff'
});

// Embedding flash objects
$('#homepage-flash').flash({
    src: '/flash/homepage.swf',
    width: 940,
    height: 425,
	wmode: 'transparent'
}); 

$('#preview').flash({
    src: '/flash/player.swf',
    width: 380,
    menu:true,
    height: 55,
    background: '#ffffff',
    id: 'ply',
    wmode: 'transparent',
    flashvars: { file: $("#pronunciation_url").text(), skin: '/flash/grunge.swf' }
 },
 {
     expressInstall: true,
     version: '8'
});

// For any text inputs we want a default value removed onFocus

var active_color = '#000'; // Colour of user provided text
var inactive_color = '#999'; // Colour of default text
 
$(document).ready(function() {
  $("input.value").css("color", inactive_color);
  var default_values = new Array();
  $("input.value").focus(function() {
    if (!default_values[this.id]) {
      default_values[this.id] = this.value;
    }
    if (this.value == default_values[this.id]) {
      this.value = '';
      this.style.color = active_color;
    }
    $(this).blur(function() {
      if (this.value == '') {
        this.style.color = inactive_color;
        this.value = default_values[this.id];
      }
    });
  });
});


});