﻿$(document).ready(function() {
    //Text Open & Close
    $(".textmore").hide();
    $(".textmorebtn").html("more");

    $(".textmorebtn").click(function() {

        $(".textmorebtn").html("more");
        $(".textmore").slideUp(1000);

        var _text = $("#" + $(this).attr("text"));

        if (_text.attr("style").indexOf("display: none") == -1) {
            _text.slideUp(1000);
        }
        else {
            _text.slideDown(1000);
            $(this).html("less");
        }
    });

    //Preview Mouse Over
    $(".shared_Thumb").mouseover(function() {

        $.ajax({
            url: "/Home/Preview?item=" + $(this).attr("ref"),
            type: "GET",
            cache: false,
            success: function(result) {


                $("#menucontainer").hide();
                $("#preview_content").html(result).show();

            }
        });
    });

    //Preview Mouse Out
    $(".shared_Thumb").mouseout(function() {
        $("#preview_content").hide()
        $("#menucontainer").show();
    });



    $(".shared_ThumbSmall").click(function() {
        var _url = $(this).attr("url");
        if (_url != null) {
            window.location = _url;
        }
    });


});






