// JavaScript Document

function show(el) 
{
    for (var i=0;i<=6;i++)
    {
            document.getElementById('subNav'+i).style.display = 'none';
    }
    document.getElementById('subNav'+el).style.display = 'block';
}

function clearText(el) {
    document.getElementById(el).value = ""
}

function resetText(el) {
    if(document.getElementById(el).value == "")
        document.getElementById(el).value = "Product Search..."
} 

jQuery.fn.toggleVal = function(focusClass) {
 this.each(function() {
 $(this).focus(function() {
 // clear value if current value is the default
 if($(this).val() == this.defaultValue) { $(this).val(""); }

 // if focusClass is set, add the class
 if(focusClass) { $(this).addClass(focusClass); }
 }).blur(function() {
 // restore to the default value if current value is empty
 if($(this).val() == "") { $(this).val(this.defaultValue); }

 // if focusClass is set, remove class
 if(focusClass) { $(this).removeClass(focusClass); }
 });
 });
}

function ShowLargeImage(mID)
{
    var Name = $(mID).attr('title');
    
    $('#' + Name).fadeIn(800);
    
    //alert(Name);
}

function HideLargeImage(mID, type)
{
    if (type == 1)
    {
        var Name = $(mID).attr('title');
    
        $(Name).fadeOut(800);
    }
    else
    {
        $(mID).fadeOut(800);
    }
    
    //alert(Name);
}

