/* FILE ARCHIVED ON 23:25:49 Oct 6, 2012 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 18:26:13 Aug 13, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* * nato usage */ if (location.href=='https://webarchive.library.unt.edu/web/20121006232549/http://www.nato.int/cps/en/natolive/news_17895.htm') { /* ************************************************************************** * * Social Engagement * * ************************************************************************** */ window.fbAsyncInit = function() { FB.init({ xfbml: true }); // Additional initialization code here FB.Event.subscribe('edge.create', function(targetUrl) { _gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]); }); }; function LinkedInShare() { _gaq.push(['_trackSocial', 'LinkedIn', 'Share']); } function extractParamFromUri(uri, paramName) { if (!uri) { return; } var regex = new RegExp('[\\?&#]' + paramName + '=([^&#]*)'); var params = regex.exec(uri); if (params != null) { return unescape(params[1]); } return; } // Load the SDK Asynchronously (function(){ var id = 'facebook-jssdk'; if (document.getElementById(id)) return; var js = document.createElement('script'); js.type = 'text/javascript'; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(js, s) })(); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://webarchive.library.unt.edu/web/20121006232549/https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = '//platform.linkedin.com/in.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); function trackTwitter(intent_event) { if (intent_event) { alert("trackTwitter"); var opt_pagePath; if (intent_event.target && intent_event.target.nodeName == 'IFRAME') { opt_target = extractParamFromUri(intent_event.target.src, 'url'); } _gaq.push(['_trackSocial', 'twitter', 'tweet', opt_pagePath]); } } /* ************************************************************************** */ /* ************************************************************************** * * Google Analytics Event Tracking & Social Engagement * * ************************************************************************** */ function addDownloadTracking(category, elem) { elem.click( function() { alert("tracking (category: " + category + ", action: " + 'download' + ", label: " + elem.attr('href')); _gaq.push(['_trackEvent', category, 'download', elem.attr('href')]); }); } function addAttribute(el, key, val) { var a = document.createAttribute(key); a.nodeValue = val; el.setAttributeNode(a); } /* ************************************************************************** */ } $(document).ready(function() { if (location.href=='https://webarchive.library.unt.edu/web/20121006232549/http://www.nato.int/cps/en/natolive/news_17895.htm') { /* ********************************************************************** * * Social Engagement * * ********************************************************************** */ var appendToElement; if ($('.singleview').length) { if ($('.singleview .contentWide').length) { appendToElement = $('.singleview .contentWide:last')[0]; } else { appendToElement = $('.singleview .contentCol1:last .column')[0]; } } if (!(typeof appendToElement === "undefined")) { // add social buttons asynchronously var buttons = []; var j = 0; buttons[j++] = '
 
'; $(appendToElement).append(buttons.join('')); // workaround: jQuery has problems with adding script elements to dom tree var el = document.createElement('script'); addAttribute(el, "type", "IN/Share"); addAttribute(el, "data-url", location.href); addAttribute(el, "data-counter", "right"); addAttribute(el, "data-onsuccess", "LinkedInShare"); document.getElementById('linkedInBtn').appendChild(el); var fb = document.createElement('fb:like'); addAttribute(fb, "href", location.href); addAttribute(fb, "class", "fb-like"); addAttribute(fb, "layout", "button_count"); addAttribute(fb, "show_faces", "false"); addAttribute(fb, "width", "10"); addAttribute(fb, "height", "35"); addAttribute(fb, "action", "like"); addAttribute(fb, "colorscheme", "light"); addAttribute(fb, "font", "trebuchet ms"); addAttribute(fb, "allowTransparency", "true"); document.getElementById('fbLikeBtn').appendChild(fb); // workaround: IE8 also needs plain javascript for var g = document.createElement('g:plusone'); addAttribute(g, "href", location.href); addAttribute(g, "size", "medium"); document.getElementById('googlePlusBtn').appendChild(g); // shorten url before adding twitter button /* $.ajax({ url: "./urlShortener.php", dataType: 'json', data: { url: location.href }, success: function (data) { // alert(data.id + " " + data.longUrl); */ var tw = document.createElement('a'); addAttribute(tw, "href", /* data.longUrl */ location.href); addAttribute(tw, "class", "twitter-share-button"); addAttribute(tw, "data-counturl", /* data.longUrl */ location.href); addAttribute(tw, "data-url", /* data.id */ location.href); document.getElementById('tweetBtn').appendChild(tw); // load twitter js window.twttr = (function (d,s,id) { var t, js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } }); })(document, "script", "twitter-wjs"); //Wrap event bindings - Wait for async js to load twttr.ready(function (twttr) { //event bindings twttr.events.bind('tweet', trackTwitter); }); /* } }); */ } /* ********************************************************************** */ } //einfache Aufklappfunktion der Quicklinks per CSS var quickListItem = document.getElementById("selectBoxModule"); $(quickListItem).addClass("toggleList"); //Drucker einblenden if($(".breadcrumb").is("div")) { var printButton = ''; $(".breadcrumb").append(printButton); $(".printer").click(function() { print(); }) } // Kompetenzfelder Navigation if($(".boxSkills ul li")) { $(".boxSkills ul li").hover(function() { $(this).css("position","relative"); elem = $(this).find("span"); $(elem).css("position","absolute"); $(elem).fadeIn("fast"); $(this).children("a").attr("class","active"); }, function(){ $($(this).find("span")).css("display","none"); $($(this).find("span")).css("position","static"); $(this).css("position","static"); $($(this).find("span")).hide("fast"); $($(this).find("a")).attr("class","inactive"); $($(this).find("span")).attr("class","item"); }) } //**************Deprecated Type Element*********************/ $('ol').each(function(){ if(this.type == 'A') { $(this).addClass('upper-alpha'); } else if (this.type == 'a') { $(this).addClass('lower-alpha'); }; }); $('ol').each(function(){ if(this.type == 'I') { $(this).addClass('upper-roman'); } else if (this.type == 'i') { $(this).addClass('lower-roman'); }; }); //**************Plugin Aufrufe*********************/ //Metanavi DropDown mit Languageswitcher $('#metaNavigation').singleDropMenu({parentMO: 'ddmenu-hover', childMO: 'ddchildhover', childContainer: "div"}); //Navigation $('#topNavigation').singleDropMenu({parentMO: 'ddmenu-hover', childMO: 'ddchildhover', childContainer: "div"}); //Accordion Recherchepool $('#dialogcenter').accordion({ autoheight: false, header: '.head', navigation: true }); //Accordion newsroomBox $('#newsroomBox').accordion({ active: 0, autoheight: false, header: '.head', navigation: true }); //Accordion Content $('.accordionTeaser').accordion({ autoheight: false, alwaysOpen: false, active: 1, header: 'h4.toggle', navigation: true }); /* //Selectbox if($('#selectBoxModule').is("ul")) { $('#selectBoxModule').linkselect(); } */ //Carousel $("div#medienVideo").carousel({ pagination: true, dispItems: 2, itemMargin: 10 }); $("div#medienAudio").carousel({ pagination: true, dispItems: 2, itemMargin: 10 }); $("div#medienBilder").carousel({ pagination: true, dispItems: 2, itemMargin: 10 }); $("div.tabBox").each( function() { $(this).find('.tabBoxContainer').hide(); $(this).find('.show').show(); //Get all the LI from the #tabMenu UL $(this).find('.tabhead > li').click(function(){ //perform the actions when it's not selected if (!$(this).hasClass('current')) { //remove the selected class from all LI $(this).parent().find('li').removeClass('current'); //After cleared all the LI, reassign the class to the selected tab $(this).addClass('current'); //Hide all the DIV in .boxBody $(this).parent().parent().find('.tabBoxContainer').hide(); // Look for the right DIV index based on the Navigation UL index $(this).parent().parent().find('.tabBoxContainer:eq(' + $(this).parent().parent().find('.tabhead > li').index(this) + ')').show(); } }); }); /* { } */ //Carousel $("div#publications").carousel({ pagination: true, dispItems: 3, itemMargin: 20 }); $("div#nowonline").carousel({ autoSlide: true, effect: "fade", loop: true, randomItems: true }); $("div#initiativen").carousel({ autoSlide: true, effect: "fade", loop: true, randomItems: true }); $("div#termine").carousel({ dispItems: 3, effect: "fade", direction: "vertical" }); $("div#topbanner").carousel({ autoSlide: true, effect: "fade", loop: true, randomItems: true }); //Gallery Aufruf if($('#gallery-adv').is("div")) { var galleryAdv = $('#gallery-adv').galleriffic('#thumbs-adv', { delay: 3000, numThumbs: 16, preloadAhead: 40, // Set to -1 to preload all images enableTopPager: true, enableBottomPager: true, showImageContainer: false, imageContainerSel: '', controlsContainerSel: '#controls-adv', captionContainerSel: '', loadingContainerSel: '', renderSSControls: false, renderNavControls: false, playLinkText: 'Abspielen', pauseLinkText: 'Pause', prevLinkText: 'Zurück', nextLinkText: 'Weiter', nextPageLinkText: 'Weiter', prevPageLinkText: 'Zurück', enableHistory: false, autoStart: false, onChange: undefined, // accepts a delegate like such: function(prevIndex, nextIndex) { ... } onTransitionOut: undefined, // accepts a delegate like such: function(callback) { ... } onTransitionIn: undefined, // accepts a delegate like such: function() { ... } onPageTransitionOut: undefined, // accepts a delegate like such: function(callback) { ... } onPageTransitionIn: undefined // accepts a delegate like such: function() { ... } }); } // Lightboxen: /* For extended description magic see lightbox.pack file! */ $("a.lightbox").lightBox({ imageLoading: '/nato_static/assets_enh/layout/lightbox-loading.gif', imageBtnClose: '/nato_static/assets_enh/layout/lightbox_close.gif', imageBtnPrev: '/nato_static/assets_enh/layout/lightbox_prev.png', imageBtnNext: '/nato_static/assets_enh/layout/lightbox_next.png', imageBlank: '/nato_static/assets_enh/layout/blank.gif' }); $("a.lightbox").each(function(){ $(this).attr('bildunterschrift', $(this).attr('title')); $(this).attr('title', $(this).parent().parent().find('p.date').html()); }); if (location.href=='https://webarchive.library.unt.edu/web/20121006232549/http://www.nato.int/cps/en/natolive/news_17895.htm') { /* ********************************************************************** * * Google Analytics Event Tracking * * to make sure, that the [download high resolution image] links of the * * lightboxes are tracked this code must be executed after the lightbox * * initialization! * * ********************************************************************** */ $('a:not(.lightbox)').each( function() { var href = $(this).attr('href'); /* ****************************************************************** * * HREF-attribute contains a reference to an URL, which is not in the * * base domain nato.int? * * ****************************************************************** */ var urlPrefix = "(?:ht|f)tp(?:s?)\:\/\/"; if ((new RegExp(urlPrefix, "i")).test(href) && !(new RegExp(urlPrefix + "[^\/]+nato\.int", "i")).test(href)) { $(this).click( function() { _gaq.push(['_trackEvent', 'external', 'click', href]); }); } /* ****************************************************************** * * HREF-attribute contains an email address? * * ****************************************************************** */ var mailPrefix = "mailto\:"; if ((new RegExp(mailPrefix, "i")).test(href)) { $(this).click( function() { _gaq.push(['_trackEvent', 'email', 'send', href]); }); } /* ****************************************************************** * * HREF-attribute references a document? * * ****************************************************************** */ var pdfSuffix = "\.pdf$"; if ((new RegExp(pdfSuffix, "i")).test(href)) addDownloadTracking('pdf', $(this)); var jpgSuffix = "\.jpe?g$"; if ((new RegExp(jpgSuffix, "i")).test(href)) addDownloadTracking('photo', $(this)); var docSuffix = "\.docx?$"; if ((new RegExp(docSuffix, "i")).test(href)) addDownloadTracking('word', $(this)); var pptSuffix = "\.pptx?$"; if ((new RegExp(pptSuffix, "i")).test(href)) addDownloadTracking('powerpoint', $(this)); var xlsSuffix = "\.xlsx?$"; if ((new RegExp(xlsSuffix, "i")).test(href)) addDownloadTracking('excel', $(this)); var zipSuffix = "\.zip$"; if ((new RegExp(zipSuffix, "i")).test(href)) addDownloadTracking('zip', $(this)); var ebookSuffix = "\.(?:(?:epub)|(?:mobi))$"; if ((new RegExp(ebookSuffix, "i")).test(href)) addDownloadTracking('ebook', $(this)); var audioSuffix = "\.mp3$"; if ((new RegExp(audioSuffix, "i")).test(href)) addDownloadTracking('audio', $(this)); }); /* ********************************************************************** */ } /* Pagination in Media-Containern */ /* Next-Button anzeigen: */ $('.teaser ul.thumbnail.hidden').each( function() { var teaser = $(this).parent(); var aktiveListe = teaser.find('ul.thumbnail:not(.hidden)'); if( aktiveListe.next('ul.thumbnail.hidden').length > 0) { teaser.find('.pagination .next').removeClass('hidden'); } }); var oriSrc; $('.teaser .pagination .next img').hover( function() { oriSrc = $(this).attr('src'); $(this).attr('src','/nato_static/assets_enh/layout/btn_pfeil_vor.gif'); }, function(){ $(this).attr('src',oriSrc); }); $('.teaser .pagination .prev img').hover( function() { oriSrc = $(this).attr('src'); $(this).attr('src','/nato_static/assets_enh/layout/btn_pfeil_zurueck.gif'); }, function(){ $(this).attr('src',oriSrc); }); $('.teaser .pagination .next img').click( function() { var aktiveListe = $(this).parent().parent().parent().find('ul.thumbnail:not(.hidden)'); if( aktiveListe.next('ul.thumbnail.hidden').length > 0) { aktiveListe.addClass('hidden'); aktiveListe = aktiveListe.next('ul.thumbnail.hidden'); aktiveListe.removeClass('hidden'); if( aktiveListe.next('ul.thumbnail.hidden').length == 0) { aktiveListe.parent().find('.pagination .next').addClass('hidden'); } if( aktiveListe.prev('ul.thumbnail.hidden').length > 0) { aktiveListe.parent().find('.pagination .prev').removeClass('hidden'); } } }); $('.teaser .pagination .prev img').click( function() { var aktiveListe = $(this).parent().parent().parent().find('ul.thumbnail:not(.hidden)'); if( aktiveListe.prev('ul.thumbnail.hidden').length > 0) { aktiveListe.addClass('hidden'); aktiveListe = aktiveListe.prev('ul.thumbnail.hidden'); aktiveListe.removeClass('hidden'); if( aktiveListe.prev('ul.thumbnail.hidden').length == 0) { aktiveListe.parent().find('.pagination .prev').addClass('hidden'); } if( aktiveListe.next('ul.thumbnail.hidden').length > 0) { aktiveListe.parent().find('.pagination .next').removeClass('hidden'); } } }); // Video Playicon Overlay $("img.videoteaser").after(''); $("img.videomarginal").after(''); }); /* * */