     $(document).ready(function () {
             $(".hidden-shown").hover(function () {
                     $(this).find('.shown').hide();
                     $(this).find('.hidden').show();
                 }, function () {
                     $(this).find('.shown').show();
                     $(this).find('.hidden').hide();
                 });

             // Social network icons
             $(".li-icon").click(function(){
                     _gaq.push(['_trackSocial', 'LinkedIn', 'Page Visit']);
                     window.open("http://www.linkedin.com/company/logic-supply");
                 });
             $(".tw-icon").click(function(){
                     _gaq.push(['_trackSocial', 'Twitter', 'Page Visit']);
                     window.open("http://twitter.com/#!/LogicSupply");
                 });
             $(".fb-icon").click(function(){
                     _gaq.push(['_trackSocial', 'Facebook', 'Page Visit']);
                     window.open("http://www.facebook.com/LogicSupply");
                 });
             $(".yt-icon").click(function(){
                     _gaq.push(['_trackSocial', 'YouTube', 'Page Visit']);
                     window.open("http://www.youtube.com/user/logicsupply");
                 });
             
             
             // Track twitter tweets
             try {
                 twttr.events.bind('tweet', function(event) {
                         if (event) {
                             _gaq.push(['_trackSocial', 'Twitter', 'Tweet', window.location.href]);
                         }
                     });
             } catch(e) {
                 return;
             }
         });

// Facebook like button analytic tracking
window.fbAsyncInit = function() {
    try{
    FB.init({appId: '274004202613780', status: true, cookie: true,
             xfbml: true});
    FB.Event.subscribe('edge.create', function(href, widget) {
            _gaq.push(['_trackSocial', 'Facebook', 'Like', href]);
        });
    FB.Event.subscribe('edge.remove', function(href, widget) {
            _gaq.push(['_trackSocial', 'Facebook', 'Unlike', href]);
        });
    } catch(e) {
        return;
    }
};

// Google +1 button code
(function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();

function popWin(url, width, height){
    var params = "width=" + width + ",height=" + height +
        ",toolbar=no,menubar=no,status=no,directories=no,scrollbars=yes";
    window.open(url, '', params);
}

function getRaqUrl(model, name){
    var url = "/request-a-quote.php";
    if(model == null){
        var params = "";
    } else {
        var params = "?model=" + model + "&name=" + escape(name);
        
        jQuery(".anti_option").each(function(){
                if(!(jQuery(this).text() == "Not available for this mainboard" || jQuery(this).text() == "Not available for this mainboard ")){ 
                    var noPrice = jQuery(this).text().split(/\[[ol]/);
                    var label = jQuery(this).parent().parent().parent().find("label").text();
                    params += "&option[" + escape(label) + "]=" + escape(noPrice[0]);
                }
            });
        jQuery("#product_information__purchasing_information select :selected").each(function(){
                if(!(jQuery(this).text() == "None" || jQuery(this).text() == "None ")){ 
                    var noPrice = jQuery(this).text().split(/\([+-]/);
                    noPrice = noPrice[0].split(/\[[ol]/);
                    var label = jQuery(this).parent().parent().parent().find("label").text();
                    params += "&option[" + escape(label) + "]=" + escape(noPrice);
                }
            });
    }
    return url + params;
}


