/*****************************************************************************
It is adviced to place the sIFR JavaScript calls in this file, keeping it
separate from the `sifr.js` file. That way, you can easily swap the `sifr.js`
file for a new version, while keeping the configuration.

You must load this file *after* loading `sifr.js`.

That said, you're of course free to merge the JavaScript files. Just make sure
the copyright statement in `sifr.js` is kept intact.
*****************************************************************************/

// Make an object pointing to the location of the Flash movie on your web server.
// Try using the font name as the variable name, makes it easy to remember which
// object you're using. As an example in this file, we'll use Futura.
//var futura = { src: '/path/to/futura.swf' };

// Get folder location /webdev_abv/ or /abv/
var url = window.location.href;

//var url = document.location.toString() ; //url
	var e_url = '' ; //edited url
	var p = 0 ; //position
	var p2 = 0 ;//position 2
	var p3 = 0; //position 3
	p = url.indexOf("//") ;
	e_url = url.substring(p+2) ;
	p2 = e_url.indexOf("/") ;
	f_url = url.substring (p+p2+3); //get url webdev_abv/ or abv/
	p3 = f_url.indexOf ("/");
	var root_path = url.substring(p+p2+2,p+p2+p3+4);
	//alert (root_path)
	
	
// end get folder location	/webdev_abv/ or /abv/
	var centuryGothic = { src: root_path+'resources/swf/CenturyGothic.swf' };
	
// Now you can set some configuration settings.
// See also <http://wiki.novemberborn.net/sifr3/JavaScript+Configuration>.
// One setting you probably want to use is `sIFR.useStyleCheck`. Before you do that,
// read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad>.

// sIFR.useStyleCheck = true;

// Next, activate sIFR:
//sIFR.activate(futura);
sIFR.activate(centuryGothic);
// If you want, you can use multiple movies, like so:
//
//    var futura = { src: '/path/to/futura.swf' };
//    var garamond = { src '/path/to/garamond.swf' };
//    var rockwell = { src: '/path/to/rockwell.swf' };
//    
//    sIFR.activate(futura, garamond, rockwell);
//
// Remember, there must be *only one* `sIFR.activate()`!

// Now we can do the replacements. You can do as many as you like, but just
// as an example, we'll replace all `<h1>` elements with the Futura movie.
// 
// The first argument to `sIFR.replace` is the `futura` object we created earlier.
// The second argument is another object, on which you can specify a number of
// parameters or "keyword arguemnts". For the full list, see "Keyword arguments"
// under `replace(kwargs, mergeKwargs)` at 
// <http://wiki.novemberborn.net/sifr3/JavaScript+Methods>.
// 
// The first argument you see here is `selector`, which is a normal CSS selector.
// That means you can also do things like '#content h1' or 'h1.title'.
//
// The second argument determines what the Flash text looks like. The main text
// is styled via the `.sIFR-root` class. Here we've specified `background-color`
// of the entire Flash movie to be a light grey, and the `color` of the text to
// be red. Read more about styling at <http://wiki.novemberborn.net/sifr3/Styling>.
sIFR.replace(centuryGothic, {
  selector: '#bottomcontentcontainer h1', 
  wmode: 'transparent',
  css: '.sIFR-root { color: #394052; font-size:14px;	padding:5px 0px; margin:0px; }'
});
sIFR.replace(centuryGothic, {
  selector: '.phoneNumberText', 
  wmode: 'transparent',
  css: '.sIFR-root { color: #020e2d; font-size:24px; text-align:right }'
});
sIFR.replace(centuryGothic, {
  selector: '.headerTaglineText', 
  wmode: 'transparent',
  css: '.sIFR-root { color: #4f576b; font-size:14px;text-align:right }'
});
sIFR.replace(centuryGothic, {
  selector: '.headerTaglineTextLarge', 
  wmode: 'transparent',
  css: '.sIFR-root { color: #4f576b; font-size:18px;font-weight:bold;text-align:right }'
});

sIFR.replace(centuryGothic, {
  selector: '.pageTitleBlue', 
  wmode: 'transparent',
  css: 	['.sIFR-root { color: #102238; font-size:24px; padding:0px; margin:0px; text-align:center }' 
  		,'a {color: #102238; text-decoration: underline }'
		,'a:link { color: #102238; text-decoration: underline}'
		,'a:hover { color: #102238; text-decoration: underline}'
		,'a:visited { color: #102238;  text-decoration: underline}'
		]
});

sIFR.replace(centuryGothic, {
  selector: '.pageTitleRed', 
  wmode: 'transparent',
  css: '.sIFR-root { color: #7d0121; font-size:24px; padding:0px; margin:0px;text-align:left }'
});
sIFR.replace(centuryGothic, {
  selector: '#col2leftcol h2', 
  wmode: 'transparent',
  css: '.sIFR-root { font-size: 14px; 	color:#7d0121; 	text-align: center;}' /*red*/
});
sIFR.replace(centuryGothic, {
  selector: '#rightcontentcontainer h2', 
  wmode: 'transparent',
  css: 	['.sIFR-root { font-size: 14px; 	color:#7d0121; }' 
  		,'a { color:#7d0121; text-decoration: underline }'
		,'a:link { color:#7d0121; text-decoration: underline}'
		,'a:hover { color: #102238; text-decoration: underline}'
		,'a:visited { color:#7d0121;  text-decoration: underline}'
		]
  
});
sIFR.replace(centuryGothic, {
  selector: '#rightcontentcontainer .h2housesize', 
  wmode: 'transparent',
  css: 	['.sIFR-root { font-size: 14px; 	color:#7d0121; text-align:center; padding:0px; margin:0px }' 
  		,'a { color:#7d0121; text-decoration: underline }'
		,'a:link { color:#7d0121; text-decoration: underline}'
		,'a:hover { color: #102238; text-decoration: underline}'
		,'a:visited { color:#7d0121;  text-decoration: underline}'
		]
  
});
sIFR.replace(centuryGothic, {
  selector: '.rightcolPhone', 
  wmode: 'transparent',
  css: '.sIFR-root { font-size: 14px; 	font-size:36px; color:#7d0121;text-align: center; margin:0px; padding:0px;}'
});

/*sIFR.replace(centuryGothic, {
  selector: '.pageTitle2BlueBold', 
  wmode: 'transparent',
  css: ['.sIFR-root { color: #102238; font-size:18px; font-weight:bold; text-align: center; padding:0px; margin:0px;}'
  		,'a { color:#ffffff; text-decoration: underline }'
		,'a:link { color: #ffffff; text-decoration: underline}'
		,'a:hover { color: #cccccc; text-decoration: underline}'
		]
});*/
sIFR.replace(centuryGothic, {
  selector: '.pageTitle2BlueBold', 
  wmode: 'transparent',
  css: ['.sIFR-root { color: #102238; font-size:18px; font-weight:bold; text-align: center; padding:0px; margin:0px;}'
  		,'a { color: #102238; text-decoration: underline }'
		,'a:link { color: #102238; text-decoration: underline}'
		,'a:hover { color: #666666; text-decoration: underline}'
		]
});
sIFR.replace(centuryGothic, {
  selector: '#bannerleft h1', 
  wmode: 'transparent',
  css: '.sIFR-root { font-size: 18px; 	color:#ffffff; 	line-height:50px; margin:0px; padding:0px; text-align:center;}' /*white*/
});
sIFR.replace(centuryGothic, {
  selector: '#rightcontentcontainer h1', 
  wmode: 'transparent',
  css: ['.sIFR-root { color: #102238; font-size:16px; font-weight:bold; padding:0px; margin:0px;}'
  		,'a { color:#ffffff; text-decoration: underline }'
		,'a:link { color: #ffffff; text-decoration: underline}'
		,'a:hover { color: #cccccc; text-decoration: underline}'
		]
});
sIFR.replace(centuryGothic, {
  selector: '.special', 
  wmode: 'transparent',
  css: 	['.sIFR-root { font-size: 14px; 	color:#7d0121; text-align:center; }' 
  		,'a { color:#7d0121; text-decoration: underline }'
		,'a:link { color:#7d0121; text-decoration: underline}'
		,'a:hover { color: #102238; text-decoration: underline}'
		,'a:visited { color:#7d0121;  text-decoration: underline}'
		]
  
});
