if(Ka.Info.PAGE == "pageBuilder/v1/avermedia-contest" || Ka.Info.PAGE == "pageBuilder/v1/avermedia-contest-guidelines" || Ka.Info.PAGE == "pageBuilder/v1/avermedia-contest-winner" || Ka.Info.PAGE == "pageBuilder/v1/avermedia-contest-submissions") {
	$j('body').addClass('contestPage');
	$j('#ka-pb-pending').appendTo('#ka_headerBtmNav');
	$j('#navLogo').after('<ul id="contestNav"><li id="nav_home"><a href="http://media.community.avercampus.com/page/avermedia-contest.html">home</a></li><li id="nav_createAccount"><a href="http://www.avercampus.com/video-contest-create-account.asp">create account</a></li><li id="nav_login"><a href="http://www.avercampus.com/video-contest-login.asp">log in</a></li><li id="nav_upload"><a href="http://media.community.avercampus.com/service/displayVideoUpload.kickAction?as=153709&param=uploadToContest">upload video</a></li><li id="nav_guidelines"><a href="http://media.community.avercampus.com/page/avermedia-contest-guidelines.html">guidelines</a></li></ul>');
	$j('#ka-mod-a4-admintags').hide();
	/*
	if(Ka.Info.USERNAME != 'avercmadmin') {
		$j('#ka_headerBtmNav').hide();
	}
	*/
	
	$j('body.contestPage').css('color', '#fff');
	$j('body.contestPage #footer').siblings('a').hide();
	$j('body').show();
}

if(Ka.Info.PAGE == "pageBuilder/v1/avermedia-contest") {
	$j('#nav_home').addClass('current');
}

if(Ka.Info.PAGE == "pageBuilder/v1/avermedia-contest-guidelines") {
	$j('#nav_guidelines').addClass('current');
	if(Ka.Info.USERNAME == '') {
		$j('#enterContest').attr('href', 'http://www.avercampus.com/video-contest-login.asp');
	}
}

//check file type before submitting
function validateAddVideo(formObj){ 
	if (window.location.href.indexOf("&param=uploadToContest") != -1) {	
		var acceptedFiles = new Array('flv', 'FLV', 'wmv', 'WMV', 'asf', 'ASF', 'avi', 'AVI', 'mov', 'MOV', '3gp', '3GP', 'mpg', 'MPG', 'mpeg', 'MPEG', 'mp4', 'MP4');
		var fileType = $j('#mediaFile').val();
		fileType = fileType.split(".");
		fileType = fileType[1];
		//alert(fileType);
		for (var i=0; i < acceptedFiles.length; i++) {
			if(fileType == acceptedFiles[i]) {
				//alert('match!');
				break;
			}		
			if(acceptedFiles[i] == acceptedFiles[acceptedFiles.length -1]) {
				$j('#ka_fileTr').prepend('<div errormessagecontainer="" class="ka_Error">This file type is incorrect.</div>');
				return false;
			}
		}
	}
	
	addUrlParameters();
	if (!Ka.events.dispatchEvent('add-video-page-before-submit')) {return false;}
	$j('.ka_Error').html(''); // hide all errors
	Ka.formValidation.actions.disableSubmit(formObj);
	validateTags(formObj);		
}


//add a video page
if(Ka.Info.PAGE == 'pages/newVideoUpload.jsp') {
	if (window.location.href.indexOf("&param=uploadToContest") != -1) {	
		$j('#mediaAdminTags').val('contest');
		$j('body').addClass('contestPage');
		/*
		if(Ka.Info.USERNAME != 'avercmadmin') {
			$j('#ka_headerBtmNav').hide();
		}
		*/
		
		$j('#navLogo').after('<ul id="contestNav"><li id="nav_home"><a href="http://media.community.avercampus.com/page/avermedia-contest.html">home</a></li><li id="nav_createAccount"><a href="http://www.avercampus.com/video-contest-create-account.asp">create account</a></li><li id="nav_login"><a href="http://www.avercampus.com/video-contest-login.asp">log in</a></li><li id="nav_upload" class="current"><a href="http://media.community.avercampus.com/service/displayVideoUpload.kickAction?as=153709&param=uploadToContest">upload video</a></li><li id="nav_guidelines"><a href="http://media.community.avercampus.com/page/avermedia-contest-guidelines.html">guidelines</a></li></ul>');
		$j('#ka_mainContainer').prepend('<div id="contestHomeMsg"><img src="http://www.avercampus.com/images/contestPromo.jpg" /></div><h3>Contest is now closed for submissions!</h3>');
		$j('#ka_videoSubmit').before('<div id="contestRulesWrapper"><h5>2010 AVerMedia Interactive Classroom Video Contest Official Rules:</h5><div id="contestRules" class="contestContentInfo"><p class="guideline" style="margin-top:0px;">THIS CONTEST IS INTENDED ONLY FOR RESIDENTS OF THE UNITED STATES AND SHALL BE CONSTRUED ACCORDING TO UNITED STATES LAW. DO NOT ENTER THIS CONTEST UNLESS YOU ARE A RESIDENT OF THE UNITED STATES AT THE TIME OF ENTRY.</p><p class="guideline" style="margin-top:0px;">NO PURCHASE OR PAYMENT OF ANY KIND IS NECESSARY TO ENTER OR TO WIN. A PURCHASE WILL NOT INCREASE THE CHANCE OF WINNING. VOID WHERE PROHIBITED BY LAW. BY ENTERING, YOU AGREE TO BE BOUND BY THESE OFFICIAL RULES AND BY THE RESPECTIVE DECISIONS OF SPONSOR AND THE JUDGES, WHICH DECISIONS SHALL BE FINAL IN ALL RESPECTS.</p><p class="guideline">1. ELIGIBILITY: Open only to legal residents of the 50 United States or the District of Columbia who, as of June 30, 2010, have attained the age of majority (generally 18 years of age or older, except that residents of Alabama and Nebraska must be 19 years of age or older, and residents of Mississippi must be 21 years of age or older). The following individuals are not eligible to enter the Contest or to appear in a Video: Employees, contractors, attorneys, directors and officers of AVerMedia Information, Inc. (&quot;Sponsor&quot;) and its parent, affiliated companies, subsidiaries, distributors, advertising, promotion, web design, fulfillment and insurance agencies, judging and contest agencies involved in the administration, fulfillment or execution of the Contest (collectively, &quot;Contest Parties&quot;), and the immediate family members (spouse, parent, child, sibling and spouse or &quot;step&quot; of each) and those living in the same household (those persons, regardless of whether related, who live in the same residence for at least three months during the 12-month period immediately preceding the start date of the Contest) of any such employee, contractor, attorney, director or officer. </p><p class="guideline">2. START DATE AND CONTEST SCHEDULE: You may enter the AVerMedia 21st Century Classroom Contest (the &quot;Contest&quot;) between 3:00 p.m. Eastern Time on 9/1/2010 and 11:59 p.m. Eastern Time on 10/15/2010.</p><p class="guideline">3. HOW TO ENTER: To enter the Contest go to http://media.community.avercampus.com/page/avermedia-contest.html and click on the login link for the AVerMedia 21st Century Classroom Contest registration and video upload page. Follow the on-screen directions to complete and submit a registration form for the Contest or, if you have previously registered, you can log in by entering your username and password. When prompted, you will be asked to submit/upload your original video to the web site.  Your Video may not be acknowledged and will not be received or held &quot;in confidence.&quot; Video should be a commercial-type video of yourself, students in your classroom, teachers, school administrators, etc., and should promote AVerMedia products and services. Before uploading your video, you will be required to agree (a) that you have read or have had read to you these Official Rules, (b) that you accept, agree with and agree to be bound by and subject to these Official Rules, and (c) that you have received express permission to use the name/image/ likeness/voice of each identifiable person appearing in your video (which permission, in the case of a minor, must be signed by the minor&prime;s parent or legal guardian). If your video is selected as a finalist in the Contest, you will be required to submit a release (to be provided by Sponsor) signed by each identifiable person appearing in your video (or, if such person is a minor, signed by such person&prime;s parent or legal guardian), which release will grant to Sponsor permission to use such person&prime;s name/image/likeness/voice. Once uploaded, your video will not be returned. Any video which is submitted without all required information or which does not fully adhere to these Official Rules as determined by Sponsor in its sole discretion will be considered void. Sponsor may, in its sole discretion, remove, delete or disqualify any video which it considers inappropriate or which it considers not to have been submitted in full compliance with these Official Rules.</p><p class="guideline">4. VIDEO REQUIREMENTS: VIDEO MUST NOT EXCEED 120 SECONDS IN LENGTH. The Video file must comply with the file format and file size specifications indicated on the Contest website. The Video must relate to the promotion of AVerMedia products or services. The Video must be primarily in English, and should be in commercial form consistent with these Official Rules. By submitting a Video, you represent, acknowledge and agree that you have produced and filmed the Video, that you have all rights, approvals and/or consents necessary to submit the Video on the terms provided in these Official Rules and that your Video does not violate the rights of any other person or entity or any federal, state or local law, rule or regulation. Each Video must be the original work of the entrant produced for this Contest; it must not have been entered in or won any other or previous contest or award; it must not previously have been published in any medium; it must not infringe on the intellectual property or other rights of any person or entity; it must not contain any copyrighted works (other than as owned by the entrant); it must not contain nudity, profanity or gratuitous violence; and it must not contain defamatory statements (including without limitation words or symbols which are generally considered offensive to persons of any certain race, ethnicity, religion, sexual orientation or socioeconomic group). Without limiting the foregoing, any Video which, in the sole opinion of Sponsor, is deemed unsuitable for public presentation or is inconsistent with the theme or image of the Contest will be disqualified. You may enter more than once; however, each entry must be accompanied by a unique Video. Decisions of Sponsor and its designated judges are final and binding in all respects.</p><p class="guideline">5. ADDITIONAL REQUIREMENTS: The person obtaining the Contest ID and uploading the Video will be deemed the entrant (&quot;Entrant&quot;). The Entrant is the one person who owns the email address associated with the Contest ID. If any group collaborates on a Contest entry or submission, they must designate one person as the agent of the group to enter the Contest, to agree to these Official Rules and to accept any prize on behalf of the group. Neither Sponsor nor any of the Contest Parties will be liable for or in connection with any disputes between or among collaborators arising under or relating to the Contest.</p><p class="guideline">All Videos will be reviewed for content before being published or judged. Such review does not relieve Entrant of the responsibility to comply fully with these Official Rules. Videos which do not comply in all material respects with these Official Rules or that otherwise contain prohibited or inappropriate content as determined by Sponsor in it sole discretion will be disqualified. Sponsor makes the final decision as to which Videos are eligible to participate in the Contest and be considered for a prize.</p><p class="guideline">BY ENTERING THIS CONTEST AND UPLOADING YOUR VIDEO, YOU IRREVOCABLY GRANT TO SPONSOR AND ITS SUCCESSORS AND ASSIGNS THE EXCLUSIVE, UNCONDITIONAL AND PERPETUAL WORLDWIDE RIGHT TO DISPLAY, POST, PUBLISH, DISTRIBUTE, USE, ADAPT, EDIT AND/OR MODIFY SUCH VIDEO IN ANY WAY, IN ANY AND ALL MEDIA ANYWHERE IN THE WORLD AND FOR ANY PURPOSE, WITHOUT LIMITATION AND WITHOUT NOTICE TO YOU, WITHOUT ANY FURTHER APPROVAL FROM YOU AND WITHOUT ANY COMPENSATION TO YOU. YOU FURTHER AGREE TO IRREVOCABLY ASSIGN, CONVEY AND TRANSFER TO SPONSOR ANY AND ALL RIGHTS, TITLE AND INTEREST IN YOUR VIDEO, INCLUDING WITHOUT LIMITATION ALL COPYRIGHTS AND OTHER INTELLECTUAL PROPERTY RIGHTS, AND YOU AGREE TO WAIVE ALL MORAL RIGHTS IN THE VIDEO. YOU ALSO AGREE TO FULLY RELEASE, INDEMNIFY, DEFEND AND HOLD HARMLESS SPONSOR AND THE CONTEST PARTIES FROM AND AGAINST (1) ANY AND ALL CLAIMS, DEMANDS, ACTIONS, SUITS OR PROCEEDINGS THAT MAY BE MADE, BROUGHT OR THREATENED ALLEGING (A) THAT ANY PORTION(S) OR ALL OF YOUR VIDEO INFRINGES ON THE RIGHTS OF ANY THRID PARTY OR (B) THAT ANY ADVERTISING, COMMERCIAL, WEB CONTENT, MEDIA PRESENTATION OR ANY OTHER MATERIAL PRODUCED, PUBLISHED, POSTED, PRESENTED, DISTRIBUTED OR PREPARED BY OR ON BEHALF OF SPONSOR OR ANY OF THE CONTEST PARTIES INFRINGES ON YOUR RIGHTS IN YOUR WORK AS CONTAINED IN YOUR VIDEO, AND (2) ANY AND ALL LIABILITIES, DAMAGES, LOSSES, COSTS AND EXPENSES (INCLUDING WITHOUT LIMITATION REASONABLE ACCOUNTANTS&prime; AND ATTORNEYS&prime; FEES) WHICH MAY BE SUSTAINED OR INCURRED BY SPONSOR OR ANY OF THE CONTEST PARTIES IN CONNECTION WITH ANY OF SUCH CLAIMS, DEMANDS, ACTIONS, SUITS OR PROCEEDINGS.</p><p class="guideline">6. SELECTION OF WINNERS: All entries will be judged as follows:</p><p class="guideline">Initial Round: All qualifying Videos will be judged by Sponsor during an initial round of judging based on the following criteria: (1) ability to capture viewers&prime; interest / creativity – 40%, (2) relevance to education technology – 20%, (3) adherence to Contest theme – 20%, and (4) technical quality – 20%. In the event of a tie, tied Videos will be re-judged in accordance with the above criteria. The top ten (10) Videos based on the scores received in this initial round of judging will become the ten (10) finalist entries (each a &quot;Finalist&quot;). All Finalists will be subject to verification, including without limitation verification of eligibility, compliance with these Official Rules and completion and submission of such waiver, authorization and/or release forms as Sponsor may deem appropriate in its sole discretion. If attempted notification is returned as undeliverable, if a Finalist cannot be verified or if a Finalist does not provide requested information or completed forms within five (5) days of Sponsor&prime;s request, such Finalist may be disqualified and an alternate entry may be selected as a Finalist.</p><p class="guideline">Final Round: The 10 Finalists&prime; Videos (as determined by the initial round of judging by Sponsor) will then be judged in the final stage of the Contest which will commence on or about November 12, 2010, and end on or about November 19, 2010 (or when the Judges have determined the winners) by a panel of five (5) judges (&prime;Judges&quot;) designated by Sponsor, which panel will be comprised of qualified education technology industry professionals, media representatives and other professionals who are not employed by or affiliated with AVerMedia in any way. The Finalists&prime; Videos also will be posted for public viewing at http://media.community.avercampus.com/page/avermedia-contest.html for approximately one week starting on or about 11/12/2010 at 12:00:01am ET. The winners will be selected by a judging process in which the Judges will evaluate each Finalist Video based on the following criteria (&quot;Judging Criteria&quot;): (1) originality and creativity – 40%, (2) relevance to education technology – 40%, and (3) adherence to Contest theme – 20%. In the event of a tie, the tie will be broken based on the highest score in the first Judging Criteria, continuing thereafter to each Judging Criteria in order, as necessary to break the tie. Entrants agree that Sponsor has the sole right to decide all matters and disputes arising from this Contest and that all decisions of Sponsor are final and binding.</p> <p class="guideline">7. PRIZES AND APPROXIMATE RETAIL VALUE: Grand Prize – One AVerPen Collaborative Learning Solution ClassPack, one AVerVision 355AF Document Camera, One AVerComm H300 Video Conferencing System and $2,000.00 cash. Second Prize - One AVerPen Collaborative Learning Solution ClassPack, one AVerVision 355AF Document Camera, One AVerComm H100 Video Conferencing System and $1,000 cash. Third Prize – One AVerPen Collaborative Learning Solution StarterPack, One AVerVision CP355 Document Camera, One AVerComm H100 Video Conferencing System and $500 cash. Approximate retail value (&quot;ARV&quot;) of each prize (including the cash portion thereof), based on product MSRP is $7,900 for the Grand Prize, $5,900 for the Second Prize, and $5,000 for the third prize.</p><p class="guideline">THE TOTAL ARV OF ALL PRIZES IN THIS CONTEST IS $18,800.00 (includes aggregate cash prizes of $3,500.00).</p><p class="guideline">Prizes consist only of those items listed as the prize. All prizes including cash/checks will be shipped to all winners within 30 days following the receipt of relevant tax information.</p><p class="guideline">8. GENERAL TERMS AND CONDITIONS: Each Entrant must have a valid Contest ID, telephone number and email address.  Winners are solely responsible for any and all taxes on their respective prizes, and will receive an IRS Form 1099 for the value of their prize. No substitution of prize is offered, and prizes are non-transferable. Winners will be required to submit a Form W-9 to Sponsor prior to prize distribution. Unclaimed prizes will not be awarded. If for any reason the Contest cannot be run or administered as planned, including without limitation as a result of infection by computer virus, unauthorized intervention, tampering, fraud, technical failure(s) or any other problems or causes of any kind which corrupt or affect the administration, security, fairness, integrity or proper conduct of the Contest, Sponsor reserves the right, at its sole discretion, to modify, cancel, terminate or suspend the Contest. This Contest is offered only in the United States and is governed by the laws of the State of California, notwithstanding any California or other conflict-of-law provisions to the contrary. All claims relating in any manner to this Contest must be brought and resolved in the federal or state courts located in Santa Clara County, California.</p><p class="guideline">Details of Sponsor&prime;s policy regarding personal information collected in connection with this Contest are contained in Sponsor&prime;s privacy policy located at http://www.averusa.com. By participating in the Contest, Entrant hereby agrees to Sponsor&prime;s collection and usage of Entrant&prime;s personal information and acknowledges that Entrant has read and accepted Sponsor&prime;s privacy policy.</p><p class="guideline">LEGAL WARNING: ANY ATTEMPT BY ANY INDIVIDUAL TO DELIBERATELY DAMAGE, DESTROY, TAMPER OR VANDALIZE ANY WEB SITE OR INTERFERE WITH THE OPERATION OF THIS CONTEST IS A VIOLATION OF CRIMINAL AND CIVIL LAWS AND THE SPONSOR RESERVES THE RIGHT TO SEEK DAMAGES AND VIGOROUSLY PURSUE ALL REMEDIES AGAINST ANY SUCH INDIVIDUAL TO THE FULLEST EXTENT PERMITTED BY LAW.</p><p class="guideline">Neither Sponsor nor any of the Contest Parties is or will be responsible for any typographical or clerical error in these Official Rules, or any inaccurate or incorrect data or information contained on the Web Site, or any error in the administration of the Contest or in the announcement of the prize winners. If there is a discrepancy or inconsistency between any disclosure(s) or other statement(s) on the Web Site (or in any other Contest materials) and the terms and conditions of these Official Rules, these Official Rules shall control.</p><p class="guideline">9. NOTIFICATION OF FINALISTS AND WINNERS: Finalists and potential winners will be notified by email and/or phone and will be required to complete, sign and return a Certificate of Eligibility/Liability Release or be disqualified, in which event an alternate Finalist may be selected. Each person (hereafter, a &quot;Participant&quot;) whose name, image, likeness or voice appears in any Video selected as a finalist must provide a signed Authorization and Release granting permission (a) for such Participant&prime;s name, image, likeness and voice to be included in such Video and (b) for Sponsor, its licenses, successors and assigns to display, post, publish, distribute, use, adapt, edit and/or modify such Video in any way, in any and all media anywhere in the world and for any purpose, without limitation and without notice to or any further approval from such Participant and without any compensation to such Participant. For each correspondence sent to Finalists and potential winners, the required information and the required signed documents must be received by Sponsor within five (5) days, and failure to comply within such five (5) day time period may result in disqualification. Sponsor assumes no responsibility for undeliverable emails resulting from any cause whatsoever, including without limitation any form of active or passive email filtering by a user&prime;s internet service provider and/or email client or insufficient space in user&prime;s email account to receive email. Return of any email as undeliverable may result in disqualification and an alternate be selected.</p><p class="guideline">Sponsor reserves the right, in its sole discretion, to require any Entrant as well as any Participant in any Video selected as a finalist to submit to a confidential background check to confirm eligibility and to help ensure that such Entrant or Participant will not reflect unfavorably on Sponsor or the Contest if such Video is displayed, posted, published, used or distributed by Sponsor. Sponsor may request that any Entrant or Participant sign and deliver a waiver form authorizing the release of personal and background information, and the failure or refusal of an Entrant or a Participant to sign and deliver such waiver form within the time specified by Sponsor will result in the corresponding Video becoming ineligible, in which event an alternate Video may be selected as a finalist Video.</p> <p class="guideline">By accepting a prize, the prize winner thereof agrees, and will agree in writing if requested, that such prize winner&prime;s Video will be deemed to be a Work Made For Hire under the Copyright laws of the United States, and if it cannot be so deemed or if requested by Sponsor, then the prize winner agrees to irrevocably assign and transfer to Sponsor all of such prize winner&prime;s right, title and interest in and to such Video, including without limitation all copyright and trademark rights which such prize winner may have therein in the United States and worldwide, for consideration, the receipt and sufficiency of which are acknowledged. Each Finalist hereby waives in favor of Sponsor all &quot;moral rights&quot; and any similar rights or legal principles which such Finalist may now or hereafter have to or in connection with such Finalist&prime;s Video. Sponsor shall have the right to alter, change or modify a Finalist Video in Sponsor&prime;s sole discretion. Upon request of Sponsor, each prize winner shall execute, acknowledge and deliver such additional instrument(s) of assignment as Sponsor may, in its sole discretion, determine to be reasonably necessary to fully vest or establish in Sponsor the ownership of all right, title and interest in and to the Video submitted by such prize winner, including all copyright and trademark rights which such prize winner may have therein in the United States and worldwide, and including a full and complete waiver of all &quot;moral rights&quot; therein. Any failure or delay by Sponsor to request such an instrument of assignment shall not constitute a waiver of Sponsor&prime;s rights hereunder, and Sponsor may rightfully request such an instrument of assignment at any time.</p> <p class="guideline">10. LIMITATION OF LIABILITY AND RELEASE: Sponsor and the Contest Parties disclaim any and all liability and responsibility of whatsoever kind or nature resulting from any user&prime;s participation in or attempt to participate in the Contest. No responsibility or liability is assumed by Sponsor or any of the Contest Parties for technical problems or technical malfunction arising in connection with any of the following occurrences which may affect the operation of the Contest or the integrity of any users&prime; computer system (including without limitation data and/or software on such user&prime;s computer system): hardware or software errors; faulty computer, telephone, cable, satellite, network, electronic, wireless or Internet connectivity or other online communication problems; errors or limitations of any Internet service providers, servers, hosts or providers; garbled, jumbled or faulty data transmissions; failure of any email transmissions to be sent or received; lost, late, delayed or intercepted email transmissions; inaccessibility of the web site in whole or in part; traffic congestion on the Internet or the web site; unauthorized human or electronic intervention of the operation of the Contest, including without limitation unauthorized tampering, hacking, theft, virus, bugs and/or worms; destruction of any aspect of the Contest; or the loss, miscount, misdirection, inaccessibility or unavailability of any email account used in connection with the Contest. Use of the Web Site is at user&prime;s own risk. Neither Sponsor nor any of the Contest Parties is or will be responsible for any personal injury or property damage or losses of any kind which may be sustained to user&prime;s or any other person&prime;s computer equipment (including without limitation data and/or software on such computer equipment) resulting from participation in the Contest, use of the Web Site, or accessing or downloading or uploading information from the Web Site or otherwise in connection with this Contest. By participating in this Contest, the Entrant releases Sponsor, the Contest Parties and their respective licensees, successors and assigns from any and all claims, damages and liabilities resulting from or relating to such Entrant&prime;s participation in the Contest.</p> <p class="guideline">Any and all disputes, claims and causes of action arising out of or in connection with this Contest shall be resolved individually, without resort to any form of class action. Any claim or cause of action arising out of or related to this Contest, the Contest Website, or these Official Rules must be filed within one (1) year after such claim or cause of action arose regardless of any statute, rule or law to the contrary. If any such claim or cause of action is not filed within such one (1) year period, such claim or cause of action shall be barred. ANY CLAIMS, JUDGMENTS AND/OR AWARDS SHALL BE LIMITED TO ACTUAL OUT-OF-POCKET COSTS AND EXPENSES INCURRED IN CONNECTION WITH ENTERING THIS CONTEST. ENTRANT HEREBY WAIVES ANY AND ALL RIGHTS OR CLAIMS TO ATTORNEYS&prime; FEES, AS WELL AS ANY AND ALL RIGHTS OR CLAIMS TO INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ENTRANT, IDENTIFIABLE PERSONS, OR THIRD PARTY PARTICIPANTS, WHETHER FORESEEABLE OR NOT AND REAGRDLESS OF WHETHER BASED ON CONTRACT OR TORT INCLUDING NEGLIGENCE OR ANY OTHER ALLEGED BASIS.</p> <p class="guideline">Potential Prize winners and the Participants in their Video (if applicable) must execute and return an Affidavit of Eligibility/Release of Liability and, unless prohibited by law, a Publicity Release within five (5) days of date of attempted notification. Noncompliance within this time period may result in disqualification and an alternate will be selected. Return of any prize/prize notification as undeliverable or noncompliance with these Official Rules will result in disqualification and an alternate will be selected.  Sponsor reserves the right to substitute a prize (or portion thereof) of comparable or greater value. Acceptance of a prize constitutes permission to Sponsor and its respective designees, licensees and affiliates to use the winner&prime;s name, city and state of residence, voice, likeness and interview for purposes of advertising and trade in any and all media now or hereafter devised worldwide in perpetuity, without further compensation, notification or permission, unless prohibited by law. By accepting a prize, winner agrees to hold Sponsor and the Contest Parties harmless from and against any and all claims and liability arising out of use of any prize.</p> <p class="guideline">11. LIST OF WINNERS; OFFICIAL RULES: For a list of the Finalists and the Prize Winners, or for a copy of the Official Rules, send your request with a self-addressed, stamped envelope to be received by 12/15/2010 to: 2010 AVerMedia 21st Century Classroom Video Contest (specify Winners&prime; List or Official Rules), 423 Dixon Landing Road, Milpitas, CA 95035. The names of the Grand Prize, Second Prize and Third Prize winners also will be available, upon completion of winner verification, for a minimum of two weeks, at http://media.community.avercampus.com/page/avermedia-contest.html.</p> <p class="guideline">12. SPONSOR: Sponsor is AVerMedia Information, Inc., 423 Dixon Landing Road, Milpitas, CA 95035.<br /></p></div></div>').after('<p class="guideline">Contest is now closed for submissions. All finalists will be notified by <b>November 15</b>, and will at that time be required to submit release forms (<a title="General Assignment" href="http://www.avercampus.com/file/assignment_2010.pdf" target="_blank">General Assignment</a> , <a title="Authorization and Personal Release Form" href="http://www.avercampus.com/file/authorization_and_release_form_2010.pdf" target="_blank">Authorization and Personal Release Form</a>), so the videos can be posted public. Finalist videos will be posted to the Video Contest page by <b>December 3</b>. Good luck to everyone!</p><div id="contestFooter">Copyright &copy; 1991-2010 AVerMedia Inc. All rights reserved.</div>');	
		$j('#ka_uploadHelp').insertAfter('#ka_fileTr');
		$j('#uploadbutton').attr('value','Contest is now closed for submissions!');
		
		$j('#termsOfUse').insertBefore('#ka_videoSubmit').wrap('<div id="acceptWrapper"></div>');
		$j('#termsOfUse').after('<span>I accept the Official Rules.</span>');
		$('fieldVideoUpReq').getElementsByTagName('li')[5].innerHTML = "";
		
		/*
		$j('input#mediaName').attr('required','true');
		Ka.formValidation.messages.titleError = "Title is required.";
		$j('input#mediaName').attr('errorkey', 'titleError'); 
		
		$j('#mediaDescription').attr('required','true');
		Ka.formValidation.messages.descriptionError = "Description is required.";
		$j('#mediaDescriptione').attr('errorkey', 'descriptionError'); 
		*/ 
		
		$j('#termsOfUse').attr('required','true');
		Ka.formValidation.messages.acceptError = "You must accept the Official Rules."
		$j('#termsOfUse').attr('errorkey', 'acceptError'); 
		
		$('fieldVideoUpReq').getElementsByTagName('label')[1].innerHTML = "Upload Video:";

		$j('body').show();	
	} else {
		$j('body').show();	
	}	
}

//thank you page (my videos success page)
if(document.referrer.indexOf("&param=uploadToContest") > -1) {
	if (Ka.Info.PAGE == "pages/manageVideo.jsp") {
		$j('body').addClass('contestPage');
		/*
		if(Ka.Info.USERNAME != 'avercmadmin') {
			$j('#ka_headerBtmNav').hide();
		}
		*/
		
		$j('#navLogo').after('<ul id="contestNav"><li id="nav_home"><a href="http://media.community.avercampus.com/page/avermedia-contest.html">home</a></li><li id="nav_createAccount"><a href="http://www.avercampus.com/video-contest-create-account.asp">create account</a></li><li id="nav_login"><a href="http://www.avercampus.com/video-contest-login.asp">log in</a></li><li id="nav_upload" class="current"><a href="http://media.community.avercampus.com/service/displayVideoUpload.kickAction?as=153709&param=uploadToContest">upload video</a></li><li id="nav_guidelines"><a href="http://media.community.avercampus.com/page/avermedia-contest-guidelines.html">guidelines</a></li></ul>');
		//$j('#noAdWrapper li').hide();
		$j('#ka_mainContainer').prepend('<div id="contestHomeMsg"><img src="http://www.avercampus.com/images/contestPromo.jpg" /></div><h3>Upload contest video:</h3><div id="contestContent"><p class="guideline">Thank you for submitting your video for the 2010 AVerMedia Interactive Classroom Video Contest. If your submission is selected as a finalist, you will be notified by phone and or email following the selection. Thank you and good luck!</p><p class="guideline"><a href="http://media.community.avercampus.com/service/displayHomePageExperience.kickAction?page=Homepage&as=153709">Click here to return to AVerCampus</a></p><div id="contestFooter">Copyright &copy; 1991-2010 AVerMedia Inc. All rights reserved.</div></div>');

		$j('body').show();
	}
} else {
	if (Ka.Info.PAGE == "pages/manageVideo.jsp") {
		$j('body').show();
	}
}

//contest play page
if((document.referrer == "http://media.community.avercampus.com/page/avermedia-contest-winner.html") || (document.referrer == "http://media.community.avercampus.com/page/avermedia-contest.html") || (window.location.href.indexOf("widgetId=392299") != -1)) {
	if (Ka.Info.PAGE == "pages/mediaPlayPage.jsp") {
		$j('body').addClass('contestPage');
		/*
		if(Ka.Info.USERNAME != 'avercmadmin') {
			$j('#ka_headerBtmNav').hide();
		}
		*/
		
		$j('#navLogo').after('<ul id="contestNav"><li id="nav_home"><a href="http://media.community.avercampus.com/page/avermedia-contest.html">home</a></li><li id="nav_createAccount"><a href="http://www.avercampus.com/video-contest-create-account.asp">create account</a></li><li id="nav_login"><a href="http://www.avercampus.com/video-contest-login.asp">log in</a></li><li id="nav_upload"><a href="http://media.community.avercampus.com/service/displayVideoUpload.kickAction?as=153709&param=uploadToContest">upload video</a></li><li id="nav_guidelines"><a href="http://media.community.avercampus.com/page/avermedia-contest-guidelines.html">guidelines</a></li></ul>');
		$j('#ka_mainContainer').prepend('<div id="contestHomeMsg"><img src="http://www.avercampus.com/images/contestPromoFinalists.jpg" /></div><h3></h3>');
		$j('#ka_contentContainer').append('<div id="contestFooter">Copyright &copy; 1991-2010 AVerMedia Inc. All rights reserved.</div>');
		$j('#ka_leftColumn h2').prependTo('#ka_uploadedby');
		$j('#ka_upMeta').wrap('<div id="ka_upMetaWrapper"></div>');
		$j('#currentRatingArea').appendTo('#ka_upMetaWrapper');
		$j('.ka_stats_views').appendTo('#ka_upMetaWrapper');
		
		var el = $j('.ka_stats_views');
		el.html(el.html().replace(/Views:/ig, "<b>Views:</b>"));
		
		$j('#currentRatingArea').prepend('<span id="ratingTitle"><b>Ratings:</b></span>');
		
		// updating Flashvars for KA widgets
		$j(window).load(function () {
	
			$j('#ka_playPagePlayer').html('<span id="ka_playPagePlayer_inner"></span>');
			var flashvars = {
				affiliateSiteId: Ka.Info.AFFILIATESITEID,
				widgetId: 392642,
				mediaType_mediaID: "video_" + Ka.Info.MEDIAID,
				width: 500,
				height: 320
				//js: '1'
			}
			var params = {
				menu: "false",
				allowfullscreen: "true",
				allowscriptaccess: "always",
				wmode: "transparent"
			};
			var attributes = {
				id: "kickWidget_1_" + 392642
			};
			var expressInstallURL = "http://serve.a-widget.com/kickapps/kickFlash/scripts/expressInstall2.swf";
			var swfURL = "http://serve.a-widget.com/service/getWidgetSwf.kickAction";
			swfobject.embedSWF(swfURL, "ka_playPagePlayer_inner", "500px", "320px", "9.0.28", expressInstallURL, flashvars, params, attributes);
			$j('#ka_playPagePlayer').show();
		});
		
		$j('body').show();
	}
} else {
	if (Ka.Info.PAGE == "pages/mediaPlayPage.jsp") {
		$j('body').show();
	}
}

if(Ka.Info.USERNAME == '') {
	$j('body.contestPage #nav_upload a').attr('href', 'http://www.avercampus.com/video-contest-login.asp');
}

if(Ka.Info.USERNAME != '') {
		$j('body.contestPage #ka_login_area').append('<li class="ka_signout"><a href="http://community.avercampus.com/login/logout?&redirectURL=http://media.community.avercampus.com/page/avermedia-contest.html">sign out</a></li>');
}
