

/******************************************************************************
 * Install Guides page
 */
function InstallGuidesPage(path)
{
    markInstallGuide()
    unmarkInstallGuide();
    downloadInstallGuide(path);
    prepareGuideCode();
}

/**
 * Marking the install guide items
 */
function markInstallGuide()
{
    $(".install_guide_item").live('mouseover', function() {
        $(this).addClass("install_guide_item_selected");
    });
}

/**
 * Unmarking the install guide items
 */
function unmarkInstallGuide()
{
    $(".install_guide_item").live('mouseout', function() {
        $(this).removeClass("install_guide_item_selected");
    });
}

/**
 * Download install guide
 */
function downloadInstallGuide(path)
{
    /**
     * Download install guide when clicking on the string happens
     */
    $(".install_guide_item").live('click', function() {
        location.href=path+$(this).attr("guideid");
    });

   /**
     * Download install guide when clicking on the "Download" button happens
     */
    $(".download_guide").live('click', function() {
        var guideid = $(this).siblings("#guideID").children("input").val();
        location.href=path+guideid;
    });
}

/**
 * Clears Guide Code edit when it's used first time
 */
function prepareGuideCode()
{
    $(".guide_code").live('click', function() {
       if ($(this).val()=="Guide Code") $(this).val("");
    });
}
 
function showLoader()
{
	$('.additional_detail').addClass('loading');
} 
function hideLoader()
{
	$('.additional_detail').removeClass('loading');
}
