(function($){$.fn.extend({center:function(){return this.each(function(){var obj=$(this);obj.css("margin",(obj.parent().height()-obj.height())/2+"px "+(obj.parent().width()-obj.width())/2+"px");});}});})(jQuery);function pageSubmit(request){document.getElementById("pRequest").value=request;document.wwv_flow.submit();}function submitEnter(request,e){var keycode;if(window.event){keycode=window.event.keyCode;}else{if(e){keycode=e.which;}else{return true;}}if(keycode==13){pageSubmit(request);return false;}else{return true;}}var pageLayout;var layout={sidebarLeft:{west__paneSelector:"#cms-page-sidebar",west__togglerAlign_open:100,west__togglerAlign_closed:100},sidebarRight:{east__paneSelector:"#cms-page-sidebar",east__togglerAlign_open:100,east__togglerAlign_closed:100},init:function(){var config={spacing_open:10,spacing_closed:10,resizable:false,north__paneSelector:"#cms-page-header",center__paneSelector:"#cms-page-content",south__paneSelector:"#cms-page-footer"};switch(cms.settings.layoutType){case"sidebarLeft":$.extend(config,layout.sidebarLeft);break;case"sidebarRight":$.extend(config,layout.sidebarRight);break;}pageLayout=$("body").layout(config);}};var cms={settings:{gallery:new Array()},elements:{overlay:$("<div />",{id:"cms-overlay-busy"})},pagination:function(url,obj){var widgetContent=$(obj).closest("div.cms-widget-content");widgetContent.append(cms.elements.overlay);var fullUrl=window.location.protocol+"//"+window.location.host+"/"+cms.settings.apexpath+decodeURIComponent(url)+Math.random();widgetContent.load(fullUrl+" #cms-ajax > *",function(){widgetContent.trigger("cmsrefresh");});return false;},fileman:function(url,obj){var widgetContent=$(obj).closest("div.cms-widget-content");widgetContent.append(cms.elements.overlay);var fullUrl=window.location.protocol+"//"+window.location.host+"/"+cms.settings.apexpath+decodeURIComponent(url)+Math.random();widgetContent.load(fullUrl+" #cms-ajax > *",function(){widgetContent.trigger("cmsrefresh");});return false;},modal:function(url,width,height,id){if(!id){id="modal";}if(!width){width=700;}if(!height){height=500;}$("body").append('<div id="'+id+'" class="cms-modal-popup"><iframe name="'+id+'" src="'+url+'" frameborder="0" scrolling="no" width="100%" height="100%"></iframe><div class="cms-modal-helper"></div></div>');$("#"+id).dialog({width:width,height:height,minWidth:300,minHeight:200,modal:true,resizable:true,draggable:true,zIndex:999999,resizeStart:function(){$(this).children(".cms-modal-helper").show();},resizeStop:function(){$(this).children(".cms-modal-helper").hide();},dragStart:function(){$(this).children(".cms-modal-helper").show();},dragStop:function(){$(this).children(".cms-modal-helper").hide();},close:function(){$(this).dialog("destroy").remove();}});},togglePageWidth:function(){$("#cms-page").toggleClass("cms-page-fullwidth");},gotoModule:function(url){window.parent.location=url+window.parent.apexVar.sessionId;return false;},init:function(){$(".cms-widget-gallery-inline ul.cms-list-gallery img").center();$(".cms-widget-gallery-inline ul.cms-list-gallery div[id^=gallery] > *:not(:first-child)").hide();$(".cms-widget-gallery-inline div[id^=gallery] > a:first-child > img, .cms-widget-gallery-inline div[id^=gallery] > img:first-child").each(function(){var img=$(this);var gallery=img.closest("div[id^=gallery]");if(img.attr("complete")==false){$('<span class="loader"></span>').insertAfter(img).center();img.hide();img.one("load",function(){var img=$(this);var gallery=img.closest("div[id^=gallery]");img.next("span.loader").remove();img.fadeIn();gallery.cycle(cms.settings.gallery[gallery.attr("id")]);});}else{gallery.cycle(cms.settings.gallery[gallery.attr("id")]);}});$(".cms-widget-gallery-thumbnail ul.cms-list-gallery img, .cms-widget-gallery-popup ul.cms-list-gallery img").each(function(){var img=$(this);if(img.attr("complete")==false){$('<span class="loader"></span>').insertAfter(img).center();img.hide();img.one("load",function(){var img=$(this);img.next("span.loader").remove();img.center().fadeIn();});}else{img.center();}});$("#ul.cms-list-drop, ul.cms-list-flyout").mouseenter(function(){if(pageLayout&&pageLayout.allowOverflow){pageLayout.allowOverflow(this);}}).mouseleave(function(){if(pageLayout&&pageLayout.resetOverflow){pageLayout.resetOverflow(this);}});$("li:has( > ul.cms-sublist-drop) > :first-child").prepend('<span class="cms-icon cms-icon-sublist-drop"></span>');$("li:has( > ul.cms-sublist-flyout) > :first-child").prepend('<span class="cms-icon cms-icon-sublist-flyout"></span>');$("div.cms-widget-nav-drop, div.cms-widget-list-drop, div.cms-widget-nav-flyout, div.cms-widget-list-flyout, div.cms-widget-nav-mega, div.cms-widget-list-mega").mouseenter(function(){$("div.cms-widget").css("z-index",0);$(this).css("z-index",99999);});$("ul.cms-list-drop li, ul.cms-list-flyout li").mouseenter(function(){var obj=$(this);$("ul.cms-sublist-drop, ul.cms-sublist-flyout").not(obj.parents("ul.cms-sublist")).hide();if(obj.hasClass("cms-hasSublist")){obj.addClass("cms-sublist-open");obj.css("z-index",99999).siblings().css("z-index",0);var sublist=obj.children("ul.cms-sublist");if(sublist.hasClass("cms-sublist-drop")){var left=0;if(obj.closest("div.cms-widget").hasClass("cms-widget-list-mega")){sublist.css({visibilty:"hidden",display:"block"});var width=0;sublist.children("li").each(function(){width+=$(this).outerWidth(true);});sublist.css({display:"none"});if(width>obj.parent().outerWidth()){width=obj.parent().outerWidth();}left=-((width/2)-(obj.outerWidth()/2));if(obj.offset().left+left<obj.parent().offset().left){left=-obj.position().left;}if(obj.offset().left+left+width>obj.parent().offset().left+obj.parent().width()){left=-(width-(obj.parent().width()-obj.position().left));}sublist.css({left:left,top:obj.outerHeight(),width:width,"z-index":9999}).slideDown("fast");}else{sublist.css({left:left,top:obj.outerHeight(),"z-index":9999}).slideDown("fast");}}else{if(sublist.hasClass("cms-sublist-flyout")){sublist.css({left:obj.outerWidth(),top:0,"z-index":9999}).show();}}}else{$(this).siblings().find("ul.cms-sublist").stop(true,true).hide();}}).mouseleave(function(){$(this).find("ul.cms-sublist").stop(true,true).hide();$(this).removeClass("cms-sublist-open");});cms.update();},update:function(e){var root=$(document);if(e){root=$(e.target);}root.find("a[onclick*=gotoModule]").removeAttr("target");$("<span>",{"class":"cms-icon cms-icon-tree-expand",title:"Expand/Collapse",click:function(){$(this).toggleClass("cms-icon-tree-expand cms-icon-tree-collapse").closest("li.cms-hasSublist").children("ul.cms-sublist").toggle();return false;}}).prependTo(root.find("ul.cms-list-tree li.cms-hasSublist > a"));root.find("ul.cms-list-tree li.cms-current").parents("li.cms-hasSublist").andSelf().find("> a span.cms-icon-tree-expand").click();$("<span>",{"class":"cms-icon cms-icon-hideshow-expand",title:"Expand/Collapse",click:function(){$(this).closest("ul").find("span.cms-icon-hideshow-collapse").not(this).toggleClass("cms-icon-hideshow-expand cms-icon-hideshow-collapse").closest("li").children("div:last").hide();var obj=$(this).toggleClass("cms-icon-hideshow-expand cms-icon-hideshow-collapse").closest("li").children("div:last");if(obj.css("display")=="none"){obj.show();}else{obj.hide();}return false;}}).prependTo(root.find("h4.cms-rss-title > a, h4.cms-article-title > a").filter("div.cms-display-hideshow *"));root.find("span.cms-icon-fileman-versions").click(function(){var t=$(this);if(t.is(".cms-display-interactive *")){var el=t.closest("tr").nextUntil("tr.cms-fileman-title, tr.cms-fileman-desc");}else{if(t.is(".cms-display-detailed *")){var el=t.parent().siblings("ul.cms-fileman-versions");}}var s=t.attr("title");t.attr({title:t.attr("longdesc"),longdesc:s});if(el.css("display")=="none"){el.show();}else{el.hide();}});}};$(document).ready(function(){if(typeof cms.settings.layoutType!="undefined"){layout.init();}cms.init();}).bind("cmsrefresh",cms.update);GetCookie=function(){return false;};
