鎮痛剤乱用
").text(); //alert(myCaptionArray[string]); //alert(myCaptionColorArray[string]); } var img = $(this).data('__imgObject'); var ctx = aContext; ctx.clearRect(0,0,500,500); // Load an image ctx.rotate(rotator * Math.PI / 180); ctx.translate(120,120); ctx.scale(2,1.5); ctx.scale(1+animatorSmall*4.7,1+animatorSmall*5); ctx.rotate(animatorSmall*4); ctx.fillStyle = "rgba(0, 0, 0, "+animateOpacity+")"; ctx.fillRect(-50, -70, 130, 90); ctx.fillRect(-30, -55, 100, 65); ctx.beginPath(); //ctx.rotate(animatorSmall/20); //ctx.restore(); ctx.fillStyle = "rgba(0, 0, 0, .5)"; ctx.fillRect(-35, -60, 100, 65); //ctx.drawImage(img, 0, 0, 20, 20, -35, -60, 100, 65); ctx.translate(20, 20); ctx.drawImage(img, -65, -80); ctx.restore(); ctx.fillStyle = "rgba(255, 255, 255, .5)"; ctx.fillRect(0, this.height/4*3-20, this.width*animator, this.height/4*animator+10); ctx.restore(); ctx.fillStyle = "rgba(0, 0, 0, 1)"; if (myCaptionArray.length == 2) { ctx.fillRect(0, this.height/4*3-35, this.width*animator, this.height/2); } else { ctx.fillRect(0, this.height/4*3-15, this.width*animator, this.height/4); } ctx.restore(); ctx.fillStyle = "rgba(255,255,255, "+animator+")"; var xpos = 5*animator*2+10; if (rtl) { xpos = 5*animator*2+280; } if (myCaptionArray.length == 1) { var fontSize = this.width/myCaptionArray[string].length*1.7; console.log("length 1 = "+fontSize); console.log("length of string = "+myCaptionArray[string].length); if (fontSize > 33) { fontSize = 33; } ctx.fillText(myCaptionArray[string], xpos, this.height/4*3+(string*20)); ctx.font = '600 '+fontSize+'px "Century Gothic","Trebuchet MS",Helvetica,sans-serif'; ctx.stroke(); ctx.textBaseline = "middle"; } else { // console.log(' * * * * '); for (var string in myCaptionArray) { var fontSize = this.width/myCaptionArray[string].length*1.7; console.log("length 2 = "+fontSize); console.log("length of string = "+myCaptionArray[string].length); if (fontSize > 33) { fontSize = 33; } if (string == 0) { var offset = -10; } else { var offset = 0; } if (myCaptionColorArray[string] == 0) { ctx.fillText(myCaptionArray[string], xpos, this.height/4*3+(string*20)+offset); ctx.font = '600 '+fontSize+'px "Century Gothic","Trebuchet MS",Helvetica,sans-serif'; } else { ctx.fillText(myCaptionArray[string], xpos, this.height/4*3+(string*20)+offset); ctx.font = '600 '+fontSize+'px "Century Gothic","Trebuchet MS",Helvetica,sans-serif'; } ctx.stroke(); ctx.textBaseline = "middle"; } } ctx.restore(); }); $(".header-menu-button").gcuiCanvasButton(function(aContext, aAnimator) { var animator = aAnimator; var animatorSmall = animator/50; var animateOpacity = animator/3+.5; var rtlCheck = ""; var rtl = false; if (rtlCheck.length > 0) { rtl = true; } //Because canvas cannot do line breaks, we have to split the caption into individual lines var myCaption = $(this).attr('__caption'); // If the string is very long and has nos, split it after the first word ending after the 20th character. if (myCaption.length > 20 && (myCaption.indexOf('
25)) { last_space = 20 + myCaption.substr(20).indexOf(' '); if (last_space > 20) { new_caption = myCaption.substr(0,last_space) + '
' + myCaption.substr(last_space+1); myCaption = new_caption; } } //Split at the line break in the XML myCaptionArray = myCaption.split(/
/); //Go through each split line and strip the html and assign it to the array for (var string in myCaptionArray) { myCaptionArray[string] = $("
" + myCaptionArray[string] + "
左サイドの痛みの原因").text(); } if(this.id == "button2") { myButtonShape=[ [18,15], [255,7], [257,45], [268,45], [266,80], [27,78], [27,63], [18,63] ], myArrowPosition=[220,45] } else { myButtonShape=[ [12,12], [255,15], [257,60], [222,60], [224,75], [28,83], [26,53], [12,53] ], myArrowPosition=[220,25] } var ctx = aContext; ctx.clearRect(0,0,300,110); //ctx.fillRect(10, 10, 100, 65); //ctx.setTransform(1+animatorSmall,0,0,1+animatorSmall,-7*animator,-6*animator); // ctx.translate(0, 0); // ctx.scale(1, 1); if (myCaptionArray.length > 1) { ctx.transform(1+animatorSmall,0,0,1+animatorSmall,-7*animator,-6*animator); ctx.rotate(animatorSmall); ctx.beginPath(); ctx.fillStyle="rgba(0, 0, 0, "+animateOpacity+")"; ctx.strokeStyle="rgba(0, 0, 0, "+animateOpacity+")"; ctx.scale(1+animatorSmall*2.7,1+animatorSmall*3); for (var i in myButtonShape) { var myCoords = myButtonShape[i]; // if first one.. if (i==0) { ctx.moveTo(myCoords[0],myCoords[1]); } else { ctx.lineTo(myCoords[0],myCoords[1]); } } ctx.fill(); ctx.beginPath(); ctx.restore(); ctx.save(); if (rtl) { ctx.translate(140, 0); ctx.scale(-1, 1); ctx.translate(-140, 0); } var arrow = $(this).data('__imgObject'); ctx.fillStyle="rgba(0, 0, 0, 1)"; ctx.strokeStyle="rgba(0, 0, 0, 1)"; // Load an image ctx.drawImage(arrow, myArrowPosition[0]*animator/16+220, myArrowPosition[1]); ctx.restore(); } else { ctx.transform(1+animatorSmall,0,0,1+animatorSmall,-7*animator,-6*animator); ctx.rotate(-animatorSmall); ctx.fillStyle="rgba(0, 0, 0, "+animateOpacity+")"; ctx.strokeStyle="rgba(0, 0, 0, "+animateOpacity+")"; ctx.scale(1+animatorSmall*2.7,1.35+animatorSmall*15); ctx.fillRect(0,15,300,30); ctx.restore(); var arrow = $(this).data('__imgObject'); var arrow2 = $(this).data('__imgObject2'); ctx.fillStyle="rgba(0, 0, 0, 1)"; ctx.strokeStyle="rgba(0, 0, 0, 1)"; // Load an image ctx.restore(); ctx.save(); if (rtl) { ctx.translate(140, 0); ctx.scale(-1, 1); ctx.translate(-140, 0); } ctx.drawImage(arrow2, myArrowPosition[0]*animator/16+220, 25); ctx.drawImage(arrow, myArrowPosition[0]*animator/14+200, 25); ctx.drawImage(arrow, myArrowPosition[0]*animator/12+180, 25); ctx.save(); ctx.restore(); } ctx.translate(0, 0); ctx.scale(1, 1); if (rtl) { var thisX = 40*animator/10+210; } else { var thisX = 40*animator/10+32; } var locale = "ja"; var fontSize = 16; for (var string in myCaptionArray) { if (myCaptionArray[string].length > 24) { fontSize = (this.width/myCaptionArray[string].length); } else if (locale == "ja") { if (myCaptionArray[string].length > 15) { fontSize = (this.width/myCaptionArray[string].length)/3; } else { fontSize = 12; } } } // console.log(fontSize); if (myCaptionArray.length == 1) { ctx.save(); if (rtl) { ctx.translate(140, 0); ctx.scale(-1, 1); ctx.translate(-140, 0); } ctx.stroke(); //ctx.font = "bold 20px optimer"; ctx.font = '600 '+fontSize+'px/2 "Trebuchet MS",Helvetica,sans-serif'; ctx.fillStyle = "rgba(255, 255, 255, 1)"; ctx.textBaseline = "middle"; ctx.fillText(myCaptionArray[0], thisX, this.height/2); ctx.restore(); } else if (myCaptionArray.length == 2) { ctx.stroke(); //ctx.font = "bold 20px optimer"; ctx.font = '600 '+fontSize+'px/2 "Trebuchet MS",Helvetica,sans-serif'; ctx.fillStyle = "rgba(44, 167, 170, 1)"; ctx.textBaseline = "middle"; ctx.fillText(myCaptionArray[0], thisX, this.height/2-10); //ctx.font = '20px "optimer"'; ctx.font = '600 '+fontSize+'px/2 "Trebuchet MS",Helvetica,sans-serif'; ctx.
食品リストの便秘fillStyle = "rgba(255, 255, 255, 1)"; ctx.textBaseline = "middle"; ctx.fillText(myCaptionArray[1], thisX, this.height/2+10); ctx.restore(); } else if (myCaptionArray.length == 3 || myCaptionArray.length == 4) { ctx.stroke(); //ctx.font = "20px optimer"; ctx.font = '600 '+fontSize+'px/2 "Trebuchet MS",Helvetica,sans-serif'; ctx.fillStyle = "rgba(44, 167, 170, 1)"; ctx.textBaseline = "middle"; ctx.fillText(myCaptionArray[0], thisX, this.height/2-17); //ctx.font = "20px optimer"; ctx.font = '600 '+fontSize+'px/2 "Trebuchet MS",Helvetica,sans-serif'; ctx.fillStyle = "rgba(44, 167, 170, 1)"; ctx.textBaseline = "middle"; ctx.fillText(myCaptionArray[1], thisX, this.height/2); ctx.font = '600 '+fontSize+'px/2 "Trebuchet MS",Helvetica,sans-serif'; //ctx.font = "20px optimer"; ctx.fillStyle = "rgba(255, 255, 255, 1)"; ctx.textBaseline = "middle"; ctx.fillText(myCaptionArray[2], thisX, this.height/2+17); ctx.restore(); } //ctx.drawImage(arrow, myArrowPosition[0]*animator/6+180, myArrowPosition[1]); }); $('.button').gcuiActivate( '.header-menu-button', function() { //Clear all Flyouts on Select $.gcuiClearAllFlyouts(); //If it is a link, then call the link var myVideoId = $(this).attr('__videoid'); //alert(myVideoId); var myHref = $(this).attr('__href'); var myTarget = $(this).attr('__target'); var myOnClick = $(this).attr('__onclick'); var myThumb = $(this).attr('__thumb'); if (myOnClick && myOnClick.length > 1) { eval(myOnClick); } else if (myHref && myHref.length > 1) { $("#gcui-header-player-wrapper #main_player").gcuiStopVideo(); if (myTarget == "_blank") { if (myThumb) { $("#defaultimagediv").html(''); } else { $("#defaultimagediv").html(''); } window.open(myHref); } else { document.location = myHref; } //If it is a video, then play the video } else { $("#gcui-header-player-wrapper #main_player").css("display", "block"); $("#gcui-header-player-wrapper #main_player").gcuiPlayVideo($(this).attr("__videoid"), $(this).attr("__playlistid"), "ja_JA", "ja"); } }, function() { $(this).gcuiAnimateIn(200, "swing"); if (!$.gcuiSupports({basic_html5:true})) { $(this).css("opacity", 1); $(this).children(":first").css("display", "inline-block"); } }, function() { $(this).gcuiAnimateOut(200, "swing"); if (!$.gcuiSupports({basic_html5:true})) { $(this).children(":first").css("display", "none"); $(this).css("opacity", .8); } }, function() { $(this).gcuiFlyoutAnimateIn(200, "swing", .2); }, function() { $(this).gcuiFlyoutAnimateOut(200, "swing"); $("#defaultimagediv").animate({"opacity":.7},400,"swing",null); } ); $('.header-menu-button-alt').gcuiActivate( '.header-menu-button-alt', function() { //Clear all Flyouts on Select $.gcuiClearAllFlyouts(); //If it is a link, then call the link var myVideoId = $(this).attr('__videoid'); //alert(myVideoId); var myHref = $(this).attr('__href'); var myTarget = $(this).attr('__target'); var myOnClick = $(this).attr('__onclick'); var myThumb = $(this).attr('__thumb'); if (myOnClick && myOnClick.length > 1) { eval(myOnClick); } else if (myHref && myHref.length > 1) { $("#gcui-header-player-wrapper #main_player").gcuiStopVideo(); if (myTarget == "_blank") { if (myThumb) { $("#defaultimagediv").html(''); } else { $("#defaultimagediv").html(''); } window.open(myHref); } else { document.location = myHref; } //If it is a video, then play the video } else { $("#gcui-header-player-wrapper #main_player").css("display", "block"); $("#gcui-header-player-wrapper #main_player").gcuiPlayVideo($(this).attr("__videoid"), $(this).attr("__playlistid"), "ja_JA", "ja"); } }, function() { $(this).gcuiAnimateIn(200, "swing"); $(this).gcuiFlyoutAnimateIn(200, "swing", .2); }, function() { $(this).gcuiAnimateOut(200, "swing"); if (!$.gcuiSupports({basic_html5:true})) { } }, function() { $(this).gcuiFlyoutAnimateIn(200, "swing", .2); if (!$.gcuiSupports({basic_html5:false})) { $("#gcui-header-player-wrapper #main_player").gcuiStopVideo(); } }, function() { $(this).gcuiFlyoutAnimateOut(200, "swing"); $("#defaultimagediv").animate({"opacity":.7},400,"swing",null); } ); $('.gcuiAlt.flyout-button-alt').gcuiActivate( '.header-menu-button', function() { //Clear all Flyouts on Select $.gcuiClearAllFlyouts(); //If it is a link, then call the link var myVideoId = $(this).attr('__videoid'); //alert(myVideoId); var myHref = $(this).attr('__href'); var myTarget = $(this).attr('__target'); var myOnClick = $(this).attr('__onclick'); var myThumb = $(this).attr('__thumb'); if (myOnClick && myOnClick.length > 1) { eval(myOnClick); } else if (myHref && myHref.length > 1) { $("#gcui-header-player-wrapper #main_player").gcuiStopVideo(); if (myTarget == "_blank") { if (myThumb) { $("#defaultimagediv").html(''); } else { $("#defaultimagediv").html(''); } window.open(myHref); } else { document.location = myHref; } //If it is a video, then play the video } else { $("#gcui-header-player-wrapper #main_player").css("display", "block"); $("#gcui-header-player-wrapper #main_player").gcuiPlayVideo($(this).attr("__videoid"), $(this).attr("__playlistid"), "ja_JA", "ja"); } }, function() { $(this).gcuiAnimateIn(200, "swing"); if (!$.gcuiSupports({basic_html5:true})) { $(this).css("opacity", 1); $(this).children(":first").css("background", "#000"); $(this).children(":first").css("display", "inline-block"); } }, function() { $(this).gcuiAnimateOut(200, "swing"); if (!$.gcuiSupports({basic_html5:true})) { $(this).children(":first").css("background", "#111"); $(this).children(":first").css("display", "none"); $(this).css("opacity", .8); } }, function() { $(this).gcuiFlyoutAnimateIn(200, "swing", .2); }, function() { $(this).gcuiFlyoutAnimateOut(200, "swing"); $("#defaultimagediv").animate({"opacity":.7},400,"swing",null); } ); $('#gcui-header-player-wrapper.dropdown-button').gcuiActivate( '.header-menu-button', function() { //Clear all Flyouts on Select $.gcuiClearAllFlyouts(); //If it is a link, then call the link var myVideoId = $(this).attr('__videoid'); //alert(myVideoId); var myHref = $(this).attr('__href'); var myTarget = $(this).attr('__target'); var myOnClick = $(this).attr('__onclick'); var myThumb = $(this).attr('__thumb'); if (myOnClick && myOnClick.length > 1) { eval(myOnClick); } else if (myHref && myHref.length > 1) { $("#gcui-header-player-wrapper #main_player").gcuiStopVideo(); if (myTarget == "_blank") { if (myThumb) { $("#defaultimagediv").html(''); } else { $("#defaultimagediv").html(''); } window.open(myHref); } else { document.location = myHref; } //If it is a video, then play the video } else { $("#gcui-header-player-wrapper #main_player").css("display", "block"); $("#gcui-header-player-wrapper #main_player").gcuiPlayVideo($(this).attr("__videoid"), $(this).attr("__playlistid"), "ja_JA", "ja"); } }, function() { $(this).gcuiAnimateIn(200, "swing"); if (!$.gcuiSupports({basic_html5:true})) { $(this).css("opacity", 1); //$(this).children(":first").css("background", "#000"); //$(this).children(":first").css("display", "inline-block"); } }, function() { $(this).gcuiAnimateOut(200, "swing"); if (!$.gcuiSupports({basic_html5:true})) { $(this).css("opacity", .8); //$(this).children(":first").css("background", "#111"); //$(this).children(":first").css("display", "none"); } }, function() { $(this).gcuiFlyoutAnimateIn(200, "swing", .2); }, function() { $(this).gcuiFlyoutAnimateOut(200, "swing"); $("#defaultimagediv").animate({"opacity":.7},400,"swing",null); } ); var avideo_id = 'antidrug_psa9_medicinechest'; //Init Video Player //$("#gcui-header-player-wrapper #main_player").gcuiVideoPlayer($.urlParser.host, 'antidrug_psa9_medicinechest', 'truthaboutdrugsdoc_painkillers', 576, 324, false); // $("#gcui-header-player-wrapper #main_player").gcuiVideoPlayer($.urlParser.host, 'antidrug_psa9_medicinechest', 'antidrug_psa9_medicinechest', 576, 324, false); $("#gcui-header-player-wrapper #main_player").gcuiVideoPlayer($.urlParser.host, avideo_id, avideo_id, 576, 324, false, "cid:logoimg0painkillers_booklet_ja.jpg", "ja_JA", "ja"); }); function viewBookletInline(aDocumentId, aAccessKey, aTitle, AltPDF) { if (swfobject.hasFlashPlayerVersion('9.0.115.0')) { scribd_doc_id = aDocumentId; scribd_doc_key = aAccessKey; var myLink = $('#view_booklet_inline_link'); myLink.attr('href', '/gcui_book_viewer_scribd_viewer?' + gcui_getLightboxSizes_for_reader() + '&doc_id=' + scribd_doc_id + '&doc_key=' + scribd_doc_key + '&page_num=' + scribd_page_num + '&mode=slide'); myLink.attr('rel', 'lightmodal[|' + gcui_getLightboxSizes() + '; scrolling: auto;][' + aTitle + ']'); myLink.click(); } else { window.
0 件のコメント:
コメントを投稿