
var PRPL={};Shadowbox.loadSkin('classic','http://dev.abstraktdesigns.com/wp-content/themes/purple/js/shadowbox_skin');$(document).ready(function()
{Shadowbox.init({enableKeys:false,overlayOpacity:'.90',resizeDuration:'.4',animSequence:'sync',overlayColor:"#000000",displayNav:true,modal:true});if(window.location.href.search('referrer=hydra')!=-1)
{Shadowbox.open({player:'html',content:'<div><h2 class="hdr" id="hdr_hey_there">Hey There! Let\'s Catch Up</h2><p><strong>Hydra Studio</strong> is now <strong>Abstrakt Designs.</strong> Why? We\'ve grown. And Abstrakt Designs is an encapsulation of our growth. It\'s the same faces, with a new name. Welcome to our new brand.</p></div>',height:180,width:415});}
var moneyshotTabs=$('.moneyshots').tabs({collapsible:false,fx:{opacity:'toggle'}});moneyshotTabs.tabs('rotate',5000,false);$('.tabs').tabs({collapsible:false,fx:{opacity:'toggle'}});$('.moneyshots .video a:not(".more_money")').click(function()
{moneyshotTabs.tabs('rotate',0,false);var rel=$(this).attr('rel');var videoTag=$(this).next('.money_video').html();var height=420;var heightRegex=new RegExp('height=([0-9]{1,})');if(heightRegex.test(rel)){height=heightRegex.exec(rel);height=height[1];}
Shadowbox.open({enableKeys:true,player:'html',content:'<div>'+videoTag+'</div>',height:height,width:620});return false;});$('.tabs a').click(function()
{if($(this).hasClass("off"))
{$(this).parent().parent().find('a').removeClass('on').addClass('off');$(this).removeClass('off').addClass('on');var targetDiv=$(this).attr('href');$('.media_column > div:visible').fadeOut('fast',function()
{$(targetDiv).fadeIn();});}
return false;});PRPL.hideProjects=function(category)
{PRPL.checkEmptyChecks();$('.project').fadeOut('fast',function()
{PRPL.cleanUpProjects();$('#project_options input:checked').each(function()
{var checkedCategory=$(this).attr('name');PRPL.showProjects(checkedCategory);});});};PRPL.checkEmptyChecks=function()
{var projectCount=$('#project_options input:checked').size();if(projectCount===0)
{$('.message').fadeIn();}
else
{$('.message').hide();}};$('#s, #newsletter_email').each(function()
{var fieldName=$(this).attr('name');PRPL[fieldName]=new PRPL.formEraserHelper($(this));});PRPL.cleanUpProjects=function()
{$('#projects .clear').remove();var i=0;$('#projects .project:visible').each(function()
{i++;if(i==3)
{$('<div class="clear"></div>').insertAfter(this);i=0;}});};PRPL.showProjects=function(category)
{PRPL.checkEmptyChecks();$('#projects .'+category).each(function()
{$('.'+category+':hidden').fadeIn('slow',function()
{PRPL.cleanUpProjects();});});};PRPL.appendIdentity=function()
{$('.identity a').each(function()
{var urlString=$(this).attr('href');var fixedURL=urlString.replace('?tab=identity','');var newURL=fixedURL+'?tab=identity';$(this).attr('href',newURL);});};PRPL.removeIdentity=function()
{$('.identity a').each(function()
{var urlString=$(this).attr('href');var newURL=urlString.replace('?tab=identity','');$(this).attr('href',newURL);});};$('#project_options input').change(function()
{var category='';if($(this).attr('checked')===true)
{category=$(this).attr('name');PRPL.showProjects(category);}
else
{category=$(this).attr('name');PRPL.hideProjects(category);}
if($('#checkbox_identity').attr('checked')===true&&$('#checkbox_web').attr('checked')===false)
{PRPL.appendIdentity();}
else
{PRPL.removeIdentity();}});});PRPL.formEraserHelper=function(fieldObj)
{var obj=this;this.fieldObj=fieldObj;this.initialValue=this.fieldObj.val();this.fieldObj.focus(function()
{if($(this).val()==obj.initialValue)
{$(this).val('');}});this.fieldObj.blur(function()
{if($(this).val()==='')
{$(this).val(obj.initialValue);}});};