I chose your suggested solution #2 because, that sounded more straightforward and quick. But, I'm getting some JavaScript error which is preventing me to run this successfully:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls.
Source Error:
Line 1:
Line 2: <head>
Line 3: <script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.
js"></script>
Line 4: <script language="javascript" type="text/javascript">
Line 5: $(function () {
Source File: /Default.aspx Line: 3
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
-------
I placed the script code in the default.aspx with <head>..</head> enclosed.