{"size": 1978, "ext": "js", "max_stars_repo_path": "AzureBlog/Scripts/scripts.js", "max_stars_repo_name": "aml630/BuyBabble", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "AzureBlog/Scripts/scripts.js", "max_issues_repo_name": "aml630/BuyBabble", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "AzureBlog/Scripts/scripts.js", "max_forks_repo_name": "aml630/BuyBabble", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.3921568627, "max_line_length": 71, "alphanum_fraction": 0.511627907}
﻿
$(".testButton").click(function () {
    console.log('working');
    //$(".mainContainer").toggle("slow");

    $(".individualProduct").toggleClass("active", 500, "easeOutSine");
});

$(".learnMore").click(function () {

    $(".alignCenter").nextAll(".moreResources").eq(0).slideToggle();
})



function next(x) {
    var total = $(".productParent").children().length;
    for (var i = 0; i< total; i = i+x)
    {
        if( $(".productParent").children().eq(i).is(":visible")===true)
        {
            $(".productParent").children().eq(i).hide();
            $(".productParent").children().eq(i + x).show();
            if (i+1 === total)
            {
                $(".productParent").children().eq(0).show();
            }


            //debugger;


            return "working";
        }
    }

    $(".productParent").children().eq(0).show();



}


$(".next").click(function () {
    next(1);
});


$('.prev').click(function () {

    next(-1);

});
window.onload = next(1);

//var myInter = setInterval(function myInterval () {
//    next(1);
//}, 5000);


$('.showReview').click(function () {
    $(".leaveReview").toggle("slow");
    clearInterval(myInter)
})

$('.rate label').click(function () {
    $(this).prev().prop("checked", true);
})

$(':radio').change(
  function () {
      var text = parseInt(this.value);
      $('.testStars').val(text);
  }
)

$('.tweet').submit(function (event) {
    event.preventDefault();
    console.log("tweeting!");
    debugger;
    $.ajax({
        url: '/../Category/Tweet/',
        type: 'POST',
        dataType: 'json',
        data: $(this).serialize(),
        success: function (result) {
            console.log(result);
            $(".tweetNumber").text(result);
        }
    });

    console.log("endTweet!");
});


$(".showProducts").click(function () {
    $(this).parent().next().next().next().fadeToggle("slow");
})

$(".showEdit").click(function () {
    $(this).next(".editForm").fadeToggle();
})