//Input Hints plugin Copyright(c)2009 Rob Volk http://www.robvolk.com
jQuery.fn.inputHints=function() {
    $(this).each(function(i) {
        $(this).val($(this).attr('title'))
            .addClass('hint');
    });
    return $(this).focus(function() {
        if ($(this).val() == $(this).attr('title'))
            $(this).val('')
                .removeClass('hint');
    }).blur(function() {
        if ($(this).val() == '')
            $(this).val($(this).attr('title'))
                .addClass('hint');
    });
};
$(document).ready(function() {

    $('input[title]').inputHints();
    $('.skBotMoreInfo').hide(); // hide extra text - click below reveals
    $('.aSkBotMoreInfo').click(function() { $('.skBotMoreInfo').show('slow'); return false; });
    $('.sup').hide();
    $('#breadcrumbPlaceholder').html($('#breadcrumb').html()); // relocate breadcrumb

    // Change bcg heading img to girl/boy ver
    if (document.getElementById('hdr-Boy')) { $('#entityName').addClass('hdr-Boy'); }
    if (document.getElementById('hdr-Girl')) { $('#entityName').addClass('hdr-Girl'); }

    if ($('.altImages').html() == '') { $('.altImages').hide(); } // Prod page hide empty thumbs
});

function PPIPLoadSizes(){
	$('#productResults p.productResultImage').hover(function () {
		$(this).children().children('span').fadeIn('fast');
		$.ajax({
			context: $(this),
			url: 'ppip-custom/ajax-sizes.aspx?id=' + $(this).attr('rel'),
			success: function (data) {
				$(this).children().children('span').html(data);
			}
		});
	}, function () {
		$(this).children().children('span').fadeOut('slow');
	});
}

