
jQuery(document).ready(function(){
    $("#hidePanel").click(function(){
        $("#panel").animate({
            marginLeft:"-175px"
        }, 500 );
        $("#leftColumn").animate({
            width:"0px", 
            opacity:0
        }, 400 );
        $("#showPanel").show("normal").animate({
            width:"28px", 
            opacity:1
        }, 200);
        $("#middleColumn").animate({
            width:"750px",
            marginLeft:"10px"
        }, 500);
        $("#prog_content").animate({
            width:"80%"
        }, 500);
    });
    $("#showPanel").click(function(){
        $("#middleColumn").animate({
            marginLeft:"1px",
            width:"578px"
        }, 200);
        $("#panel").animate({
            marginLeft:"0px"
        }, 400 );
        $("#leftColumn").animate({
            width:"211px", 
            opacity:1
        }, 400 );
        $("#showPanel").animate({
            width:"0px", 
            opacity:0
        }, 600).hide("slow");
    });
});


function searchProgramme(){
    var d = $("#Programmes_name").val();
    //    alert(d);
    $.ajax({
        type: "POST",
        cache: false,
        url: "index.php?r=site/programmesearch",
        data: "name="+d,
        error: function(msg){
            alert(msg.responseText);
        },
        success: function(json){
//            plotLine(json);
            $("#req_res").html(json);
        }
    });
}

