function focus_text(div){
if($(div).val() == $(div).attr('defaultValue')){
      $(div).val('');
      $(div).css("color", "black");
    }

}

function blur_text(div){
if($(div).val() == '')
    {
      $(div).val($(div).attr('defaultValue'));
      $(div).css("color", "gray");
    } 

}

//*************************
//Video.js 
//Plugin Name: Simple Flash Video
//Version: 1.8
//Plugin URI: http://www.simplethoughtproductions.com/category/simple-flash-video/
//Description: Detects device viewing the content and renders out the proper html
//Author: Josh Chesarek 
//Author URI: http://www.simplethoughtproductions.com
//Detection code utilized from http://www.hand-interactive.com/resources/detect-mobile-javascript.htm

var deviceAndroid = "android";

//**************************
// Detects if the current device is an Android OS-based device.
function DetectAndroid()
{
   if (uagent.search(deviceAndroid) > -1)
      return true;
   else
      return false;
}


//**************************
// Detects if the current device is an iPhone.
function DetectIphone()
{
   if (uagent.search(deviceIphone) > -1)
      return true;
   else
      return false;
}

//**************************
// Detects if the current device is an iPod Touch.
function DetectIpod()
{
   if (uagent.search(deviceIpod) > -1)
      return true;
   else
      return false;
}

var deviceIphone = "iphone";
var deviceIpod = "ipod";

//Initialize our user agent string to lower case.
var uagent = navigator.userAgent.toLowerCase();

//**************************
// Detects if the current device is an iPhone or iPod Touch.
function DetectIphoneOrIpod()
{
    if (DetectIphone())
       return true;
    else if (DetectIpod())
       return true;
    else
       return false;
}

var deviceBB = "blackberry";
var vndRIM = "vnd.rim"; //Detectable when BB devices emulate IE or Firefox



//Detect what is looking at the page

if (DetectAndroid())
{
	document.write ('<a href="rtsp://simplethoughtproductions.com/foxdaycam/live.sdp"><img src="http://simplethoughtproductions.com/foxdaycam/iphone.png"> <br />Click here to watch</a>');
        document.write ('<br /><script type="text/javascript">\n');
        document.write ('var _gaq = _gaq || [];\n');
        document.write ("_gaq.push(['_setAccount', 'UA-937895-3']);\n");
        document.write ("_gaq.push(['_trackPageview']);\n");
        document.write ('\n(function() {\n');
        document.write ("var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n");
        document.write ("ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n");
        document.write ("var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n");
        document.write ("})();\n \n");
        document.write ("</script>");
}

else if (DetectIphoneOrIpod())
{
	document.write ('<a href="http://www.simplethoughtproductions.com:1935/foxdaycam/live.sdp/playlist.m3u8"><img src="http://simplethoughtproductions.com/foxdaycam/iphone.png"><br />Click here to watch</a>');
        document.write ('<br /><script type="text/javascript">\n');
        document.write ('var _gaq = _gaq || [];\n');
        document.write ("_gaq.push(['_setAccount', 'UA-937895-3']);\n");
        document.write ("_gaq.push(['_trackPageview']);\n");
        document.write ('\n(function() {\n');
        document.write ("var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n");
        document.write ("ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n");
        document.write ("var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n");
        document.write ("})();\n \n");
        document.write ("</script>");
}

