-$a->page['htmlhead'] .= '
- <script>
-
-$(document).ready(function() {
- $("iframe").each(function(){
- var ifr_source = $(this).attr("src");
- var wmode = "wmode=transparent";
- if(ifr_source.indexOf("?") != -1) {
- var getQString = ifr_source.split("?");
- var oldString = getQString[1];
- var newString = getQString[0];
- $(this).attr("src",newString+"?"+wmode+"&"+oldString);
- }
- else $(this).attr("src",ifr_source+"?"+wmode);
-
- });
-
-});
-
-function yt_iframe() {
-
- $("iframe").load(function() {
- var ifr_src = $(this).contents().find("body iframe").attr("src");
- $("iframe").contents().find("body iframe").attr("src", ifr_src+"&wmode=transparent");
- });
-
- };
-
-function scrolldown(){
- $("html, body").animate({scrollTop:$(document).height()}, "slow");
- return false;
- };
-
-function scrolltop(){
- $("html, body").animate({scrollTop:0}, "slow");
- return false;
- };
-
-$(window).scroll(function () {
-
-
- var scrollInfo = $(window).scrollTop();
-
- if (scrollInfo <= "900"){
- $("a#top").attr("id","down");
- $("a#down").attr("onclick","scrolldown()");
- $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_bottom.png");
- }
-
- if (scrollInfo > "900"){
- $("a#down").attr("id","top");
- $("a#top").attr("onclick","scrolltop()");
- $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_top.png");
- }
-
- });
-
- </script>';
-
-if($a->argv[0] === "settings" && local_user()) {
-$a->page['htmlhead'] .= '
-<script>
-function restore_boxes(){
- $.cookie("close_pages","2", { expires: 365, path: "/" });
- $.cookie("close_helpers","2", { expires: 365, path: "/" });
- $.cookie("close_services","2", { expires: 365, path: "/" });
- $.cookie("close_friends","2", { expires: 365, path: "/" });
- $.cookie("close_twitter","2", { expires: 365, path: "/" });
- $.cookie("close_lastusers","2", { expires: 365, path: "/" });
- $.cookie("close_lastphotos","2", { expires: 365, path: "/" });
- $.cookie("close_lastlikes","2", { expires: 365, path: "/" });
- alert("Right-hand column was restored. Please refresh your browser");
- }
-</script>';}
-
-
-
-if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){
-$a->page['htmlhead'] .= '
-<script>
-
- $(function() {
- $(".oembed.photo img").aeImageResize({height: 400, width: 400});
- });
-</script>';
-
-
- if($ccCookie != "8") {
-$a->page['htmlhead'] .= '
-<script>
-$("right_aside").ready(function(){
-
- if($.cookie("close_pages") == "1")
- {
- document.getElementById( "close_pages" ).style.display = "none";
- };
-
- if($.cookie("close_helpers") == "1")
- {
- document.getElementById( "close_helpers" ).style.display = "none";
- };
-
- if($.cookie("close_services") == "1")
- {
- document.getElementById( "close_services" ).style.display = "none";
- };
-
- if($.cookie("close_friends") == "1")
- {
- document.getElementById( "close_friends" ).style.display = "none";
- };
-
- if($.cookie("close_twitter") == "1")
- {
- document.getElementById( "twitter" ).style.display = "none";
- };
-
- if($.cookie("close_lastusers") == "1")
- {
- document.getElementById( "close_lastusers" ).style.display = "none";
- };
-
- if($.cookie("close_lastphotos") == "1")
- {
- document.getElementById( "close_lastphotos" ).style.display = "none";
- };
-
- if($.cookie("close_lastlikes") == "1")
- {
- document.getElementById( "close_lastlikes" ).style.display = "none";
- };}
-
-);
-
-function close_pages(){
- document.getElementById( "close_pages" ).style.display = "none";
- $.cookie("close_pages","1", { expires: 365, path: "/" });
- };
-
-function close_helpers(){
- document.getElementById( "close_helpers" ).style.display = "none";
- $.cookie("close_helpers","1", { expires: 365, path: "/" });
- };
-
-function close_services(){
- document.getElementById( "close_services" ).style.display = "none";
- $.cookie("close_services","1", { expires: 365, path: "/" });
- };
-
-function close_friends(){
- document.getElementById( "close_friends" ).style.display = "none";
- $.cookie("close_friends","1", { expires: 365, path: "/" });
- };
-
-function close_twitter(){
- document.getElementById( "twitter" ).style.display = "none";
- $.cookie("close_twitter","1", { expires: 365, path: "/" });
- };
-
-function close_lastusers(){
- document.getElementById( "close_lastusers" ).style.display = "none";
- $.cookie("close_lastusers","1", { expires: 365, path: "/" });
- };
-
-function close_lastphotos(){
- document.getElementById( "close_lastphotos" ).style.display = "none";
- $.cookie("close_lastphotos","1", { expires: 365, path: "/" });
- };
-
-function close_lastlikes(){
- document.getElementById( "close_lastlikes" ).style.display = "none";
- $.cookie("close_lastlikes","1", { expires: 365, path: "/" });
- };
-</script>';}}
-
-$a->page['htmlhead'] .= '
-
-<script>
-function insertFormatting(comment,BBcode,id) {
-
- var tmpStr = $("#comment-edit-text-" + id).val();
- if(tmpStr == comment) {
- tmpStr = "";
- $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
- $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
- openMenu("comment-edit-submit-wrapper-" + id);
- }
-
- textarea = document.getElementById("comment-edit-text-" +id);
- if (document.selection) {
- textarea.focus();
- selected = document.selection.createRange();
- if (BBcode == "url"){
- selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
- } else
- selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
- } else if (textarea.selectionStart || textarea.selectionStart == "0") {
- var start = textarea.selectionStart;
- var end = textarea.selectionEnd;
- if (BBcode == "url"){
- textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
- } else
- textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
- }
- return true;
-}
-
-function cmtBbOpen(id) {
- $(".comment-edit-bb-" + id).show();
-}
-function cmtBbClose(id) {
- $(".comment-edit-bb-" + id).hide();
-}
-
-</script> ';
\ No newline at end of file