diff options
author | martin speleo <martin.speleo@gmail.com> | 2009-06-28 22:23:56 +0100 |
---|---|---|
committer | martin speleo <martin.speleo@gmail.com> | 2009-06-28 22:23:56 +0100 |
commit | 22aa9990a5944230223f3724fa48d68cfeae8435 (patch) | |
tree | 2bdbbcd344138ff3d51b2b72f5c1f54b1d6c0eef /media/js/base.js | |
parent | 16b7404d9bc2f9ba264f140310948897689fe3ca (diff) | |
download | troggle-22aa9990a5944230223f3724fa48d68cfeae8435.tar.gz troggle-22aa9990a5944230223f3724fa48d68cfeae8435.tar.bz2 troggle-22aa9990a5944230223f3724fa48d68cfeae8435.zip |
[svn] Have different css for plain and eye candy views.
Diffstat (limited to 'media/js/base.js')
-rw-r--r-- | media/js/base.js | 19 |
1 files changed, 16 insertions, 3 deletions
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 |