var _jq=$.noConflict(true);try{window.$=_jq,window.jQuery=_jq}catch(Excp){} _jq.imCookie=function(a,b,d){if(b!=null){d=d||{};if(d.expires==null)d.expires=60;if(b===null)b="",d.expires=-1;var c="";if(d.expires&&(typeof d.expires=="number"||d.expires.toUTCString))typeof d.expires=="number"?(c=new Date,c.setTime(c.getTime()+d.expires*864E5)):c=d.expires,c="; expires="+c.toUTCString();var e=d.path?"; path="+d.path:"",h=d.domain?"; domain="+d.domain:";",d=d.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(b),c,e,h,d].join("")}else{b=null;if(document.cookie&&document.cookie!== ""){d=document.cookie.split(";");for(c=0;c1/2.75?c*7.5625*b*b+d:b<2/2.75?c*(7.5625*(b-=1.5/2.75)*b+0.75)+d:b<2.5/2.75?c*(7.5625*(b-=2.25/2.75)*b+0.9375)+d:c*(7.5625*(b-=2.625/2.75)*b+0.984375)+d}}); var x5engine={settings:{imGrid:{enabled:false},imSound:{idName:"imJSSound"},imCaptcha:{offlineCodes:[]},zIndex:{menu:1E4,datePicker:10201,tip:10221,showBox:10301,splashBox:10401,popup:10501},general:{preview:true},imShowBox:{background:"black",opacity:0.6,border:10,closeImg:"res/imClose.png",loadingImg:"res/imLoad.gif",textColor:"black",boxColor:"white",effect:"fade",shadow:false,innerBorder:12},imPopUp:{background:"black",opacity:0.6,borderRadius:10,textColor:"black",boxColor:"white",effect:"fade", shadow:false},imTip:{borderRadius:10,classes:"",shadow:true,arrow:true,position:"right",effect:"fade",showTail:true,persistant:false,unique:true},imAdv:{},imAlertBox:{position:"top",sound:"",cookie:false,image:"",link:""},imSplashBox:{position:"center",sound:"",effect:"none",shadow:true,margin:0,width:100,height:100,cookie:false,image:"",link:""},imBlog:{posts:[],posts_month:[],posts_cat:[],posts_ids:[],comments:false,captcha:false}},l10n:{_l10n:[],addLocalization:function(a,b){x5engine.l10n._l10n[a]= b},getLocalization:function(a){return a==null||a==""||x5engine.l10n._l10n[a]==null||x5engine.l10n._l10n[a]=="undefined"||x5engine.l10n._l10n[a]==""?"":x5engine.l10n._l10n[a]}},utils:{hex2rgb:function(a,b,d,c){for(var a=a.replace("#","").match(/(.{2})/g),e=3;e--;)a[e]=parseInt(a[e],16);b!=null&&(a[0]+=b);d!=null&&(a[1]+=d);c!=null&&(a[2]+=c);for(e=0;e<3;e++)a[e]>255&&(a[e]=255),a[e]<0&&(a[e]=0);return"rgb("+a.join(", ")+")"},imFormatInt:function(a){a<10&&(a="0"+a);return a},popup:function(a){(new x5engine.utils.Gui).showPopUp(a)}, Gui:function(){var a=function(a){_jq("#imGuiPopUp").fadeOut(a);_jq("#imGuiPopUpBg").fadeOut(a,function(){_jq("#imGuiPopUp").remove();_jq("#imGuiPopUpBg").remove()})};this.showPopUp=function(b){b.width=b.width||x5engine.settings.imPopUp.width;b.borderRadius=b.borderRadius||x5engine.settings.imPopUp.borderRadius;b.backGround=b.background||x5engine.settings.imPopUp.background;b.effect=b.effect||x5engine.settings.imPopUp.effect;b.textColor=b.textColor||x5engine.settings.imPopUp.textColor;b.boxColor=b.boxColor|| x5engine.settings.imPopUp.boxColor;b.opacity=b.opacity||x5engine.settings.imPopUp.opacity;if(b.graphics==null)b.graphics=true;if(b.graphics){b.text=b.text.replace(/&/g,"&").replace(/\>/g,">").replace(/\</g,"<");var d;d=b.effect!="none"?200:0;if(b.shadow==null)b.shadow=x5engine.settings.imPopUp.shadow;_jq("#imGuiPopUpBG").remove();_jq("#imGuiPopUp").remove();var c='
'+b.text+'
OK
';_jq("body").append(c); _jq("#imGuiPopUpBg").css({zIndex:x5engine.settings.zIndex.popup});_jq("#imGuiPopUp").css({zIndex:x5engine.settings.zIndex.popup+1});_jq("#imGuiPopUp").fadeOut(0);b.shadow&&(_jq("#imGuiPopUp").css("box-shadow","0px 5px 30px #000"),_jq("#imGuiPopUp").css("-webkit-box-shadow","0px 5px 30px #000"),_jq("#imGuiPopUp").css("-moz-box-shadow","0px 5px 30px #000"));_jq("#imGuiPopUp").css("-moz-border-radius",b.borderRadius+"px");_jq("#imGuiPopUp").css("-webkit-border-radius",b.borderRadius+"px");_jq("#imGuiPopUp").css("border-radius", b.borderRadius+"px");_jq(".imGuiButton").css("-moz-border-radius",b.borderRadius+"px");_jq(".imGuiButton").css("-webkit-border-radius",b.borderRadius+"px");_jq(".imGuiButton").css("border-radius",b.borderRadius+"px");_jq("#imGuiPopUpBg").css({width:_jq(window).width(),height:_jq(window).height()});_jq("#imGuiPopUp").width(b.width);_jq("#imGuiPopUp").css({position:"fixed",top:(_jq(window).height()-_jq("#imGuiPopUp").outerHeight())/2,left:(_jq(window).width()-_jq("#imGuiPopUp").outerWidth())/2});_jq("#imGuiPopUpBg").click(function(){a(d)}); _jq("#imCloseButton").click(function(){a(d)});_jq("#imGuiPopUp").fadeIn(d);_jq("#imGuiPopUpBg").fadeOut(1,function(){_jq("#imGuiPopUpBg").fadeTo(d,b.opacity)})}else alert(b.text.replace(/&/g,"&").replace(/\>/g,">").replace(/\</g,"<").replace(//g,"\n").replace(/<([A-Z][A-Z0-9]*)\b[^>]*\/?>/g,""))};this.removeLabels=function(){_jq(".imGuiLabel").remove()};this.showLabel=function(a){for(var d=0;_jq("#imGuiLabel"+d).length>0;)d++;var d="imGuiLabel"+d,c="
"+a.text+"
";_jq("body").append(c);var e=_jq("#"+d);e.css("box-shadow","0px 0px 7px #aaa");e.css("-webkit-box-shadow","0px 0px 7px #aaa");e.css("-moz-box-shadow","0px 0px 7px #aaa");e.css("-moz-border-radius","3px");e.css("-webkit-border-radius","3px");e.css("border-radius","3px");a.object!==null?(a=_jq(a.object),d=a.offset(),c=d.top+Math.floor((a.outerHeight()-e.outerHeight())/2),c<0&&(c=0),e.css({position:"absolute",top:c,left:d.left+a.outerWidth()+10})):(e.css({width:200,height:50,padding:10}), a=e.outerHeight(),e.css({position:"fixed",bottom:-a,right:30,overflow:"hidden",cursor:"pointer"}),e.animate({bottom:10}));e.fadeTo(300,0.8);e.click(function(){e.fadeOut(100,function(){e.remove()})})}},createId:function(a){for(var a=a||"imObj",b=0;_jq("#"+a+b).length>0;)b++;return a+b},imGetParameter:function(a){var b="",d=0,c=0;window.top.location.search!==0&&(b=unescape(window.top.location.search));a+="=";if(b.length>0&&(d=b.indexOf(a),d!=-1)){d+=a.length;c=b.indexOf("&",d);if(c==-1)c=b.length;return b.substring(d, c)}return null},imPreloadImages:function(a){for(var b=0;bembed type="'+x5engine.utils.imSoundLink.getMimeType()+'" style="height:0" id="'+x5engine.settings.imSound.idName+'" src="'+a+'" loop="'+b+'" autostart="true" hidden="true" />')},Stop:function(){_jq("#"+x5engine.settings.imSound.idName).remove()}},imPopUpWin:function(a,b,d,c,e,h){e==void 0&&(e=false);h==void 0&&(h=1);d==void 0&& (d=-1);c==void 0&&(c=-1);window.open(a,"",e==true?"":d==-1||c==-1?"width="+screen.width+",height="+screen.height+",top=0,left=0,scrollbars="+h+",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no":"width="+d+",height="+c+",top="+(screen.height?(screen.height-c)/2:100)+",left="+(screen.width?(screen.width-d)/2:100)+",scrollbars="+h+",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no").focus();return false},switchFocus:function(a){_jq(a).find(":input").each(function(){var a= _jq(this).attr("type");a!="button"&&a!="submit"&&a!="reset"&&(_jq(this).focus(function(){_jq(this).addClass("imFormFocus")}),_jq(this).blur(function(){_jq(this).removeClass("imFormFocus")}))})},isOnline:function(){return window.top.location.href.substring(0,4)=="http"?true:false},emailTo:function(a,b){for(var d="",c=0;c0&&(d=b.indexOf(a),d!=-1)){d+=a.length;c=b.indexOf("&",d);if(c==-1)c=b.length;return b.substring(d,c)}return null},offlineMessageTimeout:null,showOfflineMessage:function(a,b,d){var c=function(){_jq("#imMsgBoxF").height(_jq("#imMsgBox").outerHeight())};if(!x5engine.utils.isOnline()){if(_jq("#imMsgBox").length> 0&&_jq("#imMsgBox").html().indexOf(a)!==-1)return false;_jq("#imMsgBox, #imMsgBoxF").remove();b=b||"";d="z-index: 10200; position: fixed; top: 0; left: 0; right: 0; padding: 8px; background-color: "+(d||"#FFFFE1")+"; font-family: Tahoma; font-size: 8pt; border-bottom: 1px solid gray;";_jq("#imMsgBox").length==0&&(_jq("body").prepend('
 
'),_jq("body").prepend('
'+(b!=""?'':"")+''+ a+'X
'));c();_jq("#imMsgBox, #imMsgBoxF").fadeOut(0);_jq("#imMsgBox, #imMsgBoxF").slideDown("slow");_jq(window).unbind("resize",c).resize(c);_jq("#imMsgBoxClose").unbind("click").click(function(){_jq("#imMsgBox, #imMsgBoxF").slideUp("slow",function(){_jq("#imMsgBox, #imMsgBoxF").remove()})})}return false},alignWelcomePage:function(){var a=function(){var a=_jq(window).height()-_jq("#imCell_1").outerHeight();_jq("#imCell_2").length> 0&&(a-=_jq("#imCell_2").outerHeight());a/=2;a<0&&(a=0);_jq("#imContent").css({marginTop:a})};a();_jq(window).unbind("resize",a).resize(a)},autoHeight:function(){_jq(".autoHeight").each(function(){_jq(this).height("auto")})},imHash:function(a){for(var b="",d=0,c=a.length-1;c>=0;c--)d+=a.charCodeAt(c)*Math.pow(2,a.length-c);d*=834;d+="";for(a=0;d.length>0;)a+=(parseInt(d.charAt(0))+5)*2,d=d.substr(1),a>61&&(a-=61),b+="QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890".charAt(a);return b}}, imBlog:{separator:'
\n',showPost:function(a,b,d){var c="",b=b||0,d=d||0,e=x5engine.settings.imBlog.posts[a];if(e!=null){c+='

'+e.title+"

";c+='
'+x5engine.l10n.getLocalization("blog_published_by")+" "+e.author+" ";c+=x5engine.l10n.getLocalization("blog_in")+' '+e.category+" • "+e.timestamp; e.media!=null&&(c+=' • Download '+e.media.substring(e.media.lastIndexOf("/"))+"");if(e.tag.length>0){c+="
Tags: ";for(var h=0;ha href="?tag='+e.tag[h]+'">'+e.tag[h]+", "}c+="
";if(b!=0||d!=0){c+='
';e.mediahtml!=null&&(c+=e.mediahtml);c+=e.body;if(e.sources.length>0){c+='
';c+=""+x5engine.l10n.getLocalization("blog_sources")+":
";c+="
    ";for(d=0;d"+e.sources[d]+">/li>";c+="
"}c+=(x5engine.settings.imBlog.addThis!=null?"
"+x5engine.settings.imBlog.addThis:"")+"

"}else c+='
'+e.summary+"
";b==0&&(c+='");b!=0&&x5engine.settings.imBlog.comments&&(c+='
',c+='
'+x5engine.l10n.getLocalization("blog_no_comment")+ "
",c+='
',c+='
',c+='
',c+=' ',c+="
",c+='
',c+=' ', c+="
",c+='
',c+=' ',c+="
",c+='
',c+='', c+="
",x5engine.settings.imBlog.captcha&&(c+='
',c+=' ',c+="
"),c+='
',c+="
",c+="
",c+="
");return c}},offlineCheck:function(){x5engine.imForm.validate("#blogComment",{type:"tip",showAll:true})&&x5engine.utils.showOfflineMessage(x5engine.l10n.getLocalization("blog_offline_message"))},showCategory:function(a){var b="";bps=x5engine.settings.imBlog.posts_cat[a];if(bps!=null){if(bps.length>0)for(a=0;a0&&(b+=x5engine.imBlog.separator);else b+='
Empty category
';return b}},showMonth:function(a){var b="";bps=x5engine.settings.imBlog.posts_month[a];if(bps!=null){if(bps.length>0)for(a=0;a0&&(b+=x5engine.imBlog.separator);else b+='
Empty month
';return b}},showSearch:function(a){var b="",d=x5engine.settings.imBlog.posts_ids,c=0;if(d!=null){if(d.length>0){for(var e= 0;e0&&(b+=x5engine.imBlog.separator);c==0&&(b+='
Empty search
')}else b+='
Empty blog
';return b}},showLast:function(a){var b=x5engine.settings.imBlog.posts_ids,d="";if(b!=null){if(b.length> 0)for(var a=b.lengtha;c++)d+=x5engine.imBlog.showPost(b[c],0,c==0?1:0),c>0&&(d+=x5engine.imBlog.separator);else d+='
Empty blog
';return d}},showTag:function(a){var b=x5engine.settings.imBlog.posts_ids,d="";if(b!=null){if(b.length>0)for(var c=0;ce.length;g++)e[g]==a&&(h=true);h&&(d+=x5engine.imBlog.showPost(b[c],0,c==b.length-1?1:0),c>0&&(d+=x5engine.imBlog.separator))}else d+= '
Empty blog
';return d}},show:function(){x5engine.utils.isOnline()||(x5engine.utils.getParam("id")!=null?_jq("#imBlogContent").empty().append(x5engine.imBlog.showPost(x5engine.utils.getParam("id"),1)):x5engine.utils.getParam("category")!=null?_jq("#imBlogContent").empty().append(x5engine.imBlog.showCategory(x5engine.utils.getParam("category"))):x5engine.utils.getParam("tag")!=null?_jq("#imBlogContent").empty().append(x5engine.imBlog.showTag(x5engine.utils.getParam("tag"))): x5engine.utils.getParam("month")!=null?_jq("#imBlogContent").empty().append(x5engine.imBlog.showMonth(x5engine.utils.getParam("month"))):x5engine.utils.getParam("search")!=null?_jq("#imBlogContent").empty().append(x5engine.imBlog.showSearch(x5engine.utils.getParam("search"))):_jq("#imBlogContent").empty().append(x5engine.imBlog.showLast(10)))}},imQueue:{_init_payload:[],_close_payload:[],_init_setted_up:false,_close_setted_up:false,_close_queue_executed:false,_exec:function(a){for(var b=0;b0?b.css({marginLeft:-b.parent("li").width()-b.width()}):b.css({marginLeft:0})},k=function(b){b.children("ul, div").stop(true, true);b.children("ul, div").length>0&&b.siblings("li").each(function(){h[_jq(this).attr("id")]!=null&&(clearTimeout(h[_jq(this).attr("id")]),o(_jq(this)))});if(a.type!="multipleColumn"){var c=b.offset();b.closest("ul").data("flip-direction")!=b.children("ul").data("flip-direction")&&j(b.children("ul"),b.closest("ul").data("flip-direction"));b.children("ul").data("flip-direction")==1&&c.left+b.width()+b.children("ul").width()>_jq(window).width()+_jq(window).scrollLeft()&&j(b.children("ul"),-1);b.children("ul").data("flip-direction")== -1&&c.left-b.width()<_jq(window).scrollLeft()&&j(b.children("ul"),1)}switch(a.effect){case "fade":b.children("ul,div").fadeIn(a.animationTime);break;case "v-slide":b.children("ul,div").slideDown(a.animationTime);break;case "h-slide":if(b.children(".jsOverflowControl").length>0){if(b.children(".jsOverflowControl").attr("vis")=="false"||b.children(".jsOverflowControl").attr("vis")==null)b.children(".jsOverflowControl").attr("vis","true").width("auto"),c=e[b.children(".jsOverflowControl").attr("id_number")].width, a.orientation!="horizontal"&&b.children(".jsOverflowControl").children("div").css({marginTop:0,marginLeft:0}),b.children(".jsOverflowControl").css({overflow:"hidden",width:0}),b.children(".jsOverflowControl").fadeIn(1).animate({width:c},a.animationTime,null,function(){_jq(this).css("overflow","visible")})}else if(b.children("ul").attr("vis")=="false"||b.children("ul").attr("vis")==null)b.children("ul").attr("vis","true").width("auto").height("auto"),c=b.children("ul").width(),b.children("ul.autoHide").css({overflow:"hidden", width:0}),b.children("ul.autoHide").fadeIn(1).animate({width:c},a.animationTime,null,function(){_jq(this).css("overflow","visible")});break;case "b-slide":if(b.children(".jsOverflowControl").length>0){if(b.children(".jsOverflowControl").attr("vis")=="false"||b.children(".jsOverflowControl").attr("vis")==null){b.children(".jsOverflowControl").attr("vis","true").width("auto");var c=e[b.children(".jsOverflowControl").attr("id_number")].width,d=e[b.children(".jsOverflowControl").attr("id_number")].height; a.orientation!="horizontal"&&b.children(".jsOverflowControl").children("div").css({marginTop:0,marginLeft:0});b.children(".jsOverflowControl").css({overflow:"hidden",width:0,height:0});b.children(".jsOverflowControl").fadeIn(1).animate({width:c,height:d},a.animationTime,null,function(){_jq(this).css("overflow","visible")})}}else if(b.children("ul").attr("vis")=="false"||b.children("ul").attr("vis")==null)b.children("ul").attr("vis","true").width("auto").height("auto"),c=b.children("ul").width(),d= b.children("ul").height(),b.children("ul.autoHide").css({overflow:"hidden",width:0,height:0}),b.children("ul.autoHide").fadeIn(1).animate({width:c,height:d},a.animationTime,null,function(){_jq(this).css("overflow","visible")});break;default:b.children("ul,div").fadeIn(1)}},o=function(b){b.children("ul,div").stop(true,true);b.children("ul, div").each(function(){_jq(this).children("li, ul").each(function(){_jq(this).is("ul")?_jq(this).children("li").each(function(){o(_jq(this))}):o(_jq(this))})});switch(a.effect){case "fade":b.children("ul,div").fadeOut(a.animationTime); break;case "v-slide":b.children("ul,div").slideUp(a.animationTime);break;case "h-slide":b.children("div").length==0?b.children("ul").animate({width:0},a.animationTime,"swing",function(){_jq(this).fadeOut(0);_jq(this).attr("vis","false")}):b.children("div").animate({width:0},a.animationTime,"swing",function(){_jq(this).fadeOut(0);_jq(this).attr("vis","false")});break;case "b-slide":b.children("div").length==0?b.children("ul").animate({width:0,height:0},a.animationTime,"swing",function(){_jq(this).fadeOut(0); _jq(this).css("overflow","hidden");_jq(this).attr("vis","false")}):b.children("div").animate({width:0,height:0},a.animationTime,"swing",function(){_jq(this).fadeOut(0);_jq(this).css("overflow","hidden");_jq(this).attr("vis","false")});break;case "none":b.children("ul,div").fadeOut(1)}};b.find(".auto").removeClass("auto").addClass("autoHide");b.find("ul").data("flip-direction",1);a.type=="multipleColumn"&&(a.effect=="h-slide"||a.effect=="b-slide")&&b.find("li > div").each(function(){var a=_jq(this).width(), b=_jq(this).height(),c=e.length;_jq(this).wrapInner('
').addClass("jsOverflowControl");_jq(this).attr("id_number",c);e[c]={width:a,height:b};_jq(this).css({overflow:"hidden",width:a,height:b})});c&&a.type!="multipleColumn"&&(_jq("#imMnMn ul ul ul").css({marginTop:-a.submenuHeight,marginLeft:0}),_jq("#imMnMn ul ul").css({marginLeft:0}));c&&a.orientation=="horizontal"&&(_jq("#imMnMn > ul > li > ul, #imMnMn > ul > li > div").css("margin-top", 0),a.type=="multipleColumn"&&_jq("#imMnMn > ul > li > div").css("margin-left",0));if(a.type=="accordion"){_jq(".imMnMnTxt img").css("position");var m;m=_jq("#imFooPad").length>0?_jq("#imFooPad").height():_jq("#imContent").height();var p=function(){_jq("#imFooPad").length>0?_jq("#imFooPad").height(Math.max(m,_jq("#imMnMn").children("ul").outerHeight()-(_jq("#imContent").height()-_jq("#imFooPad").height()))):_jq("#imContent").height(Math.max(m,_jq("#imMnMn").children("ul").outerHeight()))};_jq("#imMnMn > ul > li > ul").slideUp(0); _jq("#imMnMn > ul > li > span.imMnMnFirstBg").click(function(){_jq(this).parent().siblings("li").each(function(){_jq(this).children("ul").slideUp(a.animationTime)});_jq(this).siblings("ul").children("ul").hide(0);_jq(this).siblings("ul").slideToggle(a.animationTime,p)});p();b=_jq("#imMnMn > ul > li > ul")}b.find("li").hover(function(){var a=_jq(this),b=a.attr("id");h[b]!=null&&clearTimeout(h[b]);a.find("div ul ul").hide();h[b]=setTimeout(function(){k(a)},300)});b.find("li").mouseleave(function(){var b= _jq(this),c=b.attr("id");h[c]!=null&&clearTimeout(h[c]);h[c]=setTimeout(function(){o(b)},a.timeout)});if(a.verticalScroll)d=_jq(a.target),g=d.offset(),g=g.top,i=_jq(document).height(),f=d.position(),_jq(window).scroll(function(){d.stop(true,false);var a=d.offset(),b=d.position();((a.top-_jq(window).scrollTop()<0||_jq(window).scrollTop()>g)&&_jq(window).scrollTop()+d.height()b.top)&&_jq(window).scrollTop()-g>0?d.animate({marginTop:_jq(window).scrollTop()-g},"medium"):_jq(window).scrollTop()- g<=0&&d.animate({marginTop:0},"fast")})}},imCart:{products:{},html_form:"",payments:[],shippings:[],settings:{vat:0,vatincluded:false,currency:"\u20ac",currency_id:"EUR",currency_format:"#.###,@@[C]",post_url:"x5cart.php",order_no_format:"[yy][mm][dd]-[A-Z][A-Z][0-9][0-9]",form_autocomplete:true,form_validation:"tip",continue_shopping_page:"index.html",currencies:["USD","EUR"],cart_price:{multiplier:1,format:"#.@"}},costants:{QUANT_FIELD_NAME:"product_{id}_qty",OPT_FIELD_NAME:"product_{id}_opt",COOKIE_NAME:"imCart", COOKIE_FORM_NAME:"imCartFormData",WIDGET_NAME:"imCartWidget"},payment_type:null,shipping_type:null,email_data:null,product_price_plus_vat:0,total_price:0,setupProductList:function(){_jq(".imProductListText").each(function(){if(_jq(this).hasClass("imTypeImage")){if(/MSIE/.test(navigator.userAgent)){var a=0;_jq(this).parent().find(".imProductListBoxAdd img").each(function(){a+=_jq(this).width()+5});a+=_jq(this).parent().find(".imProductListQuantity").width()+5;_jq(this).parent().find(".imProductListBoxAdd").css({width:a})}var b= _jq(this).parent().find(".imProductListImage img"),d=_jq(this).parent().find(".imProductListImage"),c=_jq(this).parent().innerHeight()-_jq(this).find(".imProductListBuyBox").outerHeight();c',f=x5engine.utils.isOnline()? 0:1;h?_jq("body").append(g+'
'): _jq("body").append(g+'');var i=_jq("#imWebSiteX5Adv");i.css({padding:0,margin:0});if(f){var j=_jq("#imWebSiteX5AdvObj"), k=function(){i.unbind("mouseleave");go=true;setTimeout(function(){i.bind("mouseleave",k);i.width(parseInt(a/4));i.height(parseInt(a/4));j.css("left",parseInt(a/4-a));i.html(i.html());j=_jq("#imWebSiteX5AdvObj")},800)};i.bind("mouseleave",k);i.bind("mouseenter",function(){i.width(a);i.height(a);j.css("left",0)})}i.css({zIndex:x5engine.settings.zIndex.splashBox})},imSetSize:function(a,b,d){b==0?(d&&_jq("#"+a).html(_jq("#"+a).html()),_jq("#"+a).width(parseInt(x5engine.imAdv.width/4)),_jq("#"+a).height(parseInt(x5engine.imAdv.height/ 4)),_jq("#"+a+"Obj").css("left",parseInt(x5engine.imAdv.width/4-x5engine.imAdv.width))):(_jq("#"+a).width(x5engine.imAdv.width),_jq("#"+a).height(x5engine.imAdv.height),_jq("#"+a+"Obj").css("left",0))}},imForm:{constants:{mark:"imFormMark"},initForm:function(a,b,d){b=b||false;d==null&&(d={base:""});_jq(a).find("label").wrapInner("");_jq(a).append('');_jq(a).find("img").each(function(){_jq(this).bind("mouseover",function(){x5engine.imTip.Show(_jq(this), {position:"top"})})});b&&_jq(a).find(":input").each(function(){_jq("#"+_jq(this).attr("id")+"_tip").length>0&&_jq(this).bind("focus click",function(){_jq(this).one("blur",function(){_jq("#"+_jq(this).attr("id")+"_tip").triggerHandler("mouseout")})})});_jq(a).find("[class*=datePicker]").each(function(){_jq(this).attr("class").match(/datePicker\[(.*),([\d]{1})\]/);RegExp.$1!=""&&RegExp.$2!=""&&x5engine.imDatePicker(_jq(this),{format:RegExp.$1.toString(),icon:parseInt(RegExp.$2)==1?true:false})});_jq("[class*=valMaxLength], [class*=valLength]").each(function(){_jq(this).attr("class").match(/Length\[([0-9]+)\]/g); var a=RegExp.$1;_jq(this).keyup(function(){_jq(this).val(_jq(this).val().substring(0,a))})});_jq("[class*=valNumber]").keypress(function(a){a=a.charCode?a.charCode:a.keyCode;return a==8||a==37||a==39||a==46?true:/^[0-9]+$/g.test(_jq(this).val()+String.fromCharCode(a))});_jq("[class*=valDate]").keypress(function(a){a=a.charCode?a.charCode:a.keyCode;return a==8||a==37||a==39||a==46?true:/^[0-9\/\.]+$/g.test(_jq(this).val()+String.fromCharCode(a))});_jq("[class*=valTelephone]").keypress(function(a){a= a.charCode?a.charCode:a.keyCode;return a==8||a==37||a==39||a==46?true:/^[0-9\s\-\(\)]+$/g.test(_jq(this).val()+String.fromCharCode(a))});x5engine.imForm.showFiles(a);x5engine.imForm.setPagination(a,d);x5engine.imForm.lockCopyPaste(a);x5engine.utils.switchFocus(a);x5engine.imForm.showCaptcha(a);x5engine.imForm.setLabels(a,d);/Chrome/.test(navigator.userAgent)||/MSIE 8/.test(navigator.userAgent)||/MSIE 9/.test(navigator.userAgent)||/MSIE 10/.test(navigator.userAgent)?(b={"padding-left":7,"padding-right":7}, _jq(a).find("input[type=button], input[type=submit], input[type=reset]").css(b)):/Firefox/.test(navigator.userAgent)&&(b={"padding-left":4,"padding-right":4,"padding-bottom":_jq(a).find(".imFormButtonWrapper").length>0?4:2},_jq(a).find("input[type=button], input[type=submit], input[type=reset]").css(b));_jq(a).find("input[type=reset]").click(function(){_jq("[tiptarget]").remove();_jq(a).find("."+x5engine.imForm.constants.mark).removeClass(x5engine.imForm.constants.mark);_jq(a).find("."+x5engine.imTip.constants.locked).removeClass(x5engine.imTip.constants.locked); _jq(a).find("[class*=datePicker]").val("").attr("value","");return true})},showFiles:function(a){/Chrome/.test(navigator.userAgent)&&_jq("input[type=file]").css({height:_jq(a).find("input[type=text]").innerHeight(),padding:0})},setLabels:function(a,b){_jq(a).find("input, textarea").not(":submit, :radio, :reset, :hidden, :button").each(function(){if(_jq(this).val()!=""&&_jq(this).prop("readonly")!=true){var d,c,e=_jq(this);b=b||{};e.data("label",_jq(this).val());b.labelColor!=null&&e.css({color:b.labelColor}); e.is("input[type=password]")&&(d=e.attr("id")+"_fake",e.data("password",true),e.after('').fadeOut(0),c=_jq("#"+d),e.attr("value",""),c.focus(function(){c.fadeOut(0);e.fadeIn(0);e.focus()}),_jq(a).find("input[type=reset]").click(function(){e.fadeOut(0);c.fadeIn(0);setTimeout(function(){e.attr("value","")},500)}));e.focus(function(){e.data("password")&& c.fadeOut(0);e.val()==_jq(this).data("label")&&(e.val(""),e.css({color:b.fieldColor}))});e.blur(function(){e.val()==""&&(e.data("password")&&(e.fadeOut(0),c.fadeIn(0)),e.val(e.data("label")),e.css({color:b.labelColor}))})}})},showCaptcha:function(a){var b="",d,c;_jq(a).find("[class*=imCpt]").not("iframe").each(function(){_jq(this).val("");var e="";if(/imCpt\[([0-9]+)\]/.test(_jq(this).attr("class"))){_jq(this).attr("class").match(/imCpt\[([0-9]+)\]/);var h=RegExp.$1||5;h>9&&(h=9)}else _jq(this).attr("class").match(/imCpt\[([0-9]+),\s*([^\]]+)\]/), h=RegExp.$1||5,h>9&&(h=9),e=RegExp.$2||"";_jq(this).attr("class").match(/imCpt\[\]/);for(d=0;d-1);b+=c}_jq("#"+_jq(this).attr("id")+"_imCptHdn").remove();if(x5engine.utils.isOnline())_jq(".imFrame\\["+_jq(this).attr("id")+"\\]").remove(),_jq(this).before('');else{_jq("#"+_jq(this).attr("id")+"_fakediv").remove();h='
';for(d=0;dimg src="'+e+x5engine.settings.imCaptcha.offlineCodes[parseInt(b.charAt(d))].path+ '" />';h+="
";h+='';_jq(this).before(h)}_jq(a).find("input[type=reset]").click(function(){x5engine.imForm.showCaptcha(_jq(a))})})},checkCaptcha:function(a){var b=a.prev("#"+a.attr("id")+"_imCptHdn").val(),d=a.val(),c="",e=false;/imCpt\[([0-9]+),\s*([^\]]+)\]/.test(a.attr("class"))&&(a.attr("class").match(/imCpt\[([0-9]+),\s*([^\]]+)\]/), c=RegExp.$2||"");x5engine.utils.isOnline()?_jq.ajax({url:c+"captcha/imcaptcha.php?action=check&code="+b+"&ans="+d,async:false,cache:false,success:function(a){a!="-1"&&(e=true)}}):d.toLowerCase()==b.toLowerCase()&&(e=true);return e},setPagination:function(a,b){var d=0,b=b||{},c=b.type||"tip";showPage=function(b,c){c=c||400;_jq(a+"_next").attr("disabled",false);_jq(a+"_prev").attr("disabled",false);_jq("."+x5engine.imTip.constants.classId).remove();_jq("."+x5engine.imForm.constants.mark).removeClass(x5engine.imForm.constants.mark); b==1?(_jq(a+"_prev").fadeOut(0),_jq(a+"_next").fadeIn(0),_jq(a+"_submit").fadeOut(0)):_jq(a).find("[pageCount="+(b+1)+"]").length==0?(_jq(a+"_prev").fadeIn(0),_jq(a+"_next").fadeOut(0),_jq(a+"_submit").fadeIn(0)):(_jq(a+"_prev").fadeIn(0),_jq(a+"_next").fadeIn(0));_jq(a).find("fieldset").each(function(){parseInt(_jq(this).attr("pageCount"))==b?_jq(this).children("div").not(".legend").animate({height:"show"},c):_jq(this).children("div").not(".legend").animate({height:"hide"},c)})};showNextPage=function(){var b= parseInt(_jq(a+"_pageCounter").val());x5engine.imForm.validate(_jq("fieldset[pageCount="+b+"]"),{showAll:true,paginate:true,type:c})==true&&(b++,_jq(a).find("[pageCount="+b+"]").length>0?(showPage(b),_jq(a+"_pageCounter").attr("value",b)):_jq(a).submit())};showPrevPage=function(){var b=parseInt(_jq(a+"_pageCounter").val());b--;b>0&&(_jq(a+"_pageCounter").attr("value",b),showPage(b))};_jq(a).find("fieldset").each(function(){_jq(this).hasClass("newPage")?d++:d==0&&d++;_jq(this).attr("pageCount",d)}); if(d>1){_jq(a).append('');_jq(a).children("div:last").append('');_jq(a).children("div:last").append('');var e=_jq(a).find("input[type=submit]").attr("value");_jq(a).find("input[type=submit]").remove(); _jq(a).children("div:last").append('');e=_jq(a).find("input[type=reset]").attr("value");_jq(a).find("input[type=reset]").remove();_jq(a).children("div:last").append('');_jq(a).find(a+"_submit").fadeOut(0);_jq(a+"_prev").click(showPrevPage);_jq(a+"_next").click(showNextPage);showPage(1,1)}else e=_jq(a).find("input[type=submit]").attr("value"),_jq(a).find("input[type=submit]").after(''),_jq(a).find("input[type=submit]").remove();_jq(a+"_reset").click(function(){_jq(a)[0].reset();showPage(1)});_jq(a+"_submit").click(function(){x5engine.imForm.submit(a,b)});_jq(a).submit(function(){x5engine.imForm.submit(a,b);return false})},lockCopyPaste:function(a){_jq(a).find("input[class*=equalTo]").each(function(){for(var a=_jq(this).attr("class").split(" "),d=0;d0&&(g=null)):_jq(a).next("img").is("img")?(h=_jq(a),g=_jq(a).next("img")):_jq(a).nextAll("iframe.imFrame\\["+_jq(a).attr("id")+"\\]").is("iframe")?(h=_jq(a),g=_jq(a).nextAll("iframe.imFrame\\["+_jq(a).attr("id")+"\\]")):g=_jq(a),g!=null&&(g.removeClass(x5engine.imTip.constants.locked),x5engine.imTip.Show(g,{position:"right", text:f,unique:false,classes:b.classes,persistant:true,hideOnFocus:h}))}}d=false};b.type=="tip"&&_jq("."+x5engine.imTip.constants.classId).remove();_jq(a).find("[type=submit]").length>0&&(e=_jq(a).find("[type=submit]").attr("value"),_jq(a).find("input[type=submit]").attr("disabled",true).attr("value",x5engine.l10n.getLocalization("form_validating")));_jq(a).find(g+"_fakebutton2").length>0&&(h=_jq(a).find(id+"_fakebutton2").attr("value"),_jq(a).find(g+"_fakebutton2").attr("disabled",true).attr("value", x5engine.l10n.getLocalization("form_validating")));(function(){_jq(a).find(".mandatory").not(":checkbox").not(":radio").each(function(){(_jq(this).val()==""||_jq(this).data("label")!=void 0&&_jq(this).val()==_jq(this).data("label"))&&f(this,"form_mandatory")});_jq(a).find(".mandatory:checkbox").each(function(){this.checked==false&&f(this,"form_mandatory")});_jq(a).find(".mandatory:radio").each(function(){_jq(".mandatory[name="+_jq(this).attr("name")+"]:checked").length==0&&f(this,"form_mandatory")}); _jq(a).find("[class*=equalTo]").each(function(){if(!(_jq(this).data("label")!=void 0&&_jq(this).val()==_jq(this).data("label")))for(var a=_jq(this).attr("class").split(" "),b=0;bc&&f(this,"form_length")}});_jq(a).find("[class*=valLength]").each(function(){if(!(_jq(this).data("label")!=void 0&&_jq(this).val()==_jq(this).data("label")))for(var a=_jq(this).attr("class").split(" "),b=0;bc.length;e++)switch(c.charAt(e)){case "N":d+="[0-9]{1}";break;case "F":d+="[0-9]{0,1}";break;case "A":d+="[a-zA-Z]{1}";break;case "Z":d+="[a-zA-Z]{0,1}";break;default:d+="[]_\\(){}-.+*?".indexOf(c.charAt(e))!=false?"\\"+c.charAt(e):c.charAt(e)}d="^"+d+"$";c=RegExp(d);_jq(this).val()!= ""&&_jq(this).val()!=""&&c.test(_jq(this).val())==false&&f(this,"form_format")}});_jq(a).find("[class*=valVAT]").each(function(){return true});_jq(a).find("input.valDisclaimer").each(function(){this.checked||f(_jq(this),"form_err_disclaimer")});_jq(a).find("[class*=imCpt]").not("iframe").each(function(){x5engine.imForm.checkCaptcha(_jq(this))||(x5engine.imForm.showCaptcha(a),f(_jq(this),"form_captcha"))});_jq(a).find("input[type=submit]").attr("disabled",false).attr("value",e);_jq(a).find(g+"_fakebutton2").attr("disabled", false).attr("value",h);_jq(a).find("[class*=valQuestion]").each(function(){if(!(_jq(this).data("label")!=void 0&&_jq(this).val()==_jq(this).data("label"))){var b=_jq(this).attr("class"),c=_jq(a).attr("action");b.match(/valQuestion\[([A-Za-z0-9]+)\]/);if(x5engine.utils.isOnline()){if(RegExp.$1!=""){var d=_jq(this);_jq.ajax({type:"POST",url:c,data:{action:"check_answer",id:RegExp.$1,answer:d.val()},async:false,cache:false,success:function(a){a==="0"&&f(_jq(d),"form_question")}})}}else _jq("#"+_jq(this).attr("id")+ "_offlineanswer").val().replace(/\"/g,"'").replace(/\/g,">")!=_jq(this).val().replace(/\"/g,"'").replace(/\/g,">")&&f(_jq(this),"form_question")}})})();return d},submit:function(a,b){x5engine.imForm.validate(a,b)&&(x5engine.utils.isOnline()?(_jq(a).unbind("submit"),_jq(a).submit()):x5engine.utils.showOfflineMessage(b.offlineMessage))}},imAlertBox:function(a){a=a||{};a.link=a.link||x5engine.settings.imAlertBox.link;if(a.cookie==null)a.cookie=x5engine.settings.imAlertBox.cookie; a.position=a.position||x5engine.settings.imAlertBox.position;a.image=a.image||x5engine.settings.imAlertBox.image;a.sound=a.sound||x5engine.settings.imAlertBox.sound;var b='
',d=function(){_jq("#imAlertBox_fake").height(_jq("#imAlertBox").outerHeight())};a.position=a.position|| x5engine.settings.imAlertBox.position;a.sound=a.sound||x5engine.settings.imAlertBox.sound;a.image=a.image||x5engine.settings.imAlertBox.image;if(a.cookie&&_jq.imCookie("im_alert")=="true"&&x5engine.utils.isOnline())return false;if(a.position=="top"){_jq("body").prepend(b);var c=_jq("#imAlertBox");c!=null&&(c.slideUp(0),c.addClass("alertBox"),b=function(){x5engine.utils.imSoundLink.Stop();c.slideUp(500,function(){c.remove()});_jq("#imAlertBox_fake").slideUp(500)},_jq("#imAlertBox img.imAdvTarget").load(function(){_jq("body").prepend('
'); d();_jq("#imAlertBox_fake").slideUp(0);_jq("#imAlertBox_fake").css({position:"relative",right:0,left:0,top:0});_jq(this).unbind("load");_jq("#imAlertBox").css({position:"absolute",right:0,left:0,top:0,zIndex:x5engine.settings.zIndex.splashBox,"border-top-width":0});a.sound!=""&&a.sound!=null&&x5engine.utils.imSoundLink.Play(a.sound);_jq("#imAlertBox_fake").slideDown(500);c.slideDown(500);a.cookie&&_jq.imCookie("im_alert","true",{expires:0,path:"/"})}),_jq("#imAlertBox img.imAdvTarget").mouseenter(function(){_jq("#imAlertBox img.imAdvTarget").attr("src", a.image);_jq("#imAlertBox img.imAdvTarget").mouseleave(function(){_jq("#imAlertBox img.imAdvTarget").attr("src",a.image);_jq("#imAlertBox img.imAdvTarget").unbind("mouseleave")})}),_jq("#imAlertBox img.imAdvTarget").attr("src",a.image),_jq(".closeAlBox").click(b),a.callback!=null&&(_jq("#imAlertBox .boxText").css("cursor","pointer"),_jq("#imAlertBox .boxText").click(a.callback)),_jq(window).unbind("resize",d).resize(d))}else if(_jq("body").append(b),c=_jq("#imAlertBox"),c!=null){c.addClass("alertBox"); c.css({position:"fixed",bottom:-1E3,left:0,right:0,zIndex:x5engine.settings.zIndex.splashBox+1});var b=function(){x5engine.utils.imSoundLink.Stop();c.animate({bottom:-_jq("#imAlertBox img").outerHeight(),height:_jq("#imAlertBox img").outerHeight()},{duration:500,complete:function(){c.remove()}})},e=function(){_jq("#imAlertBox img.imAdvTarget").unbind("load");_jq("#imAlertBox img.imAdvTarget").load(function(){_jq("#imAlertBox .imgContainer").animate({height:_jq("#imAlertBox img.imAdvTarget").outerHeight()}); c.animate({height:_jq("#imAlertBox img.imAdvTarget").outerHeight()});_jq("#imAlertBox img.imAdvTarget").mouseleave(h)});_jq("#imAlertBox img.imAdvTarget").attr("src",a.img_big)},h=function(){_jq("#imAlertBox img.imAdvTarget").unbind("load");_jq("#imAlertBox img.imAdvTarget").attr("src",a.image);_jq("#imAlertBox .imgContainer").animate({height:_jq("#imAlertBox img.imAdvTarget").outerHeight()});c.animate({height:_jq("#imAlertBox img.imAdvTarget").outerHeight()});_jq("#imAlertBox img.imAdvTarget").unbind("mouseleave")}; _jq("#imAlertBox img.imAdvTarget").load(function(){_jq(this).unbind("load");a.sound!=""&&a.sound!=null&&x5engine.utils.imSoundLink.Play(a.sound);c.css({bottom:-_jq("#imAlertBox img").outerHeight(),"border-bottom-width":0});_jq("#imAlertBox .imgContainer").css({height:_jq("#imAlertBox img.imAdvTarget").outerHeight()});c.stop(true,true);c.animate({bottom:0,height:_jq("#imAlertBox img.imAdvTarget").outerHeight()},{duration:500});a.cookie&&_jq.imCookie("im_alert","true",{expires:0})});a.img_big!=""&& _jq("#imAlertBox img.imAdvTarget").mouseenter(e);_jq("#imAlertBox img.imAdvTarget").attr("src",a.image);_jq(".closeAlBox").click(b);a.callback!=null&&(_jq("#imAlertBox .boxText").css("cursor","pointer"),_jq("#imAlertBox .boxText").click(a.callback))}},imShowBox:{_create:function(a,b,d){var c=b||0,e=a.loadingImg||"imLoad.gif",h=a.closeImg||"imClose.png",g=a.effect=="none"?0:350,f=a.opacity,i,j=false,k=null,o=false,m=function(){_jq("#imSB").css("backgroundImage","url('"+e+"')")},p=function(){_jq("#imSB").css("background-image", "url('')")},r=function(b){var c=g,d=a.background||"black";if(d=="none"||d=="transparent")f=0.01,d="#ffffff";_jq("#imSB").width()!=null?_jq("#imSB").before('
 
'):_jq("body").append('
 
');a.effect=="none"&&(c=0);_jq("#imSBBG").fadeOut(0);_jq("#imSBBG").css({backgroundColor:d,position:"fixed",top:0,left:0,zIndex:x5engine.settings.zIndex.showBox,width:_jq(window).width(),height:_jq(window).height()});a.radialBg&&(/Firefox/.test(navigator.userAgent)? _jq("#imSBBG").css({"background-image":"-moz-radial-gradient(center 45deg, ellipse farthest-corner, "+x5engine.utils.hex2rgb(d,80,80,80)+" 0%, "+x5engine.utils.hex2rgb(d,40,40,40)+" 40%, "+x5engine.utils.hex2rgb(d)+" 100%)"}):/Chrome/.test(navigator.userAgent)&&_jq("#imSBBG").css({background:"-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 500, from("+x5engine.utils.hex2rgb(d,80,80,80)+"), to("+x5engine.utils.hex2rgb(d)+"))"}));_jq("#imSBBG").fadeTo(c,f,function(){b!=null&&b();_jq("#imSBBG").click(q); _jq("#imSBBG").mousemove(function(){o=false})})},q=function(){p();/MSIE 7/.test(navigator.userAgent)==false&&(_jq("#imSB").css("box-shadow",""),_jq("#imSB").css("-webkit-box-shadow",""),_jq("#imSB").css("-moz-box-shadow",""));_jq("#imClose").remove();_jq("#imDes").remove();_jq("#imNext").remove();_jq("#imPrev").remove();_jq(document).unbind("keydown",v);a.media[c].type!="img"&&_jq("#imSBmedia").empty();if(a.effect=="fade"||a.effect=="none")_jq("#imSB").fadeOut(g,function(){_jq("#imSBBG").remove(); _jq("#imSB").remove()});else if(a.effect=="move")_jq("#imSB").animate({top:-_jq("#imSB").height()-100},g/2,null,function(){_jq("#imSBBG").remove();_jq("#imSB").remove()});else if(a.effect=="zoom"||a.effect=="hide")if(j)_jq("#imSB").fadeOut(g),_jq("#imSBmedia").fadeOut(g,function(){_jq("#imSBBG").remove();_jq("#imSB").remove()}),_jq(d).css("visibility")!="visible"&&_jq(d).fadeOut(1,function(){_jq(d).css("visibility","visible");_jq(d).fadeIn(g)});else{var b=_jq(d).offset();b.left-=_jq(window).scrollLeft(); b.top-=_jq(window).scrollTop();_jq("#imSBmedia img, #imSBmedia").css("width","100%");if(a.media[c].type=="img"){var e=_jq("#imSBmedia").clone();e.attr("id","imSBmedia2");e.find("img").attr("src",_jq(d).attr("src"));e.css({position:"absolute",top:0,left:0});_jq("#imSBmedia").before(e);e.fadeOut(0);e.fadeIn(g);_jq("#imSBmedia").fadeOut(g)}_jq("#imSB").animate({borderWidth:0,left:b.left,top:b.top,width:_jq(d).width(),margin:0,padding:0,height:_jq(d).height()},g,function(){_jq(d).css("visibility","visible"); _jq("#imSBBG").remove();_jq("#imSB").remove()})}_jq(window).unbind("resize",n);_jq("#imSBBG").fadeOut(g);_jq("body").unbind("keypress",A)},n=function(){i!=null&&clearTimeout(i);i=setTimeout(l,200);_jq("#imSB").width()!==null&&(_jq("#imSBBG").width(_jq(document).width()),_jq("#imSBBG").height(_jq(document).height()))},w=function(b,c,d,e){_jq("#imSBBG").width()!=null?_jq("#imSBBG").after('
'):_jq("body").append('
'); a.effect!="none"&&_jq("#imSB").fadeOut(0);_jq("#imSB").css({top:c,left:b,width:d,height:e,padding:a.innerBorder,zIndex:x5engine.settings.zIndex.showBox+1,backgroundColor:a.boxColor});_jq("#imSB #imDes").css("color",a.textColor);_jq("#imSB").css("-moz-border-radius","10px");_jq("#imSB").css("-webkit-border-radius","10px");_jq("#imSB").css("border-radius","10px");return _jq("#imSB")},B=function(){/MSIE 7/.test(navigator.userAgent)==false&&(_jq("#imSB").css("box-shadow","0px 3px 7px #000"),_jq("#imSB").css("-webkit-box-shadow", "0px 3px 7px #000"),_jq("#imSB").css("-moz-box-shadow","0px 3px 7px #000"))},F=function(){p();_jq("#imSBmedia img").unbind("load");_jq("#imSBmedia").empty().append("File not found").fadeIn()},u=function(){m();_jq("#imSBBG").click(q);o=_jq("#imNext:visible").length>0&&_jq("#imPrev:visible").length>0?true:false;G();_jq("#imDes:visible").length>0&&_jq("#imDes:visible").html()!=""?_jq("#imDes").fadeOut(g):_jq("#imDes").fadeOut(0);_jq("#imSB #imClose").fadeOut(g+1,function(){_jq("#imSB #imClose").remove()}); _jq("#imSBmedia").length==0&&(_jq("#imSB object").remove(),_jq("#imSB").prepend('
'));_jq("#imSBmedia").fadeOut(_jq("#imSBmedia").html()==""?1:g+1,function(){_jq("#imDes").empty();a.media[c].text!=""?(_jq("#imDes").append(a.media[c].text.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")),_jq("#imDes").height("auto")):_jq("#imDes").fadeOut(0);_jq("#imSBmedia").empty();switch(a.media[c].type){case "img":_jq("#imSBmedia").append("");a.effect!="none"&&_jq("#imSBmedia img").fadeOut(0); a.effect!="zoom"&&a.effect!="hide"||j?_jq("#imSBmedia img").load(l):_jq("#imSBmedia img").load(t);_jq("#imSBmedia img").error(F);_jq("#imSBmedia img").attr("src",a.media[c].url);break;case "video":a.effect!="zoom"&&a.effect!="hide"||j?l(function(){_jq("#imSBmedia").append('')}):t(function(){_jq("#imSBmedia").append('')});break;case "swf":a.effect!="zoom"&&a.effect!="hide"||j?l(function(){_jq("#imSBmedia").append('')}):t(function(){_jq("#imSBmedia").append('')}); break;case "iframe":a.effect!="zoom"&&a.effect!="hide"||j?l(function(){_jq("#imSBmedia").append('')}):t(function(){_jq("#imSBmedia").append('')});break;case "code":var b=a.media[c].content,b=b.replace(/&/g, "&"),b=b.replace(/</g,"<"),b=b.replace(/>/g,">"),b=b.replace(/"/g,'"');a.effect!="zoom"&&a.effect!="hide"||j?l(function(){_jq("#imSBmedia").append(b);setTimeout(function(){try{_jq("#imSB").unbind("mousemove",s),_jq("#imSB").mousemove().mouseleave(),_jq("#imSB").mousemove(s)}catch(a){}},1E3)}):t(function(){_jq("#imSBmedia").append(b);setTimeout(function(){try{_jq("#imSB").unbind("mousemove",s),_jq("#imSB").mousemove().mouseleave(),_jq("#imSB").mousemove(s)}catch(a){}},1E3)})}})},x=function(b){var c= a.media[b].width,d,e;_jq("#imDes").width(c);d=a.media[b].height;_jq("#imDes").html()!=""&&(d+=_jq("#imDes").height());a.media[b].type=="img"&&(_jq("#imSBmedia img").fadeIn(0),_jq("#imSBmedia img").width(""),_jq("#imSBmedia img").height(""));_jq("#imSBmedia").width("");_jq("#imSBmedia").height("");c+2*a.border+2*a.innerBorder>_jq(window).width()-50&&(d=d*(_jq(window).width()-50-2*a.border-2*a.innerBorder)/c,c=_jq(window).width()-50-2*a.border-2*a.innerBorder,_jq("#imDes").width(c),_jq("#imDes").html()!= ""&&(d+=_jq("#imDes").height()));if(d+2*a.border+2*a.innerBorder>_jq(window).height()-50){var f=_jq("#imDes").outerHeight(),c=c*(_jq(window).height()-50-2*a.border-2*a.innerBorder)/d;e=d=_jq(window).height()-50-2*a.border-2*a.innerBorder;_jq("#imDes").html()!=""&&(e-=_jq("#imDes").height());_jq("#imDes").width(Math.round(a.media[b].width*e/a.media[b].height));_jq("#imDes").height()<=f&&(c=Math.round(a.media[b].width*e/a.media[b].height));_jq("#imDes").width("")}return[c,d,null]},l=function(b){_jq("#imSBmedia img").length> 0&&_jq("#imSBmedia img").unbind("load");_jq("#imSB").css({padding:a.innerBorder});_jq("#imDes").fadeOut(_jq("#imSBmedia").html()==""?1:g+1);_jq("#imSBmedia").fadeOut(_jq("#imSBmedia").html()==""?1:g+1,function(){var d=x(c),e=g;_jq("#imSBmedia img").width("100%");_jq("#imSB").width()==d[0]&&_jq("#imSB").height()==d[1]&&(e=1);_jq("#imSB").width()>d[0]&&(o=false);_jq("#imSB").animate({left:Math.round((_jq(window).width()-d[0]-2*a.innerBorder-2*a.border)/2),width:d[0]},e,function(){_jq("#imSB").animate({top:Math.round((_jq(window).height()- d[1]-2*a.innerBorder-2*a.border)/2),height:d[1]},e,function(){p();_jq("#imSBmedia").fadeIn(g+1,function(){o&&s()});_jq("#imDes").html()!=""&&_jq("#imDes").fadeIn(g);C();a.media.length>1&&D();a.shadow&&B();_jq(window).unbind("resize",n).resize(n);_jq(document).unbind("keydown",v).keydown(v);b!=null&&_jq.isFunction(b)&&b()})})})},t=function(b){_jq("#imSBmedia img").unbind("load");var e=x(c);p();_jq("#imSBmedia").css({width:"100%",textAlign:"center"});_jq("#imSBmedia img").css({width:"100%"});_jq("#imSB").fadeIn(0); _jq("#imSBmedia").fadeOut(1);a.effect=="hide"&&_jq(d).css("visibility","hidden");_jq("#imSB").css("background-color",a.boxColor);r();var f=_jq("#imSBmedia").clone(false);f.attr("id","fakeSBImg");f.find("img").attr("src",_jq(d).attr("src"));f.css({position:"absolute",top:0,left:0});_jq("#imSB").prepend(f);f.fadeIn(0);f.fadeOut(g,function(){f.remove()});_jq("#imSBmedia").fadeIn(g);_jq("#imSB").animate({left:Math.round((_jq(window).width()-e[0]-2*a.innerBorder-2*a.border)/2),width:e[0],padding:a.innerBorder, top:Math.round((_jq(window).height()-e[1]-2*a.innerBorder-2*a.border)/2),height:e[1],borderWidth:a.border},g,function(){_jq("#imDes").html()!=""&&_jq("#imDes").fadeIn(g);_jq("#imSB").css("border-width",a.border);C();o&&s();a.media.length>1&&D();a.shadow&&B();_jq(window).unbind("resize",n).resize(n);b!=null&&_jq.isFunction(b)&&b()})},C=function(){_jq("#imSB").append('
');_jq("#imSB #imClose img").click(q)},D=function(){_jq("#imPrev").remove();_jq("#imNext").remove(); _jq("#imSB").append('
<
>
');_jq("#imPrev").fadeOut(0);_jq("#imNext").fadeOut(0);_jq("#imPrev").click(y);_jq("#imNext").click(z);_jq("#imSB").unbind("mouseleave");_jq("#imSB").unbind("mousemove");_jq("#imSB").mouseleave(function(){k!=null&&clearTimeout(k);k=setTimeout(function(){_jq("#imNext").stop(true,true);_jq("#imPrev").stop(true,true);_jq("#imNext").fadeOut(g);_jq("#imPrev").fadeOut(g)},g/2)});_jq("#imSB").mousemove(s)},G=function(){_jq("#imPrev").fadeOut(g, function(){_jq("#imPrev").remove()});_jq("#imNext").fadeOut(g,function(){_jq("#imNext").remove()})},E=function(){_jq("#imNext").css({"-moz-border-top-left-radius":0,"-moz-border-top-right-radius":10,"-moz-border-bottom-right-radius":10,"-moz-border-bottom-left-radius":0,"-webkit-border-top-left-radius":0,"-webkit-border-top-right-radius":10,"-webkit-border-bottom-right-radius":10,"-webkit-border-bottom-left-radius":0,"border-top-left-radius":0,"border-top-right-radius":10,"border-bottom-right-radius":10, "border-bottom-left-radius":0});_jq("#imPrev").css({"-moz-border-top-left-radius":10,"-moz-border-top-right-radius":0,"-moz-border-bottom-right-radius":0,"-moz-border-bottom-left-radius":10,"-webkit-border-top-left-radius":10,"-webkit-border-top-right-radius":0,"-webkit-border-bottom-right-radius":0,"-webkit-border-bottom-left-radius":10,"border-top-left-radius":10,"border-top-right-radius":0,"border-bottom-right-radius":0,"border-bottom-left-radius":10})},v=function(a){if(!_jq("#imSB").is(":animated"))switch(a.keyCode){case 32:case 39:z(); break;case 37:y()}switch(a.keyCode){case 27:q()}},s=function(){k!=null&&clearTimeout(k);var b=_jq("#imSB").outerHeight()/2-_jq("#imPrev").outerHeight()/2,d;_jq("#imSB").width()-a.innerBorder*2>_jq("#imPrev").width()*2?(d=a.innerBorder,_jq("#imPrev").css({"-moz-border-top-left-radius":0,"-moz-border-top-right-radius":10,"-moz-border-bottom-right-radius":10,"-moz-border-bottom-left-radius":0,"-webkit-border-top-left-radius":0,"-webkit-border-top-right-radius":10,"-webkit-border-bottom-right-radius":10, "-webkit-border-bottom-left-radius":0,"border-top-left-radius":0,"border-top-right-radius":10,"border-bottom-right-radius":10,"border-bottom-left-radius":0}),_jq("#imNext").css({"-moz-border-top-left-radius":10,"-moz-border-top-right-radius":0,"-moz-border-bottom-right-radius":0,"-moz-border-bottom-left-radius":10,"-webkit-border-top-left-radius":10,"-webkit-border-top-right-radius":0,"-webkit-border-bottom-right-radius":0,"-webkit-border-bottom-left-radius":10,"border-top-left-radius":10,"border-top-right-radius":0, "border-bottom-right-radius":0,"border-bottom-left-radius":10})):(d=-_jq("#imPrev").width(),E());a.media[c].type!="iframe"&&a.media[c].type!="img"&&(d=-_jq("#imPrev").width(),E());_jq("#imPrev").css({top:b,left:d});_jq("#imNext").css({top:b,right:d});_jq("#imPrev").fadeIn(g);_jq("#imNext").fadeIn(g)},z=function(){j=true;c++;c>=a.media.length&&(c=0);u(c)},y=function(){j=true;c--;c<0&&(c=a.media.length-1);u(c)},A=function(a){switch(a.keyCode){case 37:case 40:a.preventDefault();y();break;case 39:case 38:a.preventDefault(); z();break;case 27:a.preventDefault(),q()}};this.showBox=function(){var b;r(function(){a.effect=="none"||a.effect=="fade"?(b=w(Math.round(_jq(window).width()/2-50),Math.round(_jq(window).height()/2-50),100,100),m(),b.fadeIn(g,function(){u(c)})):a.effect=="move"&&(b=w(Math.round(_jq(window).width()/2-50),-100,100,100),b.fadeIn(0),b.animate({top:Math.round(_jq(window).height()/2-50)},g/2,function(){u(c);m()}))})};this.zoomBox=function(){x(c);var b;_jq(d).find("img").is("img")&&(d=_jq(d).find("img")); try{b=_jq(d).offset(),b.left-=_jq(window).scrollLeft(),b.top-=_jq(window).scrollTop(),box=w(b.left,b.top,_jq(d).width(),_jq(d).height()),box.css("padding","0px"),box.css("border-width","0px"),box.css("background-color","transparent"),m(),box.fadeIn(),u(c),_jq("body").keypress(A)}catch(e){a.effect="fade",this.showBox()}}},Show:function(a,b,d){a.effect=a.effect||x5engine.settings.imShowBox.effect;a.shadow=a.shadow||x5engine.settings.imShowBox.shadow;a.background=a.background||x5engine.settings.imShowBox.background; a.border=a.border||x5engine.settings.imShowBox.borderRadius;a.textColor=a.textColor||x5engine.settings.imShowBox.textColor;a.boxColor=a.boxColor||x5engine.settings.imShowBox.boxColor;a.opacity=a.opacity||x5engine.settings.imShowBox.opacity;a.closeImg=a.closeImg||x5engine.settings.imShowBox.closeImg;a.loadingImg=a.loadingImg||x5engine.settings.imShowBox.loadingImg;a.innerBorder=a.innerBorder||x5engine.settings.imShowBox.innerBorder;a.radialBg=a.radialBg||x5engine.settings.imShowBox.radialBg;for(var c= [],e=0;eb.length;)a.indexOf(b.charAt(e))!=-1&&(d=true),e++;if(!d||b.length==0)return[a];d=a.split(b.charAt(0));for(e=0;ee.length;i++)switch(e[i]){case "[M]":for(var k=x5engine.l10n.getLocalization("date_months"),j=0;jk.length;j++)k[j].toLowerCase()==c[i].toLowerCase()&&(d=j+1);break;case "[D]":k=x5engine.l10n.getLocalization("date_days"); for(j=0;jk.length;j++)k[j].toLowerCase()==c[i].toLowerCase()&&(g=j+1);break;case "[yy]":h="20"+c[i];break;case "[yyyy]":h=c[i];break;case "[mm]":d=c[i];break;case "[dd]":g=c[i]}return new Date(h,d-1,g)}return false},j=function(){var a="",c;a+="";for(var e=0;e6&&(c-=7),a+='";a+="";c= new Date(b.date.getYear(),b.date.getMonth(),b.date.getDate());c.setFullYear(b.date.getFullYear());c.setDate(1);var f=parseInt(c.getDay(),10);f-=b.start;f<=0&&(f+=7);for(var g=parseInt(c.getMonth(),10),i=0;c.getMonth()==g;){a+="";for(e=1;e<=7;e++){var k="day";if(e+7*i>=f&&c.getMonth()==g){var j=e-f+1+7*i;j==d.getDate()&&c.getMonth()==d.getMonth()&&(k+=" selDay");a+='";c.setDate(c.getDate()+1)}else a+=""}a+="";i++}a+="
'+h[c]+"
'+j+"
";return a},k=function(f,i){i== null||i==false?(b.date.setDate(_jq(this).html()),d.setFullYear(b.date.getFullYear()),d.setMonth(b.date.getMonth()),d.setDate(_jq(this).html())):(b.date.setFullYear(i.getFullYear()),b.date.setMonth(i.getMonth()),b.date.setDate(i.getDate()),d.setFullYear(i.getFullYear()),d.setMonth(i.getMonth()),d.setDate(i.getDate()));var k=b.date.getFullYear().toString(),j=x5engine.utils.imFormatInt(parseInt(b.date.getDate(),10)),o=x5engine.utils.imFormatInt(parseInt(b.date.getMonth(),10)+1),l=b.format.replace(/\[yyyy\]/g, k),l=l.replace(/\[yy\]/g,k.substring(2)),l=l.replace(/\[mm\]/g,o),l=l.replace(/\[dd\]/g,j),l=l.replace(/\[D\]/g,parseInt(d.getDay(),10)-1>=0?h[parseInt(d.getDay(),10)-1]:h[6]),l=l.replace(/\[DD\]/g,parseInt(d.getDay(),10)-1>=0?g[parseInt(d.getDay(),10)-1]:g[6]),l=l.replace(/\[M\]/g,c[parseInt(d.getMonth(),10)]),l=l.replace(/\[MM\]/g,e[parseInt(d.getMonth(),10)]);_jq(a).attr("value",l);q()},o=function(){b.date.setMonth(b.date.getMonth()+1);_jq("#imDPcal").empty().append(j());_jq("#imDPMonth").empty().append(e[parseInt(b.date.getMonth(), 10)]+" "+b.date.getFullYear().toString());_jq(".day").click(k)},m=function(){b.date.setMonth(b.date.getMonth()-1);_jq("#imDPcal").empty().append(j());_jq("#imDPMonth").empty().append(e[parseInt(b.date.getMonth(),10)]+" "+b.date.getFullYear().toString());_jq(".day").click(k)},p=function(a,c){var f=i();f!=null&&f!=false&&(b.date.setFullYear(f.getFullYear()),b.date.setMonth(f.getMonth()),b.date.setDate(f.getDate()),d.setFullYear(f.getFullYear()),d.setMonth(f.getMonth()),d.setDate(f.getDate()));f='
'; f+='
< >
';f+='
'+j()+"
";f+="
";_jq("body").append('
');_jq("#imDPBG").css({position:"fixed",width:_jq(window).width(),height:_jq(window).height(),top:0,left:0,zIndex:x5engine.settings.zIndex.datePicker+1});_jq("#imDPBG").click(q);_jq("body").append(f);b.shadow==true&&(_jq("#imDatePicker").css("box-shadow","0px 0px 3px #000"),_jq("#imDatePicker").css("-webkit-box-shadow", "0px 0px 3px #000"),_jq("#imDatePicker").css("-moz-box-shadow","0px 0px 3px #000"));_jq("#imDPMonth").append(e[parseInt(d.getMonth(),10)]+" "+d.getFullYear().toString());_jq("#imDPleft").click(m);_jq("#imDPright").click(o);_jq(".day").click(k);a+_jq("#imDatePicker").width()>_jq(window).width()+_jq(window).scrollLeft()&&(a=_jq(window).width()-_jq("#imDatePicker").outerWidth()-5+_jq(window).scrollLeft());c+_jq("#imDatePicker").height()>_jq(window).height()+_jq(window).scrollTop()&&(c=_jq(window).height()- _jq("#imDatePicker").outerHeight()-5+_jq(window).scrollTop());_jq("#imDatePicker").fadeOut(0);_jq("#imDatePicker").css({top:c,left:a});/IE 7/.test(navigator.userAgent)||(_jq("#imDatePicker").css("-moz-border-radius","5px"),_jq("#imDatePicker").css("-webkit-border-radius","5px"),_jq("#imDatePicker").css("border-radius","5px"),_jq("#imDatePicker #imDPHead").css("-moz-border-radius","5px"),_jq("#imDatePicker #imDPHead").css("-webkit-border-radius","5px"),_jq("#imDatePicker #imDPHead").css("border-radius", "5px"),_jq("#imDatePicker #imDPHead").css("background","-webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(255,255,255)), color-stop(1, rgb(193,203,213)))"),_jq("#imDatePicker #imDPHead").css("background","-moz-linear-gradient( center bottom, rgb(255,255,255) 0%, rgb(193,203,213) 100%"),_jq("#imDatePicker .day").css("background","-webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(245,245,245)), color-stop(1, rgb(255,255,255)))"),_jq("#imDatePicker .day").css("background", "-moz-linear-gradient( center bottom, rgb(245,245,245) 0%, rgb(255,255,255) 100%)"),_jq("#imDatePicker .selDay").css("background","-webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(255,240,128)), color-stop(1, rgb(255,255,255)))"),_jq("#imDatePicker .selDay").css("background","-moz-linear-gradient( center bottom, rgb(255,240,128) 0%, rgb(255,255,255) 100% )"));_jq("#imDatePicker").css({zIndex:x5engine.settings.zIndex.datePicker+2}).fadeIn(200)},r=function(a){_jq("#imDatePicker").length> 0?_jq("#imDatePicker").fadeOut(200,function(){_jq("#imDatePicker").remove();p(a.pageX,a.pageY)}):p(a.pageX,a.pageY)},q=function(){_jq("#imDPBG").remove();_jq("#imDatePicker").fadeOut(200,function(){_jq("#imDatePicker").remove()})},b=b||{};if(b.icon==null)b.icon=true;b.start=b.start||0;if(b.shadow==null)b.shadow=true;b.start<0&&(b.start+=7);b.format=b.format||x5engine.l10n.getLocalization("date_format");b.date=b.date==null||b.date==""||b.date=="undefined"?new Date:new Date(b.date.substring(6),parseInt(b.date.substring(3, 5),10)-1,b.date.substring(0,2));d=new Date(b.date.getFullYear(),b.date.getMonth(),b.date.getDate());if(b.icon){var n=document.createElement("span"),n=_jq(n);_jq(a).after(n);n.empty().append('');n.find("img").css({marginTop:Math.floor(n.prev("input").outerHeight()-15)/2+1});n.click(r)}else _jq(a).click(r);_jq(a).bind("change",function(){var a=i();a!=false&&k(null,a)})},imDate:function(a,b,d){var b=b||x5engine.l10n.getLocalization("date_days"), d=d||x5engine.l10n.getLocalization("date_months"),c=x5engine.l10n.getLocalization("date_full_months"),e=x5engine.l10n.getLocalization("date_full_days"),h=x5engine.l10n.getLocalization("date_format"),g=new Date,f=g.getFullYear().toString(),i=x5engine.utils.imFormatInt(parseInt(g.getDate(),10)),j=x5engine.utils.imFormatInt(parseInt(g.getMonth(),10)+1),k="";try{k=h.replace(/\[yyyy\]/g,f),k=k.replace(/\[yy\]/g,f.substring(2)),k=k.replace(/\[aaaa\]/g,f),k=k.replace(/\[aa\]/g,f.substring(2)),k=k.replace(/\[mm\]/g, j),k=k.replace(/\[dd\]/g,i),k=k.replace(/\[D\]/g,parseInt(g.getDay(),10)-1>=0?b[parseInt(g.getDay(),10)-1]:b[6]),k=k.replace(/\[DD\]/g,parseInt(g.getDay(),10)-1>=0?e[parseInt(g.getDay(),10)-1]:e[6]),k=k.replace(/\[M\]/g,d[parseInt(g.getMonth(),10)]),k=k.replace(/\[MM\]/g,c[parseInt(g.getMonth(),10)])}catch(o){}_jq(a).empty().append(k);setTimeout("x5engine.imDate('"+a+"')",6E4)},imHour:function(a){var b=new Date;_jq(a).empty().append(x5engine.utils.imFormatInt(b.getHours())+":"+x5engine.utils.imFormatInt(b.getMinutes())+ ":"+x5engine.utils.imFormatInt(b.getSeconds())+" ");setTimeout("x5engine.imHour('"+a+"')",1E3)},imKeys:{Replace:function(a,b){for(var d=_jq(a).find(),c=0;cb.length;c++)_jq.isFunction(b[c].r)?_jq(a).html(_jq(a).html().replace(b[c].f,b[c].r())):_jq(a).html(_jq(a).html().replace(b[c].f,b[c].r))},Set:function(a){x5engine.imKeys.Replace(_jq("body"),a);x5engine.imDate(".imDate",x5engine.l10n.getLocalization("date_days"),x5engine.l10n.getLocalization("date_months")); x5engine.imHour(".imHour")}},imRollover:function(a){a.movement=a.movement||"ALTERNATE";a.direction=a.direction||"UP";a.effect=a.effect||"LINEAR";var b,d=null,c=a.time,e=null,h=0;switch(a.effect){case "SWING":b="swing";break;case "BOUNCE":b="imBounce";break;default:b="linear"}var g=_jq("#"+a.id),f,i=function(j){j==null&&(j=true);j&&(h=0);e!=null&&clearInterval(e);e=setInterval(function(){h+=10},10);a.time=c-h/1E3;if(a.time<=0)a.time=c;switch(a.movement){case "PAGINATE":switch(a.direction){case "UP":j= f.css("top").replace("px","");j=isNaN(parseInt(j))?0:parseInt(j);j>a.height-f.height()?f.animate({top:j-a.height},{duration:"medium",complete:function(){d=setTimeout(function(){i()},a.time*1E3)},easing:b}):f.animate({top:0},{duration:"medium",complete:function(){d=setTimeout(function(){i()},a.time*1E3)},easing:b});break;case "BOTTOM":j=f.css("top").replace("px","");j=isNaN(parseInt(j))?0:parseInt(j);j<=0?f.animate({top:j+a.height},{duration:"medium",complete:function(){d=setTimeout(function(){i()}, a.time*1E3)},easing:b}):f.animate({top:a.height-f.height()},{duration:"medium",complete:function(){d=setTimeout(function(){i()},a.time*1E3)},easing:b});break;case "LEFT":j=f.css("left").replace("px","");j=isNaN(parseInt(j))?0:parseInt(j);j>-f.width()+g.width()?f.animate({left:j-g.width()},{duration:"medium",complete:function(){d=setTimeout(function(){i()},a.time*1E3)},easing:b}):f.animate({left:0},{duration:"medium",complete:function(){d=setTimeout(function(){i()},a.time*1E3)},easing:b});break;case "RIGHT":j= f.css("left").replace("px",""),j=isNaN(parseInt(j))?0:parseInt(j),j<0?f.animate({left:j+g.width()},{duration:"medium",complete:function(){setTimeout(function(){i()},a.time*1E3)},easing:b}):f.animate({left:-f.width()+g.width()},{duration:"medium",complete:function(){setTimeout(function(){i()},a.time*1E3)},easing:b})}break;case "CONTINUE":switch(a.direction){case "UP":f.animate({top:-f.height()},{duration:a.time*1E3,complete:function(){f.css({top:a.height});i()},easing:b});break;case "BOTTOM":f.animate({top:a.height}, {duration:a.time*1E3,complete:function(){f.css({top:-f.height()});i()},easing:b});break;case "LEFT":f.animate({left:-f.width()},{duration:a.time*1E3,complete:function(){f.css({left:g.width()});i()},easing:b});break;case "RIGHT":f.animate({left:g.width()},{duration:a.time*1E3,complete:function(){f.css({left:-f.width()});i()},easing:b})}break;case "SINGLE":switch(a.direction){case "UP":f.animate({top:0},{duration:a.time*1E3,easing:b});break;case "BOTTOM":f.animate({top:-f.height()+a.height},{duration:a.time* 1E3,easing:b});break;case "RIGHT":f.animate({left:-k+g.width()},{duration:a.time*1E3,easing:b});break;case "LEFT":f.animate({left:0},{duration:a.time*1E3,easing:b})}break;default:switch(a.direction){case "UP":f.animate({top:0},{duration:a.time*1E3,complete:function(){a.direction="BOTTOM";i()},easing:b});break;case "BOTTOM":f.animate({top:-f.height()+a.height},{duration:a.time*1E3,complete:function(){a.direction="UP";i()},easing:b});break;case "LEFT":f.animate({left:-k+g.width()},{duration:a.time* 1E3,complete:function(){a.direction="RIGHT";i()},easing:b});break;case "RIGHT":f.animate({left:0},{duration:a.time*1E3,complete:function(){a.direction="LEFT";i()},easing:b})}}},j=function(b){_jq("#"+a.id).append('
'+b+"
");var b=_jq("#widthTest"),c=_jq("#widthTestSpan");b.css({width:"50000000px",position:"absolute"});c.css({width:"auto",position:"absolute",display:"inline"});c=c.outerWidth()+30;b.remove();return c};g.wrapInner('
');f=_jq("#"+a.id+"_runner");g.css({position:"relative",overflow:"hidden"});f.css({position:"absolute"});a.mouselock&&a.movement!="PAGINATE"?(g.mouseenter(function(){e!=null&&clearInterval(e);f.stop()}),g.mouseleave(function(){i(false)})):a.mouselock&&a.movement=="PAGINATE"&&(g.mouseover(function(){d!=null&&clearTimeout(d)}),g.mouseleave(function(){d=setTimeout(function(){i(false)},a.time*1E3)}));switch(a.movement){case "CONTINUE":switch(a.direction){case "UP":f.css({top:a.height,width:"100%"}); break;case "BOTTOM":f.css({top:-f.height(),width:"100%"});break;case "LEFT":f.css({left:g.width()});var k=j(f.html());f.css({width:k});break;case "RIGHT":k=j(f.html()),f.css({left:-f.width(),width:k})}break;case "PAGINATE":switch(a.direction){case "BOTTOM":f.css({top:-f.height()+a.height,width:"100%"});break;case "UP":f.css({top:0,width:"100%"});break;case "RIGHT":k=j(f.html());f.css({left:-k+g.width(),width:k});break;case "LEFT":k=j(f.html()),f.css({left:0,width:k})}break;default:switch(a.direction){case "UP":f.css({left:0, top:-f.height()+a.height,width:"100%"});break;case "BOTTOM":f.css({left:0,top:0,width:"100%"});break;case "LEFT":k=j(f.html());f.css({left:-k+g.width(),width:k});break;case "RIGHT":k=j(f.html()),f.css({left:0,width:k})}}a.movement!="PAGINATE"?i():d=setTimeout(function(){i()},a.time*1E3)},imSplashBox:function(a){a.effect=a.effect||x5engine.settings.imSplashBox.effect;a.position=a.position||x5engine.settings.imSplashBox.position;if(a.shadow==null)a.shadow=x5engine.settings.imSplashBox.shadow;a.margin= a.margin||x5engine.settings.imSplashBox.margin;a.width=a.width||x5engine.settings.imSplashBox.width;a.height=a.height||x5engine.settings.imSplashBox.height;a.cookie=a.cookie||x5engine.settings.imSplashBox.cookie;a.link=a.link||x5engine.settings.imSplashBox.link;a.image=a.image||x5engine.settings.imSplashBox.image;a.sound=a.sound||x5engine.settings.imSplashBox.sound;if(a.cookie&&_jq.imCookie("im_splash")=="true"&&x5engine.utils.isOnline())return false;var b,d=function(){switch(a.position){case "center":b= {left:(_jq(window).width()-cWidth)/2,top:(_jq(window).height()-cHeight)/2};break;case "bottom-right":b={left:_jq(window).width()-cWidth-a.margin,top:_jq(window).height()-cHeight-a.margin};break;case "bottom-left":b={left:a.margin,top:_jq(window).height()-cHeight-a.margin};break;case "top-right":b={left:_jq(window).width()-cWidth-a.margin,top:a.margin};break;case "top-left":b={left:a.margin,top:a.margin}}e.css(b)},c=function(){e.fadeOut(200,function(){e.remove();x5engine.utils.imSoundLink.Stop()})}; _jq("body").append('
');a.sound!=""&&a.sound!=null&&x5engine.utils.imSoundLink.Play(a.sound);var e=_jq("#imSplashBox");e.fadeOut(0);e.css({zIndex:x5engine.settings.zIndex.splashBox});a.shadow&&(e.css("box-shadow","0px 3px 7px #000"),e.css("-webkit-box-shadow","0px 3px 7px #000"),e.css("-moz-box-shadow","0px 3px 7px #000")); _jq("#splashContent img").first().load(function(){setTimeout(function(){_jq(this).unbind("load");e.fadeIn(0);cWidth=_jq("#imSplashBox").outerWidth();cHeight=_jq("#imSplashBox").outerHeight();e.fadeOut(0);d();_jq(window).resize(d);_jq("#imClose img").click(c);_jq("#splashContent img").click(function(){location.href=a.link});a.cookie&&_jq.imCookie("im_splash","true",{expires:0});switch(a.effect){case "fromtop":e.css({top:-_jq(window).height()-cHeight});e.fadeIn(0);e.animate(b,500);break;case "frombottom":e.css({top:_jq(window).height()+ cHeight});e.fadeIn(0);e.animate(b,500);break;case "fromleft":e.css({left:-cWidth});e.fadeIn(0);e.animate(b,500);break;case "fromright":e.css({left:cWidth+_jq(window).width()});e.fadeIn(0);e.animate(b,500);break;case "fade":e.fadeIn(500);break;default:e.fadeIn(0)}},500)});_jq("#splashContent img").attr("src",a.image)},imSlider:{Horizontal:function(a){var b=_jq(a+" .imGlContent"),d=_jq(a+" .imRunner");_jq(a);var c=0;_jq(a+" .imLeftArrow").not(".hiddenArrow").click(function(){c+b.innerWidth()>=20?c= d.innerWidth()%b.innerWidth()==0?-d.innerWidth()+b.innerWidth():-d.innerWidth()+d.innerWidth()%b.innerWidth():c+=b.innerWidth();d.animate({left:c})});_jq(a+" .imRightArrow").not(".hiddenArrow").click(function(){-c=10?c=d.innerHeight()%b.innerHeight()==0?-d.innerHeight()+ b.innerHeight():-d.innerHeight()+d.innerHeight()%b.innerHeight():c+=b.innerHeight();d.animate({top:c})});_jq(a+" .imBottomArrow").click(function(){-cdiv class="imSControls">

<

>

');var h=_jq(a+" .imSControls");h.css({"-moz-border-top-left-radius":10,"-moz-border-top-right-radius":10, "-moz-border-bottom-right-radius":0,"-moz-border-bottom-left-radius":0,"-webkit-border-top-left-radius":10,"-webkit-border-top-right-radius":10,"-webkit-border-bottom-right-radius":0,"-webkit-border-bottom-left-radius":0,"border-top-left-radius":10,"border-top-right-radius":10,"border-bottom-right-radius":0,"border-bottom-left-radius":0,color:"black"});h.fadeTo(0,0.9);_jq(a+" .imPPrev").click(function(){e+d.width()>0?e=-c.width()+d.width():e+=d.width();c.animate({left:e})});_jq(a+" .imPNext").click(function(){e- d.width()<-c.width()+d.width()?e=0:e-=d.width();c.animate({left:e})});b.mouseleave(function(){h.stop(true,true);h.animate({bottom:-h.height()-50})});b.mouseover(function(){h.stop(true,true);h.animate({bottom:0})})}},imTip:{constants:{locked:"imFixedTip",classId:"imTip",arrowClassId:"imTipArrow",borderClassId:"imTipArrowBorder"},Show:function(a,b){var d=null,c=false,e=null,h=200,g="top",f=false,i=x5engine.utils.createId(x5engine.imTip.constants.classId),j="",k="",a=_jq(a);a.find("img").length>0&&a.find("img").outerHeight()> a.outerHeight()&&(a=a.find("img"));(_jq(a).attr("id")==""||_jq(a).attr("id")==null)&&_jq(a).attr("id",x5engine.utils.createId(x5engine.imTip.constants.classId+"_target"));b.borderRadius=b.borderRadius||x5engine.settings.imTip.borderRadius;b.classes=b.classes||x5engine.settings.imTip.classes;if(b.shadow==null)b.shadow=x5engine.settings.imTip.shadow;if(b.arrow==null)b.arrow=x5engine.settings.imTip.arrow;b.position=b.position||x5engine.settings.imTip.position;b.effect=b.effect||x5engine.settings.imTip.effect; b.showTail=b.showTail||x5engine.settings.imTip.showTail;if(b.hideOnFocus==null)b.hideOnFocus=false;if(b.persistant==null)b.persistant=x5engine.settings.imTip.persistant;if(b.unique==null)b.unique=x5engine.settings.imTip.unique;if(b.text==""||b.text==null){if(b.text=a.attr("title"),b.text==null&&(a=a.find("[title]")),a!=null)b.text=a.attr("title")}else a.find("[title]").length>0&&(a=a.find("[title]"));k=a.attr("alt");j=a.attr("title");a.attr("title","").attr("alt","");b.text=b.text.replace(/&/g, "&");b.text=b.text.replace(/</g,"<");b.text=b.text.replace(/>/g,">");b.text=b.text.replace(/"/g,'"');var o=function(){if(!f){var g=_jq("[tiptarget="+_jq(a).attr("id")+"]");if(g.length==0)if(g='
'+b.text+(b.showTail?'
':"")+"
", _jq("#imPage").append(g),e=_jq("#"+i),f=true,b.width!=null&&b.width!=void 0&&e.width(b.width),e.find("object").each(function(){e.css({height:Math.max(_jq(this).height(),40)})}),e.fadeOut(0),e.css({zIndex:x5engine.settings.zIndex.tip}),b.arrow||(e.find("."+x5engine.imTip.constants.arrowClassId).fadeOut(),e.find("."+x5engine.imTip.constants.borderClassId).fadeOut()),b.borderRadius!=0&&(e.css("-webkit-border-radius",b.borderRadius),e.css("-moz-border-radius",b.borderRadius),e.css("border-radius",b.borderRadius)), b.shadow&&(e.css("box-shadow","0px 0px 5px #888"),e.css("-webkit-box-shadow","0px 0px 5px #888"),e.css("-moz-box-shadow","0px 0px 5px #888")),_jq(a).mouseleave(q),e.mouseleave(q),e.mouseenter(r),_jq(a).mouseenter(r),clearTimeout(d),c=false,e.find("img").length>0){var j=e.find("img"),g=j.attr("src");j.attr("src","null");j.load(function(){j.unbind("load");var a=m(b.position,e);p(a,e)});j.attr("src",g)}else g=m(b.position,e),p(g,e);else g!=null&&g.html().indexOf(b.text)==-1&&g.find("."+x5engine.imTip.constants.borderClassId).before("
"+ b.text)}},m=function(c,d,e){var f,j,h=_jq(a).offset(),i=_jq("#imPage").offset(),e=e||0;h.top-=_jq(a).scrollTop()+i.top;h.left-=_jq(a).scrollLeft()+i.left;var i=null,k=10;b.showTail&&(i=d.find("."+x5engine.imTip.constants.arrowClassId).css("border-bottom-width"),i=parseInt(i.substring(0,i.length-2)),k=d.find("."+x5engine.imTip.constants.borderClassId).css("border-bottom-width"),parseInt(k.substring(0,k.length-2)));k=d.css("background-color");if(e>3)return c=(d.width()-i/3)/2,d.find("."+x5engine.imTip.constants.arrowClassId).css({borderLeftColor:"transparent", borderRightColor:"transparent",borderBottomColor:"transparent",borderTopColor:k,position:"absolute",left:c,bottom:-2*i+1}),d.find("."+x5engine.imTip.constants.borderClassId).css({borderLeftColor:"transparent",borderRightColor:"transparent",borderBottomColor:"transparent",position:"absolute",left:c,bottom:-2*i}),d.css("position","fixed"),[_jq(window).width()/2,_jq(window).height()/2];if(c=="top"){g="top";if(h.top-d.outerHeight()-2*i-10-_jq(window).scrollTop()<0)return m("bottom",d,e+1);j=h.left+(_jq(a).outerWidth()- d.outerWidth())/2;f=h.top-d.outerHeight()-2*i;j<0&&(j=10);j+d.outerWidth()>_jq(window).width()&&(j=_jq(window).width()-d.outerWidth()-10);c=(d.width()-i/3)/2;d.find("."+x5engine.imTip.constants.arrowClassId).css({borderLeftColor:"transparent",borderRightColor:"transparent",borderBottomColor:"transparent",borderTopColor:k,position:"absolute",left:c,bottom:-2*i+1});d.find("."+x5engine.imTip.constants.borderClassId).css({borderLeftColor:"transparent",borderRightColor:"transparent",borderBottomColor:"transparent", position:"absolute",left:c,bottom:-2*i})}else if(c=="bottom"){g="bottom";if(h.top+_jq(a).outerHeight()+2*i-_jq(window).scrollTop()>_jq(window).height())return m("left",d,e+1);j=h.left+(_jq(a).width()-d.width())/2;f=h.top+_jq(a).outerHeight()+10;j<0&&(j=10);j+d.outerWidth()>_jq(window).width()&&(j=_jq(window).width()-d.outerWidth()-10);c=(d.width()-i/3)/2;d.find("."+x5engine.imTip.constants.arrowClassId).css({borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent", borderBottomColor:k,position:"absolute",left:c,top:-2*i+1});d.find("."+x5engine.imTip.constants.borderClassId).css({borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",position:"absolute",left:c,top:-2*i})}else if(c=="left"){if(h.left-d.outerWidth()-_jq(window).scrollLeft()<0)return m("top",d,e+1);j=h.left-d.outerWidth()-2*i;f=h.top+(_jq(a).outerHeight()-d.outerHeight())/2;if(f-_jq(window).scrollTop()<0)return m("bottom",d,e+1);if(f+d.outerHeight()-_jq(window).scrollTop()> _jq(window).height())return m("top",d,e+1);d.find("."+x5engine.imTip.constants.arrowClassId).css({borderRightColor:"transparent",borderBottomColor:"transparent",borderTopColor:"transparent",borderLeftColor:k,position:"absolute",right:-2*i+1,top:d.outerHeight()/2-i});d.find("."+x5engine.imTip.constants.borderClassId).css({borderRightColor:"transparent",borderBottomColor:"transparent",borderTopColor:"transparent",position:"absolute",right:-2*i,top:d.outerHeight()/2-i})}else if(c=="right"){if(h.left+ _jq(a).outerWidth()+d.outerWidth()-_jq(window).scrollLeft()>_jq(window).width())return m("top",d,e+1);j=h.left+_jq(a).outerWidth()+2*i;f=h.top+(_jq(a).outerHeight()-d.outerHeight())/2;if(f-_jq(window).scrollTop()<0)return m("bottom",d,e+1);if(f+d.outerHeight()-_jq(window).scrollTop()>_jq(window).height())return m("top",d,e+1);d.find("."+x5engine.imTip.constants.arrowClassId).css({borderLeftColor:"transparent",borderBottomColor:"transparent",borderTopColor:"transparent",position:"absolute",borderRightColor:k, left:-2*i+1,top:d.outerHeight()/2-i});d.find("."+x5engine.imTip.constants.borderClassId).css({borderLeftColor:"transparent",borderBottomColor:"transparent",borderTopColor:"transparent",position:"absolute",left:-2*i,top:d.outerHeight()/2-i})}return[f,j]},p=function(c,d){if(_jq(a).hasClass(x5engine.imTip.constants.locked))switch(b.effect){case "fade":d.css({top:c[0],left:c[1]});d.fadeIn();break;case "bounce":g=="top"?d.css({top:c[0]-50,left:c[1]}):d.css({top:c[0]+50,left:c[1]});d.fadeIn(100);d.animate({top:c[0], left:c[1]},600,"imBounce");break;default:d.css({top:c[0],left:c[1]}),h=0,d.fadeIn(0)}},r=function(){clearTimeout(d);c=false},q=function(){b.persistant||(clearTimeout(d),d=setTimeout(n,250),c=true)},n=function(){clearTimeout(d);c&&(_jq(a).removeClass(x5engine.imTip.constants.locked),e!=null&&(e.stop(),e.find("object, embed").remove(),e.fadeOut(h,function(){e.remove();f=false;_jq(a).attr("title",j);_jq(a).attr("alt",k)})))};(function(){var d=_jq("[tiptarget="+_jq(a).attr("id")+"]");if(d.length==0|| d.length>0&&d.html().indexOf(b.text)==-1)b.unique&&_jq("."+x5engine.imTip.constants.classId).length>0&&(_jq("."+x5engine.imTip.constants.classId).remove(),h=0),_jq(a).addClass(x5engine.imTip.constants.locked),c=false,o();if(b.hideOnFocus!=null)if(typeof b.hideOnFocus=="boolean"&&b.hideOnFocus==true)_jq(a).hasClass("imDatePickerIcon")?(_jq(a).parent().prev("input[type=text]").focus(function(){c=true;_jq(a).removeClass(x5engine.imForm.constants.mark);n()}),_jq(a).click(function(){_jq(a).parent().prev("input[type=text]").focus()})): _jq(a).click(function(){c=true;_jq(a).removeClass(x5engine.imForm.constants.mark);n()});else if(typeof b.hideOnFocus=="object"||typeof b.hideOnFocus=="string")_jq(b.hideOnFocus).click(function(){c=true;_jq(b.hideOnFocus).removeClass(x5engine.imForm.constants.mark);_jq(a).removeClass(x5engine.imForm.constants.mark);n()}),_jq(a).click(function(){c=true;_jq(a).removeClass(x5engine.imForm.constants.mark);_jq(b.hideOnFocus).removeClass(x5engine.imForm.constants.mark);n()})})();return i}},imMarquee:function(a){a.direction= a.direction||"up";a.easing=a.easing||"linear";a.speed=a.speed||2E3;a.bounce=a.bounce||false;a.type=a.type||"inner";var b=_jq(a.object),d=b.html();b.empty().append('
'+d+"
");b.css({position:"relative",overflow:"hidden"});var c=_jq(a.object+" .imRoller");c.css("position","relative");var e=function(){var d;switch(a.direction){case "up":d=a.type=="inner"?b.innerHeight()-c.outerHeight():b.innerHeight();c.css({top:d});break;case "BOTTOM":d=a.type=="inner"?0:-c.outerHeight();c.css({top:d}); break;case "right":d=a.type=="inner"?0:-c.outerWidth();c.css({left:d});break;case "left":d=a.type=="inner"?b.innerWidth()-c.outerWidth():b.innerWidth(),c.css({left:d})}},h=function(){var d;if(a.bounce)switch(a.direction){case "up":a.direction="BOTTOM";break;case "BOTTOM":a.direction="up";break;case "left":a.direction="right";break;case "right":a.direction="left"}e();switch(a.direction){case "up":d=a.type=="inner"?0:-c.outerHeight();c.animate({top:d},a.speed,a.easing,function(){h()});break;case "BOTTOM":d= a.type=="inner"?b.innerHeight()-c.outerHeight():b.innerHeight();c.animate({top:d},a.speed,a.easing,function(){h()});break;case "right":d=a.type=="inner"?b.innerWidth()-c.outerWidth():b.innerWidth();c.animate({left:d},a.speed,a.easing,function(){h()});break;case "left":d=a.type=="inner"?0:-c.outerWidth(),c.animate({left:-c.outerWidth()},a.speed,a.easing,function(){h()})}};h()},imBgStretch:function(a,b){b==null&&(b=true);var d=null,c=null,e=function(){c==null&&(c=g.width()/g.height());_jq(window).width(); _jq(window).height();var a,b,d;a=_jq(window).width();b=_jq(window).width()/c;b<_jq(window).height()&&(b=_jq(window).height(),a=_jq(window).height()*c);_jq(window).height();d=(_jq(window).width()-a)/2;h.css({width:a,height:b,top:0,left:d});g.css({width:a,height:b})};_jq(".imBgStretcher").remove();_jq("body").prepend('
 
');var h=_jq(".imBgStretcher"),g=_jq(".imBgStretcher img");h.css({position:"fixed",top:0,left:0, zIndex:0,overflow:"hidden",backgroundColor:"transparent"});_jq(".imBgWrap").css("z-index",0);_jq("#imFooterBg").css({position:"relative"});g.load(e);_jq(window).resize(function(){b?e():(d!=null&&clearTimeout(d),d=setTimeout(e,100))});g.attr("src",a)},imAccordion:function(a,b){var d=null,c=null,e=function(a,b){b=b||400;d=d||a.css("padding");c=c||a.height();a.css({padding:0,overflow:"hidden"});a.animate({height:0,padding:0},b)},h=function(a,b){a.css({padding:d,overflow:"hidden"});a.animate({height:c}, b)};e(_jq(a+" .imAccContent"),1);for(var g=0;g<_jq(a+" li").length;g++)_jq(a+" li:eq("+g+")").attr("id",x5engine.utils.createId("imAccLi"));b!=null&&h(_jq(a+" li:eq("+b+") .imAccContent"),1);_jq(a+" li").click(function(){if(_jq(this).find(".imAccContent").height()==0){for(var b=0;b<_jq(a+" li").length;b++)_jq(a+" li:eq("+b+")").attr("id")!=_jq(this).attr("id")&&e(_jq(a+" li:eq("+b+") .imAccContent"));h(_jq(this).find(".imAccContent"))}else e(_jq(this).find(".imAccContent"))})},imStarRating:function(a, b){var d=null,c,e=function(){d!=null&&clearTimeout(d);var c=_jq(this).attr("class");c.match(/imStarRating\[([0-9]*)\]/);for(var c=RegExp.$1,e=0;ec?_jq("#"+a+"_star"+(e+1)).attr("src","res/star_full.png"):_jq("#"+a+"_star"+(e+1)).attr("src","res/star_empty.png")},h=function(){d=setTimeout(function(){for(var c=0;cb;c++)_jq("#"+a+"_star"+(c+1)).mouseover(e),_jq("#"+a+"_star"+(c+1)).mouseleave(h),_jq("#"+a+"_star"+(c+1)).click(g)},imGrid:{cell:function(a){var b,d,c,e,h,g=false,f=function(){b=_jq(a).offset().top;d=b+_jq(a).outerHeight()},i=function(){c=_jq(a).offset().left;e=c+_jq(a).outerWidth()};this.height=function(b){if(b== null)return _jq(a).height();else _jq(a).height(b-(_jq(a).outerHeight()-_jq(a).height()))};this.pushY=function(b){_jq(a).css("top").match(/^([0-9]+)[a-z]*$/);var c=RegExp.$1*1;c+=b;_jq(a).css("top",c+"px")};this.html=function(b){if(b==null)return _jq(a).html();else _jq(a).html(b)};this.isAbsolute=function(a){if(a==null)return g;else g=a};this.sy=function(){f();return b};this.ey=function(){f();return d};this.sx=function(){i();return c};this.ex=function(){i();return e};_jq(a).offset();h=function(){var b= _jq(a).css("height");_jq(a).css("height","auto");var c=_jq(a).height();_jq(a).find("[class*=imCpt]").not("iframe").length>0&&(c+=30);_jq(a).css("height",b);return c}();_jq(a).height()0)g=e.offset(),g=g.top,h=g+e.innerHeight();_jq("[class*=imGrid]").each(function(){var c=_jq(this).attr("class"),d,e,f=false;/imGrid\[[0-9]+,\s*[0-9]+[,]*\s*[0-9]*\]/.test(c)&&(c.match(/imGrid\[([0-9]+),\s*([0-9]+)[,]?\s*([0-9]*)\]/), c=RegExp.$1*1,d=RegExp.$2*1,RegExp.$3*1==1&&(f=true),a[d]==null&&(a[d]=[]),b[c]==null&&(b[c]=[]),e=new x5engine.imGrid.cell(_jq(this)),e.isAbsolute(f),a[d][a[d].length]=e,b[c][b[c].length]=e)});for(d=0;da[d].length;c++){if(a[d][c].isAbsolute()&&d!=0)for(c2=0;c2j.sy()&&(i.sx()j.sx())&&j.pushY(i.ey()-j.sy())}a[d][c].ey()>f&&(f=a[d][c].ey())}for(c=0;c0&&(f>h?e.remove():e.height(h-g-f-(_jq("#imBtMn").length>0?_jq("#imBtMn").outerHeight():0)))}}},imAccess:{showLogout:function(){_jq(".imLogout").empty();x5engine.utils.isOnline()?_jq.imCookie("im_access_cookie_uid")!=null&&_jq.imCookie("im_access_cookie_uid")!=""&&_jq(".imLogout").append(''+x5engine.l10n.getLocalization("private_area_logout")+""):_jq(".imLogout").append(''+x5engine.l10n.getLocalization("private_area_logout")+ "")}},imSearch:{current:null,Load:function(){_jq("#imSearchWebPages, #imSearchBlog, #imSearchProducts, #imSearchImages, #imSearchVideos").fadeOut(0);_jq("#imSearchWebPages, #imSearchBlog, #imSearchProducts, #imSearchImages, #imSearchVideos").first().fadeIn(0);x5engine.imSearch.current="#"+_jq("#imSearchWebPages, #imSearchBlog, #imSearchProducts, #imSearchImages, #imSearchVideos").first().attr("id");_jq("#imSearchWebPages, #imSearchBlog, #imSearchProducts, #imSearchImages, #imSearchVideos").length< 2&&(_jq("#imSearchSideBar").hide(0),_jq("#imSearchContent").css({width:"100%"}))},Show:function(a){a!=x5engine.imSearch.current&&_jq("#imSearchWebPages, #imSearchBlog, #imSearchProducts, #imSearchImages, #imSearchVideos").fadeOut(1,function(){_jq(a).fadeIn(0);x5engine.imSearch.current=a});return false}},imSiteMap:{toggleLevel:function(a){a=_jq(a);_jq(a).next(".imSiteMap").slideToggle("medium","swing",function(){_jq(a).next("ul:visible").length>0?_jq(a).children("img").attr("src","res/imfolder_open.gif"): _jq(a).children("img").attr("src","res/imfolder_closed.gif")});return false},foldAll:function(){_jq("#imContent > ul").find(".imSiteMap").slideUp("medium","swing",function(){_jq(this).prev("span").children("img").attr("src","res/imfolder_closed.gif")});return false},unfoldAll:function(){_jq("#imContent > ul").find(".imSiteMap").slideDown("medium","swing",function(){_jq(this).prev("span").children("img").attr("src","res/imfolder_open.gif")});return false}}};