1 |
85ad3d82
|
Assos Assos
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
(function($){
|
8 |
|
|
|
9 |
|
|
$.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) {
|
10 |
|
|
s = $.extend({
|
11 |
|
|
top : 'auto',
|
12 |
|
|
left : 'auto',
|
13 |
|
|
width : 'auto',
|
14 |
|
|
height : 'auto',
|
15 |
|
|
opacity : true,
|
16 |
|
|
src : 'javascript:false;'
|
17 |
|
|
}, s);
|
18 |
|
|
var html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
|
19 |
|
|
'style="display:block;position:absolute;z-index:-1;'+
|
20 |
|
|
(s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
|
21 |
|
|
'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
|
22 |
|
|
'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
|
23 |
|
|
'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
|
24 |
|
|
'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
|
25 |
|
|
'"/>';
|
26 |
|
|
return this.each(function() {
|
27 |
|
|
if ( $(this).children('iframe.bgiframe').length === 0 )
|
28 |
|
|
this.insertBefore( document.createElement(html), this.firstChild );
|
29 |
|
|
});
|
30 |
|
|
} : function() { return this; });
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
$.fn.bgIframe = $.fn.bgiframe;
|
34 |
|
|
|
35 |
|
|
function prop(n) {
|
36 |
|
|
return n && n.constructor === Number ? n + 'px' : n;
|
37 |
|
|
}
|
38 |
|
|
|
39 |
|
|
})(jQuery); |