script type text javascript jQuery sidebar1 li each function jQuery th

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<script type="text/javascript">
jQuery('#sidebar1>li').each(function(){
jQuery(this).addClass('widget_' + jQuery(this).attr('id') + ' ' + 'widget_' + this.className + ' ' + 'widget');
});
</script>
<?php endif; ?>
</ul>
<script type="text/javascript">
if(!jQuery.browser.msie || jQuery.browser.version >= 7){
function trimSlashes(s){
while(s[s.length-1] == '/')s=s.substring(0,s.length-1);
return s;
}
var currentUrl = trimSlashes(window.location.href);
jQuery("#archives a[href]").each(function(){
if(trimSlashes(jQuery(this).attr("href")) == currentUrl)
jQuery(this).parent("li").addClass("current-archive");
});
jQuery("#calendar a[href]").each(function(){
if(trimSlashes(jQuery(this).attr("href")) == currentUrl)
jQuery(this).parent("td").addClass("current-archive");
});
}
</script>
<script type="text/javascript">
var pageType = '_unknown';
<?php
$page_types = array("category", "search", "author", "tag", "day", "month", "archive", "page");
$page_classes = array(
"archive" => "widget_archive",
"search" => "widget_search",
"author" => "widget_authors",
"tag" => "widget_tag_cloud",
"category" => "widget_categories",
"page" => "widget_pages",
"day" => "widget_calendar",
"month" => "widget_calendar|widget_archive"
);
foreach($page_types as $page_type)
if(function_exists("is_$page_type") && call_user_func("is_$page_type")):?>
pageType = "<?php echo $page_classes[$page_type];?>";
<?php
break;
endif;
?>
// jQuery.animate runs very slow on IE, we use jQuery.css as a replacement
jQuery.prototype.slidebarAnimate = jQuery.browser.msie ? jQuery.prototype.css : jQuery.prototype.animate;
var hideFunction = function(){
jQuery(">*:not(h3:first)", this).stop().slidebarAnimate({"opacity": 0});
jQuery(this).stop().slidebarAnimate({"opacity": 0.4}).removeClass("widget-hover");
};
var faseHideFunction = function(){
jQuery(">*:not(h3:first)", this).css("opacity", 0);
jQuery(this).css("opacity", 0.4).removeClass("widget-hover");
};
var showFunction = function(){
jQuery(">*:not(h3:first)", this).stop().slidebarAnimate({"opacity": 1});
jQuery(this).stop().slidebarAnimate({"opacity": 0.6}).addClass("widget-hover");
};
var initialShowFunction = function(){
jQuery(">*:not(h3:first)", this).css("opacity", 1);
jQuery(this).css("opacity", 0.6).addClass("widget-hover");
};
var jqWidgets = jQuery("#sidebar1>.widget");
var i=jqWidgets.length;
if(!jQuery.browser.msie || jQuery.browser.version >= 7)
jqWidgets.each(function(){
if(!jQuery(this).attr("class").match("(" + pageType + ")")){
if(fromWordpress)
faseHideFunction.apply(this);
else{
var me=this;
setTimeout(function(){
hideFunction.apply(me);
}, 200 * (i--));
}
jQuery(this).hover(showFunction, hideFunction);
jQuery("a,input,button",this).focus(function(){
showFunction.apply(jQuery(this).parents(".widget")[0]);
}).blur(function(){
hideFunction.apply(jQuery(this).parents(".widget")[0]);
});
}else
initialShowFunction.apply(this);
});
</script>
<script type="text/javascript">
var removeHandle4IE = undefined;
var addHandle4IE = undefined;
if(!jQuery.browser.msie || jQuery.browser.version >= 7)
jQuery("#sidebar1 ul li").each(function(){
var me = this;
if(jQuery("a", this).length == 1 && jQuery("a", this).attr("href") && !jQuery("a", this).attr("onclick"))
jQuery(this).addClass("li-with-link").click(function(e){
if((e.target || e.srcElement) != me) return ;
window.location.href = jQuery("a", this).attr("href");
}).mouseover(function(e){
if(jQuery.browser.msie && !addHandle4IE){
addHandle4IE = setTimeout(function(){
if(!jQuery(me).hasClass("li-hover-4ie"))
jQuery(me).addClass("li-hover-4ie");
addHandle4IE = undefined;
}, 100);
removeHandle4IE = undefined;
}
window.status = jQuery("a", this).attr("href");
}).mouseout(function(e){
if(jQuery.browser.msie && !removeHandle4IE){
removeHandle4IE = setTimeout(function(){
if(jQuery(me).hasClass("li-hover-4ie"))
jQuery(me).removeClass("li-hover-4ie");
removeHandle4IE = undefined;
}, 100);
addHandle4IE = undefined;
}
window.status = '';
});
});
</script>