/*------------------------------------------------------------------ * Icons for links */ $(document).ready(function() { // Add pdf icons to pdf links $("#content a[href$='.pdf']").each(function (i) { $(this).attr("title", $(this).attr("title") + "PDF, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("pdf"); } else { $(this).addClass("pdf"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.pdf']").each(function (i) { $(this).attr("title", $(this).attr("title") + "PDF, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("pdf"); } else { $(this).addClass("pdf"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#content a[href$='.PDF']").each(function (i) { $(this).attr("title", $(this).attr("title") + "PDF, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("pdf"); } else { $(this).addClass("pdf"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.PDF']").each(function (i) { $(this).attr("title", $(this).attr("title") + "PDF, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("pdf"); } else { $(this).addClass("pdf"); } $(this).click(function(){ window.open(this.href); return false; }); }); // Add doc icons to doc links $("#content a[href$='.doc']").each(function (i) { $(this).attr("title", $(this).attr("title") + "MS Word, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("doc"); } else { $(this).addClass("doc"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.doc']").each(function (i) { $(this).attr("title", $(this).attr("title") + "MS Word, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("doc"); } else { $(this).addClass("doc"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#content a[href$='.DOC']").each(function (i) { $(this).attr("title", $(this).attr("title") + "MS Word, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("doc"); } else { $(this).addClass("doc"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.DOC']").each(function (i) { $(this).attr("title", $(this).attr("title") + "MS Word, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("doc"); } else { $(this).addClass("doc"); } $(this).click(function(){ window.open(this.href); return false; }); }); // Add dot icons to dot links $("#content a[href$='.dot']").each(function (i) { $(this).attr("title", $(this).attr("title") + "MS Word template, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("dot"); } else { $(this).addClass("dot"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.dot']").each(function (i) { $(this).attr("title", $(this).attr("title") + "MS Word template, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("dot"); } else { $(this).addClass("dot"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#content a[href$='.DOT']").each(function (i) { $(this).attr("title", $(this).attr("title") + "MS Word template, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("dot"); } else { $(this).addClass("dot"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.DOT']").each(function (i) { $(this).attr("title", $(this).attr("title") + "MS Word template, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("dot"); } else { $(this).addClass("dot"); } $(this).click(function(){ window.open(this.href); return false; }); }); // Add ppt icons to ppt links $("#content a[href$='.ppt']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Powerpoint, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("ppt_icon"); } else { $(this).addClass("ppt_icon"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.ppt']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Powerpoint, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("ppt_icon"); } else { $(this).addClass("ppt_icon"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#content a[href$='.PPT']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Powerpoint, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("ppt_icon"); } else { $(this).addClass("ppt_icon"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.PPT']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Powerpoint, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("ppt_icon"); } else { $(this).addClass("ppt_icon"); } $(this).click(function(){ window.open(this.href); return false; }); }); // Add xls icons to xls links $("#content a[href$='.xls']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Excel, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("xls"); } else { $(this).addClass("xls"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.xls']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Excel, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("xls"); } else { $(this).addClass("xls"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#content a[href$='.XLS']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Excel, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("xls"); } else { $(this).addClass("xls"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href$='.XLS']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Excel, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("xls"); } else { $(this).addClass("xls"); } $(this).click(function(){ window.open(this.href); return false; }); }); // Add email icons to email links $("#content a[href^='mailto:']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Send email"); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("email"); } else { $(this).addClass("email"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href^='mailto:']").each(function (i) { $(this).attr("title", $(this).attr("title") + "Send email"); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("email"); } else { $(this).addClass("email"); } $(this).click(function(){ window.open(this.href); return false; }); }); // Add html icons to http links $("#content a[href^='http:']").each(function (i) { $(this).attr("title", $(this).attr("title") + "External website, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("http"); } else { $(this).addClass("http"); } $(this).click(function(){ window.open(this.href); return false; }); }); // Add html icons to http links $("#right-nav a[href^='http:']").each(function (i) { $(this).attr("title", $(this).attr("title") + "External website, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("http"); } else { $(this).addClass("http"); } $(this).click(function(){ window.open(this.href); return false; }); }); // Add html icons to https links $("#content a[href^='https:']").each(function (i) { $(this).attr("title", $(this).attr("title") + "External website, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "a") { $(this).parent().addClass("https"); } else { $(this).addClass("https"); } $(this).click(function(){ window.open(this.href); return false; }); }); $("#right-nav a[href^='https:']").each(function (i) { $(this).attr("title", $(this).attr("title") + "External website, opens in a new window. "); var $parent = $(this).parent().get(0).tagName.toLowerCase(); if ($parent == "li") { $(this).parent().addClass("https"); } else { $(this).addClass("https"); } $(this).click(function(){ window.open(this.href); return false; }); }); });