function reportAbuse(c,g,b){var a="/"+c+"/reportabuse/"+g+"/"+b;if(c=="photos"){var a="/"+c+"/reportabuse/"+g}if(c=="events"){jQuery("#zs_postCommentDiv").hide();var e=jQuery("#zse-commentsCount").html();countParts=e.split("(");countPart=countParts[1].split(")");var d=parseInt(countPart[0])-1;var f=countParts[0]+"("+d+")"}jQuery.ajax({type:"POST",url:a,data:jQuery("form").serialize()+"&btnSubmit=1",success:function(h){if(h){jQuery("#TB_ajaxContent").html(h);jQuery("#zs_validation_err").show()}else{tb_remove();g=jQuery("#reviewId").val();jQuery("#tr_"+g).remove();if(c=="events"){jQuery("#zse-commentsCount").html(f)}content='<br><br><br><center><span class="zs_validation_err">Removed the review successfully!</span><br><a href="javascript:;" onClick="tb_remove();">Close</a></center>';jQuery("#TB_ajaxContent").html(content)}}})};function postComment(a){jQuery("#nameError").html("");jQuery("#commentError").html("");jQuery("#securityError").html("");if(document.getElementById("cName").value==""&&!jQuery("#anonymous").attr("checked")){jQuery("#nameError").html("Name is required.");return false}if(document.getElementById("c").value==""){jQuery("#commentError").html("Comment text is required.");return false}if(jQuery("#security_code").val().replace(/^\s*|\s*$/g,"")==""){jQuery("#securityError").html("Verify you are a human cannot be blank.");return}if(document.getElementById("c").value.length>751){jQuery("#commentError").html("Maximum characters of comments should be 750.");return}url="/events/comments/post/"+a;howmanycmt=jQuery("#howmany").val();jQuery("#zs_detail_C_Container2").show();jQuery.getJSON(url,jQuery("#frmComment").serialize(),function(b){if(b){if(b.success===false){jQuery("#zse-commentsWrite").html(b.write)}else{if(howmanycmt){getComments(howmanycmt,"newest",a,1)}else{getComments("","newest",a,1)}}}});return false}function getComments(e,d,h,g){if(this.href&&this.href.indexOf("#nothing")>0){return false}jQuery("#zsp-comments").hide();var f=e;howmanycmt=f;var b=jQuery("#moduleForComments").val();var c="/events/comments/show/"+h+"?howMany="+f+"&dispType="+d+"&moduleForComments="+b;var a=(this.href)?this.href:c;jQuery("#cName").val("");jQuery("#c").val("");jQuery("#security_code").val("");jQuery(".zs_validation_err").html("");jQuery.getJSON(a,function(i){jQuery("#zsp-comments").show();jQuery("#zse-eventsComments").html(i.comments);jQuery("#zse-commentsCount").html(i.count);if(g){jQuery("#zse-commentsConfirmation").html("<div class='zse-confirmation'>Thanks for your comment!</div>");jQuery("#zse-commentsWrite").html("");jQuery("#zse-bookmark-icon").hide()}else{jQuery("#zse-commentsWrite").html(i.write)}var j=i.count.length;var k=i.count.substring(10,j-1);if(f!=""){if(k>5){jQuery("#zse-readmore").show();if(b){jQuery("#readMoreComments").attr("href","/"+b+"/comments/display/"+h)}}else{jQuery("#zse-readmore").hide()}}jQuery("#zs_detail_C_Container3").hide();if(f==""){jQuery("#zsp-commentsCount-seeAll").hide()}});return false}function changeDisplayType(){cmtDisplayType=jQuery("#commentsDisplayType").val();if(howmanycmt){getComments(howmanycmt,cmtDisplayType)}else{getComments("",cmtDisplayType)}};function hideDeleteConfimeDiv(b,a,e,f,c){document.getElementById("zs_deleteConfirmDiv").style.display="none";var d=jQuery("#deldate").val();if(b){location.href="/events/delete/"+e+"/"+a+"?RGId="+f+"&ref="+c+"&deldate="+d;return true}else{location.href="/events/delete/"+e+"/"+a+"/"+f+"?ref="+c;return true}return true}function add_spl_event(g,a,f,l,n,h,j,k,m,i,d){if(jQuery.browser.msie){parameters="height=610&width=680"}else{parameters="height=590&width=650"}if(n!=""){if(d=="partner"){var c=document.getElementById("zs_splEvtConfirmDiv"+l);c.style.display="block";c.style.position="absolute";c.style.width=45+"%";c.style.top=j.clientY+document.body.scrollTop- -10+"px";c.style.left=30+"%";return true}else{var b="/events/featurePopup?"+parameters+"&modal=true&id="+a+"&splEventId="+l+"&EventPId="+f+"&type="+k+"&repeats="+m+"&master_group_id="+i;tb_show(null,b,false);if(jQuery.browser.msie){jQuery("#TB_window").css({"margin-top":"-300px"})}return false}}else{if(g=="add"){if(d=="partner"){var c=document.getElementById("zs_splEvtConfirmDiv"+l);c.style.display="block";c.style.position="absolute";c.style.width=45+"%";c.style.top=j.clientY+document.body.scrollTop- -10+"px";c.style.left=30+"%";return true}else{var b="/events/featurePopup?"+parameters+"&modal=true&id="+a+"&splEventId="+l+"&EventPId="+f+"&type="+k+"&repeats="+m+"&master_group_id="+i;tb_show(null,b,false);if(jQuery.browser.msie){jQuery("#TB_window").css({"margin-top":"-300px"})}return false}}else{if(confirm("Are you sure you want to remove from special event?")){location.href="/events/specialEventDelete/"+a+"/"+f+"/"+l}}return true}return true}function hideSplConfimeDiv(e,d,g,b,h,f,a){document.getElementById("zs_splEvtConfirmDiv"+b).style.display="none";if(a){return true}if(f=="add"){var c="/events/specialEventAdd/"+d+"/"+g+"/"+b}else{var c="/events/specialEventDelete/"+d+"/"+g+"/"+b}if(e){location.href=c;return true}else{location.href=c+"/"+h;return true}new Ajax.Request(c,{method:"post",parameters:$("splForm"+b).serialize(),onComplete:function(i){location.reload()}});return true}function feature_event(b,g,c,f,d){if(f!=""){var a=document.getElementById("zs_fevtConfirmDiv");a.style.display="block";a.style.position="absolute";a.style.width=80+"%";a.style.top=d.clientY+document.body.scrollTop-20+"px";a.style.left=10+"%";return true}else{if(b=="unfeature"){if(confirm("Are you sure you want to remove from featured event?")){location.href="/events/"+b+"/"+g+"/"+c}}else{location.href="/events/"+b+"/"+g+"/"+c}return true}return true}function hideFevtConfimeDiv(e,d,f,g,c,a){document.getElementById("zs_fevtConfirmDiv").style.display="none";if(a){return true}var b="/events/"+c+"/"+d+"/"+f;if(e){location.href=b;return true}else{location.href=b+"/"+g;return true}return true}function updateStats(d,b,a){var c=document.createElement("SCRIPT");c.setAttribute("language","JavaScript");c.setAttribute("src","http://sharethis.com/share/load?from=sharelet");document.body.appendChild(c);new Ajax.Request("/stats/sharethisAnalytics/"+d+"/"+b+"/"+a,{method:"get"})};function getFeatSpecEvents(b,a,f,d){if(d){var e=d}else{var e=f}if(b=="featured"){url="/events/browse/featured/all/-2/All/All?featuredFlag=1&evtId="+e}else{if(b=="special"){url="/events/browse/special/"+a+"/all/-2/All?specialFlag=1&evtId="+e}}var c='<img src="/images/consumer_v4/icons/ajax-loader.gif">';if(otherEventsCache[b]){jQuery("#zsp_featSpecEventsDiv").html(otherEventsCache[b]);if(b=="featued"){jQuery("#zsp-featured").addClass("zse-selected");jQuery("input[id^='zsp-special']").removeClass("zse-selected")}else{if(b=="special"){jQuery("#zsp-special-"+a).addClass("zse-selected");jQuery("#zsp-featured").removeClass("zse-selected")}}}else{jQuery.ajax({type:"GET",url:url,beforeSend:function(){if(b=="featured"){jQuery("#zsp-featured").addClass("zse-selected");jQuery("input[id^='zsp-special']").removeClass("zse-selected")}else{if(b=="special"){jQuery("#zsp-special-"+a).addClass("zse-selected");jQuery("#zsp-featured").removeClass("zse-selected")}}jQuery("#zsp-featured-special").html(c)},success:function(g){otherEventsCache[b]=g;jQuery("#zsp_featSpecEventsDiv").html(g);if(b=="featured"){jQuery("#zsp-featured").addClass("zse-selected");jQuery("input[id^='zsp-special']").removeClass("zse-selected")}else{if(b=="special"){jQuery("#zsp-special-"+a).addClass("zse-selected");jQuery("#zsp-featured").removeClass("zse-selected")}}}})}};var win=null;function NewWindow(f,d,b,c,a,e){if(e=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-b)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-c)-75)):100}if(e=="center"){LeftPosition=(screen.width)?(screen.width-b)/2:100;TopPosition=(screen.height)?(screen.height-c)/2:100}else{if((e!="center"&&e!="random")||e==null){LeftPosition=0;TopPosition=20}}settings="width="+b+",height="+c+",top="+TopPosition+",left="+LeftPosition+",scrollbars="+a+",location=yes,directories=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes";win=window.open(f,d,settings)}function NewWindowOnlyMenu(f,d,b,c,a,e){if(e=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-b)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-c)-75)):100}if(e=="center"){LeftPosition=(screen.width)?(screen.width-b)/2:100;TopPosition=(screen.height)?(screen.height-c)/2:100}else{if((e!="center"&&e!="random")||e==null){LeftPosition=0;TopPosition=20}}settings="width="+b+",height="+c+",top="+TopPosition+",left="+LeftPosition+",scrollbars="+a+",location=yes,directories=no,status=no,menubar=no,toolbar=yes,resizable=yes";win=window.open(f,d,settings)}function NewWindowNoMenu(f,d,b,c,a,e){if(e=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-b)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-c)-75)):100}if(e=="center"){LeftPosition=(screen.width)?(screen.width-b)/2:100;TopPosition=(screen.height)?(screen.height-c)/2:100}else{if((e!="center"&&e!="random")||e==null){LeftPosition=0;TopPosition=20}}settings="width="+b+",height="+c+",top="+TopPosition+",left="+LeftPosition+",scrollbars="+a+",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";win=window.open(f,d,settings)}function MM_openBrWindow(c,a,b){window.open(c,a,b)};(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(q){var o=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(o&&o!=this){try{o=o.parentNode}catch(q){o=this}}if(o==this){return false}var g=a.extend({},q);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);(function(j){var c,g,f,d,h,i,e;j.fn.cluetip=function(k){var l={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(m){return true},onShow:function(m,n){},ajaxCache:true,ajaxProcess:function(m){m=j(m).not("style, meta, link, script, title");return m},ajaxSettings:{dataType:"html"}};if(k&&k.ajaxSettings){j.extend(l.ajaxSettings,k.ajaxSettings);delete k.ajaxSettings}if(k&&k.fx){j.extend(l.fx,k.fx);delete k.fx}if(k&&k.hoverIntent){j.extend(l.hoverIntent,k.hoverIntent);delete k.hoverIntent}j.extend(l,k);return this.each(function(){var x=false;var P=parseInt(l.cluezIndex,10)-1;var J=false;if(!c){g=j('<div id="cluetip-inner"></div>');d=j('<h3 id="cluetip-title"></h3>');f=j('<div id="cluetip-outer"></div>').append(g).prepend(d);c=j("<div></div>").attr({id:"cluetip"}).css({zIndex:l.cluezIndex}).append(f).append('<div id="cluetip-extra"></div>')[b](a).hide();j('<div id="cluetip-waitimage"></div>').css({position:"absolute",zIndex:P-1}).insertBefore("#cluetip").hide();c.css({position:"absolute",zIndex:P});f.css({position:"relative",zIndex:P+1});h=j('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:P+1}).appendTo("#cluetip")}var O=(l.dropShadow)?+l.dropShadowSteps:0;if(!i){i=j([]);for(var K=0;K<O;K++){i=i.add(j("<div></div>").css({zIndex:P-K-1,opacity:0.1,top:1+K,left:1+K}))}i.css({position:"absolute",backgroundColor:"#000"}).prependTo(c)}var y=j(this);var B=y.attr(l.attribute),p=l.cluetipClass;if(!B&&!l.splitTitle){return true}if(l.local&&l.hideLocal){j(B+":first").hide()}var H=parseInt(l.topOffset,10),q=parseInt(l.leftOffset,10);var C,r;var z=isNaN(parseInt(l.height,10))?"auto":(/\D/g).test(l.height)?l.height:l.height+"px";var R,m,s,E,u;var N=parseInt(l.width,10)+parseInt(c.css("paddingLeft"))+parseInt(c.css("paddingRight"))+O;if(isNaN(N)){N=275}var M=this.offsetWidth;var G,t,F,v,A;var L;var n=(l.attribute!="title")?y.attr(l.titleAttribute):"";if(l.splitTitle){L=n.split(l.splitTitle);n=L.shift()}var I;var o=function(V){if(!l.onActivate(y)){return false}J=true;c.removeClass().css({width:l.width});if(B==y.attr("href")){y.css("cursor",l.cursor)}y.attr("title","");if(l.hoverClass){y.addClass(l.hoverClass)}m=s=y.offset().top;G=y.offset().left;v=V.pageX;u=V.pageY;if(y[0].tagName.toLowerCase()!="area"){R=j(document).scrollTop();A=j(window).width()}if(l.positionBy=="fixed"){t=M+G+q;c.css({left:t})}else{t=(M>G&&G>N)||G+M+N+q>A?G-N-q:M+G+q;if(y[0].tagName.toLowerCase()=="area"||l.positionBy=="mouse"||M+N>A){if(v+20+N>A){t=(v-N-q)>=0?v-N-q:v-(N/2)}else{t=v+q}var T=t<0?V.pageY+H:V.pageY}c.css({left:(t>0&&l.positionBy!="bottomTop")?t:(v+(N/2)>A)?A/2-N/2:Math.max(v-(N/2),0)})}r=j(window).height();if(L){for(var U=0;U<L.length;U++){if(U==0){g.html(L[U])}else{g.append('<div class="split-body">'+L[U]+"</div>")}}D(T)}else{if(!l.local&&B.indexOf("#")!=0){if(x&&l.ajaxCache){g.html(x);D(T)}else{var W=l.ajaxSettings;W.url=B;W.beforeSend=function(){f.children().empty();if(l.waitImage){j("#cluetip-waitimage").css({top:u-10,left:parseInt(t+(N/2),10)}).show()}};W.error=function(){if(J){g.html("<i>sorry, the contents could not be loaded</i>")}};W.success=function(Y){x=l.ajaxProcess(Y);if(J){g.html(x)}};W.complete=function(){e=j("#cluetip-inner img").length;if(e){j("#cluetip-inner img").load(function(){e--;if(e<1){j("#cluetip-waitimage").hide();if(J){D(T)}}})}else{j("#cluetip-waitimage").hide();if(J){D(T)}}};j.ajax(W)}}else{if(l.local){var X=j(B+":first");var S=j.fn.wrapInner?X.wrapInner("<div></div>").children().clone(true):X.html();j.fn.wrapInner?g.empty().append(S):g.html(S);D(T)}}}};var D=function(V){c.addClass("cluetip-"+p);if(l.truncate){var S=g.text().slice(0,l.truncate)+"...";g.html(S)}function T(){}n?d.show().html(n):(l.showTitle)?d.show().html("&nbsp;"):d.hide();if(l.sticky){var U=j('<div id="cluetip-close"><a href="#">'+l.closeText+"</a></div>");(l.closePosition=="bottom")?U.appendTo(g):(l.closePosition=="title")?U.prependTo(d):U.prependTo(g);U.click(function(){w();return false});if(l.mouseOutClose){c.hover(function(){T()},function(){U.trigger("click")})}else{c.unbind("mouseout")}}var W="";g.css({overflow:z=="auto"?"visible":"auto",height:z});C=z=="auto"?c.outerHeight():parseInt(z,10);E=s;if(l.positionBy=="fixed"){E=s-l.dropShadowSteps+H}else{if((t<v&&Math.max(t,0)+N>v)||l.positionBy=="bottomTop"){if(s+C+H>R+r&&u-R>C+H){E=u-C-H;W="top"}else{E=u+H;W="bottom"}}else{if(s+C+H>R+r){E=(C>=r)?R:R+r-C-H}else{if(y.css("display")=="block"||y[0].tagName.toLowerCase()=="area"||l.positionBy=="mouse"){E=V-H}else{E=s-l.dropShadowSteps}}}}if(W==""){t<G?W="left":W="right"}c.css({top:E+"px"}).removeClass().addClass("clue-"+W+"-"+p).addClass(" cluetip-"+p);if(l.arrows){var X=(s-E-l.dropShadowSteps);h.css({top:(/(left|right)/.test(W)&&t>=0&&X>0)?X+"px":/(left|right)/.test(W)?0:""}).show()}else{h.hide()}i.hide();c.hide()[l.fx.open](l.fx.open!="show"&&l.fx.openSpeed);if(l.dropShadow){i.css({height:C,width:l.width}).show()}l.onShow(c,g)};var Q=function(){J=false;j("#cluetip-waitimage").hide();if(!l.sticky){w()}if(l.hoverClass){y.removeClass(l.hoverClass)}};var w=function(){f.parent().hide().removeClass().end().children().empty();if(n){y.attr("title",n)}y.css("cursor","");if(l.arrows){h.css({top:""})}};if(l.activation=="click"||l.activation=="toggle"){y.click(function(S){if(c.is(":hidden")){o(S)}else{Q(S)}this.blur();return false})}else{y.click(function(){if(B==y.attr("href")){return false}});if(j.fn.hoverIntent&&l.hoverIntent){y.hoverIntent({sensitivity:l.hoverIntent.sensitivity,interval:l.hoverIntent.interval,over:function(S){o(S)},timeout:l.hoverIntent.timeout,out:function(S){Q(S)}})}else{y.hover(function(S){o(S)},function(S){Q(S)})}}})};var b="appendTo",a="body";j.cluetip={};j.cluetip.setup=function(k){if(k&&k.insertionType&&(k.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){b=k.insertionType}if(k&&k.insertionElement){a=k.insertionElement}}})(jQuery);(function(g){var a=g.fn.height,e=g.fn.width;g.fn.extend({height:function(){if(!this[0]){d()}if(this[0]==window){if(g.browser.opera||(g.browser.safari&&parseInt(g.browser.version)>520)){return self.innerHeight-((g(document).height()>self.innerHeight)?b():0)}else{if(g.browser.safari){return self.innerHeight}else{return g.boxModel&&document.documentElement.clientHeight||document.body.clientHeight}}}if(this[0]==document){return Math.max((g.boxModel&&document.documentElement.scrollHeight||document.body.scrollHeight),document.body.offsetHeight)}return a.apply(this,arguments)},width:function(){if(!this[0]){d()}if(this[0]==window){if(g.browser.opera||(g.browser.safari&&parseInt(g.browser.version)>520)){return self.innerWidth-((g(document).width()>self.innerWidth)?b():0)}else{if(g.browser.safari){return self.innerWidth}else{return g.boxModel&&document.documentElement.clientWidth||document.body.clientWidth}}}if(this[0]==document){if(g.browser.mozilla){var j=self.pageXOffset;self.scrollTo(99999999,self.pageYOffset);var i=self.pageXOffset;self.scrollTo(j,self.pageYOffset);return document.body.offsetWidth+i}else{return Math.max(((g.boxModel&&!g.browser.safari)&&document.documentElement.scrollWidth||document.body.scrollWidth),document.body.offsetWidth)}}return e.apply(this,arguments)},innerHeight:function(){if(!this[0]){d()}return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-c(this,"borderTopWidth")-c(this,"borderBottomWidth"):this.height()+c(this,"paddingTop")+c(this,"paddingBottom")},innerWidth:function(){if(!this[0]){d()}return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-c(this,"borderLeftWidth")-c(this,"borderRightWidth"):this.width()+c(this,"paddingLeft")+c(this,"paddingRight")},outerHeight:function(i){if(!this[0]){d()}i=g.extend({margin:false},i||{});return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight+(i.margin?(c(this,"marginTop")+c(this,"marginBottom")):0):this.height()+c(this,"borderTopWidth")+c(this,"borderBottomWidth")+c(this,"paddingTop")+c(this,"paddingBottom")+(i.margin?(c(this,"marginTop")+c(this,"marginBottom")):0)},outerWidth:function(i){if(!this[0]){d()}i=g.extend({margin:false},i||{});return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth+(i.margin?(c(this,"marginLeft")+c(this,"marginRight")):0):this.width()+c(this,"borderLeftWidth")+c(this,"borderRightWidth")+c(this,"paddingLeft")+c(this,"paddingRight")+(i.margin?(c(this,"marginLeft")+c(this,"marginRight")):0)},scrollLeft:function(i){if(!this[0]){d()}if(i!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(i,g(window).scrollTop())}else{this.scrollLeft=i}})}if(this[0]==window||this[0]==document){return self.pageXOffset||g.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft}return this[0].scrollLeft},scrollTop:function(i){if(!this[0]){d()}if(i!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(g(window).scrollLeft(),i)}else{this.scrollTop=i}})}if(this[0]==window||this[0]==document){return self.pageYOffset||g.boxModel&&document.documentElement.scrollTop||document.body.scrollTop}return this[0].scrollTop},position:function(i){return this.offset({margin:false,scroll:false,relativeTo:this.offsetParent()},i)},offset:function(j,p){if(!this[0]){d()}var o=0,n=0,z=0,s=0,A=this[0],m=this[0],l,i,w=g.css(A,"position"),v=g.browser.mozilla,q=g.browser.msie,u=g.browser.opera,C=g.browser.safari,k=g.browser.safari&&parseInt(g.browser.version)>520,r=false,t=false,j=g.extend({margin:true,border:false,padding:false,scroll:true,lite:false,relativeTo:document.body},j||{});if(j.lite){return this.offsetLite(j,p)}if(j.relativeTo.jquery){j.relativeTo=j.relativeTo[0]}if(A.tagName=="BODY"){o=A.offsetLeft;n=A.offsetTop;if(v){o+=c(A,"marginLeft")+(c(A,"borderLeftWidth")*2);n+=c(A,"marginTop")+(c(A,"borderTopWidth")*2)}else{if(u){o+=c(A,"marginLeft");n+=c(A,"marginTop")}else{if((q&&g.boxModel)){o+=c(A,"borderLeftWidth");n+=c(A,"borderTopWidth")}else{if(k){o+=c(A,"marginLeft")+c(A,"borderLeftWidth");n+=c(A,"marginTop")+c(A,"borderTopWidth")}}}}}else{do{i=g.css(m,"position");o+=m.offsetLeft;n+=m.offsetTop;if((v&&!m.tagName.match(/^t[d|h]jQuery/i))||q||k){o+=c(m,"borderLeftWidth");n+=c(m,"borderTopWidth");if(v&&i=="absolute"){r=true}if(q&&i=="relative"){t=true}}l=m.offsetParent||document.body;if(j.scroll||v){do{if(j.scroll){z+=m.scrollLeft;s+=m.scrollTop}if(u&&(g.css(m,"display")||"").match(/table-row|inline/)){z=z-((m.scrollLeft==m.offsetLeft)?m.scrollLeft:0);s=s-((m.scrollTop==m.offsetTop)?m.scrollTop:0)}if(v&&m!=A&&g.css(m,"overflow")!="visible"){o+=c(m,"borderLeftWidth");n+=c(m,"borderTopWidth")}m=m.parentNode}while(m!=l)}m=l;if(m==j.relativeTo&&!(m.tagName=="BODY"||m.tagName=="HTML")){if(v&&m!=A&&g.css(m,"overflow")!="visible"){o+=c(m,"borderLeftWidth");n+=c(m,"borderTopWidth")}if(((C&&!k)||u)&&i!="static"){o-=c(l,"borderLeftWidth");n-=c(l,"borderTopWidth")}break}if(m.tagName=="BODY"||m.tagName=="HTML"){if(((C&&!k)||(q&&g.boxModel))&&w!="absolute"&&w!="fixed"){o+=c(m,"marginLeft");n+=c(m,"marginTop")}if(k||(v&&!r&&w!="fixed")||(q&&w=="static"&&!t)){o+=c(m,"borderLeftWidth");n+=c(m,"borderTopWidth")}break}}while(m)}var B=h(A,j,o,n,z,s);if(p){g.extend(p,B);return this}else{return B}},offsetLite:function(q,l){if(!this[0]){d()}var n=0,m=0,k=0,p=0,o=this[0],j,q=g.extend({margin:true,border:false,padding:false,scroll:true,relativeTo:document.body},q||{});if(q.relativeTo.jquery){q.relativeTo=q.relativeTo[0]}do{n+=o.offsetLeft;m+=o.offsetTop;j=o.offsetParent||document.body;if(q.scroll){do{k+=o.scrollLeft;p+=o.scrollTop;o=o.parentNode}while(o!=j)}o=j}while(o&&o.tagName!="BODY"&&o.tagName!="HTML"&&o!=q.relativeTo);var i=h(this[0],q,n,m,k,p);if(l){g.extend(l,i);return this}else{return i}},offsetParent:function(){if(!this[0]){d()}var i=this[0].offsetParent;while(i&&(i.tagName!="BODY"&&g.css(i,"position")=="static")){i=i.offsetParent}return g(i)}});var d=function(){throw"Dimensions: jQuery collection is empty"};var c=function(i,j){return parseInt(g.css(i.jquery?i[0]:i,j))||0};var h=function(m,l,j,n,i,k){if(!l.margin){j-=c(m,"marginLeft");n-=c(m,"marginTop")}if(l.border&&((g.browser.safari&&parseInt(g.browser.version)<520)||g.browser.opera)){j+=c(m,"borderLeftWidth");n+=c(m,"borderTopWidth")}else{if(!l.border&&!((g.browser.safari&&parseInt(g.browser.version)<520)||g.browser.opera)){j-=c(m,"borderLeftWidth");n-=c(m,"borderTopWidth")}}if(l.padding){j+=c(m,"paddingLeft");n+=c(m,"paddingTop")}if(l.scroll&&(!g.browser.opera||m.offsetLeft!=m.scrollLeft&&m.offsetTop!=m.scrollLeft)){i-=m.scrollLeft;k-=m.scrollTop}return l.scroll?{top:n-k,left:j-i,scrollTop:k,scrollLeft:i}:{top:n,left:j}};var f=0;var b=function(){if(!f){var i=g("<div>").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:-1000}).appendTo("body");f=100-i.append("<div>").find("div").css({width:"100%",height:200}).width();i.remove()}return f}})(jQuery);