(function(a){a.fn.setPosition=function(b,c){return this.each(function(){a(this).css({left:b+"px",top:c+"px"})})}})(jQuery);var iac=iac||{};iac.ns={create:function(e){var a=e.split("."),d=a[0];window[d]=window[d]||{};for(var c=window[d],b=1;b<a.length;b++){c[a[b]]=c[a[b]]||{};c=c[a[b]]}}};var iac=iac||{};iac.js={safe:function(b){try{return b()}catch(a){alert(a);throw a;}},exec:function(a){if(iac.js.domLoaded)iac.js.safe(a);else if(typeof google==="undefined")$(function(){iac.js.safe(a)});else google.setOnLoadCallback(function(){$(function(){iac.js.safe(a)})})}};iac.url={toAbsolute:function(a){return iac.url.root+a}};iac.store={"get":function(a){return $(document.body).data(a)},"set":function(b,a){$(document.body).data(b,a)}};iac.ns.create("iac.fx");iac.fx.begin=function(){};iac.fx.end=function(a){$(a.target).fadeIn()};iac.fx.cancelLink=function(a){$("#"+a).fadeOut(function(){$(this).empty()})};iac.fx.confirmDelete=function(a){return confirm(a)};iac.ga={append:function(b,a){setTimeout(function(){var c="https:"==document.location.protocol?"https://ssl.":"http://www.";jQuery.getScript(c+"google-analytics.com/ga.js",function(){try{var c=_gat._getTracker(b);a&&c._setVar("no-report");c._trackPageview()}catch(d){}})},250)},setNoReport:function(a){setTimeout(function(){var b=_gat._getTracker(a);b._setVar("no-report")},350)}};iac.utils=function(a){var b={scrollTop:function(){var a=window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop;return a},height:function(){var a=window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body.clientHeight;return a}};function c(c){if(c)var d=a(c).offset(),e={width:a(c).width(),height:a(c).height()};else var d={top:b.scrollTop(),left:0},e={width:a(window).width(),height:b.height()};return {offset:d,dim:e}}function e(e,g,f,d){var b=c(f);if(d)b.offset.top+=d;switch(g){case "top":return b.offset.top;case "bottom":return b.offset.top+b.dim.height-a(e).outerHeight()+1;case "center":return b.offset.top+(b.dim.height-a(e).outerHeight())/2}}function d(e,g,f,d){var b=c(f);if(d)b.offset.left+=d;switch(g){case "left":return b.offset.left;case "right":return b.offset.left+b.dim.width-a(e).outerWidth();case "center":return b.offset.left+(b.dim.width-a(e).outerWidth())/2}}return {getVPlacement:e,getHPlacement:d,viewport:b,chain:function(b,c,a){b(a);c(a)}}}(jQuery);function dumpObj(c,g,a,f){var h=10;if(f>h)return a+g+": <Maximum Depth Reached>\n";if(typeof c=="object"){var b=null,d=a+g+"\n";a+="\t";for(var e in c){try{b=c[e]}catch(i){b="<Unable to Evaluate>"}if(typeof b=="object")d+=dumpObj(b,e,a,f+1);else d+=a+e+": "+b+"\n"}return d}else return c}iac.ns.create("iac");iac.hooks=function(a){var i="X-Arabica";function b(b){try{return b()}catch(a){alert(a);throw a;}}function f(a){return b(function(){var b=a.attr("options");if(!b)return {};var c=eval("("+b+")");return c})}function e(a){if(a.status===299){var b=a.getResponseHeader("Location");window.location.href=b;return true}return false}function d(g,d,b){var c=g.getResponseHeader(i);b.onAppSuccess&&(!c||c==="1")&&b.onAppSuccess.call(this,d,b);b.onAppError&&c==="-1"&&b.onAppError.call(this,d,b);if(c==="-1"&&!b.target){var e=a("<div class='error' />").text(a(d).text()),f=new Boxy(e,{title:"Error",modal:true,draggable:true,unloadOnHide:true,show:true});f.resize(300)}}function c(c,b){if(c.status===403){g(b);a("#loginLink").click()}else g(b)}function g(b){var c=b.endfx||function(b){a(b.target).show()};c(b)}function h(b,c){a(b.target).css("display","none");if(!b.insertionMode){a(b.target).html(c);return}b.insertionMode==="Replace"&&a(b.target).html(c);b.insertionMode==="InsertBefore"&&a(b.target).prepend(c);b.insertionMode==="InsertAfter"&&a(b.target).append(c)}return {forms:function(){a(".ajaxForm").livequery(function(){var i=a(this),j=null,g=f(i);g.beforeSubmit=function(){if(i.hasClass("reusableForm"))return true;if(i.alreadySubmitted)return false;i.alreadySubmitted=true;return true};var m=g.beforeSend||function(){};g.beforeSend=function(a){j=a;b(function(){g.beginfx&&g.beginfx(g);m.call(i,a,g)})};var l=g.success||function(){};g.success=function(c){b(function(){if(e(j))return;c=a.trim(c);g.target&&c&&c!==""&&h(g,c);l.call(i,c,g);d.call(i,j,c,g)})};var n=g.error||function(){};g.error=function(c,d,a){i.alreadySubmitted=false;b(function(){n.call(i,c,g,a)})};var k=g.complete||function(){};g.complete=function(a){j=null;b(function(){k.call(i,a,g);c(a,g)})};g.dataType="html";a(this).ajaxForm(g)})},links:function(){a(".ajaxLink").live("click",function(){var b=a(this),c=b.attr("url")||b.attr("href"),d=f(b);iac.hooks.req.call(b,c,d);return false})},req:function(m,f){f.url=m;var i=a(this),g=null,l=f.beforeSend||function(){};f.beforeSend=function(c,a){g=c;return b(function(){a.beginfx&&a.beginfx(a);return l.call(i,c,a)})};var k=f.success||function(){};f.success=function(c){b(function(){if(e(g))return;c=a.trim(c);f.target&&c!==""&&h(f,c);k.call(i,c,f);d.call(i,g,c,f)})};var j=f.complete||function(){};f.complete=function(a){g=null;b(function(){j.call(i,a,f);c(a,f)})};f.getClientData=f.getClientData||function(){return {}};f.data=f.data||f.getClientData.call(this);a.ajax(f)}}}(jQuery);var iac=iac||{};iac.maps=function(){var a=null;function c(a){var b=a&&a.AddressDetails&&a.AddressDetails.Country&&a.AddressDetails.Country.AdministrativeArea;if(b)return b.AdministrativeAreaName;return ""}function b(a,d){for(f in a)if(f==d)return a[f];else if(typeof a[f]==="object"){var c=b(a[f],d);if(c)return c}return ""}return {getWidget:function(){return a},init:function(b){a=new Mapeed.AddressChooser.Widget({city:b,delay:500,showAddressOnMap:false,onInitialized:function(a){a.getMap().setUIToDefault();a.initMap(10)}})},extractAddress:function(d){var g=a.getCity(d),e=c(d),f=b(d,"CountryNameCode");return {city:g,adminArea:e,country:f}},buildStructuredAddress:function(){var b=a.placemarks[0],f=a.getCity(b),d=c(b),e=a.getCountry(b);return f+", "+d+", "+e},getCountry:function(){return a.getCountry(a.placemarks[0])},getCountryCode:function(){return b(a.placemarks[0],"CountryNameCode")},getAdminArea:function(){return c(a.placemarks[0])},getCity:function(){return a.getCity(a.placemarks[0])}}}(jQuery);iac.maps2=function(){var a=null;function c(){if(typeof google==="undefined"||typeof google.maps==="undefined")if(typeof GUnload==="undefined")return;else GUnload();else google.maps.Unload()}function b(){return typeof GMap2!=="undefined"}return {getMap:function(){return a},init:function(b){if(!GBrowserIsCompatible())return;a=new GMap2(document.getElementById(b));return a},addLocation:function(b,c,d){iac.maps2.addMarker(b,c,d);a.setCenter(new GLatLng(b,c),10)},addMarker:function(d,e,c){var b=new GMarker(new GLatLng(d,e));GEvent.addListener(b,"click",function(){b.openInfoWindowHtml(c)});a.addOverlay(b)},centerMap:function(c,d,b){if(c&&d&&b&&c>-80&&c<80&&d>-180&&d<180&&b>0&&b<14)a.setCenter(new GLatLng(c,d),b);else!iac.maps2.centerOnClient()&&iac.maps2.viewWholeWorld()},centerOnClient:function(c){var b=google&&google.loader?google.loader.ClientLocation:null;if(b){a.setCenter(new GLatLng(b.latitude,b.longitude),c||8);return true}return false},viewWholeWorld:function(){a.setCenter(new GLatLng(43,11),1)},unload:c,isMapsAvailable:b}}(jQuery);var iac=iac||{};iac.popup=function(a){function c(e,c,d){var b=a("<div></div>").attr("id",c).css({display:"none"}).appendTo(document.body);b.load(e,function(){var b=a(this),f=new Boxy(b,{title:d,modal:true,draggable:true,unloadOnHide:true,show:true,afterHide:function(){iac.Home&&iac.Home.Index&&iac.Home.Index.stopIntroBoxTimer&&iac.Home.Index.resetIntroBoxTimer()}});b.find("form:first input[type!=hidden]:first").focus()})}function b(a){Boxy.get(a).hide()}return {show:c,close:b}}(jQuery);var iac=iac||{};iac.msg=function(a){var b="msgbox";function c(d,c){var b=a('<div id="'+d+'" class="notificationBox rounded_small" style="position:fixed"></div>').appendTo("body");b.html(c);return b}return {show:function(f,e){a("#"+b).remove();var d=c(b,f);if(e){e=a(e);var g=iac.utils.getHPlacement(d,"right",e,d.outerWidth()+10),h=iac.utils.getVPlacement(d,"center",e)}else var g=iac.utils.getHPlacement(d,"center"),h=0;d.setPosition(g,h)},showTemp:function(a){iac.msg.show(a);setTimeout(function(){iac.msg.hide()},2e3)},error:function(d){a("#errbox").remove();var b=c("errbox",d),e=iac.utils.getHPlacement(b,"center"),f=0;b.setPosition(e,f)},hide:function(){a("#"+b).fadeOut("slow",function(){a(this).remove()})},removeAll:function(){a("#msgbox, #errbox").remove()}}}(jQuery);var iac=iac||{};jQuery(function(a){iac.js.domLoaded=true;iac.tabIndex=100;a("form.tabindexable").livequery(function(){var b=a(this);setTimeout(function(){var c=b.find(":input:visible").each(function(){a(this).attr("tabindex",iac.tabIndex);iac.tabIndex++}),d=b.find(":input:visible").not("input[type=submit], input[type=button], input[type=reset], button").eq(0).focus()},800)});iac.hooks.forms();iac.hooks.links();a(".execFn").live("click",function(){var b=a(this).attr("function"),c=b+".call(this);";eval(c)});a(".info").livequery(function(){var b=a(this).remove().text();iac.msg.showTemp(b)});a(".pager a").live("click",function(){var b=a(this),c=b.attr("href");b.closest(".ajax-container").load(c,function(){a(this).find(".truncate").truncate()});return false});a("#menu a").click(function(){a("#menu a").removeClass("selected");a(this).addClass("selected")});a(".truncate").truncate();a("#loading").ajaxSend(function(b,c,a){iac.msg.removeAll();iac.msg.show(a.message||"Loading...")});a("#loading").ajaxError(function(b,a){iac.msg.error("Server error: "+a.status+" "+a.statusText)});a("#loading").ajaxComplete(function(){iac.msg.hide();iac.Home&&iac.Home.Index&&iac.Home.Index.stopIntroBoxTimer&&iac.Home.Index.stopIntroBoxTimer()})})
