$(document).ready(function() {

    $('.slideshow').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });


    // Content box tabs:

    $('.productspecs .tab-content .content').hide(); // Hide the content divs
    $('ul.spectabs li.default-tab').addClass('active'); // Add the class "current" to the default tab
    $('.productspecs .tab-content div.default-tab').show(); // Show the div with class "default-tab"

    $('ul.spectabs li a').click( // When a tab is clicked...
		function() {
		    $(this).parent().siblings().removeClass('active'); // Remove "current" class from all tabs
		    $(this).parent().addClass('active'); // Add class "current" to clicked tab

		    var currentTab = $(this).attr('href'); // Set variable "currentTab" to the value of href of clicked tab
		    $(currentTab).siblings().hide(); // Hide all content divs
		    $(currentTab).show(); // Show the content div with the id equal to the id of clicked tab
		    return false;
		}
	);

    //Quick Menu
    var buttonposition = $('#btnProdSel').offset();
    $('#quickmenu').hide();
    $('#quickmenu').css('left', buttonposition.left - 580);
    $('#quickmenu').css('visibility', 'visible');
    $('#btnProdSel').click(
        function() {
            $('#quickmenu').show();
        }
    );
    $('#quickmenu').mouseleave(
        function() {
            $('#quickmenu').hide();
        }
    );
});

function clearText(el) { if (el.defaultValue == el.value) el.value = ""; }
function restoreText(el) { if (el.value == "") el.value = el.defaultValue; }
