Дата: Ср, 27.06.2012, 15:41:56 | Сообщение # 2
|
babuc9, uwnd не работает из-за файла one.js
В нем удали код: Code // ************************************************** VIDEO GLOBAL; (function(b){function q(){for(var a=["transform","WebkitTransform","MozTransform","msTransform","OTransform"],b;b=a.shift();)if(typeof document.body.style[b]!="undefined")return!0;return!1}b.fn.wowwindow=function(a){function c(c){if(this.title)c=c.replace(/\{\%title\%\}/,this.title);else if(b(this).find("img").length==1&&b(this).find("*").length==1)var d=b(this).find("img")[0].alt||"",c=c.replace(/\{\%title\%\}/,d);else c=c.replace(/\{\%title\%\}/,"");return c=c.replace(/\{\%close\%\}/,a.closeButton|| "")}var e={testMode:!1,draggable:!1,fixedWindow:!1,width:500,height:500,overlay:{background:"#000",opacity:0.6,zIndex:1E3,fixed:!0,clickToClose:!0,d estroyOnClose:!1},before:function(){},after:function(){},onclose:function(){},zoom:!0,rotate:!1,rotations:1,clockwise:!0,speed:800,autoplay: !0,videoIframe:!0,showRelated:!0,autoYouTubeThumb:null,closeButton:'<a class="wowwindow-close" title="close" href="javascript:jQuery(document.body).overlayPlayground(\'close\');void(0)">Close</a>',wrapHTML:'<div id="wowwindow-inner"></div>', beforeHTML:'<div class="wowwindow-controlbar">{%close%} <span class="wowwindow-title">{%title%}</span></div>',afterHTML:"",verticalCenter:!0,forceImageFade:!1,yabbadabbadoo:!1},a=a||{};if(a.overlay===!1)a.overlay={},a.overlay.overlay=!1;if(a.overlay)a.overlay=b.extend(e.overlay,a.overlay);a=b.extend(e,a);a.overlay.playgroundFixed=a.fixedWindow;a.overlay.onclose=a.onclose;if(a.testMode){if(!window.console)window.console={},window.console.log=function(){};b.fn.wowwindow.ii=0}var d=q(),f=[],h=Math.round(Math.random()* 1E4),k=a.clockwise?"+":"-";return this.each(function(){if(b(this).attr("href").match(/\/\/www\.youtube\.com\/watch\?/)&&a.autoYouTubeThumb&&b(this).find(">img").length>0){var e=document.location.protocol=="https:"?"https://":"http://";b(this).find(">img").eq(0).attr("src",e+"img.youtube.com/vi/"+this.href.split("v=")[1].split("&")[0]+"/"+a.autoYouTubeThumb+".jpg")}b(this).click(function(e){function n(){b("#wowwindow")[0].style.MozTransform="none";b("#wowwindow")[0].style.WebkitTransform="none";b("#wowwindow")[0].style.transform= "none"}function o(){if(a.draggable&&b("#wowwindow .wowwindow-controlbar").length!=0){var c=!0,d,e,f,g,h=!1;b("#wowwindow .wowwindow-controlbar").mousedown(function(a){if(c)d=a.pageX,e=a.pageY,b("#wowwindow")[0].style.top&&b("#wowwindow")[0].style.left?(f=Math.round(parseFloat(b("#wowwindow").css("left").replace(/px/,""))),g=Math.round(parseFloat(b("#wowwindow").css("top").replace(/px/,"")))):(f=Math.round(b("body > .overlayPlaygroundPlayground").width()/2),g=Math.round(b("body > .overlayPlaygroundPlayground").height()/ 2)),h=!0;c=!0});b("#wowwindow .wowwindow-controlbar .wowwindow-close").mousedown(function(){c=!1});b(document.body).mousemove(function(a){if(h){var c=f+(a.pageX-d),a=g+(a.pageY-e);b("#wowwindow").css({left:c+"px",top:a+"px"})}});b(window).mouseup(function(){h=!1});b("#wowwindow .wowwindow-controlbar").mouseup(function(){h=!1})}}function v(){a.zoom?(b(document.body).overlayPlayground("open"),b("#wowwindow").animate({scale:"+=1.00"},{queue:!1,duration:a.speed,complete:function (){d&&(n(),typeof a.after== "function"&&a.after.call(l),o.call(this))}})):b(document.body).overlayPlayground("open");a.rotate&&b("#wowwindow").animate({rotate:k+"="+360*a.rotations+"deg"},{queue:!1,duration:a.speed,complete:function(){d&&!a.zoom&&(n(),!a.zoom&&typeof a.after=="function"&&a.after.call(l),o.call(this))}});b("#wowwindow").css({marginTop:"-"+b("#wowwindow").outerHeight()/2+"px",marginLeft:"-"+b("#wowwindow").outerWidth()/2+"px"});d&&b("#wowwindow").css({left:e.clientX+"px",top:e.clientY+"px"}).animate({left:b("body > .overlayPlaygroundPlayground").width()/ 2+"px",top:b("body > .overlayPlaygroundPlayground").height()/2+"px"},a.speed)}e.preventDefault();var l=this,i=b(this).attr("href").slice(-4),i=i==".jpg"||i==".png"||i==".gif"||i==".bmp",m=!1;if(b(this).attr("href").indexOf("#")===0)a.overlay.html='<div id="wowwindow">'+c.call(this,b(b(this).attr("href")).html())+"</div>";else if(i)a.overlay.html=f[this.href]&&!a.forceImageFade?'<div id="wowwindow"><div id="wowwindow-image"><img src="'+this.href+"?"+h+'"></div></div>':'<div id="wowwindow"><div id="wowwindow-image"><div id="wowwindow-image-loading"> </div></div></div>'; else{var m=!0,j="",g;if(this.href.match(/\/\/www\.youtube\.com\/watch\?/))j="youtube",g=this.href.split("v=")[1].split("&")[0];else if(this.href.match(/\/\/vimeo\.com\/([0-9]+)$/)||this.href.match(/\/\/www\.vimeo\.com\/([0-9]+)$/))j="vimeo",g=this.href.split("//")[1].split("/")[1];a.overlay.html='<div id="wowwindow-image"><div id="wowwindow-image-loading"> </div></div>';a.overlay.html='<div id="wowwindow">'+a.overlay.html+"</div>"}typeof a.before=="function"&&a.before.call(this);if(m&&j!="")a.overlay.onclose= function(){b("#wowwindow iframe, #wowwindow-video-flash").remove()};b(document.body).overlayPlayground(a.overlay);if(m){var r=this.href,s="";switch(j){case "youtube":r="//www.youtube.com/embed/"+g+"?rel="+(a.showRelated?"1":"0")+(a.autoplay?"&autoplay=1":"");s="wowwindow-video wowwindow-video-youtube";a.videoIframe||b('<div id="wowwindow-video-flash"><object width="'+a.width+'" height="'+a.height+'"><param name="movie" value="http://www.youtube.com/v/'+g+"?fs=1&rel="+(a.showRelated?"1":"0")+(a.autoplay? "&autoplay=1":"")+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+g+"?fs=1&rel="+(a.showRelated?"1":"0")+(a.autoplay?"&autoplay=1":"")+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+a.width+'" height="'+a.height+'"></embed></object></div>').appendTo("#wowwindow");break;case "vimeo":r="http://player.vimeo.com/video/"+g+"?title=0&byline=0&portrait=0"+ (a.autoplay?"&autoplay=1":""),s="wowwindow-video wowwindow-video-vimeo",a.videoIframe||b('<div id="wowwindow-video-flash"><object width="'+a.width+'" height="'+a.height+'"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='+g+"&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1"+(a.autoplay?"&autoplay=1":"&autoplay=0")+'&loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id='+ g+"&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1"+(a.autoplay?"&autoplay=1":"&autoplay=0")+'&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+a.width+'" height="'+a.height+'"></embed></object></div>').appendTo("#wowwindow")}(j==""||a.videoIframe)&&b(document.createElement("iframe")).attr({id:"wowwindow-iframe",className:s,src:r,height:a.height,width:a.width,type:"text/html",frameBorder:"0"}).css({display:"none"}).load(function(){b(this).fadeIn(300, function(){j=="youtube"&&b(this).parent().html(b(this).parent().html())})}).appendTo("#wowwindow")}a.fixedWindow||b("body > .overlayPlaygroundPlayground").css({top:b(window).scrollTop()+"px"});b("#wowwindow").click(function(){b.fn.wowwindow.overLayClickDefault=!1});if(a.overlay.clickToClose&&!b.fn.wowwindow.overLayClickEventSet)b(document.body).click(function(){b.fn.wowwindow.overLayClickDefault&&b(document.body).overlayPlayground("close");b.fn.wowwindow.overLayClickDefault=!0}),b.fn.wowwindow.overLayClickEventSet= !0;b("#wowwindow >*").wrapAll(a.wrapHTML);b("#wowwindow").prepend(c.call(this,a.beforeHTML));b("#wowwindow").append(c.call(this,a.afterHTML));m&&b("#wowwindow-iframe").parent().height(a.height);a.zoom&&b("#wowwindow").scale(0);if(m)b("#wowwindow").width(a.width+20);else if(i){var t=a.forceImageFade;if(b("#wowwindow-image-loading").length==1||a.forceImageFade)b("#wowwindow").width(b("#wowwindow-image-loading").width()+20),b("#wowwindow-i mage-loading").parent().height(b("#wowwindow-image-loading").height()), t=!0;else{var p=b("#wowwindow-image img").width();g=b("#wowwindow-image img").height();a.testMode&&(b.fn.wowwindow.ii+=1,console.log("!"+b.fn.wowwindow.ii+". "+p+","+g));p&&b("#wowwindow").width(p+20)}}else b("#wowwindow").width(a.width);if(!i||p||t)v.call(this);else var q=setInterval(function(){var c=b("#wowwindow-image img").width(),d=b("#wowwindow-image img").height();a.testMode&&(b.fn.wowwindow.ii+=1,console.log("!"+b.fn.wowwindow.ii+". "+c+","+d));c&&(b("#wowwindow").width(c+20),v.call(l),clearInterval(q))}, 1);if(t){var u=new Image;b(u).attr({id:"wowwindow-loaded-image",src:b(l).attr("href")+"?"+h}).css({position:"absolute",top:"-999em",bottom:"-999em"});b(u).load(function(){var c=this;b(this).appendTo("#wowwindow-image");var d=setInterval(function(){var e=b(c).height(),f=b(c).width();a.testMode&&(b.fn.wowwindow.ii+=1,console.log(b.fn.wowwindow.ii+". "+f+","+e));f&&(b("#wowwindow").animate({width:f+20+"px",marginTop:"-"+(e+20)/2+"px",marginLeft:"-"+(f+20)/2+"px"},{queue:a.yabbadabbadoo,duration:300, complete:function(){b("#wowwindow-loaded-image").css({top:"10px",left:"10px",display:"none"}).fadeIn(300)}}),b("#wowwindow-loaded-image").pa rent().animate({height:e+"px"}),b(u).unbind("load"),clearInterval(d))},1);f[l.href]=!0})}!a.zoom&&!a.rotate&&d&&typeof a.after=="function"&&(n(),a.after.call(this),o.call(this));!d&&typeof a.after=="function"&&(n(),a.after.call(this),o.call(this));return!1})})};b.fn.wowWindow=b.fn.WowWindow=b.fn.wowwindow;b.fn.wowwindow.overLayClickEventSet=!1;b.fn.wowwindow.overLayClickDefault= !0;b.fn.overlayPlayground=function(a){var c=!0;a=="close"&&(a={open:!1});a=="open"&&(a={open:!0},c=!1);a=b.extend({background:"#000",opacity:0.75,zIndex:1E3,fixed:!0,playgroundFixed:!1,html:"",overlay:!0,open:!0,destroyOnClose:!1,onclose:null} ,a);if(typeof a.onclose=="function")b.fn.overlayPlayground.onclose=a.onclose;else if(typeof b.fn.overlayPlayground.onclose=="function")a.onclose=b.fn.overlayPlayground.onclose;var e=typeof document.body.style.maxWidth=="undefined"?!0:!1;return this.each(function(){if(a.open){var d= !1;b(this).find("> .overlayPlaygroundOverlay, > .overlayPlaygroundPlayground").length>0&&(d=!0,b(this).find("> .overlayPlaygroundOverlay, > .overlayPlaygroundPlayground").show());b("html,body").css({height:"100%"});if(c){if(a.overlay){var f={opacity:a.opacity,filter:"alpha(opacity="+a.opacity*100+")",background:a.background,zIndex:a.zIndex,padding:0,margin:0,height:b(document) .height()+"px",width:"100%",left:0,top:0,position:"absolute"};d?b(this).find("> .overlayPlaygroundOverlay").css(f):b('<div class="overlayPlaygroundOverlay"> </div>').css(f).appendTo(this)}f= {zIndex:a.zIndex+10,padding:0,margin:0,height:"100%",width:"100%",left:0,top:0,position:e||!a.playgroundFixed?"absolute":"fixed"};if(d)b(this).find("> .overlayPlaygroundPlayground").css(f).html(a.html);else if(b('<div class="overlayPlaygroundPlayground"></div>').css(f).html(a.html).appendTo(this),e&&a.playgroundFixed){var h=this;b(window).scroll(function(){b(h).find("> .overlayPlaygroundPlayground").css("top",b(window).scrollTop()+"px")});b(window).scroll()}}}else a.destroyOnClose?b(this).find(".overlayPlaygroundOverlay,.overlayPlaygroundPlayground").remove(): b(this).find(".overlayPlaygroundOverlay,.overlayPlaygroundPlayground").hide(),typeof a.onclose=="function"&&a.onclose.call(this)})};var w=b.fn.css;b.fn.css=function(a,c){if(typeof b.props.transform=="undefined"&&(a=="transform"||typeof a=="object"&&typeof a.transform!="undefined")){var e=b.props,d;a:{d=this.get(0);for(var f=["transform","WebkitTransform","MozTransform","msTransform","OTransform"],h;h=f.shift();)if(typeof d!="undefined"&&typeof d.style[h]!="undefined"){d=h;break a}d="transform"}e.transform= d}if(b.props.transform!="transform")if(a=="transform"){if(a=b.props.transform,typeof c=="undefined"&&jQuery.style)return jQuery.style(this.get(0),a)}else if(typeof a=="object"&&typeof a.transform!="undefined")a[b.props.transform]=a.transform,delete a.transform;return w.apply(this,arguments)};var k="deg";b.fn.rotate=function(a){var c=b(this).css("transform")||"none";if(typeof c=="undefined")return this;if(typeof a=="undefined"){if(c&&(a=c.match(/rotate\(([^)]+)\)/))&&a[1])return a[1];return 0}if(a= a.toString().match(/^(-?\d+(\.\d+)?)(.+)?$/))a[3]&&(k=a[3]),b(this).css("transform",c.replace(/none|rotate\([^)]*\)/,"")+"rotate("+a[1]+k+")");return this};b.fn.scale=function(a){var c=b(this).css("transform");if(typeof c=="undefined")return this;if(typeof a=="undefined"){if(c&&(a=c.match(/scale\(([^)]+)\)/))&&a[1])return a[1];return 1}b(this).css("transform",c.replace(/none|scale\([^)]*\)/,"")+"scale("+a+")");return this};var x=b.fx.prototype.cur;b.fx.prototype.cur=function(){if(this.prop=="rotate")return parseFloat(b(this.elem).rotate()); else if(this.prop=="scale")return parseFloat(b(this.elem).scale());return x.apply(this,arguments)};b.fx.step.rotate=function(a){b(a.elem).rotate(a.now+k)};b.fx.step.scale=function(a){b(a.elem).scale(a.now)};var y=b.fn.animate;b.fn.animate=function(a){if(typeof a!="undefined"&&typeof a.rotate!="undefined"){var b=a.rotate.toString().match(/^(([+-]=)?(-?\d+(\.\d+)?))(.+)?$/);b&&b[5]&&(k=b[5]);a.rotate=b[1]}return y.apply(this,arguments)}})(jQuery); А вообще, лучше поставить другой шаблон, где багов по меньше
|
|