/** * jQuery LinkColor Plugin 1.0 * * https://www.9lessons.info/ * * Copyright (c) 2011 Arun Kumar Sekar */ (function($){ // Done by ArunKumar Sekar $.fn.anchorCloud = function(options){ $this = $(this); var anchors = ""; var ids = ""; var chk = ""; var cache = []; var selectors = ""; var opts = $.extend({}, $.fn.anchorCloud.defaults, options); return $this.each(function(i,obj){ anchors = $(obj).find("a").get(); selectors = $this.selector.replace("#",""); var o = $.meta ? $.extend({}, opts, $this.data()) : opts; $.each(anchors, function(j, anc){ $description = $('
').addClass('anchorDescription').css({ 'font-size':'12px', 'color':o.description_color, 'padding':'0', 'margin':'5px' }); $title = $('').addClass('anchorTitle').css({ 'font-size':'14px', 'font-weight':'bold', 'color':o.title_color, 'padding':'0', 'margin':'5px' }).after($description); $arrow = $('').css({ 'border-bottom':'7px solid '+o.background, 'border-left':'7px solid transparent', 'border-right':'7px solid transparent', 'height':'0', 'width':'0', 'position':'absolute', 'top':'-7px', 'left':'2px' }).addClass('upArrow'); $append = $("").css({ 'border':'1px solid '+o.background, 'position':'absolute', 'width':'250px', 'font-size':'10px', 'height':'auto', 'background-color':o.background, 'padding':'3px', 'margin':'0', 'left':'100px', 'font-family':'arial', 'box-shadow': '0px 4px 5px #AAAAAA' }).addClass('ancSite').html($title.before($arrow)); // Append popup div $(anc).bind("mouseover", function(e){ var anchorPosition = $(this).position(); var page_x = Math.round(anchorPosition.left+5); var page_y = Math.round(anchorPosition.top+25); //alert(page_x); $append.css({ 'left':(page_x)+"px", 'top':(page_y)+"px" }); $link = $(this).attr('href'); ids = $link.replace(/[^a-zA-Z 0-9]+/g,""); ids += "_"+selectors; if($link.search("youtu") != -1){ if($link.search("v=") != -1) var yarr = $link.split("="); else var yarr = $link.split("be/"); var videoFormat = '