var blink_on = true;
var blink_color = "#BF2026";
var blink_counter = 15;

$(function(){
	$('#tabs').tabs();
	
	var flashvars = {
	  page: 1
	};
	var params = {
	  wmode: "transparent",
	  align: 'top',
	  salign: 't'
	};
	var attributes = {
	  id: "myDynamicContent",
	  name: "myDynamicContent"
	};
	swfobject.embedSWF("/wp-content/themes/sostheme/flash/purewater_video.swf", "myContent", "401", "228", "9.0.0", "", flashvars, params, attributes, function(e){});
	
	
	$("#testinput_xml").focus(function(){
		$("#testinput_xml").css("color", "#BF2026");
		blink_on = false;					   						   
	});
	
	blink_text();
	
});
function clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
};
function replaceDefault(el) {
	el.value = el.defaultValue
};
$(document).ready(function() {
	//$("#companies").accordion({ active: false, collapsible: true, autoHeight: false });
	$('#product_tab').tabify();
});

getTwitters('tweeter', { 
  id: 'sapphireoffice', 
  count: 1, 
  enableLinks: true, 
  ignoreReplies: true, 
  clearContents: true,
  template: '"%text%" <a href="http://twitter.com/%user_screen_name%/statuses/%id%/">%time%</a>'
});


function blink_text(){
	if(blink_on){
		blink_counter--;
		if(blink_color == "#BF2026"){
            blink_color = "#CCCCCC";
		}else{
            blink_color = "#BF2026";
		}
        $("#testinput_xml").css("color", blink_color)
		if(blink_counter > 0){
			setTimeout("blink_text()", 800);
		}else{
			$("#testinput_xml").css("color", "#BF2026")
		}
	}
}
