

/** 
* @filepath: /photo-display/photo-display.js
* @timestamp: 1268028215
*/

$(document).ready(function(){$('#baselocation, #preffunction, #prefindustry, #nationality').sSelect({ddMaxHeight:'300px'}).change(function(){return false;});if($("#baselocation option:selected").val()=='3737'){$('.photoCarouselContainer').append('<a id="buyPoster" href="http://www.oscars.org/academy/posters-books/posters/82awards.html" target="_blank">Buy </a>');}});

/** 
* @filepath: /theme-gallery/theme-gallery.js
* @timestamp: 1268028215
*/

$(function(){var photoCounter=0;var totalPhotos=$('ul.jcarousel-list li').length;var initPhotoStrip=function(){var nextOffset=$('#list-next').offset();var selectedImageOffset=$('ul.jcarousel-list li.selected').offset();var factor=1;var container=$('ul.jcarousel-list');if($('ul.jcarousel-list li').length>4){var fourthImage=$('ul.jcarousel-list li').eq(3);var fourthImageOffset=fourthImage.offset();if((!container.is(':animated'))&&(selectedImageOffset.left>fourthImageOffset.left)){$('a#list-previous').removeClass('disabled');var slideMultiple=(Math.ceil((selectedImageOffset.left-fourthImageOffset.left)/292)+0);var amtToSlide=slideMultiple*292;container.animate({left:"-="+amtToSlide+"px"},500);}}}
var reset=function(){var container=$("ul.jcarousel-list");photoCounter=(((parseInt(container.css("left")))/-100));if((!container.is(':animated'))&&(parseInt(container.css("left"))<0)){var slideAmount=(photoCounter)*73;container.animate({left:"+="+slideAmount+"px"},500);}}
var slideLeft=function(){var container=$("ul.jcarousel-list");photoCounter=(((parseInt(container.css("left")))/-73));if((!container.is(':animated'))&&(parseInt(container.css("left"))<0)){var slideAmount=((photoCounter-4)>=0)?292:((photoCounter)*73);container.animate({left:"+="+slideAmount+"px"},500);if(photoCounter<=4){$(this).addClass('disabled');}else{$(this).removeClass('disabled');}
if(parseInt(container.css("left"))<0){$('#list-next').removeClass('disabled');}else{$('#list-next').addClass('disabled');}}}
var slideRight=function(slideMultiple){var container=$("ul.jcarousel-list");photoCounter=(((parseInt(container.css("left")))/-73));var lastImage=$('ul.jcarousel-list li:last');var lastImageOffset=lastImage.offset();var containerOffset=$('#list-previous').offset();if(!container.is(":animated")&&(totalPhotos>photoCounter+4)){var slideAmount=((totalPhotos/(photoCounter+4))>1)?292:((totalPhotos%(photoCounter))*73);container.animate({left:"-="+slideAmount+"px"},500);if((lastImageOffset.left-containerOffset.left)<500){$(this).addClass('disabled');}else{$(this).removeClass('disabled');}
if((totalPhotos-photoCounter)>4){$('#list-previous').removeClass('disabled');}else{$('#list-previous').addClass('disabled');}}}
$('#list-previous').click(slideLeft);$('#list-next').click(slideRight);initPhotoStrip();$('#photoGameOn').mouseover(function(){$('#photo-previous').show();$('#photo-next').show();});$('#photoGameOn').mouseout(function(){$('#photo-previous').hide();$('#photo-next').hide();});});function changeGalleryImage(obj,url){try{if(obj){var index=obj.selectedIndex;var imageNum=obj.options[index].value;if(imageNum!=''){url=url+imageNum;window.location=url;}}}catch(e){}}

/** 
* @filepath: /utils/stylish-select.js
* @timestamp: 1268028215
*/

(function($){$('html').addClass('stylish-select');Array.prototype.indexOf=function(obj,start){for(var i=(start||0);i<this.length;i++){if(this[i]==obj){return i;}}}
$.fn.extend({getSetSSValue:function(value){if(value){$(this).val(value).change();return this;}else{return $(this).find(':selected').val();}},resetSS:function(){var oldOpts=$(this).data('ssOpts');$this=$(this);$this.next().remove();$this.unbind().sSelect(oldOpts);}});$.fn.sSelect=function(options){return this.each(function(){var defaults={defaultText:'Please select',animationSpeed:0,ddMaxHeight:''};var opts=$.extend(defaults,options),$input=$(this),$containerDivText=$('<div class="selectedTxt"></div>'),$containerDiv=$('<div class="newListSelected" tabindex="0"></div>'),$newUl=$('<ul class="newList"></ul>'),itemIndex=-1,currentIndex=-1,keys=[],prevKey=false,prevented=false,$newLi;$(this).data('ssOpts',options);$containerDiv.insertAfter($input);$containerDivText.prependTo($containerDiv);$newUl.appendTo($containerDiv);$input.hide();if($input.children('optgroup').length==0){$input.children().each(function(i){var option=$(this).text();var key=$(this).val();keys.push(option.charAt(0).toLowerCase());if($(this).attr('selected')==true){opts.defaultText=option;currentIndex=i;}
$newUl.append($('<li><a href="JavaScript:void(0);">'+option+'</a></li>').data('key',key));});$newLi=$newUl.children().children();}else{$input.children('optgroup').each(function(){var optionTitle=$(this).attr('label'),$optGroup=$('<li class="newListOptionTitle">'+optionTitle+'</li>');$optGroup.appendTo($newUl);var $optGroupList=$('<ul></ul>');$optGroupList.appendTo($optGroup);$(this).children().each(function(){++itemIndex;var option=$(this).text();var key=$(this).val();keys.push(option.charAt(0).toLowerCase());if($(this).attr('selected')==true){opts.defaultText=option;currentIndex=itemIndex;}
$optGroupList.append($('<li><a href="JavaScript:void(0);">'+option+'</a></li>').data('key',key));})});$newLi=$newUl.find('ul li a');}
var newUlHeight=$newUl.height(),containerHeight=$containerDiv.height(),newLiLength=$newLi.length;if(currentIndex!=-1){navigateList(currentIndex,true);}else{$containerDivText.text(opts.defaultText);}
function newUlPos(){var containerPosY=$containerDiv.offset().top,docHeight=jQuery(window).height(),scrollTop=jQuery(window).scrollTop();if(newUlHeight>parseInt(opts.ddMaxHeight)){newUlHeight=parseInt(opts.ddMaxHeight);}
containerPosY=containerPosY-scrollTop;if(containerPosY+newUlHeight>=docHeight){$newUl.css({top:'-'+newUlHeight+'px',height:newUlHeight});$input.onTop=true;}else{$newUl.css({top:containerHeight+'px',height:newUlHeight});$input.onTop=false;}}
newUlPos();$(window).resize(function(){newUlPos();});$(window).scroll(function(){newUlPos();});function positionFix(){$containerDiv.css('position','relative');}
function positionHideFix(){$containerDiv.css('position','static');}
$containerDivText.click(function(event){event.stopPropagation();$('.newList').not($(this).next()).hide().parent().removeClass('newListSelFocus');$newUl.toggle();positionFix();$newLi.eq(currentIndex).focus();});$newLi.click(function(e){var $clickedLi=$(e.target);currentIndex=$newLi.index($clickedLi);prevented=true;navigateList(currentIndex);$newUl.hide();$containerDiv.css('position','static');});$newLi.hover(function(e){var $hoveredLi=$(e.target);$hoveredLi.addClass('newListHover');},function(e){var $hoveredLi=$(e.target);$hoveredLi.removeClass('newListHover');});function navigateList(currentIndex,init){$newLi.removeClass('hiLite').eq(currentIndex).addClass('hiLite');if($newUl.is(':visible')){$newLi.eq(currentIndex).focus();}
var text=$newLi.eq(currentIndex).text();var val=$newLi.eq(currentIndex).parent().data('key');if(init==true){$input.val(val);$containerDivText.text(text);return false;}
$input.val(val)
$input.change();$containerDivText.text(text);};$input.change(function(event){$targetInput=$(event.target);if(prevented==true){prevented=false;return false;}
$currentOpt=$targetInput.find(':selected');currentIndex=$targetInput.find('option').index($currentOpt);navigateList(currentIndex,true);});function keyPress(element){element.onkeydown=function(e){var keycode;if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
prevented=true;switch(keycode)
{case 40:case 39:incrementList();return false;break;case 38:case 37:decrementList();return false;break;case 33:case 36:gotoFirst();return false;break;case 34:case 35:gotoLast();return false;break;case 13:case 27:$newUl.hide();positionHideFix();return false;break;}
keyPressed=String.fromCharCode(keycode).toLowerCase();var currentKeyIndex=keys.indexOf(keyPressed);if(typeof currentKeyIndex!='undefined'){++currentIndex;currentIndex=keys.indexOf(keyPressed,currentIndex);if(currentIndex==-1||currentIndex==null||prevKey!=keyPressed)currentIndex=keys.indexOf(keyPressed);navigateList(currentIndex);prevKey=keyPressed;return false;}}}
function incrementList(){if(currentIndex<(newLiLength-1)){++currentIndex;navigateList(currentIndex);}}
function decrementList(){if(currentIndex>0){--currentIndex;navigateList(currentIndex);}}
function gotoFirst(){currentIndex=0;navigateList(currentIndex);}
function gotoLast(){currentIndex=newLiLength-1;navigateList(currentIndex);}
$containerDiv.click(function(){keyPress(this);});$containerDiv.focus(function(){$(this).addClass('newListSelFocus');keyPress(this);});$containerDiv.blur(function(){$(this).removeClass('newListSelFocus');});$('body').click(function(){$containerDiv.removeClass('newListSelFocus');$newUl.hide();positionHideFix();});$containerDivText.hover(function(e){var $hoveredTxt=$(e.target);$hoveredTxt.parent().addClass('newListSelHover');},function(e){var $hoveredTxt=$(e.target);$hoveredTxt.parent().removeClass('newListSelHover');});$newUl.css('left','0').hide();});};})(jQuery);
