/*jqModal - Minimalist Modaling with jQuery (http://dev.iceburg.net/jquery/jqmodal/) Copyright (c) 2007,2008 Brice Burgess <bhb@iceburg.net> Dual licensed under the MIT and GPL licenses:http://www.opensource.org/licenses/mit-license.php http://www.gnu.org/licenses/gpl.html $Version: 07/06/2008 +r13*/
(function(u){u.fn.jqm=function(a){var b={overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:f,ajaxText:"",target:f,modal:f,toTop:f,onShow:f,onHide:f,onLoad:f};return this.each(function(){if(this._jqm){return i[this._jqm].c=u.extend({},i[this._jqm].c,a)}e++;this._jqm=e;i[e]={c:u.extend(b,u.jqm.params,a),a:f,w:u(this).addClass("jqmID"+e),s:e};if(b.trigger){u(this).jqmAddTrigger(b.trigger)}})};u.fn.jqmAddClose=function(a){return m(this,a,"jqmHide")};u.fn.jqmAddTrigger=function(a){return m(this,a,"jqmShow")};u.fn.jqmShow=function(a){return this.each(function(){u.jqm.open(this._jqm,a)})};u.fn.jqmHide=function(a){return this.each(function(){u.jqm.close(this._jqm,a)})};u.jqm={hash:{},open:function(b,c){var d=i[b],a=d.c,g="."+a.closeClass,n=(parseInt(d.w.css("z-index"))),n=(n>0)?n:3000,h=u("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":n-1,opacity:a.overlay/100});if(d.a){return f}d.t=c;d.a=true;d.w.css("z-index",n);if(a.modal){if(!x[0]){q("bind")}x.push(b)}else{if(a.overlay>0){d.w.jqmAddClose(h)}else{h=f}}d.o=(h)?h.addClass(a.overlayClass).prependTo("body"):f;if(v){u("html,body").css({height:"100%",width:"100%"});if(h){h=h.css({position:"absolute"})[0];for(var l in {Top:1,Left:1}){h.style.setExpression(l.toLowerCase(),"(_=(document.documentElement.scroll"+l+" || document.body.scroll"+l+"))+'px'")}}}if(a.ajax){var j=a.target||d.w,k=a.ajax,j=(typeof j=="string")?u(j,d.w):u(j),k=(k.substr(0,1)=="@")?u(c).attr(k.substring(1)):k;j.html(a.ajaxText).load(k,function(){if(a.onLoad){a.onLoad.call(this,d)}if(g){d.w.jqmAddClose(u(g,d.w))}r(d)})}else{if(g){d.w.jqmAddClose(u(g,d.w))}}if(a.toTop&&d.o){d.w.before('<span id="jqmP'+d.w[0]._jqm+'"></span>').insertAfter(d.o)}(a.onShow)?a.onShow(d):d.w.show();r(d);return f},close:function(a){var b=i[a];if(!b.a){return f}b.a=f;if(x[0]){x.pop();if(!x[0]){q("unbind")}}if(b.c.toTop&&b.o){u("#jqmP"+b.w[0]._jqm).after(b.w).remove()}if(b.c.onHide){b.c.onHide(b)}else{b.w.hide();if(b.o){b.o.remove()}}return f},params:{}};var e=0,i=u.jqm.hash,x=[],v=u.browser.msie&&(u.browser.version=="6.0"),f=false,t=u('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),r=function(a){if(v){if(a.o){a.o.html('<p style="width:100%;height:100%"/>').prepend(t)}else{if(!u("iframe.jqm",a.w)[0]){a.w.prepend(t)}}}s(a)},s=function(a){try{u(":input:visible",a.w)[0].focus()}catch(b){}},q=function(a){u()[a]("keypress",w)[a]("keydown",w)[a]("mousedown",w)},w=function(a){var c=i[x[x.length-1]],b=(!u(a.target).parents(".jqmID"+c.s)[0]);if(b){s(c)}return !b},m=function(c,b,a){return c.each(function(){var d=this._jqm;u(b).each(function(){if(!this[a]){this[a]=[];u(this).click(function(){for(var h in {jqmShow:1,jqmHide:1}){for(var g in this[h]){if(i[this[h][g]]){i[this[h][g]].w[h](this)}}}return f})}this[a].push(d)})})}})(jQuery);$(document).ready(function(){$().ready(function(){var d=function(a){a.w.fadeIn(500)};var c=function(a){a.w.fadeOut(500);a.o.fadeOut(250,function(){a.o.remove()})};$("#popup_wrap").jqm({trigger:".AskOS",overlay:30,overlayClass:"scrOverlay",onShow:d,onHide:c});$("#windows_wrap").jqm({trigger:".Windows",overlay:30,overlayClass:"scrOverlay",onShow:d,onHide:c});$("#linux_wrap").jqm({trigger:".Linux",overlay:30,overlayClass:"scrOverlay",onShow:d,onHide:c})});$("a[class=AskOS orderbutton]").click(function(){var e=$(this).attr("rel");var f=e.split(",",2);var d="http://clients.ifusehosting.com/cart.php?a=add&pid=";$("#winlink").attr("href",d+f[0]);$("#linlink").attr("href",d+f[1]);return false})});