﻿$(function() {
/*home page tabds functionality*/
    $('#Navtabs div').hide();
    $('.liContainerNav li a').click(function() {
        $('.liContainerNav li a').removeClass('selectedLiNav');
        $(this).addClass('selectedLiNav');
        $('#Navtabs div').hide();
        var divID = $(this).attr('id');
        $(divID).fadeIn('slow');
    });
    $('#NavTab').show();

    
    
    /*text font size less*/
    $('#plusTextSize').click(function() {
    
        var fontSize = $('.pageCont').css('font-size').replace('px', '');
        var intFontSize = parseInt(fontSize.replace('px', ''));
        if (intFontSize < 16)
            $('.pageCont').css('font-size', intFontSize + 1 + 'px');

    });
    $('#minustextSize').click(function() {
        var fontSize = $('.pageCont').css('font-size').replace('px', '');
        var intFontSize = parseInt(fontSize.replace('px', ''));
        if (intFontSize > 10)
            $('.pageCont').css('font-size', intFontSize - 1 + 'px');
    });


    /*Scheme Summary tabs*/
    $('#tabs div').each(function() {
        $(this).hide();
    });

    $('.liContainer li a').click(function() {
        $('.liContainer li a').removeClass('selectedLi');
        $(this).addClass('selectedLi');
        $('#tabs div').each(function() {
            $(this).hide();
        });
        var divID = $(this).attr('id');
        $(divID).fadeIn('slow');

    });
    $('#tab1').show();


    /*Category Landing*/
    $('.schemeHold').each(function() {
        var p1 = $(this).find(".schDtls01 p");
        var p2 = $(this).find(".schDtls02 p");
        var temp = p1.height() > p2.height() ? p1.height() : p2.height();
        p1.height(temp);
        p2.height(temp);
    });


    /*top stocks products*/

    $('table.schTab02 tr').each(function() {
        var percent = $(this).find('td:last-child').text();
        percent = (percent * 10).toString() + '%';
        $(this).find('.bckDiv').width(percent);
    });

    $('#ctl00_ContentPlaceHolder1_ctl00_hplRegister').click(function() {
        $('.popupGreyBox').height($(document).height()).fadeIn('fast');
        $('.registerPopup').fadeIn('fast');
    });

    $('.closePop').click(function() {
        $('.registerPopup').fadeOut('fast');
        $('.popupGreyBox').fadeOut('fast');
    });
});
