1 | jQuery("document").ready(function(jQuery){ |
---|
2 | |
---|
3 | // scripts Category Page ------------------------------------------------------------------------------------------------------------ |
---|
4 | |
---|
5 | // display alt from PWG stuffs actions. |
---|
6 | |
---|
7 | var stuffs_actions=jQuery(".categoryActions",".stuffs_block .stuffs"); |
---|
8 | |
---|
9 | if (stuffs_actions.length != 0) { |
---|
10 | stuffs_actions.each(function(index) { |
---|
11 | var images=jQuery(this).find("img"); |
---|
12 | if (images.length !=0) { |
---|
13 | images.each(function(index) { |
---|
14 | var alt_text = (jQuery(this).attr("alt")); |
---|
15 | jQuery(this).before(alt_text); |
---|
16 | jQuery(this).parents("li").css("width","auto"); |
---|
17 | jQuery(this).remove(); |
---|
18 | }); |
---|
19 | } |
---|
20 | }); |
---|
21 | } |
---|
22 | |
---|
23 | // gmaps icon |
---|
24 | |
---|
25 | var icon_gmaps=jQuery("#icon_gmaps"); |
---|
26 | var text_gmaps=jQuery("#text_gmaps"); |
---|
27 | if ((icon_gmaps.length == 1) && (text_gmaps.length ==1)) { |
---|
28 | icon_gmaps.text(text_gmaps.text()); |
---|
29 | icon_gmaps.css("text-align","right"); |
---|
30 | } |
---|
31 | |
---|
32 | // bug with MSIE6 & language switch |
---|
33 | /* |
---|
34 | if ((jQuery.browser.msie) && (jQuery.browser.version.substr(0,1) == "6")) { |
---|
35 | var lswitch = jQuery(".menuf > div > ul"); |
---|
36 | if (lswitch.length==1) { |
---|
37 | var flags = lswitch.children("li").children("a"); |
---|
38 | if (flags.length==2) { |
---|
39 | flags.first().remove(); |
---|
40 | } |
---|
41 | } |
---|
42 | }*/ |
---|
43 | |
---|
44 | }); |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | /** |
---|
49 | * Cookie plugin |
---|
50 | * Copyright (c) 2006 Klaus Hartl (stilbuero.de) |
---|
51 | * Dual licensed under the MIT and GPL licenses: |
---|
52 | */ |
---|
53 | jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options=jQuery.extend({},options);options.expires=-1;} |
---|
54 | var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;} |
---|
55 | expires='; expires='+date.toUTCString();} |
---|
56 | var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}} |
---|
57 | return cookieValue;}}; |
---|