// JavaScript Document /* --- This is the only function that was really used from util-functions.js --- */ function openPop(url,w,h) { window.open(url, "popup_id", "scrollbars,resizable,width="+w+",height="+h+""); return false; } /* --- Replace clear-default-text.js --- */ $(document).ready(function() { $("input[type='text'][class='cleardefault']").each(function(){ $(this).css('color','#999999').focus(function(){ if ($(this).val() == this.defaultText) { $(this).val('').css('color','#000000'); } }).blur(function(){ if ($(this).val() == '' && this.defaultText) { $(this).val(this.defaultText).css('color','#999999'); } }); if ($(this).val() != '') { this.defaultText = $(this).val(); } }); }); /* --- swfobject replaced with jmedia, part of jquery library --- */ /* --- flashreplacement.js now uses jmedia --- */ // JavaScript Document function myFR($sFlash) { if($sFlash == 'home') { var attr = { src: '/inc/flash/homeflash.swf', width: '100%', height: '242', bgcolor: 'FFFFFF', wmode: 'opaque', flashVersion: '8.0.0', // required flash version elemClass: 'swfHome', flashvars: {} }; $('#artcontent').flash(attr, { version: attr.flashVersion/*, expressInstall: true, expressInstallSrc: '/inc/flash/XI.swf'*/ }); } // Flash Header Replacements if($('#flashheader')) { var $_title = $('#flashheader').html(); var $_color; switch ($sFlash) { case 'learning': $_color = "0x877444"; // Brown break; case 'services': $_color = "0x227aba"; // Blue break; case 'support': $_color = "0xffb92e"; // Yellow Orange break; case 'testimonials': $_color = "0xff9933"; // Orange break; case 'resources': $_color = "0x4a738a"; // Dark Blue break; case 'about': $_color = "0x77a85a"; // Green break; }; var attr = { src: '/inc/flash/sectionheader.swf', width: '100%', height: '140', bgcolor: 'FFFFFF', wmode: 'opaque', flashVersion: '6.0.0', // required flash version elemClass: 'h1title', flashvars: {strHeader: $_title, fColor: $_color} }; $('#flashheader').flash(attr, { version: attr.flashVersion/*, expressInstall: true, expressInstallSrc: '/inc/flash/XI.swf'*/ }); } } /* --- Replace classreplacement.js --- */ function makeClickable() { $('li.clickable').each(function(){ $(this).hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');}).click(function(){ window.location = $('a:first','p.article').attr('href'); }).children('p.article').hide(); }); } /* --- shadowbox for free estimate form --- */ var shadowboxdefaults = { initialHeight: 200, initialWidth: 300, overlayOpacity: 0.7, enableKeys: false }; function startShadowbox() { Shadowbox.init(shadowboxdefaults); }