MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ importArticles({	type:'script',	articles: [       'MediaWiki:Common.js/redditwidget.js',      // Adds reddit widget to id="reddit-widget"	] }); /* Configuration for w:c:dev:AjaxRC */ window.ajaxSpecialPages = ['Recentchanges', 'WikiActivity', 'Log', 'Contributions', 'AbuseLog']; window.dev.i18n.overrides['AjaxRC'] = { 'ajaxrc-refresh-text': 'Auto refresh', 'ajaxrc-refresh-hover': 'Check to automatically refresh this page', }; /* Configuration for Back to Top Button */ window.BackToTopModern = true;

// Custom Special:[Multiple]Upload UI	if (({Upload: 1, MultipleUpload: 1})[mw.config.get('wgCanonicalSpecialPageName')] === 1) { pageScriptList.push(			'MediaWiki:Common.js/FairUseUpload.js'		); }	// Remove red-links (deleted pages) from Recent Changes // [They stay red, they just don't link to ?action=edit] if (({ Recentchanges: 1, Log: 1 })[mw.config.get('wgCanonicalSpecialPageName')] === 1) { var deNewRC = function { $('a.new').each(function {				this.href = this.href.replace(/\?[^?]*$/, '');			}); };		$(deNewRC); window.ajaxCallAgain.push(deNewRC); }	// Add custom class for styling long list of refs if ($('.references li').length > 9) $('.references').addClass('compactreferences'); // SMW default popup is broken in wikia // Use custom modal $('.ultisup-image-popup a').click(function(ev) {       ev.preventDefault;        $.showCustomModal(this.title, '', { width: 1000 });       $("#ultisup-load").parent.load(this.href + " #gallery-0"); }); // Oasis-only scripts if (mw.config.get('skin') === 'oasis') { // Template adder on file pages if (mw.config.get('wgCanonicalNamespace') === 'File') $(function {           if ($.inArray("autoconfirmed", mw.config.get("wgUserGroups")) === -1)                return;            var Options = {                    '\{\{No license}}': 'Unlicensed image',                    '\{\{No rationale}}': 'No Fairuse info',                    '\{\{Unused}}': 'Unused image',                    '\{\{Poor filename}}': 'Poor name'                },                tempOptStr = '';            for (var i in Options) {                tempOptStr += '' + Options[i] + ' ';            }            var html = '' + tempOptStr + ' Add template';            $('.comments').after(html);            $('#templateSubmit').click(function { $(this).html(''); new mw.Api.post({                       format: 'json',                        action: 'edit',                        title: mw.config.get('wgPageName'),                        token: mw.user.tokens.get('editToken'),                        summary: 'Adding template: ' + $('#FileTemplateAdder').val,                        minor: true,                        prependtext: $('#FileTemplateAdder').val + "\n"                    }) .done(function {                       $('#templateSubmit').text('Add this Template too!');                        new BannerNotification('Template: ' + $('#FileTemplateAdder').val + ' Added Successfully', 'confirm').show;                    }) .fail(function {                       new BannerNotification('Template addition failed!', 'error').show;                    }); });       });	}

// OGG player var oggPlayerButtonOnly = false;

/** * Removes fade animations on mw-collapsible tables * * @author Cqm * @version 1.0 * @comment Does not affect enhanced recent changes * @todo tidy up (borrow from jquery.makeCollapsible perhaps?) */ (function ($) {   'use strict';    function noFade {        // use th to avoid affecting enhanced rc        var $toggle = $('th > .mw-collapsible-toggle'),            $this,            $tr,            $table,            expand,            collapse,            i;        // prevent normal mw-collapsible behaviour        $toggle.unbind('click');        $table = $toggle.parent.parent.parent.parent;        $table.find('td > table.navbox-subgroup > tbody > tr[style*="display"]').css({'display': });        $table.find('td > table > tbody > tr[style*="display"] > th.navbox-title').parent.css({'display': });        $toggle.click(function (e) { // stop scrolling to the top of the page e.preventDefault; $this = $(this); // move one level at a time to avoid selecting nested tables $table = $($(this).parent.parent.parent.parent); // check for defined expand/collapse text // normally these are defined by MediaWiki:Collapsible-expand and MediaWiki:Collapsible-collapse respectively // however, this is currently bugged on wikia (2013-07-23) which forces the default 'Expand' and 'Collapse' expand = $table.attr('data-expandtext') || 'Expand'; collapse = $table.attr('data-collapsetext') || 'Collapse'; if ($table.children('thead').length) { // there seems to be a bug with mw-collapsible hiding thead rows? // reported to Wikia, possibly cause to sortable script loading after collapsible script $tr = $table.children('tbody').children; if ($table.hasClass('mw-collapsed')) { $table.removeClass('mw-collapsed'); $this.children.text(collapse); $this.addClass('mw-collapsible-toggle-expanded') .removeClass('mw-collapsible-toggle-collapsed'); // ignore first row as it's the header for (i = 0; i < $tr.length; i += 1) { $($tr[i]).css({                           'display': 'table-row'                        }); }               } else { $table.addClass('mw-collapsed'); // this is only added by default if already collapsed if (!$table.hasClass('mw-made-collapsible')) { $table.addClass('mw-made-collapsible'); }                   $this.children.text(expand); $this.addClass('mw-collapsible-toggle-collapsed') .removeClass('mw-collapsible-toggle-expanded'); for (i = 0; i < $tr.length; i += 1) { $($tr[i]).css({                           'display': 'none'                        }); }               }            } else { $tr = $table.children.children; if ($table.hasClass('mw-collapsed')) { $table.removeClass('mw-collapsed'); $this.children.text(collapse); $this.addClass('mw-collapsible-toggle-expanded') .removeClass('mw-collapsible-toggle-collapsed'); // ignore first row as it's the header for (i = 1; i < $tr.length; i += 1) { $($tr[i]).css({                           'display': 'table-row'                        }); }               } else { $table.addClass('mw-collapsed'); // this is only added by default if already collapsed if (!$table.hasClass('mw-made-collapsible')) { $table.addClass('mw-made-collapsible'); }                   $this.children.text(expand); $this.addClass('mw-collapsible-toggle-collapsed') .removeClass('mw-collapsible-toggle-expanded'); // ignore first row as it's the header for (i = 1; i < $tr.length; i += 1) { $($tr[i]).css({                           'display': 'none'                        }); }               }            }        });    }    $(function  { if ($('.mw-collapsible').length) { noFade; }   }); }(this.jQuery));

/* Config for w:c:dev:PreloadFileDescription */ PFD_template = '\{\{File information\n| description = \n| source = \n| portion = \n| purpose = \n| other info = \n}}'; importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:PreloadFileDescription.js',    ] });

// JavaScript spoiler tags for TvTropes.org - Version 1.5 // Double click on a spoiler to show it, double-click to hide it. // Code is public domain, but please attribute MiffTheFox. window.addEventListener("load", function {	var allSpans = document.getElementsByTagName("span");	var i;	for (i = 0; i < allSpans.length; i++){		if (allSpans[i].getAttribute("class") == "spoiler"){			var el = allSpans[i];			el.style.cursor = "help";			el.addEventListener('click', unMaskSpoilerTag, false);			var bg = window.getComputedStyle(el, null).backgroundColor;			var bgel = el;			while (bg == "transparent" || bg == "inherit"){				bgel = bgel.parentNode;				bg = window.getComputedStyle(bgel, null).backgroundColor;			}			el.style.backgroundColor = bg;			el.style.color = bg;			el.style.border = "1px dotted gray";			el.style.borderTop = "none";			var allLinks = el.getElementsByTagName("a");			for (j = 0; j < allLinks.length; j++){				allLinks[j].style.color = bg;				allLinks[j].style.backgroundColor = bg;				allLinks[j].setAttribute("x-spoiler-visible", "0");				allLinks[j].addEventListener('click', followSpoilerLink, false); }		}	} },false); function followSpoilerLink(e) {	var revealed = this.getAttribute("x-spoiler-visible") == "1";	if (!revealed)		e.preventDefault; } function unMaskSpoilerTag{	try { window.getSelection.collapseToEnd; } catch (ex) { }	var revealed = this.className == "spoiler";	this.className = revealed ? "spoilerRevealed" : "spoiler";	this.style.color = revealed ? "#a0a0a0" : this.style.backgroundColor;	var allLinks = this.getElementsByTagName("a");	for (j = 0; j < allLinks.length; j++){		if (revealed){			allLinks[j].style.color = null;			allLinks[j].setAttribute("x-spoiler-visible", "1");		} else {			allLinks[j].style.color = allLinks[j].style.backgroundColor;			allLinks[j].setAttribute("x-spoiler-visible", "0");		}	} } //Adapted from Va11Ha11A Wiki //Grab image URLs and set to variables var slider1url = $('#slider1url').text; var slider2url = $('#slider2url').text; var slider3url = $('#slider3url').text; var slider4url = $('#slider4url').text; $('#slider1').addClass('linked'); //When panals are clickable, links to designated URL. $('#slider1img').click(function{	if ($('#slider1').hasClass('linked')) {		window.location.href = slider1url;	} }); $('#slider2img').click(function{	if ($('#slider2').hasClass('linked')) {		window.location.href = slider2url;	} }); $('#slider3img').click(function{	if ($('#slider3').hasClass('linked')) {		window.location.href = slider3url;	} }); $('#slider4img').click(function{	if ($('#slider4').hasClass('linked')) {		window.location.href = slider4url;	} }); //Opens and closes panels when clicked. $('#slider1').click(function{	if ($('#slider1').hasClass('animated')) {		$('#slider1').dequeue.stop;	} else if ($('#slider2').hasClass('animated')) {		$('#slider2').dequeue.stop;	} else if ($('#slider3').hasClass('animated')) {		$('#slider3').dequeue.stop;	} }, function {	if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('opened') && $('#slider3').hasClass('opened')) {		$('#slider1arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider2caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider1caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider2arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1').removeClass('closed').addClass('animated').animate({ width: "595px" }, "normal", "linear", function { $('#slider1').removeClass('animated').dequeue; $('#slider1').addClass('opened').addClass('linked'); $('#slider2').removeClass('linked'); $('#slider3').removeClass('linked'); $('#slider4').removeClass('linked'); });	} else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('closed') && $('#slider3').hasClass('opened')) {		$('#slider1arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider3caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider1caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider3arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1').removeClass('closed').addClass('animated').animate({ width: "595px" }, "normal", "linear", function { $('#slider1').removeClass('animated').dequeue; $('#slider1').addClass('opened').addClass('linked'); $('#slider2').removeClass('linked'); $('#slider3').removeClass('linked'); $('#slider4').removeClass('linked'); });		$('#slider2').removeClass('closed').addClass('animated').animate({ width: "620px" }, "normal", "linear", function { $('#slider2').removeClass('animated').dequeue; $('#slider2').addClass('opened'); });	} else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('closed') && $('#slider3').hasClass('closed')) {		$('#slider1arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider4caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider1caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider4arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1').removeClass('closed').addClass('animated').animate({ width: "595px" }, "normal", "linear", function { $('#slider1').removeClass('animated').dequeue; $('#slider1').addClass('opened').addClass('linked'); $('#slider2').removeClass('linked'); $('#slider3').removeClass('linked'); $('#slider4').removeClass('linked'); });		$('#slider2').removeClass('closed').addClass('animated').animate({ width: "620px" }, "normal", "linear", function { $('#slider2').removeClass('animated').dequeue; $('#slider2').addClass('opened'); });		$('#slider3').removeClass('closed').addClass('animated').animate({ width: "645px" }, "normal", "linear", function { $('#slider3').removeClass('animated').dequeue; $('#slider3').addClass('opened'); });	} }); $('#slider2').click(function{	if ($('#slider1').hasClass('animated')) {		$('#slider1').dequeue.stop;	} else if ($('#slider2').hasClass('animated')) {		$('#slider2').dequeue.stop;	} else if ($('#slider3').hasClass('animated')) {		$('#slider3').dequeue.stop;	} }, function {	if ($('#slider1').hasClass('opened') && $('#slider2').hasClass('opened') && $('#slider3').hasClass('opened')) {		$('#slider2arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider1caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider2caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1').removeClass('opened').addClass('animated').animate({ width: "25px" }, "normal", "linear", function { $('#slider1').removeClass('animated').dequeue; $('#slider1').addClass('closed').removeClass('linked'); $('#slider2').addClass('linked'); $('#slider3').removeClass('linked'); $('#slider4').removeClass('linked'); });	} else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('closed') && $('#slider3').hasClass('opened')) {		$('#slider2arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider3caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider2caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider3arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider2').removeClass('closed').addClass('animated').animate({ width: "620px" }, "normal", "linear", function { $('#slider2').removeClass('animated').dequeue; $('#slider2').addClass('opened').addClass('linked'); $('#slider1').removeClass('linked'); $('#slider3').removeClass('linked'); $('#slider4').removeClass('linked'); });	} else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('closed') && $('#slider3').hasClass('closed')) {		$('#slider2arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider4caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider2caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider4arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider2').removeClass('closed').addClass('animated').animate({ width: "620px" }, "normal", "linear", function { $('#slider2').removeClass('animated').dequeue; $('#slider2').addClass('opened').addClass('linked'); $('#slider1').removeClass('linked'); $('#slider3').removeClass('linked'); $('#slider4').removeClass('linked'); });		$('#slider3').removeClass('closed').addClass('animated').animate({ width: "645px" }, "normal", "linear", function { $('#slider3').removeClass('animated').dequeue; $('#slider3').addClass('opened'); });	} }); $('#slider3').click(function{	if ($('#slider1').hasClass('animated')) {		$('#slider1').dequeue.stop;	} else if ($('#slider2').hasClass('animated')) {		$('#slider2').dequeue.stop;	} else if ($('#slider3').hasClass('animated')) {		$('#slider3').dequeue.stop;	} }, function {	if ($('#slider1').hasClass('opened') && $('#slider2').hasClass('opened') && $('#slider3').hasClass('opened')) {		$('#slider3arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider1caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider3caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1').removeClass('opened').addClass('animated').animate({ width: "25px" }, "normal", "linear", function { $('#slider1').removeClass('animated').dequeue; $('#slider1').addClass('closed').removeClass('linked'); $('#slider3').addClass('linked'); $('#slider2').removeClass('linked'); $('#slider4').removeClass('linked'); });		$('#slider2').removeClass('opened').addClass('animated').animate({ width: "50px" }, "normal", "linear", function { $('#slider2').removeClass('animated').dequeue; $('#slider2').addClass('closed'); });	} else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('opened') && $('#slider3').hasClass('opened')) {		$('#slider3arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider2caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider3caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider2arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider2').removeClass('opened').addClass('animated').animate({ width: "50px" }, "normal", "linear", function { $('#slider2').removeClass('animated').dequeue; $('#slider2').addClass('closed').removeClass('linked'); $('#slider3').addClass('linked'); $('#slider4').removeClass('linked'); });	} else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('closed') && $('#slider3').hasClass('closed')) {		$('#slider3arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider4caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider3caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider4arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider3').removeClass('closed').addClass('animated').animate({ width: "645px" }, "normal", "linear", function { $('#slider3').removeClass('animated').dequeue; $('#slider3').addClass('opened').addClass('linked'); $('#slider1').removeClass('linked'); $('#slider2').removeClass('linked'); $('#slider4').removeClass('linked'); });	} }); $('#slider4').click(function{	if ($('#slider1').hasClass('animated')) {		$('#slider1').dequeue.stop;	} else if ($('#slider2').hasClass('animated')) {		$('#slider2').dequeue.stop;	} else if ($('#slider3').hasClass('animated')) {		$('#slider3').dequeue.stop;	} }, function {	if ($('#slider1').hasClass('opened') && $('#slider2').hasClass('opened') && $('#slider3').hasClass('opened')) {		$('#slider4arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider1caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider4caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider1').removeClass('opened').addClass('animated').animate({ width: "25px" }, "normal", "linear", function { $('#slider1').removeClass('animated').dequeue; $('#slider1').addClass('closed').removeClass('linked'); $('#slider4').addClass('linked'); $('#slider2').removeClass('linked'); $('#slider3').removeClass('linked'); });		$('#slider2').removeClass('opened').addClass('animated').animate({ width: "50px" }, "normal", "linear", function { $('#slider2').removeClass('animated').dequeue; $('#slider2').addClass('closed'); });		$('#slider3').removeClass('opened').addClass('animated').animate({ width: "75px" }, "normal", "linear", function { $('#slider3').removeClass('animated').dequeue; $('#slider3').addClass('closed'); });	} else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('opened') && $('#slider3').hasClass('opened')) {		$('#slider4arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider2caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider4caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider2arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider2').removeClass('opened').addClass('animated').animate({ width: "50px" }, "normal", "linear", function { $('#slider2').removeClass('animated').dequeue; $('#slider2').addClass('closed').removeClass('linked'); $('#slider4').addClass('linked'); $('#slider1').removeClass('linked'); $('#slider3').removeClass('linked'); });		$('#slider3').removeClass('opened').addClass('animated').animate({ width: "75px" }, "normal", "linear", function { $('#slider3').removeClass('animated').dequeue; $('#slider3').addClass('closed'); });	} else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('closed') && $('#slider3').hasClass('opened')) {		$('#slider4arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider3caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200);		$('#slider4caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider3arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500);		$('#slider3').removeClass('opened').addClass('animated').animate({ width: "75px" }, "normal", "linear", function { $('#slider3').removeClass('animated').dequeue; $('#slider3').addClass('closed').removeClass('linked'); $('#slider4').addClass('linked'); $('#slider1').removeClass('linked'); $('#slider2').removeClass('linked'); });	} }); //Scrolls through slider every 6 seconds var scrolltimer = window.setInterval(autoScroll, 6000); function autoScroll { if ($('#slider1').hasClass('opened') && $('#slider2').hasClass('opened') && $('#slider3').hasClass('opened')) { $('#slider2arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); $('#slider1caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); $('#slider2caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500); $('#slider1arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500); $('#slider1').removeClass('opened').addClass('animated').animate({ width: "25px" }, "normal", "linear", function {			$('#slider1').addClass('closed').removeClass('linked').removeClass('animated').dequeue;			$('#slider2').addClass('linked');			$('#slider3').removeClass('linked');			$('#slider4').removeClass('linked');		}); } else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('opened') && $('#slider3').hasClass('opened')) { $('#slider3arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); $('#slider2caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); $('#slider3caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500); $('#slider2arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500); $('#slider2').removeClass('opened').addClass('animated').animate({ width: "50px" }, "normal", "linear", function {			$('#slider2').addClass('closed').removeClass('linked').removeClass('animated').dequeue;			$('#slider3').addClass('linked');			$('#slider4').removeClass('linked');			$('#slider1').removeClass('linked');		}); } else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('closed') && $('#slider3').hasClass('opened')) { $('#slider4arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); $('#slider3caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); $('#slider4caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500); $('#slider3arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500); $('#slider3').removeClass('opened').addClass('animated').animate({ width: "75px" }, "normal", "linear", function {			$('#slider3').addClass('closed').removeClass('linked').removeClass('animated').dequeue;			$('#slider4').addClass('linked');			$('#slider2').removeClass('linked');			$('#slider1').removeClass('linked');		}); } else if ($('#slider1').hasClass('closed') && $('#slider2').hasClass('closed') && $('#slider3').hasClass('closed')) { $('#slider1arrow').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); $('#slider4caption').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); $('#slider1caption').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500); $('#slider4arrow').css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 500); $('#slider4').removeClass('opened').addClass('animated').animate({ width: "668px" }, "normal", "linear", function {			$('#slider4').removeClass('linked').removeClass('animated').dequeue;			$('#slider1').addClass('linked');			$('#slider2').removeClass('linked');			$('#slider3').removeClass('linked');		}); $('#slider3').removeClass('closed').addClass('animated').animate({ width: "645px" }, "normal", "linear", function {			$('#slider3').removeClass('animated').dequeue;			$('#slider3').addClass('opened');		}); $('#slider2').removeClass('closed').addClass('animated').animate({ width: "620px" }, "normal", "linear", function {			$('#slider2').removeClass('animated').dequeue;			$('#slider2').addClass('opened');		}); $('#slider1').removeClass('closed').addClass('animated').animate({ width: "595px" }, "normal", "linear", function {			$('#slider1').removeClass('animated').dequeue;			$('#slider1').addClass('opened');		}); } } //Turns off autoscroll on hover $('#sliderframe').on("mouseenter",function{	scrolltimer = window.clearInterval(scrolltimer); }).on("mouseleave",function{	scrolltimer = window.setInterval(autoScroll, 6000); });