// JavaScript Document
var currentpage = window.location.hostname.toString();

if (currentpage.indexOf("cms.omedix.com") >= 0)
{
    // DON'T RUN SIFR
} else {
	// SIFR
	var archersemi 		= 	{ src: '../_swf/archer-semi.swf' };
	var avenirbold		= 	{ src: '../_swf/avenir-bold.swf' };
	var avenirlight		= 	{ src: '../_swf/avenir-light.swf' };
	
	sIFR.ua.supported = sIFR.ua.supported && (!sIFR.ua.ie || sIFR.ua.ieVersion > 6);
	
	sIFR.activate(archersemi);
	sIFR.activate(avenirbold);
	sIFR.activate(avenirlight);
	
	
	sIFR.replace(archersemi, {
		selector: '#content h1, #fullcontent h1, #homecontent h1',
		wmode: 'transparent'
		,css: {
		'.sIFR-root': { 'font-size' : '36px' , 'color' : '#432530'}
		}
	});
	
	sIFR.replace(archersemi, {
		selector: '.lead',
		wmode: 'transparent'
		,css: {
		'.sIFR-root': { 'font-size' : '36px' , 'color' : '#fb4b73'}
		}
	});
	
	sIFR.replace(avenirlight, {
		selector: '.regular',
		wmode: 'transparent'
		,css: {
		'.sIFR-root': { 'font-size' : '20px' , 'color' : '#906230'}
		}
	});
	
	sIFR.replace(archersemi, {
		selector: '#content h2, #fullcontent h2, #homecontent h2, #homesidebar h2',
		wmode: 'transparent'
		,css: {
		'.sIFR-root': { 'font-size' : '26px' , 'color' : '#432530'}
		}
	});
	
	sIFR.replace(archersemi, {
		selector: '.providers-sorth2',
		wmode: 'transparent'
		,css: {
		'.sIFR-root': { 'font-size' : '26px' , 'color' : '#432530', 'text-align' : 'center'}
		}
	});
	
	/*sIFR.replace(archersemi, {
		selector: '.doc span',
		wmode : 'transparent'
		,css: {
		'.sIFR-root': { 'font-size' : '15px' , 'color' : '#000000', 'text-align' : 'center'}
		}
	});*/
	
	sIFR.replace(avenirbold, {
		selector: '#content h3, #fullcontent h3, #sidebar h3, #sortbox span',
		wmode: 'transparent'
		,css: [
			'.sIFR-root { font-size:18px; color: #151515; font-weight: bold }'
			,'a { text-decoration: none; }'
			,'a:link { color: #151515; }'
			,'a:hover { color: #333333; }'
		] 	
	});
	
	sIFR.replace(avenirbold, {
		selector: '.phonenumber',
		wmode: 'transparent'
		,css: {
		'.sIFR-root': { 'font-size' : '26px' , 'color' : '#492734', 'text-align' : 'right' }
		}
	});
}

$(function(){	
	/* ZEBRAAAA */
	$(".zebra tr:nth-child(odd)").addClass("odd");
	
	/* Searchbar fixin' */
	$("#ctl00_Content_SEARCHCONTROL_searchKeywords").click(function(){
		$(this).attr("value","");
	});
	
	$("#sortbox a").click(function(){
		$("#sortbox a").removeClass("active");						   
		var section = $(this).attr("title");
		$(this).addClass("active");
		
		if (section != "") {
			$("#sortme img").each(function(){
				var hasclass = $(this).hasClass(section).toString();	 
				
				if(hasclass != "true") {
					$(this).hide(1000);
				} else {
					$(this).show(1000);	
				}				
			});
		} else {
			$("#sortme img").show(1000);
		}
		
		return false;
	});	
	
});