From 2ad3d7e3327c898a37581e1e36c07889381c9c0e Mon Sep 17 00:00:00 2001 From: martin speleo Date: Sun, 28 Jun 2009 22:23:56 +0100 Subject: [svn] Have different css for plain and eye candy views. --- media/js/base.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'media/js/base.js') diff --git a/media/js/base.js b/media/js/base.js index 91305a2..df9b0f4 100644 --- a/media/js/base.js +++ b/media/js/base.js @@ -79,7 +79,8 @@ $(hoverLink).bind('mouseout', }; -function showEyeCandy(){ +function showEyeCandy(){ +switchStylestyle("eyeCandy"); $("#eyeCandyFooterPopUps").load("/eyecandy"); $(".leftMargin,.rightMargin").show(); $(".showEyeCandy").hide(); @@ -90,13 +91,15 @@ linkHover("#surveyBinderLink","#surveyHover"); linkHover("#troggle","#timeMachine");}; function killEyeCandy(){ +switchStylestyle("plain"); $(".leftMargin,.rightMargin").hide(); $(".showEyeCandy").show(); $(".killEyeCandy").hide(); $("#cavesLink").unbind('mouseover').unbind('mouseout'); $("#caversLink").unbind('mouseover').unbind('mouseout'); $("#surveyBinderLink").unbind('mouseover').unbind('mouseout'); -$("#troggle").unbind('mouseover').unbind('mouseout');}; +$("#troggle").unbind('mouseover').unbind('mouseout'); +}; if (getCookie("eyeCandy") == "False") {killEyeCandy();} @@ -144,4 +147,14 @@ if (document.cookie.length>0) } } return ""; -}; \ No newline at end of file +}; + +/* Style Sheet Switcher */ + function switchStylestyle(styleName) + { + $('link[@rel*=style][title]').each(function(i) + { + this.disabled = true; + if (this.getAttribute('title') == styleName) this.disabled = false; + }); + } \ No newline at end of file -- cgit v1.2.3