Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed


function goToImg(refimg,imgindex,img, arrTitle, containerID){
          var imgid = "#"+refimg;
          var img = img[imgindex];
          $(imgid).attr("src",img);
                  
                  // Image title display
                  var titleIndex = imgindex;
                  $("#" + containerID + " .modelName").text(arrTitle[titleIndex]);
}

function goToVid(playerid, vidid, vidindex, arrTitle, containerID, videoType, height, width, screenTopCornerX, screenTopCornerY)        {
        $("#" + containerID + " .modelName").text(arrTitle[vidindex]);

        var params = { allowScriptAccess: "always", wmode: "transparent" };
    var atts = { id: playerid };
    var slideNo = playerid.replace('ytPlayer', '');

    $('#vedioContainer' + slideNo)
        .html('<div id="videoDiv' + slideNo + '"></div>')
        .css('width', width + "px").css('height', height + "px");
    
        if(videoType == "VIDEO_WITH_SKIN")      {
                $('#vedioContainer' + slideNo).css({margin: '0px 0px 0px 0px'});
                swfobject.embedSWF("http://www.youtube.com/v/" + vidid + "&enablejsapi=1&playerapiid=player" + slideNo, "videoDiv" + slideNo, width, height, "8", null, null, params, atts);
        } else  {
                $('#vedioContainer' + slideNo).css({margin: screenTopCornerY +  'px 0px 0px ' + screenTopCornerX + 'px'});
                swfobject.embedSWF("http://www.youtube.com/apiplayer?" + "&enablejsapi=1&playerapiid=player" + slideNo, "videoDiv" + slideNo, width, height, "8", null, null, params, atts);
        }
        // Following two lines will set currentvideo id for the player
        var param = "currentVideoId" + playerid.substring(8,playerid.length) + "= \"" + vidid + "\"";
        eval(param);
}

function goToVid_old(playerid, vidid, vidindex, arrTitle, containerID){
        var titleIndex = vidindex;
                $("#" + containerID + " .modelName").text(arrTitle[titleIndex]);
                
        // these two lines will set currentvideo id for the player 
        var param = "currentVideoId" + playerid.substring(8,playerid.length) + "= \"" + vidid + "\"";
        eval(param);
   }