var t = {}; var animation = 0; /** * Tracer "t" Holds functionality for the tracer website * @namespace */ //function showAlert() { // alert('alert from main'); // pictureAddNew(); //} /** * @namespace init initialize the page */ t.init = function() { // init page t.ui.init(jQuery("body")); t.nav.init(); } /** * @namespace nav handle the navigation */ t.nav = (function() { var init = function() { navControl(); menuControl(); }; var hoverOn = function(jqLink) { jqLink.parent().addClass("hover"); //jqLink. } var hoverOff = function(jqLink) { jqLink.parent().removeClass("hover"); //jqLink. } var menuControl = function() { // signin jQuery(".signInLink").click( function(e) { e.stopPropagation(); e.preventDefault(); jQuery("#signInOverlay").show(); jQuery("#signInOverlay form").submit(function(e){ e.preventDefault(); jQuery.post(root + '/?showtemplate=false', jQuery('#signInOverlay form').serialize(), function(data, textStatus, jqXHR) { if( data.indexOf("!doctype") > 0 ) { location.reload(); } else { jQuery("#signInForm").html(data); jQuery(".signInLink").click(); } }); }); }); //jQuery("#me69c0feu_input_username").css("width","200px"); //jQuery("#me69c0feu_input_password").css("width","200px"); jQuery("#signInOverlay").click(function(e) { e.stopPropagation(); }); }; var menuReset = function() { jqSigninOverlay.css({ left: -9999 }); jqJoinOverlay.css({ left: -9999 }); }; var navControl = function() { if (location.href.indexOf("cart_submit") >= 0) jQuery(".nav .active").removeClass("active"); jQuery(".nav .prmy a").hover( function() { hoverOn(jQuery(this)); }, function() { hoverOff(jQuery(this)); } ); }; return { "init": init } } ()); /** * @namespace ui */ t.ui = (function() { var init = function(context) { jQuery(".greyed_effect").hover(function () { jQuery(".greyed_effect").addClass("greyedOut"); //jQuery(".greyed_effect").find('a').addClass("secondaryButton").removeClass("primaryButton"); jQuery(this).removeClass("greyedOut");; //jQuery(this).find('a').addClass("primaryButton").removeClass("secondaryButton"); }); }; var initPngFix = function(context) { jQuery("img", context).supersleight(); }; return { 'init': init } } ()); var tracer; var thumbView; var showTab; root = ('https:' == document.location.protocol? 'https://' : 'http://') + document.domain; function popUp(URL, width, height) { width = width || 960; height = height || 900; var New_Window = window.open(URL, "New_Window", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height); New_Window.moveTo(200, 200); return false; } function gcCheck() { if (jQuery('#text_input2').val() == "" ) return confirm("Do you want to continue without entering text?"); } jQuery(document).ready(function() { t.init(); });